npqhugo/layouts/partials/aside.html

31 lines
746 B
HTML
Raw Normal View History

2020-04-11 19:28:48 +08:00
<aside id="sidenav">
<header>
2020-04-11 21:52:56 +08:00
{{if eq .Site.Params.useAvatar true}}
2020-04-17 02:21:05 +08:00
<a href={{ "" | absURL }}><img src="{{ "avatar.png" | absURL }}" alt="avatar"></a>
2020-04-11 21:52:56 +08:00
{{end}}
2020-04-11 22:27:29 +08:00
2020-04-17 02:21:05 +08:00
<a id="branding" href={{ "" | absURL }}>
2020-04-11 22:27:29 +08:00
{{with .Site.Params.logo}}
{{ . | safeHTML }}
{{else}}
{{ .Site.Title }}
{{end}}
</a>
2020-04-11 19:28:48 +08:00
</header>
<nav>
{{ range .Site.Menus.main }}
{{ $url := urls.Parse .URL }}
<a href="{{ $url }}"
{{ if ne $url.Host ""}}
2020-05-17 06:12:11 +08:00
target="_blank"
2020-04-11 19:28:48 +08:00
{{end}}
>
2020-04-11 23:58:57 +08:00
{{ .Pre }}
2020-04-11 19:28:48 +08:00
<span>{{ .Name }}</span>
</a>
{{end}}
2020-05-17 06:12:11 +08:00
</nav>
2020-04-11 19:28:48 +08:00
</aside>