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

69 lines
2.4 KiB
Handlebars
Raw Normal View History

<div class="post-card">
2020-11-11 19:54:23 +00:00
<article class="relative md:flex md:flex-row w-full h-full transition duration-500 ease-in-out py-4 px-4">
<a href="{{url}}">
{{> post-background}} {{!--Special header-image.hbs partial to generate the background image--}}
</a>
2020-11-11 04:54:56 +00:00
<div class="md:pl-4">
2021-03-10 17:41:31 +00:00
<div class="pt-4 md:pt-0 flex flex-row">
2020-11-11 04:54:56 +00:00
{{#if primary_tag}}
{{#primary_tag}}
2021-03-10 17:41:31 +00:00
<div class="pr-2">
<a href="{{url}}">
{{#if accent_color}}
<span class="tag-accent-color small" style="background-color: {{accent_color}};"></span>
2020-11-11 19:54:23 +00:00
{{else}}
2021-03-10 17:41:31 +00:00
<span class="tag-accent-color small"></span>
2020-11-11 19:54:23 +00:00
{{/if}}
<span class="text-sm hover:underline">{{name}}</span>
</a>
2021-03-10 17:41:31 +00:00
</div>
2020-11-11 04:54:56 +00:00
{{/primary_tag}}
{{/if}}
2021-03-10 17:41:31 +00:00
{{#has visibility="paid"}}
<div class="pr-2">
<a href="/subscribe">
<span class="text-sm text-red-700 hover:underline">Autonomous Systems only</span>
</a>
</div>
{{/has}}
{{#has visibility="members"}}
<div class="pr-2">
<a href="/subscribe">
<span class="text-sm text-yuika-blue-700 hover:underline">Subscribers only</span>
</a>
</div>
{{/has}}
2020-11-11 04:54:56 +00:00
</div>
2020-11-11 19:54:23 +00:00
<div class="mt-0 text-yuika-blue-700 hover:underline transition duration-500 ease-in-out">
2020-11-11 11:57:35 +00:00
<a href="{{url}}"><h1 class="text-xl md:text-2xl font-light">{{title}}</h1></a>
2019-11-08 20:59:26 +00:00
</div>
2020-11-11 11:57:35 +00:00
<div class="mt-0 text-xs">
2020-11-11 04:54:56 +00:00
<p><span class="post-card-byline-date"><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time> <span class="bull">&bull;</span> {{reading_time}}</span></p>
</div>
{{#if authors}}
2020-11-11 11:57:35 +00:00
<div class="author-list text-xs ">
2020-11-11 04:54:56 +00:00
<div class="author-images">
{{#foreach authors}}
{{#if profile_image}}
<div class="h-8 ml-1 mr-3">
<a href="{{url}}">
<img class="h-full rounded-full" src="{{img_url profile_image size="xs"}}" alt="{{name}}"/>
</a>
</div>
{{/if}}
{{/foreach}}
2019-11-08 20:59:26 +00:00
</div>
2020-11-11 04:54:56 +00:00
<div class="author-names">
<div>
<p>{{#has author="count:>2"}}Multiple authors{{else}}{{authors}}{{/has}}</p>
</div>
</div>
</div>
{{/if}}
2020-11-11 11:57:35 +00:00
<div class="block mt-2 mb-4 text-sm excerpt overflow-hidden">
2020-11-11 04:54:56 +00:00
<p>{{excerpt words="30"}}</p>
</div>
2019-11-25 19:25:00 +00:00
</div>
2020-11-11 04:54:56 +00:00
</article>
2019-11-08 20:59:26 +00:00
</div>