fix logo and hero image srcset
This commit is contained in:
parent
97ea3228e5
commit
0d5c2e0c1d
@ -45,7 +45,11 @@
|
||||
<div class="gh-head-brand-wrapper">
|
||||
<a class="gh-head-logo" href="{{@site.url}}">
|
||||
{{#if @site.logo}}
|
||||
<img src="{{@site.logo}}" alt="{{@site.title}}">
|
||||
<img srcset="{{img_url @site.logo size="s"}} 300w,
|
||||
{{img_url @site.logo size="m"}} 600w"
|
||||
sizes="(max-width: 600px) 50vw, 40vw"
|
||||
src="{{img_url @site.logo size="s"}}" alt="{{@site.title}}"
|
||||
>
|
||||
{{else}}
|
||||
{{@site.title}}
|
||||
{{/if}}
|
||||
|
20
index.hbs
20
index.hbs
@ -3,9 +3,27 @@
|
||||
<section class="gh-about gh-outer{{#match @custom.header_section_layout "!=" "Typographic profile"}}{{#unless @site.cover_image}} no-image{{/unless}}{{else}}{{#unless @site.icon}} no-image{{/unless}}{{/match}}">
|
||||
<div class="gh-about-inner gh-inner">
|
||||
{{#match @custom.header_section_layout "!=" "Typographic profile"}}
|
||||
{{#match @custom.header_section_layout "=" "Large background"}}
|
||||
{{#if @site.cover_image}}
|
||||
<img class="gh-about-image" src="{{@site.cover_image}}" alt="{{@site.title}}">
|
||||
<img class="gh-about-image"
|
||||
srcset="{{img_url @site.cover_image size="s"}} 300w,
|
||||
{{img_url @site.cover_image size="m"}} 720w,
|
||||
{{img_url @site.cover_image size="l"}} 960w,
|
||||
{{img_url @site.cover_image size="xl"}} 1200w,
|
||||
{{img_url @site.cover_image size="xxl"}} 2000w"
|
||||
sizes="100vw"
|
||||
src="{{@site.cover_image}}" alt="{{@site.title}}">
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if @site.cover_image}}
|
||||
<img class="gh-about-image"
|
||||
srcset="{{img_url @site.cover_image size="s"}} 300w,
|
||||
{{img_url @site.cover_image size="m"}} 720w,
|
||||
{{img_url @site.cover_image size="l"}} 960w"
|
||||
sizes="(max-width: 840px) 100vw, 50vw"
|
||||
src="{{@site.cover_image}}" alt="{{@site.title}}">
|
||||
{{/if}}
|
||||
{{/match}}
|
||||
{{else}}
|
||||
{{#if @site.icon}}
|
||||
<img class="gh-about-image" src="{{@site.icon}}" alt="{{@site.title}}">
|
||||
|
Loading…
Reference in New Issue
Block a user