diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index f4c238d..2918a4c 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -875,6 +875,9 @@ video { .hx-gap-4 { gap: 1rem; } +.hx-gap-6 { + gap: 1.5rem; +} .hx-gap-x-1\.5 { -moz-column-gap: 0.375rem; column-gap: 0.375rem; @@ -1152,6 +1155,9 @@ video { .hx-pb-px { padding-bottom: 1px; } +.hx-pl-\[max\(env\(safe-area-inset-left\)\,0rem\)\] { + padding-left: max(env(safe-area-inset-left),0rem); +} .hx-pl-\[max\(env\(safe-area-inset-left\)\,1\.5rem\)\] { padding-left: max(env(safe-area-inset-left),1.5rem); } @@ -1167,6 +1173,9 @@ video { .hx-pr-\[max\(env\(safe-area-inset-left\)\,1\.5rem\)\] { padding-right: max(env(safe-area-inset-left),1.5rem); } +.hx-pr-\[max\(env\(safe-area-inset-right\)\,0rem\)\] { + padding-right: max(env(safe-area-inset-right),0rem); +} .hx-pr-\[max\(env\(safe-area-inset-right\)\,1\.5rem\)\] { padding-right: max(env(safe-area-inset-right),1.5rem); } diff --git a/exampleSite/content/docs/advanced/customization.md b/exampleSite/content/docs/advanced/customization.md index 5c37b79..163ae2d 100644 --- a/exampleSite/content/docs/advanced/customization.md +++ b/exampleSite/content/docs/advanced/customization.md @@ -62,6 +62,21 @@ You may add custom scripts to the end of the head for every page by adding the f layouts/partials/custom/head-end.html ``` +## Custom Footer Section + +You can add a custom section the footer between the language/theme buttons and the Copyright/Powered By section by creating a file `layouts/partials/custom/footer.html` in your site. + +```html {filename="layouts/partials/custom/footer.html"} + +``` + +Available variables in the footer section are: + +- `.aboveVisible`: `true` if the Language or Theme button(s) are visible above the footer along with a horizontal separator. +- `.belowVisible`: `true` if the Copyright or PoweredBy text are visible below the footer. + +_Note: The custom footer inherits the default footer background color text color and the `width` setting in `hugo.yaml#footer` section._ + ## Custom Layouts The layouts of the theme can be overridden by creating a file with the same name in the `layouts` directory of your site. diff --git a/exampleSite/hugo_stats.json b/exampleSite/hugo_stats.json index 788b37d..bb600e0 100644 --- a/exampleSite/hugo_stats.json +++ b/exampleSite/hugo_stats.json @@ -327,6 +327,7 @@ "hx-gap-1", "hx-gap-2", "hx-gap-4", + "hx-gap-6", "hx-gap-x-1.5", "hx-gap-y-2", "hx-grid", @@ -430,12 +431,14 @@ "hx-pb-8", "hx-pb-[env(safe-area-inset-bottom)]", "hx-pb-px", + "hx-pl-[max(env(safe-area-inset-left),0rem)]", "hx-pl-[max(env(safe-area-inset-left),1.5rem)]", "hx-pointer-events-none", "hx-pr-2", "hx-pr-4", "hx-pr-[calc(env(safe-area-inset-right)-1.5rem)]", "hx-pr-[max(env(safe-area-inset-left),1.5rem)]", + "hx-pr-[max(env(safe-area-inset-right),0rem)]", "hx-pr-[max(env(safe-area-inset-right),1.5rem)]", "hx-pt-4", "hx-pt-6", diff --git a/layouts/partials/custom/footer.html b/layouts/partials/custom/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 8bbb7d8..1a6b9d2 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,7 @@ {{- $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" -}} @@ -15,7 +17,7 @@ {{- define "theme-credit" -}}