liwenyip / hugo-easy-gallery

Automagical css image gallery in Hugo using shortcodes, with optional lightbox/carousel gadget using PhotoSwipe and jQuery.
MIT License
573 stars 111 forks source link

Option to not crop image in thumbnail? #29

Open lambdafu opened 6 years ago

lambdafu commented 6 years ago

For some type of images (technical diagrams, screenshots), it seems better to not crop the thumbnail into a square, but to display the thumbnail with a border (so the whole image is visible). Is there an easy way to do this?

garchymede commented 5 years ago

yes, it is possible and quite easy to do by modifying the file named hugo-easy-gallery.css :

.gallery .img { position: absolute; left: 0; right: 0; top: 0; bottom: 0; background-size: contain;

liwenyip commented 5 years ago

Thanks @garchymede, will add this as an option next time I do an update