feat: add multi image support for hextra/hero-container with Swiper #676
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.
Context of this feature
On my website I have some sections where I use hextra/hero-container to display text followed by an image, but there came a time when I wanted to put several but I didn't want to add a lot of code
Modified files
hextra-home: Added the "useSwiper" parameter to make this feature optional and not disrupt the current workflow and scripts needed to make the swiper work, also It can easily be applied to index
hextra/hero-container: I rewrote the code to convert all image inputs into lists, so as not to disturb projects using olders versions
"image.html": generic template for images based on hextra/hero-container
hero-container structure
I use Swiper because of how simple it is to use, and has a lot of more options.
(in testing) Sintax
and it would be the same for others, using the "*" structure as delimiters
Note: My English isn't very good, so I'll use a translator to write this.