From 1a2693cc152ac4952d3e7985d8b394394ca4f3a4 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Sat, 17 Feb 2024 10:14:52 +0100 Subject: [PATCH] add an option to add links at the bottom of the page as well Signed-off-by: Daniel Holbach --- assets/css/theme.scss | 17 ++++++++++++++++- exampleSite/config.toml | 3 +++ exampleSite/content/homepage/license.md | 7 +++++++ exampleSite/content/license.md | 24 ++++++++++++++++++++++++ layouts/partials/footer.html | 17 +++++++++++++++++ 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 exampleSite/content/homepage/license.md create mode 100644 exampleSite/content/license.md diff --git a/assets/css/theme.scss b/assets/css/theme.scss index 0d6312c..95b78f4 100644 --- a/assets/css/theme.scss +++ b/assets/css/theme.scss @@ -274,7 +274,7 @@ a.fn-item { color: var(--sticky-menu-text-color); } -/* Bottom Icons */ +/* Footer Icons */ .icons { ol { padding-left: 0; @@ -284,3 +284,18 @@ a.fn-item { display: inline-block; } } + +/* Footer Links */ +.site-footer .links { + text-align: center; + + ol { + list-style-type: none; + list-style-position: inside; + padding-left: 0; + } + + li { + margin-left: unset; + } +} diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e0b4f71..ab20345 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -55,6 +55,9 @@ title = "Jane Doe - Nutrition Coach & Chef Consultant" # Show contact icons for email/phone (if specified) in the footer of the page showContactIcons = false + # Show links indicated with footer_menu and footer_menu_title in the footer of the page + showFooterLinks = false + [params.meta] keywords = "some, keywords, for, seo, you, know, google, duckduckgo, and, such" diff --git a/exampleSite/content/homepage/license.md b/exampleSite/content/homepage/license.md new file mode 100644 index 0000000..612f8d5 --- /dev/null +++ b/exampleSite/content/homepage/license.md @@ -0,0 +1,7 @@ +--- +footer_menu_title: License +footer_menu: true +detailed_page_path: /license/ +detailed_page_homepage_content: false +weight: 91 +--- diff --git a/exampleSite/content/license.md b/exampleSite/content/license.md new file mode 100644 index 0000000..de08de7 --- /dev/null +++ b/exampleSite/content/license.md @@ -0,0 +1,24 @@ +--- +title: Hugo Scroll License +--- + +The MIT License (MIT) + +Copyright (c) 2020 Jan Raasch + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 1a5098c..3db45b3 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,22 @@ +{{ $headless := .Site.GetPage "/homepage" }} +{{ $sections := $headless.Resources.ByType "page" }} +{{ $sections := cond .Site.BuildDrafts $sections (where $sections "Draft" "==" false) }} +