mirror of
https://github.com/imfing/hextra.git
synced 2025-05-12 18:56:29 -04:00
Remove context variable and flag in hugo.yaml
This commit is contained in:
parent
797b485c9b
commit
869731e9de
@ -64,24 +64,13 @@ 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 __and__ setting `customSection: true` in the `footer` section of your `hugo.yaml`:
|
||||
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.
|
||||
|
||||
```yaml {filename="hugo.yaml"}
|
||||
footer:
|
||||
enable: true
|
||||
customSection: true
|
||||
# These settings are still respected
|
||||
displayCopyright: false
|
||||
displayPoweredBy: true
|
||||
# This setting applies to the custom section
|
||||
with: "wide"
|
||||
```html {filename="layouts/partials/custom/footer.html"}
|
||||
<!-- Your footer element here -->
|
||||
```
|
||||
|
||||
Variables available in the footer are:
|
||||
|
||||
- `{{ .footerButtonColor }}` - The color/background color of a footer button
|
||||
|
||||
_Note: The custom footer inherits the default footer background color and text color._
|
||||
_Note: The custom footer inherits the default footer background color text color and the `width` setting in `hugo.yaml#footer` section._
|
||||
|
||||
## Custom Layouts
|
||||
|
||||
|
0
layouts/partials/custom/footer.html
Normal file
0
layouts/partials/custom/footer.html
Normal file
@ -24,15 +24,11 @@
|
||||
<hr class="dark:hx-border-neutral-800" />
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if .Site.Params.footer.customSection -}}
|
||||
<div
|
||||
class="{{ $footerWidth }} hx-pl-[max(env(safe-area-inset-left),0rem)] hx-pr-[max(env(safe-area-inset-right),0rem)] hx-text-gray-600 dark:hx-text-gray-400"
|
||||
>
|
||||
{{ partial "custom/footer.html" (dict "context" . "footerButtonColor" "hx-rounded-md hx-transition-colors hover:hx-bg-gray-100 hover:hx-text-gray-900 dark:hover:hx-bg-primary-100/5 dark:hover:hx-text-gray-50" ) }}
|
||||
{{ partial "custom/footer.html" . }}
|
||||
</div>
|
||||
<hr class="dark:hx-border-neutral-800" />
|
||||
{{- end -}}
|
||||
<div
|
||||
class="{{ $footerWidth }} hx-mx-auto hx-flex hx-justify-center hx-py-12 hx-pl-[max(env(safe-area-inset-left),1.5rem)] hx-pr-[max(env(safe-area-inset-right),1.5rem)] hx-text-gray-600 dark:hx-text-gray-400 md:hx-justify-start"
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user