leilukin-site/src/_includes/main/changelogs.njk
2024-08-11 23:13:34 +08:00

62 lines
1.7 KiB
Plaintext

---
layout: main/content
articleElement: true
---
{% set currentUrl %}{{ page.url }}{% endset %}
<nav class="changelog__nav" aria-labelledby="changelog-nav-title">
<p class="changelog__nav--title" id="changelog-nav-title">Changelog Archive:</p>
<ul class="inline-nav changelog__nav--links">
<li><a
{% if currentUrl === "/changelogs/" %}aria-current="page"{% endif %}
href="/changelogs"
>Latest</a></li>
{% set navPages = collections.all | eleventyNavigation("Changelogs") | reverse %}
{%- for entry in navPages %}
<li><a
{% if entry.url == page.url %}aria-current="page"{% endif %}
href="{{ entry.url }}"
>{{ entry.title }}</a></li>
{%- endfor %}
</ul>
</nav>
<p>To get notified of the updates on this website, you can subscribe to the <a href="{{ sitemeta.feedPath }}">{{ sitemeta.siteName }} RSS feed</a>, which contains new articles, blog posts and website changelogs.</p>
{{ content | safe }}
{%- css %}
.changelog__nav,
.changelog__nav--links {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
.changelog__nav {
flex-direction: column;
gap: 0.2em;
align-self: center;
font-weight: 700;
gap: 0.5em;
}
.changelog__nav--links li {
text-align: center;
align-self: center;
}
.changelog__nav--links [aria-current="page"] {
text-decoration: none;
color: var(--clr-bold-txt);
}
@media (min-width: 640px) {
.changelog__nav {
flex-direction: row;
gap: 1em;
}
}
{% endcss %}