hugo-theme-flat/layouts/partials/header.html
2022-05-18 19:45:04 +08:00

23 lines
789 B
HTML

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