npqhugo/layouts/partials/aside.html

35 lines
1,008 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}}
<a href="{{ .Site.BaseURL }}"><img src="/avatar.png" alt="avatar"></a>
{{end}}
2020-04-11 20:51:04 +08:00
<a id="branding" href="{{ .Site.BaseURL }}">{{ .Site.Title | safeHTML }}</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 ""}}
target="_blanck"
{{end}}
>
2020-04-11 21:52:56 +08:00
{{with .Pre}}
{{ .}}
{{else}}
<i class="far fa-file far-sm"></i>
{{end}}
2020-04-11 19:28:48 +08:00
<span>{{ .Name }}</span>
</a>
{{end}}
2020-04-11 21:52:56 +08:00
<a href="/tags" >
<i class="fas fa-tags"></i>
<span>tags</span>
</a>
2020-04-11 19:28:48 +08:00
<a href="/contact" >
<i class="far fa-envelope"></i>
<span>contact</span>
</a>
</aside>