Shows are now sorted by date. This date is the real show date for Combaillaux shows, and the last date for the company shows. Dates can now be cancelled. Cancelled dates are reported on the pages and on the calendar, but tagged as such.
104 lines
3.1 KiB
Text
104 lines
3.1 KiB
Text
{% macro build_title(title, author, company) %}
|
|
<h1>{{ title }}
|
|
<small>
|
|
{% if author != null %} de {{ author }} {% endif %}
|
|
{% if company != null %} par {{ company | safe }} {% endif %}
|
|
</small>
|
|
</h1>
|
|
{% endmacro %}
|
|
|
|
{% macro build_show_header(show, config) %}
|
|
<section>
|
|
{% if config.display_date != undefined %}
|
|
<p class="date">{{ config.display_date }}</p>
|
|
{% elif not config.no_display_date %}
|
|
<p class="date">{{ moment(show.date).format('LL') }}</p>
|
|
{% endif %}
|
|
<h3><a href="/{{ show.path }}">{{ show.title }}</a></h3>
|
|
<p>
|
|
{% if show.author != null %} de {{ show.author }} {% endif %}
|
|
{% if show.company != null %} par {{ show.company | safe }} {% endif %}
|
|
</p>
|
|
</section>
|
|
{% endmacro %}
|
|
|
|
{% macro expose_archive(show, config) %}
|
|
<article>
|
|
{{ build_show_header(show, config) }}
|
|
</article>
|
|
{% endmacro %}
|
|
|
|
{% macro expose_show(show, config) %}
|
|
<article class="container">
|
|
<section class="row {% if show.cancelled %}tes-show-cancelled{% endif %}">
|
|
<section class="col-sm-12 col-md-2 center">
|
|
<a href="/{{ show.path }}">
|
|
<img src="/images/thumbnails/tn_{{ show.poster }}" alt="{{ show.title }}">
|
|
</a>
|
|
</section>
|
|
<section class="col-sm-12 col-sm-first col-md-6 col-md-normal">
|
|
{{ build_show_header(show, config) }}
|
|
<p class="hidden-sm">
|
|
<a class="button" href="/{{ show.path }}">Plus d'informations...</a>
|
|
</p>
|
|
</section>
|
|
</section>
|
|
<section class="row">
|
|
<section class="col-sm-12 hidden-md hidden-lg">
|
|
<p class="center">
|
|
<a class="button" href="/{{ show.path }}">Plus d'informations...</a>
|
|
</p>
|
|
<hr/>
|
|
</section>
|
|
</section>
|
|
</article>
|
|
{% endmacro %}
|
|
|
|
{% macro expose_poster(show) %}
|
|
{% if show.poster %}
|
|
<div class="front-poster-header">
|
|
<h3>{{ show.title }}</h3>
|
|
</div>
|
|
<section class="front-poster">
|
|
<a href="{{ show.path }}"><img src="/images/posters/{{ show.poster }}" alt=""></a>
|
|
</section>
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% macro iterate_news(collections) %}
|
|
{% set news = collections["news"] %}
|
|
<ul>
|
|
{% for article in news %}
|
|
<li>
|
|
<p><a href="{{ article.path }}">{{ moment(article.date).format('LL') }} | {{ article.title }}</a></p>
|
|
<p>{{ article.synopsis | safe }}</p>
|
|
</li>
|
|
{% else %}
|
|
{% endfor %}
|
|
</ul>
|
|
{% endmacro %}
|
|
|
|
{% macro iterate_shows(collections, category, config) %}
|
|
{% set shows = collections[category] %}
|
|
{% for show in shows %}
|
|
{% if config.before %}
|
|
{% if moment(show.date).isBefore(config.before) %}
|
|
{{ config.render(show, config) }}
|
|
{% endif %}
|
|
{% elif config.after %}
|
|
{% if moment(show.date).isAfter(config.after) %}
|
|
{{ config.render(show, config) }}
|
|
{% endif %}
|
|
{% elif config.ongoing != undefined %}
|
|
{% if show.ongoing %}
|
|
{{ config.render(show, config) }}
|
|
{% endif %}
|
|
{% else %}
|
|
{{ config.render(show, config) }}
|
|
{% endif %}
|
|
{% else %}
|
|
<section>
|
|
<p>Aucun spectacle répertorié.</p>
|
|
</section>
|
|
{% endfor %}
|
|
{% endmacro %}
|