From 33226334d95e642c4bc5a69d41f81bc6c80344a2 Mon Sep 17 00:00:00 2001 From: Manuel Streuhofer Date: Fri, 2 Jan 2015 22:57:06 +0100 Subject: [PATCH] added missing templates, consistent site title on all pages new templates: - author.html - authors.html - category.html - categories.html - period_archives.html - tags.html updated template: - archives.html: site title - article.html: site title - page.html: site title - tag.html: extend base.html instead of index.html give the page a proper look as well as a explaining

(author.html + category.html share the same look, just the explaining

differs) --- templates/archives.html | 2 +- templates/article.html | 2 +- templates/author.html | 35 ++++++++++++++++++++++++++++++++ templates/authors.html | 15 ++++++++++++++ templates/categories.html | 17 ++++++++++++++++ templates/category.html | 35 ++++++++++++++++++++++++++++++++ templates/page.html | 2 +- templates/period_archives.html | 36 +++++++++++++++++++++++++++++++++ templates/tag.html | 37 ++++++++++++++++++++++++++++++++-- templates/tags.html | 17 ++++++++++++++++ 10 files changed, 193 insertions(+), 5 deletions(-) create mode 100644 templates/author.html create mode 100644 templates/authors.html create mode 100644 templates/categories.html create mode 100644 templates/category.html create mode 100644 templates/period_archives.html create mode 100644 templates/tags.html diff --git a/templates/archives.html b/templates/archives.html index 99dc5a4..a57590a 100644 --- a/templates/archives.html +++ b/templates/archives.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}{{ SITENAME }} Archive {% endblock %} +{% block title %}Blog Archive — {{ SITENAME }}{% endblock %} {% block content %}
diff --git a/templates/article.html b/templates/article.html index 3ce2333..b726c19 100644 --- a/templates/article.html +++ b/templates/article.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}{{ article.title|striptags }}{% endblock %} +{% block title %}{{ article.title|striptags }} — {{ SITENAME }}{% endblock %} {% block content %}
diff --git a/templates/author.html b/templates/author.html new file mode 100644 index 0000000..737eb99 --- /dev/null +++ b/templates/author.html @@ -0,0 +1,35 @@ +{% extends "base.html" %} +{% block title %}Author: {{ author }} — {{ SITENAME }}{% endblock %} +{% block content %} +
+
+
+

Author: {{ author }}

+
+ +
+ {% for year, date_year in dates|groupby('date.year')|sort(reverse=NEWEST_FIRST_ARCHIVES) %} +

{{ year }}

+ {% for month, articles in date_year|groupby('date.month')|sort(reverse=NEWEST_FIRST_ARCHIVES) %} + {% for article in articles %} +
+

{{ article.title }}

+ + +
+ {% endfor %} + {% endfor %} + {% endfor %} +
+
+
+{% endblock %} diff --git a/templates/authors.html b/templates/authors.html new file mode 100644 index 0000000..0dea62a --- /dev/null +++ b/templates/authors.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block title %}Authors — {{ SITENAME }}{% endblock %} +{% block content %} +
+
+
+

Blog Authors

+
+ + {% for author, articles in authors|sort %} +

{{ author.name }} ({{ articles|count }})

+ {% endfor %} +
+
+{% endblock %} diff --git a/templates/categories.html b/templates/categories.html new file mode 100644 index 0000000..13857ac --- /dev/null +++ b/templates/categories.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} +{% block title %}Categories — {{ SITENAME }}{% endblock %} +{% block content %} +
+
+
+

Blog Categories

+
+ +

+ {% for category, articles in categories|sort %} + {{ category.name }} ({{ articles|count }})
+ {% endfor %} +

+
+
+{% endblock %} diff --git a/templates/category.html b/templates/category.html new file mode 100644 index 0000000..89c7b53 --- /dev/null +++ b/templates/category.html @@ -0,0 +1,35 @@ +{% extends "base.html" %} +{% block title %}Category: {{ category }} — {{ SITENAME }}{% endblock %} +{% block content %} +
+
+
+

Category: {{ category }}

+
+ +
+ {% for year, date_year in dates|groupby('date.year')|sort(reverse=NEWEST_FIRST_ARCHIVES) %} +

{{ year }}

+ {% for month, articles in date_year|groupby('date.month')|sort(reverse=NEWEST_FIRST_ARCHIVES) %} + {% for article in articles %} +
+

{{ article.title }}

+ + +
+ {% endfor %} + {% endfor %} + {% endfor %} +
+
+
+{% endblock %} diff --git a/templates/page.html b/templates/page.html index b19c3d6..39ad053 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,5 +1,5 @@ {% extends 'base.html' %} -{% block title %}{{ page.title }} | {{ SITENAME }} {% endblock %} +{% block title %}{{ page.title }} — {{ SITENAME }}{% endblock %} {% block content %}
diff --git a/templates/period_archives.html b/templates/period_archives.html new file mode 100644 index 0000000..14b19c1 --- /dev/null +++ b/templates/period_archives.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} +{% block title %}Archive – {{ period[2] }} {{ period[1] }} {{ period[0] }} — {{ SITENAME }}{% endblock %} +{% block content %} +
+
+
+

Blog Archive – {{ period[2] }} {{ period[1] }} {{ period[0] }}

+
+ +
+ {% for year, date_year in dates|groupby('date.year')|sort(reverse=NEWEST_FIRST_ARCHIVES) %} +

{{ year }}

+ {% for month, articles in date_year|groupby('date.month')|sort(reverse=NEWEST_FIRST_ARCHIVES) %} + {% for article in articles %} +
+

{{ article.title }}

+ + +
+ {% endfor %} + {% endfor %} + {% endfor %} +
+
+
+{% endblock %} diff --git a/templates/tag.html b/templates/tag.html index 81d21ba..62afb5c 100644 --- a/templates/tag.html +++ b/templates/tag.html @@ -1,2 +1,35 @@ -{% extends 'index.html' %} -{% block title %}{{ SITENAME }} - {{ tag }}{% endblock %} +{% extends "base.html" %} +{% block title %}Tag: {{ tag }} — {{ SITENAME }}{% endblock %} +{% block content %} +
+
+
+

Tag: {{ tag }}

+
+ +
+ {% for year, date_year in dates|groupby('date.year')|sort(reverse=NEWEST_FIRST_ARCHIVES) %} +

{{ year }}

+ {% for month, articles in date_year|groupby('date.month')|sort(reverse=NEWEST_FIRST_ARCHIVES) %} + {% for article in articles %} +
+

{{ article.title }}

+ + +
+ {% endfor %} + {% endfor %} + {% endfor %} +
+
+
+{% endblock %} diff --git a/templates/tags.html b/templates/tags.html new file mode 100644 index 0000000..c22a100 --- /dev/null +++ b/templates/tags.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} +{% block title %}Tags — {{ SITENAME }}{% endblock %} +{% block content %} +
+
+
+

Blog Tags

+
+ +

+ {% for tag, articles in tags|sort %} + {{ tag.name }} ({{ articles|count }})
+ {% endfor %} +

+
+
+{% endblock %}