56 lines
1.9 KiB
Twig
56 lines
1.9 KiB
Twig
{% extends 'partials/base.html.twig' %}
|
|
{% set options = { items: {'@self.siblings':''}, 'order': {'by': 'folder', 'dir': 'asc'}} %}
|
|
{% set collection = page.collection(options) %}
|
|
|
|
{% block hero %}
|
|
<header class="sous_nav">
|
|
{% set options = { items: {'@self.parent':page.url} } %}
|
|
<ul>
|
|
{% for p in page.collection(options) %}
|
|
{% for child in p.collection %}
|
|
{% set active_page = (child.active or child.activeChild) ? 'active' : '' %}
|
|
<li>
|
|
<a href="{{ child.url }}" class="{{ active_page }}">
|
|
{{ child.menu }}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
</header>
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
<section id="body-wrapper" class="section">
|
|
{% embed 'partials/layout.html.twig' with {blog: page} %}
|
|
|
|
{% block item %}
|
|
{% for sibling in collection %}
|
|
{% for item in sibling.collection %}
|
|
|
|
{% if not item.header.date_end %}
|
|
{% if item.header.date|date("Ymd") < "now"|date("Ymd") %}
|
|
{% include 'partials/blog-list-item.html.twig' with {blog: page, page: item} %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if item.header.date and item.header.date_end %}
|
|
{% if item.header.date|date("Ymd") < "now"|date("Ymd") and item.header.date_end|date("Ymd") < "now"|date("Ymd") %}
|
|
{% include 'partials/blog-list-item.html.twig' with {blog: page, page: item} %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{% endembed %}
|
|
|
|
</section>
|
|
<script>
|
|
//Bricklayer
|
|
var bricklayer = new Bricklayer(document.querySelector('.bricklayer'))
|
|
</script>
|
|
{% endblock %}
|