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 class="post-card__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">
{{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">
{{/if}}
</div>

View File

@ -46,7 +46,7 @@
{{#if profile_image}}
<div class="post-card__author-image">
<a href="{{url}}">
<img src="{{img_url profile_image size=" xs"}}" alt="{{name}}" />
<img src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
</a>
</div>
{{/if}}

View File

@ -25,7 +25,7 @@
{{#if profile_image}}
<div class="post-header__author-image">
<a href="{{url}}">
<img src="{{img_url profile_image size=" xs"}}" alt="{{name}}" />
<img src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
</a>
</div>
{{/if}}
@ -109,4 +109,4 @@
{{#contentFor "scripts"}}
<script>
</script>
{{/contentFor}}
{{/contentFor}}