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;
}
.nav {
.desktop-navigation {
overflow-x: auto;
overflow-y: hidden;
min-width: 0;
height: 100%;
gap: var(--header-items-gap);
}
.nav .nav-item {
line-height: var(--header-height);
.desktop-navigation .nav-item {
display: flex;
align-items: center;
}
.desktop-navigation .nav-item-text {
margin-top: 3px;
}
.footer {

@ -8,7 +8,7 @@
{{ define "navigation-links" }}
{{ 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 }}
@ -30,7 +30,7 @@
</svg>
{{- end }}
</div>
<nav class="nav flex grow hide-scrollbars">
<nav class="desktop-navigation flex grow hide-scrollbars">
{{ template "navigation-links" . }}
</nav>
{{ if not .App.Config.Theme.DisablePicker }}