2019-04-14 18:41:25 +00:00
|
|
|
{{!--
|
|
|
|
This template is used for the index page.
|
|
|
|
It can be used also as the home page or the default page.
|
|
|
|
--}}
|
|
|
|
|
|
|
|
{{!-- The tag below means: insert everything in this file
|
|
|
|
into the {body} of the default.hbs template --}}
|
2019-02-19 16:22:38 +00:00
|
|
|
{{!< default}}
|
2019-02-19 23:00:22 +00:00
|
|
|
|
2019-03-08 09:47:48 +00:00
|
|
|
<div class="main-wrap">
|
2019-10-27 16:57:53 +00:00
|
|
|
{{!-- Special header.hbs partial to generate the <header> tag --}}
|
2019-03-08 09:47:48 +00:00
|
|
|
{{> header background=@site.cover_image}}
|
2019-04-14 18:41:25 +00:00
|
|
|
{{!-- Inject styles of the hero image to make it responsive --}}
|
2019-03-08 09:47:48 +00:00
|
|
|
{{> hero background=@site.cover_image}}
|
2019-02-26 16:22:09 +00:00
|
|
|
<div class="m-hero__content" data-aos="fade-down">
|
|
|
|
<h1 class="m-hero-title bigger">{{@site.title}}</h1>
|
|
|
|
{{#if @site.description}}
|
2019-03-08 09:47:48 +00:00
|
|
|
<p class="m-hero-description bigger">{{@site.description}}</p>
|
2019-02-26 16:22:09 +00:00
|
|
|
{{/if}}
|
|
|
|
{{#if @labs.subscribers}}
|
2019-08-15 14:40:46 +00:00
|
|
|
<a href="{{@site.url}}/subscribe" class="m-button filled">{{t "Subscribe"}}</a>
|
2019-02-26 16:22:09 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2019-10-06 14:14:16 +00:00
|
|
|
</section>
|
2019-03-08 09:47:48 +00:00
|
|
|
|
2019-03-12 10:39:01 +00:00
|
|
|
<main>
|
|
|
|
<div class="l-content">
|
2019-03-08 09:47:48 +00:00
|
|
|
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
|
2019-03-12 10:39:01 +00:00
|
|
|
<div class="l-grid centered">
|
2019-03-08 09:47:48 +00:00
|
|
|
{{#get "posts" filter="featured:true" include="authors,tags" limit="5" as |featured|}}
|
2019-02-26 16:22:09 +00:00
|
|
|
{{#if featured}}
|
2019-03-08 09:47:48 +00:00
|
|
|
<div class="m-featured-slider">
|
2019-03-17 16:16:17 +00:00
|
|
|
<div class="m-featured-slider__list js-featured-articles">
|
2019-03-08 09:47:48 +00:00
|
|
|
{{#foreach featured}}
|
2019-03-17 16:16:17 +00:00
|
|
|
<div class="m-featured-slider__list__item">
|
2019-03-08 09:47:48 +00:00
|
|
|
{{#if feature_image}}
|
|
|
|
<article class="m-featured-article">
|
|
|
|
{{else}}
|
|
|
|
<article class="m-featured-article no-picture">
|
2019-02-26 16:22:09 +00:00
|
|
|
{{/if}}
|
2019-03-08 09:47:48 +00:00
|
|
|
<div class="m-featured-article__picture">
|
|
|
|
{{#if feature_image}}
|
2019-11-11 20:14:25 +00:00
|
|
|
<div class="lozad no-fade-animation" data-background-image="{{img_url feature_image size="l"}}"></div>
|
2019-03-08 09:47:48 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class="m-featured-article__meta">
|
2019-08-17 18:34:39 +00:00
|
|
|
<a href="{{primary_author.url}}" class="m-featured-article__author js-tooltip" aria-label="Authors" data-tippy-content="{{t "Posted by"}} {{primary_author.name}} {{authors autolink="false" from="2" prefix=(t "Among with") separator=" , "}}">
|
2019-03-08 09:47:48 +00:00
|
|
|
{{#if primary_author.profile_image}}
|
2019-10-29 09:20:52 +00:00
|
|
|
<div style="background-image: url({{img_url primary_author.profile_image size="xs"}});"></div>
|
2019-03-08 09:47:48 +00:00
|
|
|
{{else}}
|
|
|
|
<div style="background-image: url({{asset "images/default-avatar-square-small.jpg"}});"></div>
|
2019-02-26 16:22:09 +00:00
|
|
|
{{/if}}
|
|
|
|
</a>
|
2019-03-08 09:47:48 +00:00
|
|
|
{{#if primary_tag}}
|
|
|
|
<a href="{{primary_tag.url}}" class="m-featured-article__tag">{{primary_tag.name}}</a>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class="m-featured-article__ribbon">
|
|
|
|
<span class="icon-star"></span>
|
2019-08-15 14:40:46 +00:00
|
|
|
<span>{{t "Featured"}}</span>
|
2019-03-08 09:47:48 +00:00
|
|
|
</div>
|
|
|
|
<a href="{{url}}" class="m-featured-article__content">
|
2019-11-21 15:48:21 +00:00
|
|
|
<h1 class="m-featured-article__title js-featured-article-title" title="{{title}}">
|
|
|
|
{{title}}
|
|
|
|
</h1>
|
2019-03-08 09:47:48 +00:00
|
|
|
<div class="m-featured-article__timestamp">
|
2019-03-17 16:16:17 +00:00
|
|
|
<span>{{date published_at timeago="true"}}</span>
|
2019-03-08 09:47:48 +00:00
|
|
|
<span>•</span>
|
2019-08-15 14:40:46 +00:00
|
|
|
<span>{{reading_time minute=(t "1 min read") minutes=(t "% min read")}}</span>
|
2019-03-08 09:47:48 +00:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</article>
|
2019-03-17 16:16:17 +00:00
|
|
|
</div>
|
2019-03-08 09:47:48 +00:00
|
|
|
{{/foreach}}
|
2019-03-17 16:16:17 +00:00
|
|
|
</div>
|
2019-03-08 09:47:48 +00:00
|
|
|
</div>
|
2019-02-26 16:22:09 +00:00
|
|
|
{{/if}}
|
2019-03-08 09:47:48 +00:00
|
|
|
{{/get}}
|
2019-04-14 18:41:25 +00:00
|
|
|
{{!-- The tag below iterates over all the posts --}}
|
2019-03-08 09:47:48 +00:00
|
|
|
{{> "loop"}}
|
2019-03-12 10:39:01 +00:00
|
|
|
</div>
|
2019-03-08 09:47:48 +00:00
|
|
|
</div>
|
2019-04-14 18:41:25 +00:00
|
|
|
{{!-- Links to Previous/Next posts --}}
|
2019-03-08 09:47:48 +00:00
|
|
|
{{pagination}}
|
2019-03-12 10:39:01 +00:00
|
|
|
</div>
|
2019-03-08 09:47:48 +00:00
|
|
|
</main>
|
|
|
|
</div>
|
2019-02-26 16:22:09 +00:00
|
|
|
|
2019-04-14 18:41:25 +00:00
|
|
|
{{!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs --}}
|
2019-02-26 16:22:09 +00:00
|
|
|
{{#contentFor "scripts"}}
|
|
|
|
<script defer src="{{asset "js/home.js"}}"></script>
|
|
|
|
{{/contentFor}}
|