Skip to content

Commit

Permalink
Merge pull request duilio#65 from mstreuhofer/templates
Browse files Browse the repository at this point in the history
added missing templates, consistent site title on all pages
  • Loading branch information
duilio committed Jan 3, 2015
2 parents 949202f + 3322633 commit 9f36da0
Show file tree
Hide file tree
Showing 10 changed files with 193 additions and 5 deletions.
2 changes: 1 addition & 1 deletion templates/archives.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% block title %}{{ SITENAME }} Archive {% endblock %}
{% block title %}Blog Archive — {{ SITENAME }}{% endblock %}
{% block content %}
<div>
<article role="article">
Expand Down
2 changes: 1 addition & 1 deletion templates/article.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% block title %}{{ article.title|striptags }}{% endblock %}
{% block title %}{{ article.title|striptags }} &mdash; {{ SITENAME }}{% endblock %}
{% block content %}
<div>
<article class="hentry" role="article">
Expand Down
35 changes: 35 additions & 0 deletions templates/author.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% extends "base.html" %}
{% block title %}Author: {{ author }} &mdash; {{ SITENAME }}{% endblock %}
{% block content %}
<div>
<article role="article">
<header>
<h1 class="entry-title">Author: {{ author }}</h1>
</header>

<div id="blog-archives">
{% for year, date_year in dates|groupby('date.year')|sort(reverse=NEWEST_FIRST_ARCHIVES) %}
<h2>{{ year }}</h2>
{% for month, articles in date_year|groupby('date.month')|sort(reverse=NEWEST_FIRST_ARCHIVES) %}
{% for article in articles %}
<article>
<h1><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
<time datetime="{{ article.date }}" pubdate>
<span class="month">{{ article.date.strftime('%B')[:3] }}</span>
<span class="day">{{ article.date.strftime('%d') }}</span>
<span class="year">{{ article.date.strftime('%Y') }}</span>
</time>
<footer>
<span class="categories">posted in
<a class='category' href='{{ SITEURL }}/{{ article.category.url }}'>{{ article.category }}</a>
</span>
{% include '_includes/article_stats.html' %}
</footer>
</article>
{% endfor %}
{% endfor %}
{% endfor %}
</div>
</article>
</div>
{% endblock %}
15 changes: 15 additions & 0 deletions templates/authors.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% extends "base.html" %}
{% block title %}Authors &mdash; {{ SITENAME }}{% endblock %}
{% block content %}
<div>
<article role="article">
<header>
<h1 class="entry-title">Blog Authors</h1>
</header>

{% for author, articles in authors|sort %}
<p><a href="{{ SITEURL }}/{{ author.url }}">{{ author.name }}</a> ({{ articles|count }})</p>
{% endfor %}
</article>
</div>
{% endblock %}
17 changes: 17 additions & 0 deletions templates/categories.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends "base.html" %}
{% block title %}Categories &mdash; {{ SITENAME }}{% endblock %}
{% block content %}
<div>
<article role="article">
<header>
<h1 class="entry-title">Blog Categories</h1>
</header>

<p>
{% for category, articles in categories|sort %}
<a href="{{ SITEURL }}/{{ category.url }}">{{ category.name }}</a> ({{ articles|count }})<br>
{% endfor %}
</p>
</article>
</div>
{% endblock %}
35 changes: 35 additions & 0 deletions templates/category.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% extends "base.html" %}
{% block title %}Category: {{ category }} &mdash; {{ SITENAME }}{% endblock %}
{% block content %}
<div>
<article role="article">
<header>
<h1 class="entry-title">Category: {{ category }}</h1>
</header>

<div id="blog-archives">
{% for year, date_year in dates|groupby('date.year')|sort(reverse=NEWEST_FIRST_ARCHIVES) %}
<h2>{{ year }}</h2>
{% for month, articles in date_year|groupby('date.month')|sort(reverse=NEWEST_FIRST_ARCHIVES) %}
{% for article in articles %}
<article>
<h1><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
<time datetime="{{ article.date }}" pubdate>
<span class="month">{{ article.date.strftime('%B')[:3] }}</span>
<span class="day">{{ article.date.strftime('%d') }}</span>
<span class="year">{{ article.date.strftime('%Y') }}</span>
</time>
<footer>
<span class="categories">posted in
<a class='category' href='{{ SITEURL }}/{{ article.category.url }}'>{{ article.category }}</a>
</span>
{% include '_includes/article_stats.html' %}
</footer>
</article>
{% endfor %}
{% endfor %}
{% endfor %}
</div>
</article>
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion templates/page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% block title %}{{ page.title }} | {{ SITENAME }} {% endblock %}
{% block title %}{{ page.title }} &mdash; {{ SITENAME }}{% endblock %}
{% block content %}
<div>
<article role="article">
Expand Down
36 changes: 36 additions & 0 deletions templates/period_archives.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% extends "base.html" %}
{% block title %}Archive &ndash; {{ period[2] }} {{ period[1] }} {{ period[0] }} &mdash; {{ SITENAME }}{% endblock %}
{% block content %}
<div>
<article role="article">
<header>
<h1 class="entry-title">Blog Archive &ndash; {{ period[2] }} {{ period[1] }} {{ period[0] }}</h1>
</header>

<div id="blog-archives">
{% for year, date_year in dates|groupby('date.year')|sort(reverse=NEWEST_FIRST_ARCHIVES) %}
<h2>{{ year }}</h2>
{% for month, articles in date_year|groupby('date.month')|sort(reverse=NEWEST_FIRST_ARCHIVES) %}
{% for article in articles %}
<article>
<h1><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
<time datetime="{{ article.date }}" pubdate>
<span class="month">{{ article.date.strftime('%B')[:3] }}</span>
<span class="day">{{ article.date.strftime('%d') }}</span>
<span class="year">{{ article.date.strftime('%Y') }}</span>
</time>
<footer>
<span class="categories">posted in
<a class='category' href='{{ SITEURL }}/{{ article.category.url }}'>{{ article.category }}</a>
{{ tag }}
</span>
{% include '_includes/article_stats.html' %}
</footer>
</article>
{% endfor %}
{% endfor %}
{% endfor %}
</div>
</article>
</div>
{% endblock %}
37 changes: 35 additions & 2 deletions templates/tag.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
{% extends 'index.html' %}
{% block title %}{{ SITENAME }} - {{ tag }}{% endblock %}
{% extends "base.html" %}
{% block title %}Tag: {{ tag }} &mdash; {{ SITENAME }}{% endblock %}
{% block content %}
<div>
<article role="article">
<header>
<h1 class="entry-title">Tag: {{ tag }}</h1>
</header>

<div id="blog-archives">
{% for year, date_year in dates|groupby('date.year')|sort(reverse=NEWEST_FIRST_ARCHIVES) %}
<h2>{{ year }}</h2>
{% for month, articles in date_year|groupby('date.month')|sort(reverse=NEWEST_FIRST_ARCHIVES) %}
{% for article in articles %}
<article>
<h1><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
<time datetime="{{ article.date }}" pubdate>
<span class="month">{{ article.date.strftime('%B')[:3] }}</span>
<span class="day">{{ article.date.strftime('%d') }}</span>
<span class="year">{{ article.date.strftime('%Y') }}</span>
</time>
<footer>
<span class="categories">posted in
<a class='category' href='{{ SITEURL }}/{{ article.category.url }}'>{{ article.category }}</a>
</span>
{% include '_includes/article_stats.html' %}
</footer>
</article>
{% endfor %}
{% endfor %}
{% endfor %}
</div>
</article>
</div>
{% endblock %}
17 changes: 17 additions & 0 deletions templates/tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends "base.html" %}
{% block title %}Tags &mdash; {{ SITENAME }}{% endblock %}
{% block content %}
<div>
<article role="article">
<header>
<h1 class="entry-title">Blog Tags</h1>
</header>

<p>
{% for tag, articles in tags|sort %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag.name }}</a> ({{ articles|count }})<br>
{% endfor %}
</p>
</article>
</div>
{% endblock %}

0 comments on commit 9f36da0

Please sign in to comment.