This repository has been archived on 2019-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
basta-server/ofu_app/templates/macros/event_macros.jinja
2017-10-27 01:13:43 +02:00

23 lines
867 B
Django/Jinja

{% macro event(event) -%}
<div class="col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6 col p-3 event {{ event.category }}">
<div class="p-3 border border-dark rounded bg-light text-dark">
{% if event.link %}
<a href="{{ event.link }}">
<h5>{{ event.title }}</h5></a>
<small>{{ event.category }}</small>
{% else %}
<h5>{{ event.title }}</h5>
<small>{{ event.category }}</small>
{% endif %}
<p class="mb-0">Wann: {{ event.date.strftime("%d.%m.") }}
ab {{ event.time.strftime("%H:%M") }}</p>
<p>Wo:
{% for location in event.locations.all() %}
<span>{{ location.name }}</span>
{% endfor %}
</p>
</div>
</div>
{% endmacro %}