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.
|
|
|
|
--}}
|
|
|
|
|
2020-07-07 15:13:29 +00:00
|
|
|
{{!-- This block preloads specific assets for the index page --}}
|
|
|
|
{{#contentFor "preload"}}
|
|
|
|
<link rel="preload" href="{{asset "css/home.css"}}" as="style" />
|
|
|
|
<link rel="preload" href="{{asset "css/listing.css"}}" as="style" />
|
|
|
|
<link rel="preload" href="{{asset "js/home.js"}}" as="script" />
|
|
|
|
{{/contentFor}}
|
|
|
|
|
2020-07-02 20:23:00 +00:00
|
|
|
{{!-- This block loads specific styles for the index page --}}
|
|
|
|
{{#contentFor "styles"}}
|
2020-07-07 15:13:29 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="{{asset "css/home.css"}}" media="screen" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="{{asset "css/listing.css"}}" media="screen" />
|
2020-07-02 20:23:00 +00:00
|
|
|
{{/contentFor}}
|
|
|
|
|
2019-04-14 18:41:25 +00:00
|
|
|
{{!-- 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
|
|
|
|
2020-07-07 15:13:29 +00:00
|
|
|
{{!-- Special header.hbs partial to generate the <header> tag --}}
|
|
|
|
{{> header background=@site.cover_image}}
|
|
|
|
|
|
|
|
<main class="main-wrap">
|
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}}
|
2020-02-25 16:10:57 +00:00
|
|
|
<p class="m-hero-description bigger">{{@site.description}}</p>
|
2019-02-26 16:22:09 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2019-10-06 14:14:16 +00:00
|
|
|
</section>
|
2020-07-07 15:13:29 +00:00
|
|
|
<div class="l-content">
|
|
|
|
<div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
|
|
|
|
<div class="l-grid centered">
|
|
|
|
{{#get "posts" filter="featured:true" include="authors,tags" limit="5" as |featured|}}
|
|
|
|
{{#if featured}}
|
|
|
|
<div class="m-featured-slider glide js-featured-slider">
|
|
|
|
<div class="glide__track" data-glide-el="track">
|
|
|
|
<div class="m-featured-slider__list glide__slides">
|
|
|
|
{{#foreach featured}}
|
|
|
|
<div class="m-featured-slider__list__item glide__slide js-featured-slide">
|
|
|
|
<article class="m-featured-article {{#unless feature_image}}no-picture{{/unless}}">
|
|
|
|
<div class="m-featured-article__picture">
|
|
|
|
{{#if feature_image}}
|
2020-07-08 14:13:48 +00:00
|
|
|
<style>
|
|
|
|
#featured-bg-{{id}} {
|
|
|
|
background-image: url({{img_url feature_image size='l'}});
|
|
|
|
}
|
|
|
|
|
|
|
|
@media(max-width: 768px) {
|
|
|
|
#featured-bg-{{id}} {
|
|
|
|
background-image: url({{img_url feature_image size='m'}});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<div id="featured-bg-{{id}}"></div>
|
2020-07-07 15:13:29 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class="m-featured-article__meta">
|
|
|
|
<a href="{{primary_author.url}}" class="m-featured-article__author js-tooltip" aria-label="{{primary_author.name}}" data-tippy-content="{{t "Posted by"}} {{primary_author.name}} {{authors autolink="false" from="2" prefix=(t "Among with") separator=" , "}}">
|
|
|
|
{{#if primary_author.profile_image}}
|
|
|
|
<div style="background-image: url({{img_url primary_author.profile_image size="xs"}});"></div>
|
|
|
|
{{else}}
|
|
|
|
<div style="background-image: url({{asset "images/default-avatar-square-small.jpg"}});"></div>
|
2020-06-29 13:54:07 +00:00
|
|
|
{{/if}}
|
|
|
|
</a>
|
2020-07-07 15:13:29 +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>
|
|
|
|
<span>{{t "Featured"}}</span>
|
|
|
|
</div>
|
|
|
|
<a href="{{url}}" class="m-featured-article__content">
|
|
|
|
<h2 class="m-featured-article__title js-featured-article-title" title="{{title}}">
|
|
|
|
{{title}}
|
|
|
|
</h2>
|
|
|
|
<div class="m-featured-article__timestamp">
|
|
|
|
<span>{{date published_at timeago="true"}}</span>
|
|
|
|
<span>•</span>
|
|
|
|
<span>{{reading_time minute=(t "1 min read") minutes=(t "% min read")}}</span>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
{{/foreach}}
|
2020-02-25 16:10:57 +00:00
|
|
|
</div>
|
2019-03-17 16:16:17 +00:00
|
|
|
</div>
|
2020-07-07 15:13:29 +00:00
|
|
|
<div data-glide-el="controls" class="glide__arrows js-featured-slider-controls">
|
|
|
|
<button data-glide-dir="<" class="m-icon-button in-featured-articles glide-prev js-featured-slider-previous" aria-label="{{t "Previous"}}">
|
|
|
|
<span class="icon-arrow-left" aria-hidden="true"></span>
|
|
|
|
</button>
|
|
|
|
<button data-glide-dir=">" class="m-icon-button in-featured-articles glide-next js-featured-slider-next" aria-label="{{t "Next"}}">
|
|
|
|
<span class="icon-arrow-right" aria-hidden="true"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
{{/get}}
|
|
|
|
{{!-- The tag below iterates over all the posts --}}
|
|
|
|
{{> "loop"}}
|
2019-03-08 09:47:48 +00:00
|
|
|
</div>
|
2019-03-12 10:39:01 +00:00
|
|
|
</div>
|
2020-07-07 15:13:29 +00:00
|
|
|
{{!-- Links to Previous/Next posts --}}
|
|
|
|
{{pagination}}
|
|
|
|
</div>
|
|
|
|
</main>
|
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}}
|