Add shortcode to add a resized image of the NumPy comic #834
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief description of what is fixed or changed
Hi all,
#795 already adds a link to the NumPy comic in the Contribute page.
I want to add a version that add an image of the comic. While I could add the image directly with #795, there is no way to easily resize the image across a variety of browser sizes and devices.
This shortcode adds a comic.html so that CSS can automatically resize the image. This format is used elsewhere in the NumPy
Alternative implementation
There is also an option to embed a flippable version of the comic directly on the Contribute page. This is how Heyzine (the flipbook host) provides their embed option through the
iframe
tag.I haven't tested out yet if NumPy website works nice with iframe.