Tidy up calendar display

This commit is contained in:
Yingtong Li 2019-02-13 15:44:59 +11:00
parent 114b810770
commit a681b05473
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -44,10 +44,13 @@
<tr><!-- Masthead --> <tr><!-- Masthead -->
<th class="small-12 large-12 columns first last"> <th class="small-12 large-12 columns first last">
<table> <table>
{% set ns = namespace(last_date=None) %}
{% for event in events %} {% for event in events %}
<tr> <tr>
<td class="small-12 large-3">{{ event.date.strftime('%a %d %b') }}</td> {#<td class="small-12 large-3">{% if ns.last_date != event.date.date() %}{{ event.date.strftime('%a %d %b') }}{% endif %}</td>{% set ns.last_date = event.date.date() %}
<td class="small-12 large-9 last small-margafter"><b>{{ event.title }}</b>{% if event.link %} · <a href="{{ event.link }}">Read more &#x203A;</a>{% endif %}</td> <td class="small-12 large-9 last small-margafter"><b>{{ event.title }}</b>{% if event.link %} · <a href="{{ event.link }}">Read more &#x203A;</a>{% endif %}</td>#}
<td class="small-12 large-3">{% if ns.last_date != event.date.date() %}{{ event.date.strftime('%a %d %b') }}{% endif %}</td>{% set ns.last_date = event.date.date() %}
<td class="small-12 large-9 last small-margafter">{% if event.link %}<a href="{{ event.link }}" style="color: inherit;">{% endif %}<b>{{ event.title }}</b>{% if event.link %}</a>{% endif %}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>