From d66637f84029343edfa37a6a0a6bb1309f36cbe6 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Sun, 26 Jan 2020 14:23:47 +0100 Subject: [PATCH] add: logo on home --- templates/home.html.twig | 28 ++++++++++++++++++++++-- templates/info-list.html.twig | 2 +- templates/partials/base.html.twig | 2 +- templates/partials/logo.html.twig | 21 ++++++++++-------- templates/partials/navbar.html.twig | 4 +++- templates/partials/socialmedia.html.twig | 2 +- 6 files changed, 44 insertions(+), 15 deletions(-) diff --git a/templates/home.html.twig b/templates/home.html.twig index 8f8e5cb..14ebc2e 100644 --- a/templates/home.html.twig +++ b/templates/home.html.twig @@ -2,8 +2,11 @@ {% block content %}
-
-

Herzlich Willkommen

+
+

+ {% include 'partials/logo.html.twig' with {style: 'height: 3rem; padding-bottom: 0.5rem'} %} + Herzlich Willkommen +

{% include 'partials/osm.html.twig' %}
@@ -43,4 +46,25 @@

{% endif %} + {% set collection = page.collection() %} + {% for child in collection %} +
+ {% if child.template == 'info' %} +
+ {% set text_class = 'col-12' %} + {% if child.media.images|first %} + {% set text_class = 'col-12 col-md-9' %} +
+ +
+ {% endif %} +
+ {{ child.content }} +
+
+ {% else %} + {{ child.title }} +

{{ child.summary }}

+ {% endif %} + {% endfor %} {% endblock %} diff --git a/templates/info-list.html.twig b/templates/info-list.html.twig index 9c218e7..637005a 100644 --- a/templates/info-list.html.twig +++ b/templates/info-list.html.twig @@ -22,6 +22,6 @@ {{ child.title }}

{{ child.summary }}

{% endif %} -
+
{% endfor %} {% endblock %} diff --git a/templates/partials/base.html.twig b/templates/partials/base.html.twig index 9d3a1f2..7867320 100644 --- a/templates/partials/base.html.twig +++ b/templates/partials/base.html.twig @@ -58,7 +58,7 @@

© Heike Tischler

-

Diese Webseite nutzt Grav von RocketTheme.

+

Diese Webseite nutzt Grav von RocketTheme.

{% endblock %} diff --git a/templates/partials/logo.html.twig b/templates/partials/logo.html.twig index 6b0d52e..0342acc 100644 --- a/templates/partials/logo.html.twig +++ b/templates/partials/logo.html.twig @@ -1,9 +1,12 @@ - - {% set logo = theme_var('custom_logo') %} - {% if logo %} - {% set logo_file = (logo|first).name %} - - {% else %} - - {% endif %} - +{% set logo = theme_var('custom_logo') %} +{% if style %} + {% set style='style="' ~ style ~ '"' %} +{% else %} + {% set style='' %} +{% endif %} +{% if logo %} + {% set logo_file = (logo|first).name %} + +{% else %} + +{% endif %} diff --git a/templates/partials/navbar.html.twig b/templates/partials/navbar.html.twig index 83f7079..9ff6fad 100644 --- a/templates/partials/navbar.html.twig +++ b/templates/partials/navbar.html.twig @@ -7,7 +7,9 @@