casper-i18n/index.hbs
2022-05-20 21:49:12 +08:00

68 lines
2.6 KiB
Handlebars

{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
<div class="site-header-content outer{{#match @custom.about_section "Vertical"}} vertical{{/match}}">
{{#if @custom.show_publication_cover}}
{{#if @site.cover_image}}
{{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img class="site-header-cover"
srcset="{{img_url @site.cover_image size="s"}} 300w,
{{img_url @site.cover_image size="m"}} 600w,
{{img_url @site.cover_image size="l"}} 1000w,
{{img_url @site.cover_image size="xl"}} 2000w"
sizes="100vw"
src="{{img_url @site.cover_image size="xl"}}"
alt="{{@site.title}}"
/>
{{/if}}
{{/if}}
{{#match @custom.about_section "!=" "None"}}
<section class="site-header-inner inner">
{{#if @custom.include_logo_in_about_section}}
{{#if @site.logo}}
<img class="site-logo" src="{{@site.logo}}" alt="{{@site.title}}">
{{/if}}
{{/if}}
<div class="site-header-wrapper">
{{#match @custom.about_section "Horizontal"}}
{{#if @site.logo}}
<h1 class="site-title">{{@site.title}}</h1>
{{else}}
{{#if @custom.include_logo_in_about_section}}
<h1 class="site-title">{{@site.title}}</h1>
{{/if}}
{{/if}}
{{else}}
{{#if @custom.include_logo_in_about_section}}
{{#unless @site.logo}}
<h1 class="site-title">{{@site.title}}</h1>
{{/unless}}
{{/if}}
{{/match}}
{{#if @site.description}}
<p class="site-description">{{@site.description}}</p>
{{/if}}
</div>
</section>
{{/match}}
</div>
{{!-- The main content area --}}
<main id="site-main" class="site-main outer">
<div class="inner posts">
<div class="post-feed">
{{#foreach posts}}
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
{{> "post-card"}}
{{/foreach}}
</div>
</div>
</main>