2020-08-22 07:20:08 -04:00
|
|
|
<aside class="sidebar left-sidebar sticky">
|
2020-09-09 11:17:09 -04:00
|
|
|
<button class="hamburger hamburger--spin" type="button" id="toggle-menu" aria-label="{{ T `toggleMenu` }}">
|
2020-08-22 07:20:08 -04:00
|
|
|
<span class="hamburger-box">
|
|
|
|
<span class="hamburger-inner"></span>
|
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<header class="site-info">
|
2020-09-06 06:56:44 -04:00
|
|
|
{{ with .Site.Params.sidebar.avatar }}
|
2020-08-24 15:20:59 -04:00
|
|
|
<figure class="site-avatar">
|
2020-09-06 06:56:44 -04:00
|
|
|
{{ $avatar := resources.Get (.) }}
|
|
|
|
|
|
|
|
{{ if $avatar }}
|
|
|
|
{{ $avatarResized := $avatar.Resize "300x300" }}
|
|
|
|
<img src="{{ $avatarResized.RelPermalink }}" width="{{ $avatarResized.Width }}"
|
|
|
|
height="{{ $avatarResized.Height }}" class="site-logo" loading="lazy" alt="Avatar">
|
|
|
|
{{ else }}
|
|
|
|
{{ errorf "Failed loading avatar from %q" . }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<span class="emoji">{{ $.Site.Params.sidebar.emoji }}</span>
|
2020-08-24 15:20:59 -04:00
|
|
|
</figure>
|
|
|
|
{{ end }}
|
2020-08-22 07:20:08 -04:00
|
|
|
<h1 class="site-name"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
2020-09-06 06:56:44 -04:00
|
|
|
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
2020-08-22 07:20:08 -04:00
|
|
|
</header>
|
|
|
|
|
|
|
|
<nav class="menu" id="main-menu">
|
|
|
|
{{ $currentPage := . }}
|
|
|
|
{{ range .Site.Menus.main }}
|
|
|
|
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
|
|
|
|
|
|
|
<li {{ if $active }} class='current' {{ end }}>
|
|
|
|
<a href='{{ .URL }}'>
|
2020-08-24 15:20:59 -04:00
|
|
|
{{ if .Pre }}
|
|
|
|
{{ (resources.Get (delimit (slice "icons/" .Pre ".svg") "")).Content | safeHTML }}
|
|
|
|
{{ end }}
|
2020-08-22 07:20:08 -04:00
|
|
|
<span>{{- .Name -}}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</nav>
|
|
|
|
</aside>
|