Make time or date mentions machine-parsable using time tag #1

Merged
jotoho merged 4 commits from html-time-tag into master 2021-09-15 21:47:33 +02:00
2 changed files with 69 additions and 37 deletions

View file

@ -3,10 +3,18 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link type="text/css" rel="stylesheet" href="{{ get_url(path='css/general.css') }}" /> <link
type="text/css"
rel="stylesheet"
href="{{ get_url(path='css/general.css') }}"
/>
<meta name="color-scheme" content="dark light" /> <meta name="color-scheme" content="dark light" />
<link rel="canonical" href="{{ current_url }}" /> <link rel="canonical" href="{{ current_url }}" />
<link rel="alternate" type="application/atom+xml" href="{{ get_url(path='atom.xml') }}"/> <link
rel="alternate"
type="application/atom+xml"
href="{{ get_url(path='atom.xml') }}"
/>
<!--Mastodon account ownership verification--> <!--Mastodon account ownership verification-->
<link rel="me" href="https://ruhr.social/@jotoho" /> <link rel="me" href="https://ruhr.social/@jotoho" />
<title>jotoho.de - A personal website</title> <title>jotoho.de - A personal website</title>
@ -15,39 +23,60 @@
<body> <body>
<header> <header>
<div> <div>
<a href="{{ config.base_url }}"><h1>jotoho.de - My personal website</h1></a> <a href="{{ config.base_url }}"
><h1>jotoho.de - My personal website</h1></a
>
</div> </div>
</header> </header>
<nav class="globalnav"> <nav class="globalnav">
<!--<a class="globalnav-element" href="{{ get_url(path='@/blog/_index.md') }}"> Blog </a>--> <!--<a class="globalnav-element" href="{{ get_url(path='@/blog/_index.md') }}"> Blog </a>-->
<a class="globalnav-element" href="{{ get_url(path='@/servers/index.md') }}"> Servers </a> <a
<a class="globalnav-element" href="{{ get_url(path='@/profiles/index.md') }}"> Profiles </a> class="globalnav-element"
href="{{ get_url(path='@/servers/index.md') }}"
>
Servers
</a>
<a
class="globalnav-element"
href="{{ get_url(path='@/profiles/index.md') }}"
>
Profiles
</a>
</nav> </nav>
<hr /> <hr />
<article id="mainarticle"> <article id="mainarticle">{% block content %} {% endblock %}</article>
{% block content %} {% endblock %}
</article>
<hr /> <hr />
<footer> <footer>
<p> <p>
Copyright {{ now() | date(format="%Y", timezone="Europe/Berlin") }} Jonas Tobias Hopusch (<a <!--{% set current_year = now() | date(format="%Y",
rel="noreferer" href="https://gitlab.com/jotoho" timezone="Europe/Berlin") %} -->
Copyright
<time datetime="{{ current_year }}">{{ current_year }}</time>
Jonas Tobias Hopusch (<a
rel="noreferer"
href="https://gitlab.com/jotoho"
>@jotoho</a >@jotoho</a
>) - <strong>All rights reserved</strong> >) - <strong>All rights reserved</strong>
</p> </p>
<p> <p>
This page is being served using This page is being served using
<a rel="noreferer" href="https://docs.gitlab.com/ee/user/project/pages/">GitLab Pages</a> <a
rel="noreferer"
href="https://docs.gitlab.com/ee/user/project/pages/"
>GitLab Pages</a
>
and created with the help of and created with the help of
<a rel="noreferer" href="https://www.getzola.org/">Zola</a>. <a rel="noreferer" href="https://www.getzola.org/">Zola</a>. You
You can contact me via can contact me via
<a href="mailto:webmaster@jotoho.de">email</a> <a href="mailto:webmaster@jotoho.de">email</a>
regarding any issues with this website. regarding any issues with this website.
</p> </p>
<p> <p>
You can download my OpenPGP public keys <a href="https://downloads.jotoho.de/openpgp/">here</a>. You can download my OpenPGP public keys
<a href="https://downloads.jotoho.de/openpgp/">here</a>.
</p> </p>
</footer> </footer>
</body> </body>

View file

@ -1,26 +1,29 @@
{% extends "base.html" %} {% extends "base.html" %} {% block metadata %}
{% block metadata %} <meta name="description" content="{{ page.description }}" />
<meta name="description" content="{{ page.description }}"/> {% endblock %} {% block content %}
<h2>{{ page.title }}</h2>
{% endblock %} {% if page.date and page.date is defined %}
<p>
{% block content %} <em
<h2> ><strong>Published on</strong>:
{{ page.title }} <time datetime="{{page.date}}"
</h2> >{{ page.date | date(format="%A, %e %B %Y %R %Z",
{% if page.date and page.date is defined %} timezone="Europe/Berlin") }}</time
<p> ></em
<em><strong>Published on</strong>: {{ page.date | date(format="%A, %e %B %Y %R %Z", timezone="Europe/Berlin") }}</em> >
</p> </p>
{% endif %} {% endif %} {% if page.updated and page.updated != page.date %}
{% if page.updated and page.updated != page.date %} <p>
<p> <em
<em><strong>Last updated on</strong>: {{ page.updated | date(format="%A, %e %B %Y %R %Z", timezone="Europe/Berlin") }}</em> ><strong>Last updated on</strong>:
</p> <time datetime="{{page.updated}}"
{% endif %} >{{ page.updated | date(format="%A, %e %B %Y %R %Z",
<div> timezone="Europe/Berlin") }}</time
{{ page.content | safe }} ></em
</div> >
</p>
{% endif %}
<div>{{ page.content | safe }}</div>
{% endblock content %} {% endblock content %}