hugo-theme-flat/layouts/partials/header.html
2023-07-06 15:15:04 +08:00

23 lines
797 B
HTML

<header class="header-wrapper">
<div class="header">
<a class="site-title" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
<nav class="menu">
{{ range .Site.Menus.main }}
<div class="menu-item">
{{ if not .Children }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ else }}
<a>{{ .Name }}↓</a>
<nav class="sub-menu">
{{ range .Children }}
<div class="menu-item"><a href="{{ .URL }}">{{ .Name }}</a></div>
{{ end }}
</nav>
{{ end }}
</div>
{{ end }}
</nav>
</div>
</header>