1
0
mirror of https://github.com/Damillora/Yuika synced 2024-11-22 17:27:32 +00:00
Yuika/post.hbs

126 lines
3.7 KiB
Handlebars
Raw Normal View History

2021-03-10 17:41:31 +00:00
{{!< default}} {{#post}} <div class="relative group index-header">
2021-04-14 08:24:27 +00:00
2021-07-10 21:23:59 +00:00
<div class="page-header page-header--short">
<div class="page-header__background">
2021-04-14 08:24:27 +00:00
<div class="page-header__overlay"></div>
</div>
<div class="page-header__contents">
2021-07-10 21:23:59 +00:00
</div>
</div>
<div class="post-header container mx-auto main">
{{> primary-tag}}
<h1 class="post-header__heading">{{title}}</h1>
<p class="post-header__time">
<span>
<time datetime="{{date format=" YYYY-MM-DD"}}">
{{date format="D MMM YYYY"}}
</time>
<span class="bull">&bull;</span>
{{reading_time}}
</span>
</p>
{{#if authors}}
<div class="post-header__author-list">
<div class="post-header__author-images">
{{#foreach authors}}
{{#if profile_image}}
<a href="{{url}}">
<img class="post-header__author-image" src="{{img_url profile_image size=" xs"}}" alt="{{name}}" />
</a>
{{/if}}
2021-07-10 21:23:59 +00:00
{{/foreach}}
</div>
<div class="post-header__author-names">
{{#has author="count:>2"}}
Multiple authors
{{else}}
{{#foreach authors}}
<a href="{{url}}" title="{{name}}" class="post-header__author-name">{{name}}</a>
{{/foreach}}
{{/has}}
2020-06-16 10:47:02 +00:00
</div>
</div>
2021-07-10 21:23:59 +00:00
{{/if}}
{{#if feature_image}}
<figure class="post-header__featured-image">
<img src="{{feature_image}}" alt="{{feature_image_alt}}" loading="lazy">
{{#if feature_image_caption}}
<figcaption>{{feature_image_caption}}</figcaption>
{{/if}}
</figure>
{{/if}}
2019-11-08 20:59:26 +00:00
</div>
2021-03-10 17:41:31 +00:00
2021-07-10 21:23:59 +00:00
2021-04-14 08:24:27 +00:00
<main id="post" class="container mx-auto main">
{{content}}
</main>
<div class="container mx-auto main">
<div class="post-navigator">
{{#prev_post}}
<a href="{{url}}" class="post-navigator__nav post-navigator__nav--previous-post">
<span class="material-icons post-navigator__icon">arrow_back</span>
<div class="post-navigator__nav-content post-navigator__nav-content--previous-post">
2021-04-22 13:34:59 +00:00
<p class="post-navigator__nav-indicator">Previous post</p>
<p class="post-navigator__nav-title">{{title}}</p>
</div>
2021-04-14 08:24:27 +00:00
</a>
{{/prev_post}}
<div class="flex flex-grow"></div>
{{#next_post}}
<a href="{{url}}" class="post-navigator__nav post-navigator__nav--next-post">
<div class="post-navigator__nav-content post-navigator__nav-content--next-post">
2021-04-22 13:34:59 +00:00
<p class="post-navigator__nav-indicator">Next post</p>
<p class="post-navigator__nav-title">{{title}}</p>
2021-04-14 08:24:27 +00:00
</div>
<span class="material-icons post-navigator__icon">arrow_forward</span>
</a>
{{/next_post}}
2019-11-08 21:12:26 +00:00
</div>
2021-04-14 08:24:27 +00:00
</div>
2021-04-22 13:34:59 +00:00
2021-04-14 08:24:27 +00:00
<div id="comments" class="container mx-auto main">
{{#is "preview"}}
<p>Comments are disabled for post previews</p>
{{else}}
{{!-- Comments --}}
2021-03-10 17:41:31 +00:00
2021-04-14 08:24:27 +00:00
{{/is}}
</div>
<div class="container mx-auto">
{{#if primary_tag}}
2021-04-22 13:34:59 +00:00
{{#get "posts" include="tags" filter="tags:{{primary_tag.slug}}+id:-{{id}}" limit="3" as |related_posts|}}
2021-04-14 08:24:27 +00:00
{{#if related_posts}}
2021-04-22 13:34:59 +00:00
<div class="post-list">
<div>
2021-04-14 08:24:27 +00:00
More in
2021-04-22 13:34:59 +00:00
{{#../primary_tag}}
2021-04-14 08:24:27 +00:00
<a href="{{url}}">
{{#if accent_color}}
2021-04-22 13:34:59 +00:00
<span class="tag__color" style="background-color: {{accent_color}};"></span>
2021-04-14 08:24:27 +00:00
{{else}}
2021-04-22 13:34:59 +00:00
<span class="tag__color"></span>
2021-04-14 08:24:27 +00:00
{{/if}}
2021-04-22 13:34:59 +00:00
<span class="tag__name">{{name}}</span>
2021-04-14 08:24:27 +00:00
</a>
2021-04-22 13:34:59 +00:00
{{/../primary_tag}}
</div>
2021-04-14 08:24:27 +00:00
{{#foreach related_posts}}
{{> post-card}}
{{/foreach}}
2021-03-10 17:41:31 +00:00
</div>
2021-04-14 08:24:27 +00:00
{{/if}}
{{/get}}
{{/if}}
</div>
{{/post}}
2021-04-22 13:34:59 +00:00
2021-03-10 17:41:31 +00:00
{{#contentFor "scripts"}}
<script>
</script>
2021-04-22 13:34:59 +00:00
{{/contentFor}}