44 lines
1.6 KiB
Twig
44 lines
1.6 KiB
Twig
{% extends 'partials/base.html.twig' %}
|
|
{% set blog_image = page.media.images[page.header.hero_image] ?: page.media.images|first %}
|
|
{% set collection = page.collection() %}
|
|
{% set blog = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
|
|
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog])|defined(true) %}
|
|
{% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true) %}
|
|
{% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}
|
|
|
|
{% block hero %}
|
|
{% include 'partials/hero.html.twig' with {id: 'blog-hero', content: page.content, hero_image: blog_image} %}
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
|
|
<section class="header-wrapper">
|
|
<div class="title">
|
|
<h2>{{page.title}}</h2>
|
|
</div>
|
|
<div class="cat">
|
|
{% include 'partials/taxonomylist.html.twig' with {base_url: my_url, taxonomy: 'tag'} %}
|
|
</div>
|
|
</section>
|
|
|
|
<section class="body-wrapper" class="section blog-listing">
|
|
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
|
{% include 'partials/breadcrumbs.html.twig' %}
|
|
{% endif %}
|
|
|
|
{% embed 'partials/layout.html.twig' with {blog: page} %}
|
|
|
|
{% block item %}
|
|
{% for child in page.find('/agenda').children %}
|
|
|
|
{% if child.header.date_end|date("d/m/y") <= "now"|date("d/m/y") %}
|
|
{% include 'partials/cal-list-event.html.twig' with {blog: page, page: child} %}
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
{% endblock %}
|
|
{% endembed %}
|
|
</section>
|
|
|
|
{% endblock %}
|