diff --git a/templates/article.html b/templates/article.html index 5f792bda159ce09e81ad87d73fe64ac75030109c..921def0053d38420bec3cfaf1ae291aca9a7262f 100644 --- a/templates/article.html +++ b/templates/article.html @@ -15,14 +15,16 @@ <article> <h1>{{ article.title }}</h1> {% if article.author %} - <h2>{{ article.author }}</h2> + <h2>{{ article.author }} ({% if article.institution %}{{ article.institution }}{% else %}{{ DEFAULT_INSTITUTION }}{% endif %})</h2> {% endif %} {% import 'translations.html' as translations with context %} {{ translations.translations_for(article) }} <aside> <ul> <li> - <time datetime="{{ article.date }}">{{ article.date|strftime('%b %d, %Y') }}</time> + <time datetime="{{ article.date }}">{{ article.date|strftime('%b %d, %Y') }}, + {% if article.time %}{{ article.time }}{% else %}{{ DEFAULT_TIME }}{% endif %}</time> + {% if article.location %}{{ article.location }}{% else %}{{ DEFAULT_LOCATION }}{% endif %} </li> {% if article.modified %} <li> diff --git a/templates/category.html b/templates/category.html index 2082ab2aa2a29229e504db43da6f64bd9311bdad..6736c88e40d335801d7b438078c3ca6e69c88416 100644 --- a/templates/category.html +++ b/templates/category.html @@ -7,28 +7,20 @@ <section id="list"> <h2>{{ category }}</h2> <ul> - {% set new = namespace(p=0) %} - {% for article in articles_page.object_list %} - {% set period = article.date | strftime('%Y') %} - {% if period != new.p %} - <h3>{{ period }}</h3> - <li> - <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} - {% if article.author %} - -- {{ article.author }} - {% endif %} - - </a> - <time>{{ article.date|strftime('%b %Y') }}</time> - </li> - {% set new.p = article.date | strftime('%Y') %} - {% elif period == new.p %} - <li> - <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> - <time>{{ article.date|strftime('%b %Y') }}</time> - </li> - {% endif %} - {% endfor %} + {% set current = 0 %} + {% for article in articles_page.object_list %} + {% set period = article.date | strftime('%Y') %} + {% if period != current %} + <h3>{{ period }}</h3> + {% set current = period %} + {% endif %} + <li> + <time>{{ article.date|strftime('%d %b %Y') }}</time><span> </span> + <a href="{{ SITEURL }}/{{ article.url }}"><strong>{{ article.title }}</strong> + {{ article.author }} + </a> + </li> + {% endfor %} </ul> </section> {% if articles_page.has_other_pages() %} diff --git a/templates/index.html b/templates/index.html index 215be3e8de3d9d610988ba2b31283e29e6a29659..6e516905c8c4ebf7e76671219bc252b6a15925e0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,22 +4,19 @@ {% if INDEX %}<section>{{ INDEX }}</section>{% endif %} <section id="home"> <ul> - {% for article in articles_page.object_list %} - <li> - {% if article.date.isocalendar() >= article.date.today().isocalendar() %} - <h1><time datetime="{{ article.date }}">{{ article.date|strftime('%b %d, %Y') }}</time></h1> - <h2><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" - title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> - {% if article.author %} - <h3>{{ article.author }}</h3> - {% endif %} - <p> - {{ article.summary }} - <a href="{{ SITEURL }}/{{ article.url }}"><em>Read more...</em></a> - </p> - </li> - {% endif %} - {% endfor %} + {% for article in articles_page.object_list %} + <li> + {% if NOT_FUTURE_ONLY or article.date.isocalendar() >= article.date.today().isocalendar() %} + <h2> + <time datetime="{{ article.date }}">{{ article.date|strftime('%d %b %Y') }}</time> + <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" + title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a> + </h2> + <h3>{{ article.author }} ({% if article.institution %}{{ article.institution }}{% else %}{{ DEFAULT_INSTITUTION }}{% endif %}) + </h3> + {% endif %} + </li> + {% endfor %} </ul> {% if articles_page.has_other_pages() %} {% include 'pagination.html' %}