reitanlage-oranienburg/templates/home.html.twig

85 lines
3.3 KiB
Twig
Raw Normal View History

2020-01-25 02:39:55 +00:00
{% extends 'partials/base.html.twig' %}
{% block content %}
<div class="row">
<div class="col-12">
2020-01-26 13:23:47 +00:00
<h1 class="d-inline">
{% include 'partials/logo.html.twig' with {style: 'height: 3rem; padding-bottom: 0.5rem'} %}
Herzlich Willkommen
</h1>
</div>
<div class="col-12 col-md-6 mb-2" height="100%">
<div width="100%" style="min-height: 300px;">
2020-01-25 02:39:55 +00:00
{% include 'partials/osm.html.twig' %}
</div>
2021-02-13 12:10:23 +00:00
<div>
2022-12-05 19:45:15 +00:00
<a role="button" class="btn btn-primary me-1" href="/kontakt">Kontakt</a>
2020-01-25 02:39:55 +00:00
{% include 'partials/socialmedia.html.twig' %}
</div>
</div>
<div class="col-12 col-md-6">
2020-01-26 15:21:58 +00:00
<div id="home-carousel" class="carousel slide" data-ride="carousel" data-interval="4000">
<div class="carousel-inner">
{% for media_item in page.media.images %}
{% set class_active = '' %}
{% if loop.first %}
{% set class_active = ' active' %}
{% endif %}
<div class="carousel-item{{ class_active }}">
2021-08-08 12:15:44 +00:00
<img alt="" class="d-block" src="{{ media_item.resize(540, 400).quality(75).url }}">
2020-01-26 15:21:58 +00:00
</div>
{% endfor %}
</div>
</div>
2020-01-25 02:39:55 +00:00
</div>
</div>
2020-01-25 13:34:09 +00:00
<hr class="mb-4">
{{ page.content }}
<hr class="mb-4">
2020-01-25 02:39:55 +00:00
{% set news_page = pages.find('/news') %}
2020-01-25 13:34:09 +00:00
{% if news_page and news_page.collection() and news_page.collection()|first %}
<h2>Letzte Neuigkeit</h2>
2020-01-25 13:34:09 +00:00
{% set text_class = 'col-12' %}
{% set news_latest = news_page.collection()|first %}
<div class="row">
<div class="col-12">
<h3>
<a class="text-reset" href="{{ news_latest.url }}">{{ news_latest.title }}</a>
</h3>
</div>
</div>
<div class="row">
{% if news_latest.media.images %}
2020-01-25 02:39:55 +00:00
{% set text_class = 'col-12 col-md-9' %}
<div class="col-12 col-md-3">
2021-07-22 22:28:26 +00:00
<img alt="Titelbild der letzten News." width="100%" src="{{ news_latest.media.images|first.quality(25).url }}">
2020-01-25 02:39:55 +00:00
</div>
{% endif %}
<div class="{{ text_class }}">
2020-01-25 13:34:09 +00:00
{{ news_latest.summary }}
2020-01-25 02:39:55 +00:00
</div>
2020-01-25 13:34:09 +00:00
</div>
{% endif %}
2020-01-26 13:23:47 +00:00
{% set collection = page.collection() %}
{% for child in collection %}
<hr class="mb-4" />
{% if child.template == 'info' %}
<div class="row">
{% set text_class = 'col-12' %}
{% if child.media.images|first %}
{% set text_class = 'col-12 col-md-9' %}
<div class="col-12 col-md-3">
<img width="100%" src="{{ child.media.images|first.quality(25).url }}">
2020-01-26 13:23:47 +00:00
</div>
{% endif %}
<div class="{{ text_class }}">
{{ child.content }}
</div>
</div>
{% else %}
<a href="{{ child.url }}">{{ child.title }}</a>
<p>{{ child.summary }}</p>
{% endif %}
{% endfor %}
2020-01-25 02:39:55 +00:00
{% endblock %}