big overhaul
This commit is contained in:
58
templates/blog/page.html
Normal file
58
templates/blog/page.html
Normal file
@@ -0,0 +1,58 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
{% include "partials/schema-article.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<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.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 h1 in page.toc %}
|
||||
<li>
|
||||
<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 %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="post-content">
|
||||
{{ page.content | safe }}
|
||||
</div>
|
||||
|
||||
{% if page.taxonomies.tags %}
|
||||
<footer class="post-tags">
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
<a href="/tags/{{ tag | slugify }}" class="tag">#{{ tag }}</a>
|
||||
{% endfor %}
|
||||
</footer>
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user