added the changelog command

This commit is contained in:
2026-02-26 19:06:41 +01:00
parent 2973430c00
commit 5190291b30
10 changed files with 560 additions and 5 deletions

44
templates/changelog.html Normal file
View File

@@ -0,0 +1,44 @@
{% extends "_base.html" %}
{% block title %}{{ title }}{% endblock title %}
{% block content %}
<div class="wiki-header">
<h1>{{ title }}</h1>
</div>
<div class="wiki-container">
<main class="wiki-body">
{% if changelog | length == 0 %}
<p>No changelog entries found.</p>
{% else %}
<ul class="changelog-list">
{% for entry in changelog %}
<li class="changelog-entry">
<div class="changelog-meta">
{# Split date "2026-02-26 15:10:00" into parts #}
{% set date_parts = entry.date | split(pat=" ") %}
<span class="changelog-day">{{ date_parts[0] }}</span>
<span class="changelog-time">{{ date_parts[1] }}</span>
<span class="changelog-author">by {{ entry.author }}</span>
</div>
<div class="changelog-message">{{ entry.message }}</div>
{% if entry.files %}
<div class="changelog-files">
<details>
<summary>{{ entry.files | length }} file(s) changed</summary>
<ul>
{% for file in entry.files %}
<li>{{ file }}</li>
{% endfor %}
</ul>
</details>
</div>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</main>
</div>
{% endblock content %}

View File

@@ -16,6 +16,21 @@
<hr />
<h2>Recent Changes</h2>
{% if changelog | length > 0 %}
<p><a href="{% if is_static %}changelog.html{% else %}changelog{% endif %}">View full changelog</a></p>
<ul>
{% for entry in changelog | slice(end=5) %}
<li>
<code style="color: var(--accent)">{{ entry.date | truncate(length=10, end="") }}</code>
{{ entry.message }}
</li>
{% endfor %}
</ul>
{% else %}
<p>No recent changes recorded.</p>
{% endif %}
<script>
document.addEventListener("DOMContentLoaded", function() {
const dateElements = document.querySelectorAll('.local-date');

View File

@@ -37,6 +37,7 @@ body {
width: 100%;
max-width: var(--container-width);
padding: 0 20px;
padding-bottom: 35px;
}
/* --- Wiki Layout --- */
@@ -171,3 +172,72 @@ nav {
z-index: 100;
}
nav a { font-weight: bold; font-size: 1.2rem; color: var(--text-main); }
.changelog-list {
list-style: none;
padding: 0;
}
.changelog-entry {
background: var(--container-bg);
border: 1px solid var(--border-color);
padding: 15px;
margin-bottom: 15px;
border-radius: var(--radius-sm);
}
.changelog-meta {
font-size: 0.85rem;
color: var(--text-muted);
margin-bottom: 10px;
border-bottom: 1px solid var(--border-color);
padding-bottom: 5px;
display: flex;
gap: 10px;
align-items: baseline;
}
.changelog-day {
color: var(--accent);
font-weight: bold;
}
.changelog-time {
color: var(--text-muted);
font-family: 'JetBrains Mono', monospace;
font-size: 0.8em;
}
.changelog-author {
margin-left: auto;
}
.changelog-message {
font-size: 1.05rem;
margin-bottom: 10px;
font-weight: 500;
}
.changelog-files {
font-size: 0.85rem;
margin-top: 8px;
}
.changelog-files summary {
cursor: pointer;
color: var(--text-muted);
list-style: none;
}
.changelog-files summary:hover {
color: var(--text-main);
}
.changelog-files summary::before {
content: '▶';
font-size: 0.7em;
margin-right: 5px;
display: inline-block;
transition: transform 0.2s;
}
.changelog-files details[open] summary::before {
transform: rotate(90deg);
}
.changelog-files ul {
margin: 5px 0 0 0;
padding-left: 20px;
color: var(--text-muted);
font-family: 'JetBrains Mono', monospace;
}