add: templates
This commit is contained in:
parent
0bb3d93704
commit
5ad37ff475
10 changed files with 90 additions and 7 deletions
27
templates/info-list.html.twig
Normal file
27
templates/info-list.html.twig
Normal file
|
@ -0,0 +1,27 @@
|
|||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% set collection = page.collection() %}
|
||||
|
||||
{% block content %}
|
||||
{{ page.content }}
|
||||
{% for child in collection %}
|
||||
{% if child.template == 'info' %}
|
||||
<div class="row">
|
||||
{% set text_class = 'col-12' %}
|
||||
{% if child.media.images|first %}
|
||||
{% set text_class = 'col-12 col-md-6' %}
|
||||
<div class="col-12 col-md-6">
|
||||
<img width="100%" src="{{ child.media.images|first.url }}">
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="{{ text_class }}">
|
||||
{{ child.content }}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<a href="{{ child.url }}">{{ child.title }}</a>
|
||||
<p>{{ child.summary }}</p>
|
||||
{% endif %}
|
||||
<div class="mb-4"></div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue