Skip to content

Commit

Permalink
styling updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mnyrop committed Apr 8, 2024
1 parent 239ca1f commit 570a799
Show file tree
Hide file tree
Showing 19 changed files with 303 additions and 217 deletions.
17 changes: 3 additions & 14 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,12 @@ module.exports = function(eleventyConfig) {
'./node_modules/siema/dist/siema.min.js': '/assets/vendor/siema.min.js'
})
.addPassthroughCopy({
'./node_modules/leaflet-iiif/leaflet-iiif.js': '/assets/vendor/leaflet-iiif.js'
'./node_modules/flickity/dist/flickity.pkgd.min.js': '/assets/vendor/flickity.min.js'
})
.addPassthroughCopy({
'./node_modules/leaflet-sleep/Leaflet.Sleep.js': '/assets/vendor/leaflet-sleep.js'
'./node_modules/flickity/dist/flickity.min.css': '/assets/vendor/flickity.min.css'
})
.addPassthroughCopy({
'./node_modules/leaflet/dist/leaflet.css': '/assets/vendor/leaflet.css'
})
.addPassthroughCopy({
'./node_modules/leaflet.fullscreen/Control.FullScreen.js': '/assets/vendor/leaflet-fullscreen.js'
})
.addPassthroughCopy({
'./node_modules/leaflet.fullscreen/Control.FullScreen.css': '/assets/vendor/leaflet-fullscreen.css'
})
.addPassthroughCopy({
'./node_modules/leaflet.fullscreen/icon-fullscreen.svg': '/assets/vendor/icon-fullscreen.svg'
})


return {
markdownTemplateEngine: 'liquid',
Expand Down
100 changes: 88 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
},
"dependencies": {
"clean-css": "^5.2.4",
"flickity": "^3.0.0",
"html-minifier": "^4.0.0",
"leaflet": "^1.9.4",
"leaflet-iiif": "^3.0.0",
"leaflet-sleep": "^0.5.2",
"leaflet.fullscreen": "^3.0.0",
"moment": "^2.29.1",
"siema": "^1.5.1"
"moment": "^2.29.1"
}
}
27 changes: 1 addition & 26 deletions site/_data/site.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,7 @@
},
{
"label": "Exhibit Essays",
"sub": [
{
"label": "1: Origins",
"link": "/exhibits/1"
},
{
"label": "2: A Chicano Studies Library",
"link": "/exhibits/2"
},
{
"label": "3: Labels & Systems: We Built Our Own",
"link": "/exhibits/3"
},
{
"label": "4: Library as Place",
"link": "/exhibits/4"
},
{
"label": "5: Ethnic Studies Library Transition",
"link": "/exhibits/5"
},
{
"label": "6: Impact & Future….",
"link": "/exhibits/6"
}
]
"link": "/browse/exhibits"
},
{
"label": "Browse the Collection",
Expand Down
36 changes: 18 additions & 18 deletions site/_includes/components/heros/exhibits-carousel.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<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="not-prose text-neutral-content mx-[calc(50%-50vw)] my-8 w-auto">
<h2 class="text-center text-4xl tracking-tight font-bold pb-2">Exhibit Essays</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 ({{ collections.exhibit.size }})</a>
</div>
<div class="mx-auto text-center">
<button class="prev-exhibit 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-exhibit 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="hero block">
<div class="hero-content mx-auto">
<div id="siema-exhibits" class="siema">
<div id="exhibits-carousel" class="w-full">
{%- for exhibit in collections.exhibit -%}
<div class="p-4">
{% include "partials/exhibit-card.html" %}
<div class="p-4 lg:w-1/3 sm:w-1/2 w-full">
{%- include "partials/exhibit-card.html" -%}
</div>
{%- endfor -%}
</div>
Expand All @@ -20,21 +24,17 @@ <h2 class="text-center text-4xl tracking-tight font-bold pb-2">Exhibit Essays</h
</div>

<script>
var exhibitSiema = new Siema({
selector: '#siema-exhibits',
// perPage: {
// 200: 2,
// 500: 4
// },
duration: 200,
easing: 'ease-in',
draggable: true,
multipleDrag: true,
threshold: 20,
loop: true
var exhibitCarousel = new Flickity('#exhibits-carousel', {
wrapAround: true,
imagesLoaded: true,
cellAlign: 'left',
prevNextButtons: false,
pageDots: false,
pauseAutoPlayOnHover: false,
autoPlay: 3500
});
document.querySelector('.prev-exhibit').addEventListener('click', () => exhibitSiema.prev());
document.querySelector('.next-exhibit').addEventListener('click', () => exhibitSiema.next());
document.querySelector('.prev-exhibit').addEventListener('click', () => exhibitCarousel.previous());
document.querySelector('.next-exhibit').addEventListener('click', () => exhibitCarousel.next());
</script>


41 changes: 20 additions & 21 deletions site/_includes/components/items/carousel.html
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>
Loading

0 comments on commit 570a799

Please sign in to comment.