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>
|
|
|
|
|
2020-09-14 07:38:24 -04:00
|
|
|
<ol class="menu" id="main-menu">
|
2020-08-22 07:20:08 -04:00
|
|
|
{{ $currentPage := . }}
|
|
|
|
{{ range .Site.Menus.main }}
|
|
|
|
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
|
|
|
|
|
|
|
<li {{ if $active }} class='current' {{ end }}>
|
2020-10-31 18:24:58 -04:00
|
|
|
<a href='{{ .URL | relURL }}'>
|
2020-08-24 15:20:59 -04:00
|
|
|
{{ if .Pre }}
|
2020-10-09 18:27:56 -04:00
|
|
|
{{ partial "helper/icon" .Pre }}
|
2020-08-24 15:20:59 -04:00
|
|
|
{{ end }}
|
2020-08-22 07:20:08 -04:00
|
|
|
<span>{{- .Name -}}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
2020-09-14 07:38:24 -04:00
|
|
|
</ol>
|
2020-08-22 07:20:08 -04:00
|
|
|
</aside>
|