2019-04-14 18:41:25 +00:00
|
|
|
{{!--
|
|
|
|
This template is used for the post page.
|
|
|
|
--}}
|
|
|
|
|
2020-07-07 15:13:29 +00:00
|
|
|
{{!-- This block preloads specific assets for the post page --}}
|
|
|
|
{{#contentFor "preload"}}
|
|
|
|
<link rel="preload" href="{{asset "css/post.css"}}" as="style" />
|
|
|
|
<link rel="preload" href="{{asset "js/post.js"}}" as="script" />
|
|
|
|
{{/contentFor}}
|
|
|
|
|
2020-07-02 20:23:00 +00:00
|
|
|
{{!-- This block loads specific styles for the post page --}}
|
|
|
|
{{#contentFor "styles"}}
|
2020-07-07 15:13:29 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="{{asset "css/post.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-28 16:26:55 +00:00
|
|
|
{{!< default}}
|
|
|
|
|
2020-07-07 15:13:29 +00:00
|
|
|
{{!-- Special header.hbs partial to generate the <header> tag --}}
|
|
|
|
{{#post}}
|
|
|
|
{{> header background=feature_image}}
|
|
|
|
{{/post}}
|
|
|
|
|
|
|
|
<main class="main-wrap">
|
2019-03-08 09:47:48 +00:00
|
|
|
{{#post}}
|
2020-02-25 16:10:57 +00:00
|
|
|
{{!-- Inject styles of the hero image to make it responsive --}}
|
|
|
|
{{> hero background=feature_image}}
|
|
|
|
</section>
|
2019-03-08 09:47:48 +00:00
|
|
|
{{/post}}
|
|
|
|
|
2020-07-07 15:13:29 +00:00
|
|
|
<article>
|
|
|
|
<div class="l-content in-post">
|
|
|
|
{{!-- Everything inside the #post tags pulls data from the post --}}
|
|
|
|
{{#post}}
|
|
|
|
<div class="l-wrapper in-post {{#unless feature_image}}no-image{{/unless}} js-aos-wrapper" data-aos="fade-up"
|
|
|
|
data-aos-delay="300">
|
|
|
|
<div
|
2021-03-23 21:02:04 +00:00
|
|
|
class="l-post-content js-progress-content">
|
2020-07-07 15:13:29 +00:00
|
|
|
<header class="m-heading">
|
|
|
|
<h1 class="m-heading__title in-post">{{title}}</h1>
|
|
|
|
<div class="m-heading__meta">
|
|
|
|
{{#if primary_tag}}
|
|
|
|
<a href="{{primary_tag.url}}" class="m-heading__meta__tag">{{primary_tag.name}}</a>
|
|
|
|
<span class="m-heading__meta__divider" aria-hidden="true">•</span>
|
|
|
|
{{/if}}
|
|
|
|
<span class="m-heading__meta__time">{{date published_at}}</span>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<div class="pos-relative js-post-content">
|
|
|
|
<div class="m-share">
|
|
|
|
<div class="m-share__content js-sticky">
|
|
|
|
<a href="https://twitter.com/intent/tweet?text={{encode title}}&url={{url absolute='true'}}"
|
|
|
|
class="m-icon-button filled in-share" target="_blank" rel="noopener" aria-label="Twitter">
|
|
|
|
<span class="icon-twitter" aria-hidden="true"></span>
|
|
|
|
</a>
|
|
|
|
<button class="m-icon-button filled in-share progress js-scrolltop" aria-label="{{t "Scroll to top"}}">
|
|
|
|
<span class="icon-arrow-top" aria-hidden="true"></span>
|
|
|
|
<svg aria-hidden="true">
|
|
|
|
<circle class="progress-ring__circle js-progress" fill="transparent" r="0" />
|
|
|
|
</svg>
|
|
|
|
</button>
|
2019-02-28 16:26:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-07 15:13:29 +00:00
|
|
|
{{content}}
|
2020-07-26 17:12:23 +00:00
|
|
|
{{!-- List of tags --}}
|
|
|
|
{{#if tags}}
|
|
|
|
<section class="m-tags in-post">
|
|
|
|
<h3 class="m-submenu-title">{{t "Tags"}}</h3>
|
|
|
|
<ul>
|
|
|
|
{{#foreach tags}}
|
|
|
|
<li>
|
|
|
|
<a href="{{url}}" title="{{name}}">{{name}}</a>
|
|
|
|
</li>
|
|
|
|
{{/foreach}}
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
{{/if}}
|
2019-03-12 10:39:01 +00:00
|
|
|
</div>
|
2019-02-28 16:26:55 +00:00
|
|
|
</div>
|
2020-07-07 15:13:29 +00:00
|
|
|
</div>
|
|
|
|
{{!-- Email subscribe form at the bottom of the page --}}
|
2021-03-23 21:02:04 +00:00
|
|
|
<section class="m-subscribe-section js-newsletter">
|
|
|
|
<div class="l-wrapper in-post">
|
|
|
|
<div class="m-subscribe-section__content">
|
|
|
|
<div class="m-subscribe-section__text">
|
|
|
|
<h4 class="m-subscribe-section__title">{{t "Subscribe to our newsletter"}}</h4>
|
|
|
|
<p class="m-subscribe-section__description">
|
|
|
|
{{t "Get the latest posts delivered right to your inbox."}}
|
|
|
|
</p>
|
2020-02-28 10:01:58 +00:00
|
|
|
</div>
|
2021-03-23 21:02:04 +00:00
|
|
|
<div class="m-subscribe-section__form">
|
|
|
|
{{> "newsletter-form"}}
|
2020-02-25 16:10:57 +00:00
|
|
|
</div>
|
2019-03-03 18:32:36 +00:00
|
|
|
</div>
|
2021-03-23 21:02:04 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
2020-07-07 15:13:29 +00:00
|
|
|
<section class="m-author">
|
|
|
|
<div class="m-author__content">
|
|
|
|
<div class="m-author__picture">
|
|
|
|
<a href="{{primary_author.url}}" class="m-author-picture" aria-label="{{primary_author.name}}">
|
|
|
|
{{#if primary_author.profile_image}}
|
|
|
|
<div style="background-image: url({{primary_author.profile_image}});"></div>
|
|
|
|
{{else}}
|
|
|
|
<div style="background-image: url({{asset "images/default-avatar-square-small.jpg"}});"></div>
|
|
|
|
{{/if}}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="m-author__info">
|
|
|
|
<h4 class="m-author__name">
|
|
|
|
<a href="{{primary_author.url}}">{{primary_author.name}}</a>
|
|
|
|
</h4>
|
|
|
|
{{#has author="count:>1"}}
|
|
|
|
<p class="m-small-text in-author-along-with">
|
|
|
|
{{authors separator=", " prefix=(t "Among with no break line") from="2"}}
|
|
|
|
</p>
|
|
|
|
{{/has}}
|
|
|
|
{{#if primary_author.bio}}
|
|
|
|
<p class="m-author__bio">{{primary_author.bio}}</p>
|
|
|
|
{{/if}}
|
|
|
|
<ul class="m-author-links">
|
|
|
|
{{#if primary_author.website}}
|
|
|
|
<li>
|
|
|
|
<a href="{{primary_author.website}}" target="_blank" rel="noopener" aria-label="{{t "Website"}}">
|
|
|
|
<span class="icon-globe" aria-hidden="true"></span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{#if primary_author.twitter}}
|
|
|
|
<li>
|
|
|
|
<a href="https://twitter.com/{{primary_author.twitter}}" target="_blank" rel="noopener" aria-label="Twitter">
|
|
|
|
<span class="icon-twitter" aria-hidden="true"></span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{{!-- If you want to embed comments, this is a good place to do it! --}}
|
|
|
|
{{!--
|
2019-03-08 09:47:48 +00:00
|
|
|
<section class="m-comments">
|
|
|
|
<div class="m-load-comments__iframe l-wrapper in-comments js-comments-iframe">
|
|
|
|
<div id="disqus_thread"></div>
|
|
|
|
<script>
|
|
|
|
var disqus_config = function () {
|
|
|
|
this.page.url = "{{url absolute="true"}}";
|
|
|
|
this.page.identifier = "ghost-{{comment_id}}"
|
|
|
|
};
|
|
|
|
(function () {
|
|
|
|
var d = document, s = d.createElement('script');
|
|
|
|
s.src = 'https://CHANGETHIS.disqus.com/embed.js';
|
|
|
|
s.setAttribute('data-timestamp', +new Date());
|
|
|
|
(d.head || d.body).appendChild(s);
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
</div>
|
|
|
|
</section>
|
2020-07-07 15:13:29 +00:00
|
|
|
--}}
|
|
|
|
{{/post}}
|
|
|
|
{{!-- Related posts --}}
|
2021-01-04 14:52:09 +00:00
|
|
|
{{#if post.tags.length}}
|
|
|
|
{{#get "posts" limit="3" filter="tags:[{{post.tags}}]+id:-{{post.id}}" include="tags,authors" as |related|}}
|
|
|
|
<section class="m-recommended">
|
|
|
|
<div class="l-wrapper in-recommended">
|
|
|
|
<h3 class="m-section-title in-recommended">{{t "Recommended for you"}}</h3>
|
|
|
|
<div class="m-recommended-articles">
|
|
|
|
<div class="m-recommended-slider glide js-recommended-slider">
|
|
|
|
<div class="glide__track" data-glide-el="track">
|
|
|
|
<div class="glide__slides">
|
|
|
|
{{!-- The tag below iterates over all the related posts --}}
|
|
|
|
{{> "loop"}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div data-glide-el="controls" class="glide__arrows js-controls">
|
|
|
|
<button data-glide-dir="<" class="m-icon-button filled in-recommended-articles glide-prev" aria-label="{{t "Previous"}}">
|
|
|
|
<span class="icon-arrow-left" aria-hidden="true"></span>
|
|
|
|
</button>
|
|
|
|
<button data-glide-dir=">" class="m-icon-button filled in-recommended-articles glide-next" aria-label="{{t "Next"}}">
|
|
|
|
<span class="icon-arrow-right" aria-hidden="true"></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{{/get}}
|
|
|
|
{{else}}
|
2020-07-07 15:13:29 +00:00
|
|
|
<section class="m-recommended">
|
|
|
|
<div class="l-wrapper in-recommended">
|
|
|
|
<h3 class="m-section-title in-recommended">{{t "Recommended for you"}}</h3>
|
|
|
|
<div class="m-recommended-articles">
|
|
|
|
<div class="m-recommended-slider glide js-recommended-slider">
|
|
|
|
<div class="glide__track" data-glide-el="track">
|
|
|
|
<div class="glide__slides">
|
2021-01-04 14:52:09 +00:00
|
|
|
<div class="m-recommended-slider__item glide__slide">
|
|
|
|
<div class="m-heading no-margin">
|
|
|
|
<h3>{{t "No posts found"}}</h3>
|
|
|
|
<p>
|
|
|
|
{{t "Apparently there are no posts at the moment, check again later."}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-06-29 13:54:07 +00:00
|
|
|
</div>
|
2020-02-25 16:10:57 +00:00
|
|
|
</div>
|
2019-03-17 16:16:17 +00:00
|
|
|
</div>
|
2019-03-03 18:32:36 +00:00
|
|
|
</div>
|
2020-07-07 15:13:29 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
2021-01-04 14:52:09 +00:00
|
|
|
{{/if}}
|
2020-07-07 15:13:29 +00:00
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</main>
|
2019-02-28 16:26:55 +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-28 16:26:55 +00:00
|
|
|
{{#contentFor "scripts"}}
|
|
|
|
<script defer src="{{asset "js/post.js"}}"></script>
|
|
|
|
{{/contentFor}}
|