holy/layouts/partials/header.html

43 lines
1.2 KiB
HTML
Raw Permalink Normal View History

2024-04-20 08:58:17 +00:00
<nav class="w:full h:45 fixed bg:fade-84/.95@dark bg:white z:1000">
2022-05-09 10:25:13 +00:00
<div class="
h:full
w:full
max-w:1200
mx:auto
px:32
d:flex
align-items:center
">
<div>
2022-11-27 01:48:14 +00:00
<a href="/" class="mr-3 font:extralight">
2024-04-13 10:31:46 +00:00
{{ if not .Site.Params.HeaderTitle }}
{{ .Site.Title }}
{{ else }}
{{ .Site.Params.HeaderTitle }}
{{ end }}
2022-11-27 01:48:14 +00:00
</a>
2022-05-09 10:25:13 +00:00
</div>
<div class="ml:auto">
{{ $currentPage := . }}
{{ $active := "" }}
{{ range .Site.Menus.main }}
{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
{{ $active = "active" }}
{{ end }}
<a class="
font:semibold
2022-05-10 06:29:03 +00:00
font:fade
2022-05-09 10:25:13 +00:00
font:fade-10:hover
font:fade-30.active
px:8
transition:150ms;ease-in
{{ $active }}
" href="{{ .URL }}" title="{{ .Title }}">
{{- .Name -}}
</a>
{{ end }}
</div>
</div>
</nav>