varia.website/themes/varia/templates/category.html

141 lines
5.9 KiB
HTML
Raw Normal View History

2017-07-06 14:28:42 +02:00
{% extends "index.html" %}
{% block banner %}
{% if category == 'curriculum' %}
<header id="banner">
{% for p in pages %}
{% if p.title == 'curriculum' %}
<div id="title">
{{ p.content }}
2021-03-18 19:43:29 +01:00
</div>
{% endif %}
{% endfor %}
</header>
{% else %}
{{ super() }}
{% endif %}
{% endblock %}
{% block content %}
{% set glob={} %}
{% if DEFAULT_LANG == 'nl' %}
{% set _ = glob.update({'published_at': 'Gepubliceerd op '}) %}
{% set _ = glob.update({'related_to': ' Gerelateerd aan '}) %}
{% set _ = glob.update({'written_by': 'Geschreven door '}) %}
{% set _ = glob.update({'read_more': 'lees meer '}) %}
{% set _ = glob.update({'upcoming': 'Aankomende workshops '}) %}
{% set _ = glob.update({'past': 'Eerdere workshops '}) %}
{% endif %}
{% if DEFAULT_LANG == 'en' %}
{% set _ = glob.update({'published_at': 'Published at '}) %}
{% set _ = glob.update({'related_to': ' Relating to '}) %}
{% set _ = glob.update({'written_by': 'Written by '}) %}
{% set _ = glob.update({'read_more': 'read more'}) %}
{% set _ = glob.update({'upcoming': 'Upcoming workshops '}) %}
{% set _ = glob.update({'past': 'Past workshops '}) %}
{% endif %}
{% if category == 'curriculum' %}
<div id="post-list">
<h2>{{glob.upcoming}}</h2>
<hr>
{% for article in articles_page.object_list %}
2021-03-18 19:43:29 +01:00
{% set thumb_size = '/thumb' %}
{% if article.event_start %}
{% set event_status = '' %}
2021-03-18 19:43:29 +01:00
{% if article.event_start < article.date.now() %}
{% set event_status = ' past' %}
{% endif %}
2021-03-18 19:43:29 +01:00
{% if article.event_start >= article.date.now() %}
{% set event_status = ' current' %}
{% set thumb_size = '/thumb2x' %}
2021-03-18 19:43:29 +01:00
{% endif %}
{% endif %}
{% if event_status == ' current' %}
<article class="hentry {{article.category}} current">
<div class="article-info">
<span class="entry-title"><a href="/{% if article.lang == 'en' %}en/{% endif %}{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></span>
<div class="event-details">
{{ article.event_start | strftime('%d %B %Y') }}
</div>
<div class="featured-image current">
<a href="/{% if article.lang == 'en' %}en/{% endif %}{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">
{% if article.featured_image.endswith('.gif') %}
{% set thumb_size =''%}
{% endif %}
<img src="{{ article.featured_image | replace('images','images'+thumb_size) }}">
</a>
</div>
</div>
2021-03-18 19:43:29 +01:00
<div class="summary {{ article.category }}">{{ article.summary }}
<span class="read_more">
{% if DEFAULT_LANG == 'en' %}
<a href="/en/{{ article.url }}">{{ glob.read_more }}</a>
{% elif DEFAULT_LANG == 'nl' %}
<a href="/{{ article.url }}">{{ glob.read_more }}</a>
{% endif %}
</span>
</div>
<div class="separator"><hr></div>
<div class="post-info">
{% if article.tags %}
<span class="tags">
{{ glob.related_to }}
{% for tag in article.tags %}
<span itemprop="keywords">
<a href="/{{ tag.url }}" rel="tag">{{ tag }}</a>
</span> {% endfor %}
</span>
{% endif %}
{% endif %}
</div>
</article>
{% endfor %}
</div>
<h2>{{glob.past}}</h2>
<hr>
{% for article in articles_page.object_list %}
2021-03-18 19:43:29 +01:00
{% set thumb_size = '/thumb' %}
{% if article.event_start %}
{% set event_status = '' %}
2021-03-18 19:43:29 +01:00
{% if article.event_start < article.date.now() %}
{% set event_status = ' past' %}
{% endif %}
2021-03-18 19:43:29 +01:00
{% if article.event_start >= article.date.now() %}
{% set event_status = ' current' %}
{% set thumb_size = '/thumb2x' %}
2021-03-18 19:43:29 +01:00
{% endif %}
{% endif %}
{% if event_status == ' past' %}
<article class="hentry curriculum past">
<div class="article-info">
<span class="entry-title"><a href="/{% if article.lang == 'en' %}en/{% endif %}{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></span>
<div class="event-details">
2021-03-18 19:43:29 +01:00
{{ article.event_start | strftime('%d %B %Y') }}
</div>
<div class="featured-image current">
<a href="/{% if article.lang == 'en' %}en/{% endif %}{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">
{% if article.featured_image.endswith('.gif') %}{% set thumb_size =''%}{% endif %}
<img src="{{ article.featured_image | replace('images','images'+thumb_size) }}">
</a>
</div>
</div>
<div class="summary {{ article.category }}">{{ article.summary }}
<span class="read_more">
{% if DEFAULT_LANG == 'en' %}<a href="/en/{{ article.url }}">{{ glob.read_more }}</a>
{% elif DEFAULT_LANG == 'nl' %}<a href="/{{ article.url }}">{{ glob.read_more }}</a>{% endif %}</span>
</div>
<div class="separator"><hr></div>
{% endif %}
</article>
{% endfor %}
{% else %}
{{ super() }}
{% endif %}
{% endblock %}
2017-07-06 14:28:42 +02:00
{% block content_title %}
<h1>Category: {{ category }}</h1>
<hr>
2021-03-18 19:43:29 +01:00
{% endblock %}