add: gallery

fix: blog
This commit is contained in:
Tobias Reisinger 2020-01-03 13:36:14 +01:00
parent c9def51b7e
commit 188bac429d
10 changed files with 255 additions and 74 deletions

View file

@ -0,0 +1,29 @@
{% extends 'partials/base.html.twig' %}
{% set collection = page.collection() %}
{% set gallery = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, gallery])|defined(true) %}
{% block content %}
{{ page.content }}
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
{% for child in collection %}
{% if loop.first %}
<hr class="mb-4 mt-1">
{% else %}
<hr class="my-4">
{% endif %}
<a href="{{ child.url }}">
{{ child.content }}
<div class="card-columns">
{% for media_item in child.media.images[:10] %}
<div class="card">
{{ media_item.html }}
</div>
{% endfor %}
</div>
</a>
{% endfor %}
{% endblock %}