mirror of
https://github.com/imfing/hextra.git
synced 2025-07-01 20:07:16 -04:00
Compare commits
5 Commits
codex/impl
...
797b485c9b
Author | SHA1 | Date | |
---|---|---|---|
797b485c9b | |||
71b2b1176f | |||
756769d6d3 | |||
0c2c148f5e | |||
aea9235285 |
@ -875,6 +875,9 @@ video {
|
|||||||
.hx-gap-4 {
|
.hx-gap-4 {
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
.hx-gap-6 {
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
.hx-gap-x-1\.5 {
|
.hx-gap-x-1\.5 {
|
||||||
-moz-column-gap: 0.375rem;
|
-moz-column-gap: 0.375rem;
|
||||||
column-gap: 0.375rem;
|
column-gap: 0.375rem;
|
||||||
|
@ -62,6 +62,27 @@ You may add custom scripts to the end of the head for every page by adding the f
|
|||||||
layouts/partials/custom/head-end.html
|
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`:
|
||||||
|
|
||||||
|
```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"
|
||||||
|
```
|
||||||
|
|
||||||
|
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._
|
||||||
|
|
||||||
## Custom Layouts
|
## 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.
|
The layouts of the theme can be overridden by creating a file with the same name in the `layouts` directory of your site.
|
||||||
|
@ -327,6 +327,7 @@
|
|||||||
"hx-gap-1",
|
"hx-gap-1",
|
||||||
"hx-gap-2",
|
"hx-gap-2",
|
||||||
"hx-gap-4",
|
"hx-gap-4",
|
||||||
|
"hx-gap-6",
|
||||||
"hx-gap-x-1.5",
|
"hx-gap-x-1.5",
|
||||||
"hx-gap-y-2",
|
"hx-gap-y-2",
|
||||||
"hx-grid",
|
"hx-grid",
|
||||||
|
@ -24,14 +24,23 @@
|
|||||||
<hr class="dark:hx-border-neutral-800" />
|
<hr class="dark:hx-border-neutral-800" />
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- 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"
|
{{- if .Site.Params.footer.customSection -}}
|
||||||
>
|
<div
|
||||||
<div class="hx-flex hx-w-full hx-flex-col hx-items-center sm:hx-items-start">
|
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"
|
||||||
{{- if (.Site.Params.footer.displayPoweredBy | default true) }}<div class="hx-font-semibold">{{ template "theme-credit" $poweredBy }}</div>{{ end }}
|
>
|
||||||
{{- if .Site.Params.footer.displayCopyright }}<div class="hx-mt-6 hx-text-xs">{{ $copyright | markdownify }}</div>{{ end }}
|
{{ 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" ) }}
|
||||||
|
</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"
|
||||||
|
>
|
||||||
|
<div class="hx-flex hx-w-full hx-flex-col hx-items-center sm:hx-items-start hx-gap-6">
|
||||||
|
{{- if (.Site.Params.footer.displayPoweredBy | default true) }}<div class="hx-font-semibold">{{ template "theme-credit" $poweredBy }}</div>{{ end }}
|
||||||
|
{{- if .Site.Params.footer.displayCopyright }}<div class="hx-text-xs">{{ $copyright | markdownify }}</div>{{ end }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{- define "theme-credit" -}}
|
{{- define "theme-credit" -}}
|
||||||
|
Reference in New Issue
Block a user