Determine nav item height automatically

pull/784/head
Svilen Markov 2025-08-05 02:35:16 +07:00
parent f5d52a4096
commit e0bcbb5fb7
2 changed files with 10 additions and 6 deletions

@ -279,16 +279,20 @@ kbd:active {
max-height: 2.7rem; max-height: 2.7rem;
} }
.nav { .desktop-navigation {
overflow-x: auto; overflow-x: auto;
overflow-y: hidden;
min-width: 0; min-width: 0;
height: 100%; height: 100%;
gap: var(--header-items-gap); gap: var(--header-items-gap);
} }
.nav .nav-item { .desktop-navigation .nav-item {
line-height: var(--header-height); display: flex;
align-items: center;
}
.desktop-navigation .nav-item-text {
margin-top: 3px;
} }
.footer { .footer {

@ -8,7 +8,7 @@
{{ define "navigation-links" }} {{ define "navigation-links" }}
{{ range .App.Config.Pages }} {{ range .App.Config.Pages }}
<a href="{{ $.App.Config.Server.BaseURL }}/{{ .Slug }}" class="nav-item{{ if eq .Slug $.Page.Slug }} nav-item-current{{ end }}"{{ if eq .Slug $.Page.Slug }} aria-current="page"{{ end }}>{{ .Title }}</a> <a href="{{ $.App.Config.Server.BaseURL }}/{{ .Slug }}" class="nav-item{{ if eq .Slug $.Page.Slug }} nav-item-current{{ end }}"{{ if eq .Slug $.Page.Slug }} aria-current="page"{{ end }}><div class="nav-item-text">{{ .Title }}</div></a>
{{ end }} {{ end }}
{{ end }} {{ end }}
@ -30,7 +30,7 @@
</svg> </svg>
{{- end }} {{- end }}
</div> </div>
<nav class="nav flex grow hide-scrollbars"> <nav class="desktop-navigation flex grow hide-scrollbars">
{{ template "navigation-links" . }} {{ template "navigation-links" . }}
</nav> </nav>
{{ if not .App.Config.Theme.DisablePicker }} {{ if not .App.Config.Theme.DisablePicker }}