add: templates

This commit is contained in:
Tobias Reisinger 2020-01-25 03:39:55 +01:00
parent 0bb3d93704
commit 5ad37ff475
10 changed files with 90 additions and 7 deletions

37
templates/home.html.twig Normal file
View file

@ -0,0 +1,37 @@
{% extends 'partials/base.html.twig' %}
{% block content %}
<div class="row">
<div class="col-12 col-md-6" height="100%">
<h1>Herzlich Willkommen</h1>
<div width="100%">
{% include 'partials/osm.html.twig' %}
</div>
<div style="position: absolute; bottom: 0;">
<a role="button" class="btn btn-primary" href="/kontakt">Kontakt</a>
{% include 'partials/socialmedia.html.twig' %}
</div>
</div>
<div class="col-12 col-md-6">
<img width="100%" src="{{ url('theme://images/home_slideshow.gif') }}" />
</div>
</div>
<hr class="mb-5">
<div class="row">
{% set news_page = pages.find('/news') %}
{% if news_page and news_page.collection() and news_page.collection()|first %}
{% set text_class = 'col-12' %}
{% set latest_news = news_page.collection()|first %}
{% if latest_news.media.images %}
{% set text_class = 'col-12 col-md-9' %}
<div class="col-12 col-md-3">
<img width="100%" src="{{ latest_news.media.images|first.url }}">
</div>
{% endif %}
<div class="{{ text_class }}">
{{ latest_news.content }}
</div>
{% endif %}
</div>
{{ page.content }}
{% endblock %}