----
-layout: default
----
-{% if page.pretitle %}
-<header class="pretitle">
- {% if page.date %}
- <div class="side"><a href="{{ page.url }}">Permalink</a> • {{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</div>
- {% endif %}
- <h1>{{ page.pretitle }}</h1>
-</header>
-{% endif %}
-
-<header class="title">
- <h1>{{ page.title }}</h1>
-</header>
-
-{{ content }}
+<!DOCTYPE html>
+<html>
+
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width">
+
+ {% assign title = page.title %}
+ {% assign pretitle = page.pretitle %}
+ {% if page.vars %}{% include {{ page.vars | prepend: "vars/" }} %}{% endif %}
+
+ <title>{% if pretitle %}{{ pretitle }} • {% endif %}{{ title }}</title>
+ {% if page.excerpt %}<meta name="description" content="{{ page.excerpt | newline_to_br | replace:'<br />',' ' | strip_html | strip_newlines | truncate: 192 }}">{% endif %}
+
+ <link rel="stylesheet" href="{{ site.baseurl }}/style.css">
+ <link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url }}">
+ {% if page.rss %}
+ <link rel="alternate" type="application/atom+xml" title="{{ site.blog.title }}" href="{{ site.baseurl }}/blog/feed.xml" />
+ {% if page.category %}<link rel="alternate" type="application/atom+xml" title="{{ site.blog.title }} • {{ title }}" href="{{ site.baseurl }}{{ page.url | replace: '.html','.xml' }}" />{% endif %}
+ {% endif %}
+ </head>
+
+ <body><div id="-frame">
+
+ <nav id="-navi">
+ {% assign menu = site.pages | menu: page.url %}
+ {% include menu-level.html menu=menu %}
+ </nav>
+
+ <article id="-content">
+ {% comment %} Unfortunately, the variables we set above are not preserved for sub-layouts. So, we have to have all the layout here. {% endcomment %}
+ {% if pretitle %}
+ <header class="pretitle">
+ {% if page.post %}
+ {% include post-header.html item=page %}
+ {% endif %}
+ <h1>{{ pretitle }}</h1>
+ </header>
+ {% endif %}
+
+ <header class="title">
+ <h1>{{ title }}</h1>
+ </header>
+
+ {{ content }}
+
+ {% if page.post %}
+ <p class="comment">Comments? <a href="mailto:post-AT-ralfj-DOT-de">Drop me a mail</a>{% if page.reddit %} or <a href="https://www.reddit.com/r{{ page.reddit }}">leave a note on reddit</a>{% endif %}!</p>
+ {% endif %}
+ </article>
+
+ </div></body>
+
+</html>