diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2014-10-14 01:22:31 +0200 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2014-10-14 01:27:05 +0200 |
commit | d9ae9febd9668f89c8694b66d7a0323027d416b2 (patch) | |
tree | 20d40d7b9e939c90eb7cd8b09fb7f076722c3443 /src/templates | |
parent | fd1c56a9763ab2da0edcfdfbafc51db369c3950f (diff) | |
download | website-d9ae9febd9668f89c8694b66d7a0323027d416b2.tar.xz |
redo website using bupa, ReST, and jinja templates
Diffstat (limited to 'src/templates')
-rw-r--r-- | src/templates/journal.html | 33 | ||||
-rw-r--r-- | src/templates/layout.html | 36 | ||||
-rw-r--r-- | src/templates/nav.html | 7 | ||||
-rw-r--r-- | src/templates/page.html | 17 |
4 files changed, 93 insertions, 0 deletions
diff --git a/src/templates/journal.html b/src/templates/journal.html new file mode 100644 index 0000000..0269d2e --- /dev/null +++ b/src/templates/journal.html @@ -0,0 +1,33 @@ +{% extends 'layout.html' %} + +{% block content %} + <header> +{% include 'nav.html' %} + <h1>The lost journal</h1> + </header> + +{% for entry in entries %} + <article itemscope itemtype="http://schema.org/Article" + class="entry" id="entry:{{ entry.id }}"> + + <h2 itemprop="name" class="title">{{ entry.title }}</h2> + + <div class="info"> + Published on + <time itemprop="datePublished" datetime="{{ entry.date.strftime('%Y-%m-%d') }}"> + {{ entry.date.strftime('%Y-%m-%d') }} + </time> + + <span itemprop="author" itemscope itemtype="http://schema.org/Person"> + {% if entry.author_link %} + by <a itemprop="name" rel="author" href="{{ entry.author_link }}">{{ entry.author }}</a> + {% else %} + by {{ entry.author }} + {% endif %} + </span> + </div> + + {{ entry.body }} + </article> +{% endfor %} +{% endblock content %} diff --git a/src/templates/layout.html b/src/templates/layout.html new file mode 100644 index 0000000..45ab99d --- /dev/null +++ b/src/templates/layout.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>{{ title }}</title> + <link href="style.css" rel="stylesheet"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="author" content="Johannes Löthberg"> + <link rel="me" href="https://theos.kyriasis.com/~kyrias/about.html" + title="Johannes Löthberg <johannes@kyriasis.com>"> +</head> +<body itemscope itemtype="http://schema.org/WebPage"> +{% block content %}{% endblock %} +<footer> + <div id="foot-left"> + <p id="copy"> + © <span itemprop="copyrightYear">2014</span> + by <span itemprop="copyrightHolder">Johannes Löthberg</span> + </p> + + <div id="contact-info-wrapper"> + <p>You can find me on:</p> + <div id="contact-info"> + <a rel="me" href="mailto:johannes@kyriasis.com">Email</a> + <a rel="me" href="https://twitter.com/kyriasis">Twitter</a> + <a rel="me" href="https://plus.google.com/+JohannesLothberg">Google+</a> + <a rel="me" href="sms:+46739525259">SMS</a> + </div> + </div> + </div> + <a id="emblem" href="http://www.catb.org/hacker-emblem/"> + <img src="resources/glider.png" alt="hacker emblem" /> + </a> +</footer> +</body> +</html> diff --git a/src/templates/nav.html b/src/templates/nav.html new file mode 100644 index 0000000..e40b4ed --- /dev/null +++ b/src/templates/nav.html @@ -0,0 +1,7 @@ +<nav> + <ul> + <li><a href="index.html">~kyrias/</a></li> + <li><a href="journal.html">journal/</a></li> + <li><a href="about.html">about/</a></li> + </ul> +</nav> diff --git a/src/templates/page.html b/src/templates/page.html new file mode 100644 index 0000000..9e0dddc --- /dev/null +++ b/src/templates/page.html @@ -0,0 +1,17 @@ +{% extends 'layout.html' %} + +{% block content %} + <header> +{% include 'nav.html' %} + <h1>{{ page.title }}</h1> + </header> + + <article id="{{ page.article_id }}" class="botborder" itemprop="mainContentOfPage"> + + {{ page.body }} + + <p id="last-upd">Last updated <time itemprop="dateModified" datetime="{{ page.date }}">{{ page.date }}</time></p> + <p id="author"><a rel="author" href="{{ page.author_link }}">{{ page.author }}</a></p> + + </article> +{% endblock content %} |