From 4b18e4f1fe93fac016f787d6f37b5998960668e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Thu, 15 Dec 2022 19:04:37 +0100 Subject: [PATCH] Make news banner global (#234) Co-authored-by: Gerasimos Chourdakis --- _includes/news_banner.html | 25 +++++++++++++++++++++++++ _layouts/default.html | 2 ++ _layouts/landing_page.html | 3 +++ css/customstyles-precice.css | 3 +++ css/customstyles.css | 5 +++++ css/landing-page.css | 2 +- pages/index.html | 15 --------------- 7 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 _includes/news_banner.html diff --git a/_includes/news_banner.html b/_includes/news_banner.html new file mode 100644 index 0000000000..51f4019cb8 --- /dev/null +++ b/_includes/news_banner.html @@ -0,0 +1,25 @@ +{% comment %}{% raw %} + +For landing-only news use: +{% if include.onlanding %} + +For news visible on all pages use: +{% if true %}. + +{% endraw %}{% endcomment %} + +{% if true %} + + + +{% endif %} diff --git a/_layouts/default.html b/_layouts/default.html index 52846ec86c..321bb4f25b 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -84,6 +84,8 @@ {% include topnav.html %}
+ + {% include news_banner.html onlanding=false %}
diff --git a/_layouts/landing_page.html b/_layouts/landing_page.html index 9ee2eb96d5..651720c929 100644 --- a/_layouts/landing_page.html +++ b/_layouts/landing_page.html @@ -9,6 +9,9 @@
+ + {% include news_banner.html onlanding=true %} + {{content}}
diff --git a/css/customstyles-precice.css b/css/customstyles-precice.css index ce3c36d219..af4ca67688 100644 --- a/css/customstyles-precice.css +++ b/css/customstyles-precice.css @@ -9,6 +9,9 @@ body { main { /*margin-top:-20px;*/ } +.banner-container { + margin-top:-20px; +} a.navbar-brand { padding-top: 12px; } diff --git a/css/customstyles.css b/css/customstyles.css index f18a15d592..0f02d29a00 100644 --- a/css/customstyles.css +++ b/css/customstyles.css @@ -1209,3 +1209,8 @@ h4.panel-title { display:block !important; } } + +/* News banner on pages other than the landing page */ +.banner { + padding: 15px 0; +} diff --git a/css/landing-page.css b/css/landing-page.css index 264a79fecd..8daedee5ea 100644 --- a/css/landing-page.css +++ b/css/landing-page.css @@ -5,7 +5,7 @@ /* idea is to not touch the docs part of the website, but start from a clear state */ main { /* fixed topnav takes up 50 + 20 px */ - margin-top: -20px; + /* margin-top: -20px; */ } h1[id], h2[id], h3[id], h4[id], h5[id], h6[id], dt[id] { diff --git a/pages/index.html b/pages/index.html index a45180cf12..6e90540c49 100644 --- a/pages/index.html +++ b/pages/index.html @@ -7,21 +7,6 @@ layout: landing_page --- - - - -
-
-
- -
-
-
-