personal_site/_includes/post_summary.html
2025-01-11 19:35:42 +00:00

35 lines
1.1 KiB
HTML

{% capture nowunix %}{{'now' | date: '%s'}}{% endcapture %}
{% capture posttime %}{{post.date | date: '%s'}}{% endcapture %}
{% if post.draft or post.path contains '_drafts' or posttime > nowunix %}
{% assign is_draft = true %}
{% else %}
{% assign is_draft = false %}
{% endif %}
<article class="h-entry blogroll {% if is_draft %}draft{%endif%}">
<a class="u-uid u-url" href="{{ post.url }}" aria-label="Blog Post: {{ post.title }}">
<figure>
<img class="u-photo"
src = "{{ post.thumbnail | default: post.image}}"
class = "{{ post.image_class }}"
alt="{{post.alt | smartify}}"
width=128 height=128
>
</figure>
</a>
<section>
<section class="title-date-container">
<h2 class="p-name blogroll-title"><a class="u-uid u-url" href="{{ post.url }}">{{ post.title }}</a></h2>
<time class="dt-published" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: '%b %Y' }}</time>
</section>
<summary class="p-summary">{{ post.excerpt | markdownify | remove: '<p>' | remove: '</p>' }}</summary>
</section>
</article>
{% unless forloop.last %}
<hr class="blogroll">
{% endunless %}