my-website/templates/page.html

47 lines
1.6 KiB
HTML

{% extends "base.html" %} {% block metadata %}
<meta name="description" content="{{ page.description }}" />
<script defer src="/scripts/relativetime.js"></script>
{% endblock %} {% block content %}
<h2>{{ page.title }}</h2>
<div class="visible-article-metadata">
{% if page.date and page.date is defined %}
<p>
<span class="article-metadata-label">First published</span>:
<time class="relative-timestamp" datetime="{{page.date}}"
>{{ page.date | date(format="%F %R (%Z)", timezone="Europe/Berlin")
}}</time
>
</p>
{% endif %} {% if page.updated and page.updated != page.date %}
<p>
<span class="article-metadata-label">Last updated on</span>:
<time class="relative-timestamp" datetime="{{page.updated}}"
>{{ page.updated | date(format="%F %R (%Z)", timezone="Europe/Berlin")
}}</time
>
</p>
{% endif %} {% if page.extra.author and page.extra.author != "" %}
<p>
<span class="article-metadata-label">Author(s)</span>: {{page.extra.author}}
</p>
{% else %}
<p>
<span class="article-metadata-label">Author</span>: Jonas Tobias Hopusch
</p>
{% endif %} {% if page.extra.license and page.extra.license != "" %}
<p id="article-license">
<span class="article-metadata-label"
>Article is provided under the following license</span
>: {{page.extra.license}}
</p>
{% else %}
<p class="article-missinglicense">
No license is granted for this article. All rights reserved.
</p>
{% endif %}
</div>
<hr id="last-article-metadata" />
<div>{{ page.content | safe }}</div>
{% endblock content %}