Post card

This commit is contained in:
Sodbileg Gansukh
2022-05-06 15:36:35 +08:00
parent f74e9241bb
commit 5672c0b6c8
4 changed files with 80 additions and 73 deletions

View File

@ -31,29 +31,17 @@ which templates loop over to generate a list of posts. --}}
{{/if}}
<h2 class="post-card-title">{{title}}</h2>
</header>
<div class="post-card-excerpt">
<p>{{excerpt}}</p>
</div>
{{#if excerpt}}
<div class="post-card-excerpt">{{excerpt}}</div>
{{/if}}
</a>
<footer class="post-card-meta">
<ul class="author-list">
{{#foreach authors}}
<li class="author-list-item">
{{#if profile_image}}
<a href="{{url}}" class="static-avatar">
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" loading="lazy" />
</a>
{{else}}
<a href="{{url}}" class="static-avatar author-profile-image">{{> "icons/avatar"}}</a>
{{/if}}
</li>
{{/foreach}}
</ul>
<div class="post-card-byline-content">
<span class="post-card-byline-author">{{#has author="count:>2"}}Multiple authors{{else}}{{authors}}{{/has}}</span>
<span class="post-card-byline-date"><time datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time> <span class="bull">&bull;</span> {{reading_time}}</span>
</div>
<time class="post-card-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
{{#if reading_time}}
<span class="sep">—</span>
<span class="post-card-meta-length">{{reading_time}}</span>
{{/if}}
</footer>
</div>{{!--/.post-card-content--}}