diff options
author | Christian Cleberg <hello@cleberg.net> | 2024-04-27 17:01:13 -0500 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2024-04-27 17:01:13 -0500 |
commit | 74992aaa27eb384128924c4a3b93052961a3eaab (patch) | |
tree | d5193997d72a52f7a6d6338ea5da8a6c80b4eddc /templates/page.html | |
parent | 3def68d80edf87e28473609c31970507d9f03467 (diff) | |
download | cleberg.net-74992aaa27eb384128924c4a3b93052961a3eaab.tar.gz cleberg.net-74992aaa27eb384128924c4a3b93052961a3eaab.tar.bz2 cleberg.net-74992aaa27eb384128924c4a3b93052961a3eaab.zip |
test conversion back to markdown
Diffstat (limited to 'templates/page.html')
-rw-r--r-- | templates/page.html | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..b858d1a --- /dev/null +++ b/templates/page.html @@ -0,0 +1,51 @@ +{% extends "base.html" %} + +{% block title %} +<title>{{ page.title }} | cleberg.net</title> +{% endblock %} + +{% block css %} +<link rel="stylesheet" href="/syntax-theme-dark.css" media="(prefers-color-scheme: dark)"> +<link rel="stylesheet" href="/syntax-theme-light.css" media="(prefers-color-scheme: light)"> +<link rel="stylesheet" href="/styles.css"> +{% endblock css %} + +{% block content %} +<section class="post-metadata"> + <h1>{{ page.title }}</h1> + {% if page.date %} + <p><time datetime="{{ page.date | date(format='%Y-%m-%d %H:%M:%S') }}">{{ page.date }}</time></p> + {% endif %} + {% if page.updated %} + <p>Last Updated: <time datetime="{{ page.updated | date(format='%Y-%m-%d %H:%M:%S') }}">{{ page.updated }}</time></p> + {% endif %} + <p>{{ page.word_count }} words; {{ page.reading_time }} minute(s)</p> +{% if page.toc %} + <details open> + <summary>Table of Contents</summary> + <nav class="page-nav" aria-label="page-nav" role="navigation"> + <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> + </nav> + </details> +{% endif %} +</section> + +<article role="article"> +{{ page.content | safe }} +</article> +{% endblock content %} |