72 lines
No EOL
2.4 KiB
Text
72 lines
No EOL
2.4 KiB
Text
---
|
|
layout: base.njk
|
|
pageType: post
|
|
---
|
|
|
|
<article class="blog-post">
|
|
{% if not released %}
|
|
<div class="draft-warning-banner">
|
|
⚠️ This post is still a draft and may be incomplete or subject to changes.
|
|
</div>
|
|
{% endif %}
|
|
<header class="post-header">
|
|
<h1>{{ title }}</h1>
|
|
<time class="localizable-time" datetime="{{ createdAt | isoDateTime }}">{{ createdAt | dateTimeFormat }}</time>
|
|
{% if updatedAt and (updatedAt | isMoreThanHourAfter(createdAt)) %}
|
|
<p class="updated-at">Updated: <time class="localizable-time" datetime="{{ updatedAt | isoDateTime }}">{{ updatedAt | dateTimeFormat }}</time></p>
|
|
{% endif %}
|
|
</header>
|
|
|
|
<div class="post-content">
|
|
{{ content | safe }}
|
|
</div>
|
|
|
|
{% set postTags = page.inputPath | extractTagsFromFile %}
|
|
|
|
{% if postTags.length > 0 %}
|
|
<section class="post-tags">
|
|
<h2>Tags</h2>
|
|
<ul class="tag-list">
|
|
{% for tag in postTags %}
|
|
<li><a href="/tags/{{ tag | lower }}/\">#{{ tag }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</section>
|
|
{% endif %}
|
|
|
|
{% set currentIndex = -1 %}
|
|
{% for post in collections.posts %}
|
|
{% if post.url == page.url %}
|
|
{% set currentIndex = loop.index0 %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if currentIndex >= 0 %}
|
|
{% set prevPost = collections.posts[currentIndex - 1] if currentIndex > 0 else null %}
|
|
{% set nextPost = collections.posts[currentIndex + 1] if currentIndex < collections.posts.length - 1 else null %}
|
|
|
|
<nav class="post-navigation" aria-label="Post navigation">
|
|
{% if prevPost %}
|
|
<a href="{{ prevPost.url }}" class="post-nav-link post-nav-prev">
|
|
<span class="post-nav-label">← Previous Post</span>
|
|
<span class="post-nav-title">{{ prevPost.data.title }}</span>
|
|
</a>
|
|
{% else %}
|
|
<span class="post-nav-link post-nav-prev post-nav-disabled">
|
|
<span class="post-nav-label">← Previous Post</span>
|
|
</span>
|
|
{% endif %}
|
|
|
|
{% if nextPost %}
|
|
<a href="{{ nextPost.url }}" class="post-nav-link post-nav-next">
|
|
<span class="post-nav-label">Next Post →</span>
|
|
<span class="post-nav-title">{{ nextPost.data.title }}</span>
|
|
</a>
|
|
{% else %}
|
|
<span class="post-nav-link post-nav-next post-nav-disabled">
|
|
<span class="post-nav-label">Next Post →</span>
|
|
</span>
|
|
{% endif %}
|
|
</nav>
|
|
{% endif %}
|
|
</article> |