big overhaul

This commit is contained in:
speyll
2025-04-09 16:09:59 +01:00
parent ae125d2bc6
commit 9af0a02acd
32 changed files with 517 additions and 410 deletions

View File

@@ -1,42 +1,58 @@
{% extends "base.html" %}
{% block head %}
{{ super() }}
{% include "partials/schema-article.html" %}
{% endblock %}
{% block content %}
<h1>{{ page.title }}</h1>
<article class="post">
<header class="post-header">
{% if page.date and page.extra.display_published | default(value=true) %}
<time datetime="{{ page.date }}">Published on:
<span class="accent-data">{{ page.date | date(format="%Y-%m-%d") }}</span>
</time>
{% endif %}
{% if page.toc and page.extra.toc %}
<h2>Table of contents</h2>
<ul>
{% for h1 in page.toc %}
<li>
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
{% if h1.children %}
{% if page.extra.author %}
<address rel="author">By
<span class="accent-data">{{ page.extra.author }}</span>
</address>
{% endif %}
<h1>{{ page.title }}</h1>
</header>
{% if page.extra.toc and page.toc %}
<div class="toc-container">
<h2>Table of content</h2>
<ul>
{% for h2 in h1.children %}
{% for h1 in page.toc %}
<li>
<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
<ul>
{% for h3 in h2.children %}
<li>
<a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
</li>
{% endfor %}
</ul>
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
<li><a href="{{ h2.permalink | safe }}">{{ h2.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{{ page.content | safe }}
<div class="post-content">
{{ page.content | safe }}
</div>
<p class="tags-data">
{% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %}
<a href="/tags/{{ tag | slugify }}">&#47;{{ tag }}&#47;</a>
{% endfor %}
{% endif %}
</p>
{% endblock content %}
{% if page.taxonomies.tags %}
<div class="post-tags">
{% for tag in page.taxonomies.tags %}
<a href="/tags/{{ tag | slugify }}" class="tag">#{{ tag }} </a>
{% endfor %}
</div>
{% endif %}
</article>
{% endblock %}