2023-01-11 15:15:28 +01:00
|
|
|
{% extends 'partials/base.html.twig' %}
|
|
|
|
{% set collection = page.collection() %}
|
|
|
|
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, events])|defined(true) %}
|
|
|
|
{% set show_pagination = header_var('show_pagination', [page, events])|defined(true) %}
|
|
|
|
{% set show_sidebar = header_var('show_sidebar', [page, events])|defined(true) %}
|
2023-01-11 15:37:06 +01:00
|
|
|
{% set blog_image = page.media.images[page.header.hero_image] ?: page.media.images|first %}
|
2023-01-11 15:15:28 +01:00
|
|
|
|
2023-01-11 15:37:06 +01:00
|
|
|
{% if not (grav.uri.param('chromeless') or grav.uri.param('embedded') or grav.uri.param('standalone')) and not(theme_var('chromeless.enabled')) %}
|
|
|
|
{% block hero %}
|
|
|
|
{% include 'partials/hero.html.twig' with {id: 'blog-hero', content: page.content, hero_image: blog_image} %}
|
|
|
|
{% endblock %}
|
|
|
|
{% endif %}
|
2023-01-12 00:22:01 +01:00
|
|
|
|
2023-01-12 00:44:13 +01:00
|
|
|
{% if not (grav.uri.param('chromeless') or grav.uri.param('embedded') or grav.uri.param('standalone')) and not(theme_var('chromeless.enabled')) %}
|
|
|
|
{% block sidebar %}
|
2023-01-12 00:18:46 +01:00
|
|
|
{% include 'partials/sidebar.html.twig' %}
|
|
|
|
{% endblock %}
|
2023-01-12 00:44:13 +01:00
|
|
|
{% endif %}
|
2023-01-11 15:31:26 +01:00
|
|
|
|
2023-01-11 15:15:28 +01:00
|
|
|
{% block content %}
|
|
|
|
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
|
|
|
{% include 'partials/breadcrumbs.html.twig' %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{{ 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>
|
2023-01-11 15:48:43 +01:00
|
|
|
{#{% include 'partials/events_sidebar.html.twig' with { 'page': page.parent } %}#}
|
2023-01-11 15:38:56 +01:00
|
|
|
</div>
|
|
|
|
|
2023-01-11 15:15:28 +01:00
|
|
|
{# Render the pagination list #}
|
|
|
|
{% if show_pagination and config.plugins.pagination.enabled and collection.params.pagination %}
|
|
|
|
<div id="listing-footer">
|
|
|
|
{% include 'partials/pagination.html.twig' with { base_url: page.url, pagination: collection.params.pagination } %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endblock %}
|