varia.website/themes/varia/templates/index.html

95 lines
3.5 KiB
HTML
Raw Permalink Normal View History

2017-07-06 14:28:42 +02:00
{% extends "base.html" %}
{% block content %}
2017-10-20 15:59:16 +02:00
<section id="content" class="index">
<header id="banner">
{% for p in pages %}
{% if p.title == 'header' %}
<div id="title">
{{ p.content }}
</div>
{% endif %}
{% endfor %}
</header>
2017-07-06 14:28:42 +02:00
{% block content_title %}
{% endblock %}
{% if articles_page.has_other_pages() %}
{% include 'pagination.html' %}
2017-07-06 14:28:42 +02:00
{% endif %}
<div id="post-list">
2017-07-06 14:28:42 +02:00
{% for article in articles_page.object_list %}
2018-03-20 22:45:21 +01:00
{% set thumb_size = '/thumb' %}
{% if article.category %}
{% if article.event_start %}
{% set event_status = '' %}
{% if article.event_start < article.date.now() %}
{% set event_status = ' past' %}
{% endif %}
{% if article.event_start >= article.date.now() %}
{% set event_status = ' current' %}
{% set thumb_size = '/thumb2x' %}
2018-03-20 22:45:21 +01:00
{% endif %}
{% if article.category == 'article' %}
{% set thumb_size = '/thumb2x' %}
{% endif %}
{% endif %}
<article class="hentry {{article.category}}{{event_status}}">
{% endif %}
<div class="article-info">
<span class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></span>
{% if article.event_start %}
<div class="event-details">
{{ article.event_start | strftime('%d %B %Y') }}
<!-- {% set event_status = '' %} -->
</div>
2018-03-20 22:45:21 +01:00
{% else %}
<div class="event-details"></div>
{% endif %}
<div class="featured-image {{event_status}}">
{% if article.featured_image %}
<a href="{{ 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>
{% endif %}
</div>
</div>
<div class="summary {{ article.category }}">{{ article.summary }}
<span>
{% if DEFAULT_LANG == 'en' %}
<a href="/en/{{ article.url }}">read more</a>
{% elif DEFAULT_LANG == 'nl' %}
<a href="/{{ article.url }}">lees meer</a>
{% endif %}
</span>
</div>
<div class="separator"><hr></div>
<div class="post-info">
{% if article.category %}
2018-03-20 22:45:21 +01:00
<span class="categories">
<span itemprop="articleSection">
<a href="/{{ article.category.url }}" rel="category">{{ article.category }}</a>
</span>
</span>
{% endif %}
{% if article.tags %}
<span class="tags">
relating to {% for tag in article.tags %}
<span itemprop="keywords">
<a href="/{{ tag.url }}" rel="tag">{{ tag }}</a>
</span> {% endfor %}
</span>
{% endif %}
</div>
</article>
2017-07-06 14:28:42 +02:00
{% endfor %}
</div><!-- /#posts-list -->
</section><!-- /#content -->
{% endblock content %}