grav-theme-future2021/templates/events.html.twig

51 lines
1.5 KiB
Twig

{% extends 'partials/base.html.twig' %}
{% set collection = page.collection() %}
{% if page.header.show_breadcrumbs is defined %}
{% set show_breadcrumbs = page.header.show_breadcrumbs %}
{% else %}
{% set show_breadcrumbs = true %}
{% endif %}
{% block menu %}
{% include 'partials/sidebar_right.html.twig' %}
{% endblock %}
{% block content %}
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
<article class="post">
<header>
<div class="title">
<h2>{{ page.header.title }}</h2>
{% if page.header.subtitle %}
<p>{{ page.header.subtitle }}</p>
{% endif %}
</div>
</header>
{{ page.content|raw }}
<div class="events-container">
<section class="events-listing">
{% if collection|length != 0 %}
{% for event in collection %}
{% include 'partials/event_item.html.twig' with { 'page': event, 'single': false } %}
{% endfor %}
{% else %}
<h3>{{ "PLUGIN_EVENTS.EVENTS.NO_EVENTS_TITLE"|t }}</h3>
<p>{{ ("PLUGIN_EVENTS.EVENTS.NO_EVENTS_CONTENT"|t(uri.param('category')))|markdown }}</p>
{% endif %}
</section>
</div>
</article>
{% if show_pagination and config.plugins.pagination.enabled and collection.params.pagination %}
{% include 'partials/pagination.html.twig' with {base_url: page.url, pagination: collection.params.pagination} %}
{% endif %}
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
</section>
{% endblock %}