-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
303 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,35 @@ | ||
<script src="{{ '/assets/vendor/siema.min.js' | url }}"></script> | ||
<script src="{{ '/assets/vendor/flickity.min.js' | url }}"></script> | ||
<link rel="stylesheet" href="{{ '/assets/vendor/flickity.min.css' | url }}"/> | ||
|
||
<div class="container mx-auto pt-6"> | ||
<h2 class="text-center text-4xl tracking-tight font-bold pb-2">Archival Materials</h2> | ||
<div class="link text-center mb-6"> | ||
<a href="{{ '/browse/items' | url }}" class="text-base-content link hover:text-secondary text-sm">View All ({{ items.size }})</a> | ||
</div> | ||
<div class="mx-auto text-center pb-6"> | ||
<button class="prev-items h-8 w-8 md:h-12 md:w-12 md:-mr-2 text-accent hover:text-neutral-content tooltip tooltip-left" data-tip="Previous">{% include "svg/arrow-left.svg" %}</button> | ||
<button class="next-items h-8 w-8 md:h-12 md:w-12 text-accent hover:text-neutral-content tooltip tooltip-right" data-tip="Next">{% include "svg/arrow-right.svg" %}</button> | ||
<button class="prev-item h-8 w-8 md:h-12 md:w-12 md:-mr-2 text-accent hover:text-neutral-content tooltip tooltip-left" data-tip="Previous">{% include "svg/arrow-left.svg" %}</button> | ||
<button class="next-item h-8 w-8 md:h-12 md:w-12 text-accent hover:text-neutral-content tooltip tooltip-right" data-tip="Next">{% include "svg/arrow-right.svg" %}</button> | ||
</div> | ||
<div class="siema" id="siema-items"> | ||
<div id="items-carousel" class="w-full"> | ||
{%- for item in items -%} | ||
<div class="px-6"> | ||
<div class="p-4 w-52 h-fit"> | ||
{% include "partials/item-card.html" %} | ||
</div> | ||
{%- endfor -%} | ||
</div> | ||
</div> | ||
|
||
<script> | ||
var itemSiema = new Siema({ | ||
selector: '#siema-items', | ||
perPage: { | ||
200: 2, | ||
500: 4, | ||
800: 5, // 2 items for viewport wider than 800px | ||
1240: 6 // 3 items for viewport wider than 1240px | ||
}, | ||
duration: 200, | ||
easing: 'ease-in', | ||
draggable: true, | ||
multipleDrag: true, | ||
threshold: 20, | ||
loop: true, | ||
var itemCarousel = new Flickity('#items-carousel', { | ||
wrapAround: true, | ||
cellAlign: 'left', | ||
imagesLoaded: true, | ||
prevNextButtons: false, | ||
pageDots: false, | ||
lazyLoad: true, | ||
pauseAutoPlayOnHover: false, | ||
autoPlay: 2500 | ||
}); | ||
document.querySelector('.prev-items').addEventListener('click', () => itemSiema.prev()); | ||
document.querySelector('.next-items').addEventListener('click', () => itemSiema.next()); | ||
document.querySelector('.prev-item').addEventListener('click', () => itemCarousel.previous()); | ||
document.querySelector('.next-item').addEventListener('click', () => itemCarousel.next()); | ||
</script> |
Oops, something went wrong.