From 067571fc3536262e0d9fb71a9c5795137e315d3f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 23 Apr 2020 19:50:59 +0200 Subject: [PATCH] Overview page: fallback to title + text instead of filler image --- content/u/products/bgp-peering/contents.lr | 4 ++++ templates/summary-page.html | 25 ++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/content/u/products/bgp-peering/contents.lr b/content/u/products/bgp-peering/contents.lr index b268e9b..622ad43 100644 --- a/content/u/products/bgp-peering/contents.lr +++ b/content/u/products/bgp-peering/contents.lr @@ -13,6 +13,10 @@ headline2: Your own IP Space --- headline3: At Data Center Light --- +header_background_color: #6298CB +--- +header_text_color: text-light +--- content1_text: ## For whom is BGP peering? diff --git a/templates/summary-page.html b/templates/summary-page.html index aed0ef0..a7a45e3 100644 --- a/templates/summary-page.html +++ b/templates/summary-page.html @@ -6,6 +6,22 @@
{% for childpage in this.children %} + + {# Setup default settings for the overview #} + + {% if childpage.header_background_color %} + {% set div_style = 'background-color:' + childpage.header_background_color + ';' %} + {% else %} + {% set div_style = 'background-color: #6FB0E5;' %} + {% endif %} + + {% if childpage.header_text_color %} + {% set div_classes = childpage.header_text_color %} + {% else %} + {% set div_classes = 'text-light' %} + {% endif %} + + {% if loop.first %}
{% endif %} @@ -16,8 +32,13 @@ {{ childpage.title }} {% else %} - {{ childpage.title }} +
+  
+ {{ childpage.title }}
+  
+
{% endif %}