some code streamlining
This commit is contained in:
parent
4db6110e4b
commit
da3b1b0759
@ -6,7 +6,7 @@
|
||||
{% block content_body %}
|
||||
{% for p in pages if p.title == "Index" %}
|
||||
|
||||
{% if p.featured is defined %}
|
||||
{% if p.featured %}
|
||||
<div class="index-featured">not implemented yet</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{% extends "page.html" %}
|
||||
|
||||
{% if page.termine is defined %}
|
||||
{% if page.termine %}
|
||||
{% set date_format = "%d.%m." %}
|
||||
{% set time_format = "%H:%M" %}
|
||||
|
||||
@ -31,11 +31,11 @@
|
||||
<tbody>
|
||||
{% for t in page.termine %}
|
||||
<tr>
|
||||
<td class="event-info"><strong>{{ t.startdate | strftime(date_format) }}{% if t.enddate is defined %}–{{t.enddate | strftime(date_format) }}{% elif t.starttime is defined %} {{ t.starttime | strftime(time_format) }}{% endif %}</strong><br>{{ t.location }}</td>
|
||||
<td class="event-info"><strong>{{ t.startdate | strftime(date_format) }}{% if t.enddate %}–{{t.enddate | strftime(date_format) }}{% elif t.starttime %} {{ t.starttime | strftime(time_format) }}{% endif %}</strong><br>{{ t.location }}</td>
|
||||
<td class="event-detail">
|
||||
<p>{{ t.summary }} {% if "Moderation" in t.categories %}(Moderation){%endif%}</p>
|
||||
{% if t.description is defined %}<p>{{ t.description | replace("\n\n", "</p><p>") | replace("\n", "<br>") | replace("</p><br><p>", "</p><p>")}}</p>{% endif %}
|
||||
{% if t.attach is defined %}<p><a href="{{ t.attach }}" target="_blank" title="siehe auch …">Mehr Infos</a></p>{% endif %}
|
||||
{% if t.description %}<p>{{ t.description | replace("\n\n", "</p><p>") | replace("\n", "<br>") | replace("</p><br><p>", "</p><p>")}}</p>{% endif %}
|
||||
{% if t.attach %}<p><a href="{{ t.attach }}" target="_blank" title="siehe auch …">Mehr Infos</a></p>{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@ -45,7 +45,7 @@
|
||||
{% endblock content_body %}
|
||||
|
||||
{% block content_footer %}
|
||||
{% if page.written_at is defined %}
|
||||
{% if page.written_at %}
|
||||
<footer class="content-footer">
|
||||
<p>Letzte Aktualisierung: {{ page.written_at | strftime("%d.%m.%Y, %H:%M Uhr") }}</p>
|
||||
</footer>
|
||||
|
||||
@ -14,7 +14,7 @@ original order #}
|
||||
{% set wcards = [] %}
|
||||
{% for wide_card in page.wide_cards %}
|
||||
{% do wcards.append(pages | selectattr("slug", "==", wide_card) | list | first) if pages | selectattr("slug", "==",
|
||||
wide_card) | list | first is defined %}
|
||||
wide_card) | list | first %}
|
||||
{% endfor %}
|
||||
{# now we can finally iterate over the correct pages (max. 4 pages) #}
|
||||
{% for wcard in wcards[:4] %}
|
||||
@ -23,13 +23,13 @@ wide_card) | list | first is defined %}
|
||||
<h2><a href="{{ SITEURL }}/{{ wcard.slug | lower }}/" title="{{ wcard.summary | striptags }}">{{ wcard.title }}</a></h2>
|
||||
</div>
|
||||
<div class="wcard-gallery">
|
||||
{% if wcard.card_images is defined %}
|
||||
{% if wcard.card_images %}
|
||||
<div class="wcard-gallery-mask">
|
||||
<ul>
|
||||
{% for image in wcard.card_images %}
|
||||
<li class="wcard-image" style="animation-delay: {{ loop.index0 * 5 }}s;">
|
||||
<a href="{{ SITEURL }}/{{ image.link }}">
|
||||
<img class="image-process-featured" src="{{ SITEURL }}/{{ image.pic }}" alt="{{ image.alt }}" {%- if image.y_offset is defined %} style="bottom: {{ image.y_offset }};" {% endif %} />
|
||||
<img class="image-process-featured" src="{{ SITEURL }}/{{ image.pic }}" alt="{{ image.alt }}" {%- if image.y_offset %} style="bottom: {{ image.y_offset }};" {% endif %} />
|
||||
</a>
|
||||
<div class="wcard-tooltip">
|
||||
<p>{{ image.alt }}</p>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user