summaryrefslogtreecommitdiffstats
path: root/kyrias_website/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kyrias_website/templates')
-rw-r--r--kyrias_website/templates/archive.html12
-rw-r--r--kyrias_website/templates/base.html41
-rw-r--r--kyrias_website/templates/entry.html41
-rw-r--r--kyrias_website/templates/page.html27
-rw-r--r--kyrias_website/templates/tags.html19
5 files changed, 140 insertions, 0 deletions
diff --git a/kyrias_website/templates/archive.html b/kyrias_website/templates/archive.html
new file mode 100644
index 0000000..2399c90
--- /dev/null
+++ b/kyrias_website/templates/archive.html
@@ -0,0 +1,12 @@
+{% extends 'base.html' %}
+
+{% block content %}
+<section>
+ <h1>Archive</h1>
+ <ul id="archive-list">
+ {% for entry in entries %}
+ <li>{{ entry.date }} — <a href="{{ url_for('entry', name=entry.path) }}">{{ entry.meta.title }}</a></li>
+ {% endfor %}
+ </ul>
+</section>
+{% endblock %}
diff --git a/kyrias_website/templates/base.html b/kyrias_website/templates/base.html
new file mode 100644
index 0000000..7664e57
--- /dev/null
+++ b/kyrias_website/templates/base.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ {% assets "css_all" %}
+ <link rel="stylesheet" type="text/css" href="{{ ASSET_URL }}">
+ {% endassets %}
+{% block head %}{% endblock %}
+ </head>
+
+ <body>
+ <header class="padded-box">
+ <nav>
+ <ul>
+ <li><a href="{{ url_for("index") }}">index</a></li>
+ <li><a href="{{ url_for("archive") }}">archive</a></li>
+ <li><a href="{{ url_for("tags") }}">tags</a></li>
+ <li><a href="{{ url_for("page", path='about') }}">about</a></li>
+ </ul>
+ </nav>
+ </header>
+ <hr />
+ <div class="padded-box">
+{% block content %}{% endblock %}
+ </div>
+ <hr />
+ <footer id="bottom" class="padded-box">
+ <div>
+ <p id="copy">© 2017 Johannes Löthberg</p>
+ </div>
+
+ <div>
+ <ul id="contact-info">
+ <li><a rel="me" href="mailto:johannes@kyriasis.com">Email</a></li>
+ <li><a rel="me" href="https://twitter.com/kyriasis">Twitter</a></li>
+ </ul>
+ </div>
+ </footer>
+ </body>
+</html>
diff --git a/kyrias_website/templates/entry.html b/kyrias_website/templates/entry.html
new file mode 100644
index 0000000..8391505
--- /dev/null
+++ b/kyrias_website/templates/entry.html
@@ -0,0 +1,41 @@
+{% extends 'base.html' %}
+
+{% block head %}
+<title>{{ entry.title }}</title>
+{% endblock %}
+
+{% block content %}
+<article itemscope itemtype="http://schema.org/Article">
+ <header>
+ <h1>{{ entry.title }}</h1>
+ <time itemprop="datePublished" datetime="{{ entry.meta.date }}">{{ entry.meta.date }}</time>
+ </header>
+ <div>
+ {{ entry.html|safe }}
+ </div>
+ <footer>
+ {% if 'tags' in entry.meta %}
+ <div id="tags">
+ Tags:
+ {% set comma = joiner(",") %}
+ {% for tag in entry.meta.tags %}{{ comma() }}
+ <a href="{{ url_for('tags', _anchor=tag) }}">{{ tag }}</a>{% endfor %}
+ </div>
+ {% endif %}
+ </footer>
+</article>
+{% if older or newer %}
+<nav>
+<div id="post-nav">
+{% if older and newer %}
+ <a href="{{ url_for('entry', name=older.path) }}">Older ({{ older.meta.title }})</a> — <a href="{{ url_for('entry', name=newer.path) }}">Newer ({{ newer.meta.title }})</a>
+{% elif older %}
+ <a href="{{ url_for('entry', name=older.path) }}">Older ({{ older.meta.title }})</a>
+{% elif newer %}
+ <a href="{{ url_for('entry', name=newer.path) }}">Newer ({{ newer.meta.title }})</a>
+{% endif %}
+</div>
+</nav>
+{% endif %}
+{% endblock %}
+
diff --git a/kyrias_website/templates/page.html b/kyrias_website/templates/page.html
new file mode 100644
index 0000000..cca59af
--- /dev/null
+++ b/kyrias_website/templates/page.html
@@ -0,0 +1,27 @@
+{% extends 'base.html' %}
+
+{% block head %}
+<title>{{ page.title }}</title>
+{% endblock %}
+
+{% block content %}
+<article itemscope itemtype="http://schema.org/Article">
+ <header>
+ <h1>{{ page.title }}</h1>
+ <time itemprop="datePublished" datetime="{{ page.meta.date }}">{{ page.meta.date }}</time>
+ </header>
+ <div>
+ {{ page.html|safe }}
+ </div>
+ <footer>
+ {% if 'tags' in page.meta %}
+ <div id="tags">
+ Tags:
+ {% set comma = joiner(",") %}
+ {% for tag in page.meta.tags %}{{ comma() }}
+ <a href="{{ url_for('tags', _anchor=tag) }}">{{ tag }}</a>{% endfor %}
+ </div>
+ {% endif %}
+ </footer>
+</article>
+{% endblock %}
diff --git a/kyrias_website/templates/tags.html b/kyrias_website/templates/tags.html
new file mode 100644
index 0000000..a553523
--- /dev/null
+++ b/kyrias_website/templates/tags.html
@@ -0,0 +1,19 @@
+{% extends 'base.html' %}
+
+{% block content %}
+<section>
+ <h1>Tags</h1>
+ {% for tag in tags %}
+ <div id="{{ tag }}">
+ <h2>{{ tag }} <a class="permalink" href="#{{ tag }}" title="Link to this tag">§</a></h2>
+
+ <ul id="tag-list">
+ {% for entry in tags[tag] %}
+ <li>{{ entry.meta.date }} — <a href="{{ url_for('entry', name=entry.path) }}">{{ entry.title }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endfor %}
+</section>
+{% endblock %}
+