kc0bfv / autophugo

AutoPhugo [ˌɔtoʊˈfjuːgəʊ] is a gallery/photoblog theme for Hugo that's a little more automatic than Phugo.
Other
97 stars 56 forks source link

CSS gradient: remove gray fog from thumbs #14

Closed Klaus-Tockloth closed 3 years ago

Klaus-Tockloth commented 3 years ago

This CSS (gradient) puts gray fog on each thumb picture:

#main .thumb:after {
    background-image: -moz-linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);
    background-image: -webkit-linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);
    background-image: -ms-linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);
    background-image: linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);
    -moz-pointer-events: none;
    -webkit-pointer-events: none;
    ...

Maybe a feature for a very special purpose but for general usage it decreases the image quality significant. I recommend to remove it.

#main .thumb:after {
/*
    background-image: -moz-linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);
    background-image: -webkit-linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);
    background-image: -ms-linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);
    background-image: linear-gradient(to top, rgba(10, 17, 25, 0.35) 5%, rgba(10, 17, 25, 0) 35%);
*/
    -moz-pointer-events: none;
    -webkit-pointer-events: none;
    ...
kc0bfv commented 3 years ago

That gradient makes the text at the bottom more visible by increasing the contrast between its white and whatever the photo content is.

It shouldn't decrease the image quality - the default thumbnail quality is quite low, though. Increasing the quality / decreasing the quality on the thumbnails is a configuration option - the tradeoff is increased loading times of course. One of the challenges with this theme is that the thumbnails are quite large by default, but of course people want the page to load quickly, so the tradeoff is very noticeable.

Klaus-Tockloth commented 3 years ago

Thanks for the discussion.