From 4fda7916ffed384385564ec5f15a03e53e6f5c41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sat, 12 Feb 2022 23:14:33 +0100 Subject: [PATCH] menu: set footer position at bottom of screen #177 --- .../content/basics/migration/_index.en.md | 5 +++ exampleSite/layouts/partials/menu-footer.html | 10 ++++++ layouts/partials/menu.html | 18 +++++++---- static/css/theme-relearn-dark.css | 2 +- static/css/theme-relearn-light.css | 2 +- static/css/theme.css | 32 +++++++++---------- static/css/variant.css | 8 ++--- 7 files changed, 49 insertions(+), 28 deletions(-) diff --git a/exampleSite/content/basics/migration/_index.en.md b/exampleSite/content/basics/migration/_index.en.md index 68660d08d6..e9f11b131d 100644 --- a/exampleSite/content/basics/migration/_index.en.md +++ b/exampleSite/content/basics/migration/_index.en.md @@ -14,6 +14,11 @@ This document shows you what's new in the latest release. For a detailed list of --- +## 3.0.0 + +- **Breaking**: We made changes to the menu footer. If you have your `menu-footer.html` partial overridden, you may have to provide additional styling in your partial. For a reference take a look into the `menu-footer.html` partial that is coming with the exampleSite. + + This change was made to allow your own menu footer to be placed right after the so called prefooter that comes with the theme (containing the language switch and *Clear history* functionality). ## 2.9.0 diff --git a/exampleSite/layouts/partials/menu-footer.html b/exampleSite/layouts/partials/menu-footer.html index cb433053e8..79c81e6690 100644 --- a/exampleSite/layouts/partials/menu-footer.html +++ b/exampleSite/layouts/partials/menu-footer.html @@ -1,4 +1,14 @@ + Download Star Fork diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index c616521e93..c2f58a77e3 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -52,12 +52,17 @@ {{- end }} - - {{- if or .Site.IsMultiLingual $showvisitedlinks }} +
+ {{- $showlangswitch := and .Site.IsMultiLingual (not .Site.Params.disableLanguageSwitchingButton) }} + {{- $footer := partial "menu-footer.html" . }} + {{- $showfooter := not (eq 0 (int (len $footer | plainify))) }} + {{- if or $showlangswitch $showvisitedlinks $showfooter }} +
+ {{- end }} + {{- if or $showlangswitch $showvisitedlinks }}
-
{{- end }} + {{- if $showfooter }} + {{- end }} {{- define "section-tree-nav" }} diff --git a/static/css/theme-relearn-dark.css b/static/css/theme-relearn-dark.css index edfaf3f12a..07b29eaa35 100644 --- a/static/css/theme-relearn-dark.css +++ b/static/css/theme-relearn-dark.css @@ -40,5 +40,5 @@ --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #202020; /* Color of background for the active category (only) */ --MENU-VISITED-color: #569cd8; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #282830; /* Color of
separator in menu */ + --MENU-SECTION-HR-color: #606060; /* Color of
separator in menu */ } diff --git a/static/css/theme-relearn-light.css b/static/css/theme-relearn-light.css index 99d54baa1d..8bf4dddc6a 100644 --- a/static/css/theme-relearn-light.css +++ b/static/css/theme-relearn-light.css @@ -40,5 +40,5 @@ --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #ffffff; /* Color of background for the active category (only) */ --MENU-VISITED-color: #506397; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #282830; /* Color of
separator in menu */ + --MENU-SECTION-HR-color: #606060; /* Color of
separator in menu */ } diff --git a/static/css/theme.css b/static/css/theme.css index 589ac77e10..b3b0618cf8 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -176,10 +176,6 @@ th { color: #e6e6e6; /* var(--MENU-SECTIONS-LINK-HOVER-color) */ } -#sidebar hr { - border-bottom: 1px solid #2a232f; /* var(--MENU-SECTION-HR-color) */ -} - #sidebar a.padding { padding: 0 1rem; } @@ -240,7 +236,7 @@ th { #sidebar ul li.active > a { background-color: #ffffff; /* var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color) */ - color: #777 !important; /* var(--MENU-SECTION-ACTIVE-CATEGORY-color) */ + color: #777777 !important; /* var(--MENU-SECTION-ACTIVE-CATEGORY-color) */ margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; @@ -316,6 +312,19 @@ th { text-transform: uppercase; } +#sidebar .footermargin { + margin-top: auto; +} + +#sidebar hr { + border-bottom: 1px solid #2a232f; /* var(--MENU-SECTION-HR-color) */ + margin: 1.5rem 1rem 1rem 1rem; +} + +#footer { + color: #cccccc; /* var(--MENU-SECTIONS-LINK-color) */ +} + #body { margin-left: 300px; min-height: 100%; @@ -455,17 +464,6 @@ th { text-align: justify; } -#footer { - color: #cccccc; /* var(--MENU-SECTIONS-LINK-color) */ - font-size: 13px; - padding: 3rem 1rem; - text-align: center; -} - -#footer p { - margin: 0; -} - body { font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; font-size: 16.25px !important; @@ -899,6 +897,8 @@ td { } #sidebar .highlightable { + display: flex; + flex-direction: column; overflow: auto; } diff --git a/static/css/variant.css b/static/css/variant.css index 39bd69c31a..09aaec5616 100644 --- a/static/css/variant.css +++ b/static/css/variant.css @@ -37,10 +37,6 @@ a:hover, color: var(--MENU-SECTIONS-LINK-HOVER-color); } -#sidebar hr { - border-color: var(--MENU-SECTION-HR-color); -} - #sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { background-color: var(--MENU-SECTIONS-ACTIVE-BG-color); @@ -59,6 +55,10 @@ a:hover, color: var(--MENU-SECTIONS-LINK-HOVER-color); } +#sidebar hr { + border-color: var(--MENU-SECTION-HR-color); +} + #footer { color: var(--MENU-SECTIONS-LINK-color); }