From d6a8b9328dcb7ff00e3dba4aa92ffeb2308db467 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Sat, 25 Jan 2020 14:34:09 +0100 Subject: [PATCH] fix: home template --- templates/home.html.twig | 33 ++++++++++++++++--------- templates/kontakt.html.twig | 2 +- templates/partials/blog-item.html.twig | 4 +-- templates/partials/blog/title.html.twig | 6 ++--- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/templates/home.html.twig b/templates/home.html.twig index f7c9d13..8f8e5cb 100644 --- a/templates/home.html.twig +++ b/templates/home.html.twig @@ -2,11 +2,12 @@ {% block content %}
-
+

Herzlich Willkommen

{% include 'partials/osm.html.twig' %}
+
Kontakt {% include 'partials/socialmedia.html.twig' %} @@ -16,22 +17,30 @@

Herzlich Willkommen

-
-
+
+ {{ page.content }} +
{% 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 %} + {% if news_page and news_page.collection() and news_page.collection()|first %} + {% set text_class = 'col-12' %} + {% set news_latest = news_page.collection()|first %} + +
+ {% if news_latest.media.images %} {% set text_class = 'col-12 col-md-9' %}
- +
{% endif %}
- {{ latest_news.content }} + {{ news_latest.summary }}
- {% endif %} -
- {{ page.content }} +
+ {% endif %} {% endblock %} diff --git a/templates/kontakt.html.twig b/templates/kontakt.html.twig index 0ac27a8..7de191d 100644 --- a/templates/kontakt.html.twig +++ b/templates/kontakt.html.twig @@ -6,7 +6,7 @@ {{ page.content }}
-
+
{% include 'partials/socialmedia.html.twig' %}
diff --git a/templates/partials/blog-item.html.twig b/templates/partials/blog-item.html.twig index cdc74b8..8e33397 100644 --- a/templates/partials/blog-item.html.twig +++ b/templates/partials/blog-item.html.twig @@ -21,10 +21,10 @@

{{ page.header.subtitle }}

{% if not page.isLast %} - {{ 'THEME_QUARK.BLOG.ITEM.PREV_POST'|t }} + Vorheriger Eintrag {% endif %} {% if not page.isFirst %} - {{ 'THEME_QUARK.BLOG.ITEM.NEXT_POST'|t }} + Nächster Eintrag {% endif %}

diff --git a/templates/partials/blog/title.html.twig b/templates/partials/blog/title.html.twig index 03fe090..1c262a1 100644 --- a/templates/partials/blog/title.html.twig +++ b/templates/partials/blog/title.html.twig @@ -2,10 +2,10 @@ {% if page.header.link %} <{{ title_level }} class="p-name"> {% if page.header.continue_link is not same as(false) %} - + {% endif %} - {{ page.title }} + {{ page.title }} {% else %} - <{{ title_level }} class="p-name my-1">{{ page.title }} + <{{ title_level }} class="p-name my-1">{{ page.title }} {% endif %}