add: gallery
fix: blog
This commit is contained in:
parent
c9def51b7e
commit
188bac429d
10 changed files with 255 additions and 74 deletions
29
templates/gallery.html.twig
Normal file
29
templates/gallery.html.twig
Normal 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 %}
|
Loading…
Add table
Add a link
Reference in a new issue