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

65 lines
1.9 KiB
Handlebars
Raw Permalink Normal View History

2021-04-14 08:24:27 +00:00
<article class="post-card">
<a href="{{url}}">
{{> post-background}} {{!--Special header-image.hbs partial to generate the background image--}}
</a>
<div class="post-card__info">
<div class="post-card__tag-row">
2020-11-11 04:54:56 +00:00
{{#if primary_tag}}
{{#primary_tag}}
2021-04-14 08:24:27 +00:00
<a href="{{url}}">
{{#if accent_color}}
<span class="post-card__tag-color" style="background-color: {{accent_color}};"></span>
{{else}}
<span class="post-card__tag-color"></span>
{{/if}}
<span class="post-card__tag-name">{{name}}</span>
</a>
2020-11-11 04:54:56 +00:00
{{/primary_tag}}
{{/if}}
2021-03-10 17:41:31 +00:00
{{#has visibility="paid"}}
2021-04-14 08:24:27 +00:00
<a href="/subscribe">
<span class="post-card__paywall">Paid content</span>
</a>
2021-03-10 17:41:31 +00:00
{{/has}}
{{#has visibility="members"}}
2021-04-14 08:24:27 +00:00
<a href="/subscribe">
<span class="post-card__paywall">Member-exclusive</span>
</a>
2021-03-10 17:41:31 +00:00
{{/has}}
2021-04-14 08:24:27 +00:00
</div>
<a href="{{url}}">
<h1 class="post-card__title">{{title}}</h1>
</a>
<p class="post-card__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-card__author-list">
<div class="post-card__author-images">
{{#foreach authors}}
{{#if profile_image}}
<div class="post-card__author-image">
<a href="{{url}}">
2021-04-22 10:45:11 +00:00
<img src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
2021-04-14 08:24:27 +00:00
</a>
2019-11-08 20:59:26 +00:00
</div>
2021-04-14 08:24:27 +00:00
{{/if}}
{{/foreach}}
2020-11-11 04:54:56 +00:00
</div>
2021-04-14 08:24:27 +00:00
<div class="post-card__author-names">
<p>{{#has author="count:>2"}}Multiple authors{{else}}{{authors}}{{/has}}</p>
2020-11-11 04:54:56 +00:00
</div>
2019-11-25 19:25:00 +00:00
</div>
2021-04-14 08:24:27 +00:00
{{/if}}
<div class="post-card__excerpt">
<p>{{excerpt words="30"}}</p>
</div>
</div>
2021-04-20 05:01:23 +00:00
</article>