extratonal.org/templates/macros/list.html

40 lines
1.1 KiB
HTML
Raw Normal View History

2023-11-26 23:34:10 +01:00
{% macro list(page,this) %}
<div class="list">
{% set timerpresent = namespace(v="False") %}
{% for child in page %}
{% if child.start_date < today and timerpresent.v == "False" %}
{% set timerpresent.v = True %}
<br>
2024-01-05 20:14:07 +01:00
---past---
2023-11-26 23:34:10 +01:00
<br>
{% endif %}
2024-01-05 20:14:07 +01:00
{% set class = "" %}
{% if child.format == "Extratonal Infrastructure" %}
{% set class = "infrastructure" %}
{% elif child.format == "Extratonal Education" %}
{% set class = "education" %}
{% elif child.format == "Radio Extratonality" %}
{% set class = "radio" %}
{% else %}
{% set class = "misc" %}
{% endif %}
<a href="{{ child|url }}" class="{{class}}{% if child == this %} active{% endif %}">
2023-12-12 01:26:13 +01:00
<span>
{% if child.format == "Extratonal Infrastructure" %}
🎛️
2024-01-05 20:14:07 +01:00
{% elif child.format == "Extratonal Education" %}
2023-12-12 01:26:13 +01:00
📚
2024-01-05 20:14:07 +01:00
{% elif child.format == "Radio Extratonality" %}
2023-12-12 01:26:13 +01:00
📻
2024-01-05 20:14:07 +01:00
{% else %}
2023-12-12 01:26:13 +01:00
{% endif %}
<bold>{{child.start_date|datetimeformat('yyyy/MM/dd H:mm')}} </bold>
2023-11-26 23:34:10 +01:00
{{ child.title }} @
{{ child.location}}
</span>
</a>
{% endfor %}
</div>
{% endmacro %}