1
0
mirror of https://github.com/Damillora/Yuika synced 2024-12-26 14:13:46 +00:00

fix: adjust image sizes

This commit is contained in:
Damillora 2021-04-22 17:45:11 +07:00
parent 91671d2219
commit e876a68de3
3 changed files with 7 additions and 5 deletions

View File

@ -13,10 +13,12 @@ for it, and apply those styles to the <header> tag. Else, we just output a <head
<div> <div>
<div class="post-card__image"> <div class="post-card__image">
{{#if feature_image}} {{#if feature_image}}
<img srcset="{{img_url feature_image size="s"}} 300w" <img srcset="{{img_url feature_image size="s"}} 300w, {{img_url feature_image size="m"}} 600w"
sizes="(max-width: 768px) 100vw, 35vw"
src="{{img_url feature_image size="m"}}" alt="{{title}}" loading="lazy"> src="{{img_url feature_image size="m"}}" alt="{{title}}" loading="lazy">
{{else}} {{else}}
<img srcset="{{img_url @site.cover_image size="s"}} 300w" <img srcset="{{img_url @site.cover_image size="s"}} 300w, {{img_url @site.cover_image size="m"}} 600w"
sizes="(max-width: 768px) 100vw, 35vw"
src="{{img_url @site.cover_image size="m"}}" alt="{{title}}" loading="lazy"> src="{{img_url @site.cover_image size="m"}}" alt="{{title}}" loading="lazy">
{{/if}} {{/if}}
</div> </div>