From e03f3dd2050baae0425ffcc996037f50ec9817ea Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Sat, 18 Jan 2025 08:09:00 +0100 Subject: [PATCH] refactor(footer): Switch to custom footer template --- config.yaml | 2 +- i18n/de.yaml | 1 + i18n/en.yaml | 3 +- layouts/partials/custom/footer.html | 6 ---- layouts/partials/footer.html | 49 +++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 i18n/de.yaml delete mode 100644 layouts/partials/custom/footer.html create mode 100644 layouts/partials/footer.html diff --git a/config.yaml b/config.yaml index 7ed3d68..b47a777 100644 --- a/config.yaml +++ b/config.yaml @@ -101,7 +101,7 @@ params: displayToggle: true footer: enable: true - displayCopyright: false + displayCopyright: true displayPoweredBy: false width: normal search: diff --git a/i18n/de.yaml b/i18n/de.yaml new file mode 100644 index 0000000..940d52e --- /dev/null +++ b/i18n/de.yaml @@ -0,0 +1 @@ +copyright: 'Erstellt von ODIT.Services mit ❤️, Hugo und dem Hextra Theme
Entwickelt für den Lauf für Kaya! Spendenlauf
Impressum | Datenschutz' \ No newline at end of file diff --git a/i18n/en.yaml b/i18n/en.yaml index d92d70f..9e39c9d 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -3,4 +3,5 @@ admin: Administrators selfservice: Selfservice scanstation: Scaning Stations beamershow: Beamer Show -search: Search \ No newline at end of file +search: Search +copyright: 'Made by ODIT.Services with ❤️, Hugo and the Hextra theme
Developed for the Lauf für Kaya! charity run
Imprint | Privacy' \ No newline at end of file diff --git a/layouts/partials/custom/footer.html b/layouts/partials/custom/footer.html deleted file mode 100644 index 4de88e5..0000000 --- a/layouts/partials/custom/footer.html +++ /dev/null @@ -1,6 +0,0 @@ -

- Made by ODIT.Services with ❤️ - and Hugo - - Developed for the Lauf für Kaya! charity run
- Imprint | Privacy -

\ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..b934a04 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,49 @@ +{{- $enableFooterSwitches := .Scratch.Get "enableFooterSwitches" | default false -}} +{{- $displayThemeToggle := site.Params.theme.displayToggle | default true -}} +{{- $footerSwitchesVisible := and $enableFooterSwitches (or hugo.IsMultilingual $displayThemeToggle) -}} +{{- $copyrightSectionVisible := or (.Site.Params.footer.displayPoweredBy | default true) .Site.Params.footer.displayCopyright -}} + +{{- $copyright := (T "copyright") | default "© 2024 Hextra." -}} +{{- $poweredBy := (T "poweredBy") | default "Powered by Hextra" -}} + +{{- $footerWidth := "hx-max-w-screen-xl" -}} +{{- with .Site.Params.footer.width -}} + {{ if eq . "wide" -}} + {{ $footerWidth = "hx-max-w-[90rem]" -}} + {{ else if eq . "full" -}} + {{ $footerWidth = "max-w-full" -}} + {{ end -}} +{{- end -}} + + + + +{{- define "theme-credit" -}} + + + {{- . | markdownify -}} + {{- if strings.Contains . "Hextra" -}} + {{- partial "utils/icon.html" (dict "name" "hextra" "attributes" `height=1em class="hx-inline-block ltr:hx-ml-1 rtl:hx-mr-1 hx-align-[-2.5px]"`) -}} + {{- end -}} + + +{{- end -}} \ No newline at end of file