hugo-theme-flat/layouts/partials/header.html
2022-05-16 18:46:25 +08:00

23 lines
801 B
HTML

<header class="header-wrapper">
<div class="header max-wrapper">
<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>