75 lines
3.1 KiB
Handlebars
75 lines
3.1 KiB
Handlebars
{{#match headerStyle "!=" "Off"}}
|
|
<section class="gh-header is-{{#match headerStyle "Magazine"}}magazine{{else match headerStyle "Highlight"}}highlight{{else}}classic{{/match}}{{#if @custom.use_publication_cover_as_background}} has-image{{/if}} gh-outer">
|
|
|
|
{{!-- Background image --}}
|
|
{{#if @custom.use_publication_cover_as_background}}
|
|
{{#match headerStyle "!=" "Magazine"}}
|
|
{{#match headerStyle "!=" "Highlight"}}
|
|
{{#if @site.cover_image}}
|
|
<img class="gh-header-image" src="{{@site.cover_image}}" alt="{{@site.title}}">
|
|
{{/if}}
|
|
{{/match}}
|
|
{{/match}}
|
|
{{/if}}
|
|
|
|
<div class="gh-header-inner gh-inner">
|
|
|
|
{{!-- Magazine layout --}}
|
|
{{#match headerStyle "Magazine"}}
|
|
{{#foreach posts limit="7"}}
|
|
{{#match @number 2}}
|
|
<div class="gh-header-left">
|
|
{{/match}}
|
|
{{#match @number 5}}
|
|
<div class="gh-header-right">
|
|
{{/match}}
|
|
{{> "post-card"}}
|
|
{{#match @number 4}}
|
|
</div>
|
|
{{/match}}
|
|
{{#match @number 7}}
|
|
</div>
|
|
{{/match}}
|
|
{{/foreach}}
|
|
{{/match}}
|
|
|
|
{{!-- Highlight layout --}}
|
|
{{#match headerStyle "Highlight"}}
|
|
{{#if @custom.show_featured}}
|
|
<div class="gh-header-left">
|
|
{{#foreach posts limit="4"}}
|
|
{{> "post-card"}}
|
|
{{/foreach}}
|
|
</div>
|
|
<div class="gh-header-right">
|
|
{{> "components/featured" showFeatured=@custom.show_featured limit=6}}
|
|
</div>
|
|
{{else}}
|
|
{{#foreach posts limit="4"}}
|
|
{{> "post-card"}}
|
|
{{/foreach}}
|
|
{{/if}}
|
|
{{/match}}
|
|
|
|
{{!-- Landing layout --}}
|
|
{{#match headerStyle "Landing"}}
|
|
<h1 class="gh-header-title is-title">Founded by Australian journalist Claire Lehmann, Quillette publishes high quality long reads on diverse topics, daily.</h1>
|
|
<form class="gh-header-form">
|
|
<input class="gh-header-input" type="email" placeholder="jamie@example.com">
|
|
<button class="gh-button" type="submit">Subscribe</button>
|
|
</form>
|
|
{{/match}}
|
|
|
|
{{!-- Search layout --}}
|
|
{{#match headerStyle "Search"}}
|
|
<h1 class="gh-header-title is-title">Founded by Australian journalist Claire Lehmann, Quillette publishes high quality long reads on diverse topics, daily.</h1>
|
|
<form class="gh-header-form">
|
|
{{> "icons/search"}}
|
|
<button class="gh-header-input" data-ghost-search>Search posts, tags and authors</button>
|
|
</form>
|
|
{{/match}}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
{{/match}} |