fix: phantom scroll when params.footer.enable is set to false (#658)

* Phantom scroll fix

* fix: adjust menu height in CSS and update sidebar max height reference

* chore: regenerate css

---------

Co-authored-by: Xin <xin@imfing.com>
This commit is contained in:
Zabriskije 2025-04-10 00:11:19 +02:00 committed by GitHub
parent 1eb4b9ea23
commit 1cc02a6931
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@ body {
--primary-saturation: 100%; --primary-saturation: 100%;
--primary-lightness: 50%; --primary-lightness: 50%;
--navbar-height: 4rem; --navbar-height: 4rem;
--menu-height: 3.75rem; --menu-height: 3.75rem; /* 60px */
} }
.dark { .dark {

View File

@ -43,7 +43,7 @@
{{ $displayThemeToggle := (site.Params.theme.displayToggle | default true) -}} {{ $displayThemeToggle := (site.Params.theme.displayToggle | default true) -}}
{{ if or hugo.IsMultilingual $displayThemeToggle }} {{ if or hugo.IsMultilingual $displayThemeToggle }}
<div class="{{ $switchesClass }} {{ with hugo.IsMultilingual }}hx:justify-end{{ end }} hx:sticky hx:bottom-0 hx:bg-white hx:dark:bg-dark hx:mx-4 hx:py-4 hx:shadow-[0_-12px_16px_#fff] hx:flex hx:items-center hx:gap-2 hx:border-gray-200 hx:dark:border-neutral-800 hx:dark:shadow-[0_-12px_16px_#111] hx:contrast-more:border-neutral-400 hx:contrast-more:shadow-none hx:contrast-more:dark:shadow-none hx:border-t" data-toggle-animation="show"> <div class="{{ $switchesClass }} {{ with hugo.IsMultilingual }}hx:justify-end{{ end }} hx:sticky hx:bottom-0 hx:max-h-(--menu-height) hx:bg-white hx:dark:bg-dark hx:mx-4 hx:py-4 hx:shadow-[0_-12px_16px_#fff] hx:flex hx:items-center hx:gap-2 hx:border-gray-200 hx:dark:border-neutral-800 hx:dark:shadow-[0_-12px_16px_#111] hx:contrast-more:border-neutral-400 hx:contrast-more:shadow-none hx:contrast-more:dark:shadow-none hx:border-t" data-toggle-animation="show">
{{- with hugo.IsMultilingual -}} {{- with hugo.IsMultilingual -}}
{{- partial "language-switch" (dict "context" $context "grow" true) -}} {{- partial "language-switch" (dict "context" $context "grow" true) -}}
{{- with $displayThemeToggle }}{{ partial "theme-toggle" (dict "hideLabel" true) }}{{ end -}} {{- with $displayThemeToggle }}{{ partial "theme-toggle" (dict "hideLabel" true) }}{{ end -}}