64 lines
2.1 KiB
Plaintext

<section class="postlist{% if postListTypeMicroblog %} microblogList{% endif %}">
{% if postlistHeaderText %}<h2>{{ postlistHeaderText }}</h2>{% endif %}
<div class="postlist-item-container">
{% for post in postslist | reverse %}
<article class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
{% if not postListTypeMicroblog %}
<a href="{{ post.url }}" class="postlist-link">
<div class="post-image-container">
<img class="post-image" {% if post.data.imageURL %} src="{{ post.data.imageURL }}" alt="{{ post.data.imageAlt }}" {% else %} src="{{ metadata.defaultPostImageURL }}" alt="{{ metadata.defaultPostImageAlt }}"{% endif %}>
</div>
</a>
{% endif %}
<div class="post-copy">
{% if not postListTypeMicroblog %}
<a href="{{ post.url }}" class="postlist-link">
{% endif %}
<h3>
{% if post.data.title %}{{ post.data.title | safe }}{% else %}?{% endif %}
</h3>
{% if not postListTypeMicroblog %}
</a>
{% endif %}
<div class="post-metadata">
<div class="post-metadata-copy">
<p>
{% if not postListTypeMicroblog %}
{% if post.data.author %}
{% if post.data.author.url %}
<a href="{{ post.data.author.url }}">
{% endif %}
{% if post.data.author.name %}
By {{ post.data.author.name }}
{% endif %}
{% if post.data.author.url %}</a>&nbsp;•&nbsp;
{% endif %}
{% else %}<a href="{{ metadata.author.url }}">By {{ metadata.author.name }}</a>&nbsp;•&nbsp;
{% endif %}
{% endif %}
<time datetime="{{ post.date | htmlDateString }}">{{ post.date | niceDate }}{% if post.data.time %}—{{ post.data.time }}{% endif %}</time>
</p>
<ul>
{%- for tag in post.data.tags | filterTagList %}
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<li>
<a
href="{{ tagUrl }}"
class="post-tag">
{{ tag }}&nbsp;
</a>
</li>
{%- endfor %}
</ul>
</div>
</div>
</div>
</article>
<hr>
{% endfor %}
</div>
</section>