npqhugo/layouts/partials/aside.html

38 lines
990 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 22:27:29 +08:00
<a id="branding" href="{{ .Site.BaseURL }}">
{{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 ""}}
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}}
<a href="/contact" >
<i class="far fa-envelope"></i>
<span>contact</span>
</a>
</aside>