weflock/index.hbs
Badri Sunderarajan 49d341d69e Add "I want to think about..." search bar to header
The subscribe link is added underneath with an email icon
2023-02-11 19:18:05 +05:30

67 lines
2.4 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">
{{#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=""
/>
{{/if}}
<h1 class="site-title">
{{#if @site.logo}}
<img class="site-logo" src="{{img_url @site.logo size="m"}}" alt="{{@site.title}}" />
{{else}}
{{@site.title}}
{{/if}}
</h1>
<p>{{@site.description}}</p>
<a class="header-cta-button" href="#/search">
<div>I want to think about...</div>
<span>Search</span>
</a>
{{#unless @member}}
<a class="header-cta-secondary" href="#/portal">
<p>{{> "icons/email"}} Think about something new every week</p>
</a>
{{/unless}}
</div>
{{!-- The main content area --}}
<main id="site-main" class="site-main outer">
<div class="inner posts">
<div class="post-feed">
{{#foreach posts}}
{{!-- Insert a banner at the 5th position --}}
{{#has index="4"}}
<div class="post-card post-card-large post-card-callout">
<a class="post-card-callout-link" href="https://fund.snipettemag.com" target="_blank">
<div class="post-card-excerpt" style="text-align: center; color: white;">
<img src="https://fund.snipettemag.com/img/header.png" class="post-card-callout-image"/>
<p>Snipette in print can become cheaper! But we need 1000 subscribers.</p>
<p class="gh-banner-button">
<span>Become one of them</span>
</p>
</div>
</a>
</div>
{{/has}}
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
{{> "post-card"}}
{{/foreach}}
</div>
</div>
</main>