From 36fb80159e0a87122f26105adfbcaf471d907f42 Mon Sep 17 00:00:00 2001 From: William Light <wrl@illest.net> Date: Fri, 11 Jan 2013 14:49:07 +0100 Subject: [PATCH] add support for pages --- templates/article.html | 1 + templates/base.html | 2 +- templates/page.html | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 templates/page.html diff --git a/templates/article.html b/templates/article.html index 60ddc6d..c6a6421 100644 --- a/templates/article.html +++ b/templates/article.html @@ -1,5 +1,6 @@ {% extends "base.html" %} +{% block title %}{{ SITENAME }} · {{ article.title }}{% endblock %} {% block content %} {% include "article_stub.html" %} {% endblock %} diff --git a/templates/base.html b/templates/base.html index b54b423..55267ae 100644 --- a/templates/base.html +++ b/templates/base.html @@ -25,7 +25,7 @@ <li {%- if output_file == "index.html" %} class="selected"{% endif %}><a href="{{ SITEURL }}">Home</a></li> {% for page in PAGES -%} - <li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li> + <li {%- if output_file == page.url %} class="selected"{% endif %}><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li> {% endfor -%} <li {%- if output_file == "archives.html" %} class="selected"{% endif %}><a href="{{ SITEURL }}/archives.html">Archives</a></li> </ul> diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..fa9cedc --- /dev/null +++ b/templates/page.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} · {{ page.title }}{% endblock %} +{% block content %} + + <div class="page"> + <h1>{{ page.title }}</h1> + {{ page.content }} + </div> +{% endblock %} -- GitLab