UCDavisLibrary / ucdlib-theme-wp

Wordpress theme port of the UC Davis SiteFarm One Theme
2 stars 0 forks source link

slideshow block #135

Closed spelkey-ucd closed 2 years ago

spelkey-ucd commented 2 years ago

http://dev.webstyleguide.ucdavis.edu/redesign/?p=molecules-slideshow-thumbnails

https://github.com/ucd-library/ucdlib-theme-sass/blob/main/source/js/slideshow.js

Just going to build it using wordpres jquery.

spelkey-ucd commented 2 years ago

https://sandbox.library.ucdavis.edu/slideshoooows/

wrenaria commented 2 years ago

@spelkey-ucd This looks great until you put images of varying aspect ratios into it! Which is something ASC will definitely want/need to do.

I'd like the slideshow to have a fixed aspect for the image areas of the slideshow (16:9? or 4:3?) and have the image contained in the available space (or if possible include an option to toggle between contain and cover fit options to suit the needs of the context).

I think #333333 should work fine for the background color to fill the dead space around narrower images.

Here's an example slideshow with fixed aspect + contained image to help you see what I am after: https://scalar.usc.edu/works/from-vine-to-wine/tasting-the-good-life?path=exhibition-categories

spelkey-ucd commented 2 years ago

@wrenaria slideshow now has an option to set the aspect ratio:

image

I left inherit from photo as an option in case an advanced user (aka you) needs to break the mold and use a custom aspect ratio. I can remove it if you think it is unnecessary.

If an aspect ratio is selected, the user can toggle between cover and contain fit:

image

https://sandbox.library.ucdavis.edu/slideshoooows/#contain

wrenaria commented 2 years ago

@spelkey-ucd Nice improvements!

One more change to make: I'm fine with thumbnails keeping their individual aspects, but I want them all to appear at the same max height no matter the displayed aspect so it's not a crazy jagged variable shape at the bottom.

spelkey-ucd commented 2 years ago

thumbnails now display the same as the main image (just smaller). on stage/sandbox.

wrenaria commented 2 years ago

This is fine! Thanks Steve!