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

66 lines
2.0 KiB
Handlebars
Raw 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-22 13:34:59 +00:00
<a class="post-card__tag-info" href="{{url}}">
2021-07-10 17:56:01 +00:00
<span class="post-card__tag-name">{{name}}</span>
2021-04-14 08:24:27 +00:00
{{#if accent_color}}
<span class="post-card__tag-color" style="background-color: {{accent_color}};"></span>
{{else}}
<span class="post-card__tag-color"></span>
{{/if}}
</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-22 13:34:59 +00:00
<a class="post-card__tag-info" href="/subscribe">
2021-04-14 08:24:27 +00:00
<span class="post-card__paywall">Paid content</span>
</a>
2021-03-10 17:41:31 +00:00
{{/has}}
{{#has visibility="members"}}
2021-04-22 13:34:59 +00:00
<a class="post-card__tag-info" href="/subscribe">
2021-04-14 08:24:27 +00:00
<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}}
2021-04-22 13:34:59 +00:00
<a href="{{url}}">
<img class="post-card__author-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
</a>
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">
2021-04-22 15:04:40 +00:00
{{#has author="count:>2"}}Multiple authors{{else}}
{{#foreach authors}}
<a href="{{url}}" title="{{name}}" class="post-card__author-name">{{name}}</a>
2021-04-22 15:04:40 +00:00
{{/foreach}}
{{/has}}
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-22 13:34:59 +00:00
</article>