hugo-theme-stack icon indicating copy to clipboard operation
hugo-theme-stack copied to clipboard

feat: responsive avatar image size

Open xiaoxiyao opened this issue 1 year ago • 3 comments

Refer to https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images#resolution_switching_same_size_different_resolutions

xiaoxiyao avatar Oct 12 '24 10:10 xiaoxiyao

I think the current setting is good enough: the maximum size of the avatar is 150x150. The theme generates a single image of 300x300, which covers 1x and 2x. This PR will generate 3 images instead.

CaiJimmy avatar Oct 19 '24 19:10 CaiJimmy

It would be really nice to use plain SVG as site logo. The resize command ran against Hugo pipelines is hard coded and doesn't adhere to the disabled image processing in Hugo config.

ElastiCourse avatar Oct 20 '24 01:10 ElastiCourse

This is for loading smaller images on screens with low pixel ratios to improve loading speed. And, the maximum size of the avatar is 120x120 https://github.com/CaiJimmy/hugo-theme-stack/blob/839fbd0ecb5bba381f721f31f5195fb6517fc260/assets/scss/partials/sidebar.scss#L32

xiaoxiyao avatar Oct 21 '24 04:10 xiaoxiyao