From c8cfe63aac73a92ae02354a5306ca5480808daff Mon Sep 17 00:00:00 2001 From: Hans-Peter Oeri <hp@oeri.ch> Date: Thu, 25 Oct 2018 13:27:51 +0200 Subject: re-do site in schiedsstelle layout --- theme/cccevents/templates/category.html | 67 +++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 theme/cccevents/templates/category.html (limited to 'theme/cccevents/templates/category.html') diff --git a/theme/cccevents/templates/category.html b/theme/cccevents/templates/category.html new file mode 100644 index 0000000..0c8e031 --- /dev/null +++ b/theme/cccevents/templates/category.html @@ -0,0 +1,67 @@ +{% extends "index.html" %} + +{% block title %} + {% if category == "medien" %} + {{ SITENAME }} | Medienmitteilungen + {% elif category == "pressreview" %} + {{ SITENAME }} | Pressereaktionen + {% else %} + {{ SITENAME }} | Articles in the {{ category }} category + {% endif %} +{% endblock %} + +{% block content_title %} + {% if category == "medien" %} + <h1>Medienmitteilungen</h1> + {% elif category == "pressreview" %} + <h1>Pressereaktionen</h1> + {% else %} + <h1>Articles in the {{ category }} category</h1> + {% endif %} +{% endblock %} + +{% block content %} + {% if category == "pressreview" %} + + {% for article in dates %} + + {% if (dates[loop.index-1].date.strftime("%Y")) != ((dates[loop.index-2]).date.strftime("%Y")) %} + <h2> {{ article.date.strftime("%Y") }} </h2> + {% endif %} + + {% if (dates[loop.index-1].date.strftime("%Y%m%d")) != ((dates[loop.index-2]).date.strftime("%Y%m%d")) %} + <h3> {{ article.date.strftime("%-d. %B") }} </h3> + <ul> + {% endif %} + + <li> + {{ article.publisher }}: <a href="{{ article.ext_url }}">{{ article.title }}</a> + </li> + + {% if dates[loop.index] %} + {% if (dates[loop.index-1].date.strftime("%Y%m%d")) != ((dates[loop.index]).date.strftime("%Y%m%d")) %} + </ul> + {% endif %} + {% else %} + </ul> + {% endif %} + + {% endfor %} + + {% else %} + <ul> + {% for article in dates %} + <li> + <article class="hentry"> + {{ article.date.strftime("%A, %b %-d, %Y") }} - <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a><br /> + </article> + </li> + {% endfor %} + </ul> + {% endif %} + <h2>Abonniere diesen Kanal</h2> + <ul> + <li><a href="feeds/rss_{{ category }}.xml">RSS Feed</a> </li> + <li><a href="feeds/atom_{{ category }}.xml">ATOM Feed</a> </li> + </ul> +{% endblock %} -- cgit v1.2.3