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 }}
|
2021-07-23 04:56:52 -04:00
|
|
|
{{ if (default true .enabled) }}
|
2020-08-24 15:20:59 -04:00
|
|
|
<figure class="site-avatar">
|
2020-12-11 10:33:02 -05:00
|
|
|
{{ if not .local }}
|
|
|
|
<img src="{{ .src }}" width="300" height="300" class="site-logo" loading="lazy" alt="Avatar">
|
2020-09-06 06:56:44 -04:00
|
|
|
{{ else }}
|
2020-12-11 10:33:02 -05:00
|
|
|
{{ $avatar := resources.Get (.src) }}
|
|
|
|
|
|
|
|
{{ if $avatar }}
|
|
|
|
{{ $avatarResized := $avatar.Resize "300x" }}
|
|
|
|
<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 }}
|
2020-09-06 06:56:44 -04:00
|
|
|
{{ end }}
|
|
|
|
|
2020-11-23 04:01:39 -05:00
|
|
|
{{ with $.Site.Params.sidebar.emoji }}
|
2020-11-23 04:47:22 -05:00
|
|
|
<span class="emoji">{{ . }}</span>
|
2020-11-23 04:01:39 -05:00
|
|
|
{{ end }}
|
2020-08-24 15:20:59 -04:00
|
|
|
</figure>
|
2021-07-23 04:56:52 -04:00
|
|
|
{{ end }}
|
2020-08-24 15:20:59 -04:00
|
|
|
{{ 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 }}>
|
2021-08-08 11:39:33 -04:00
|
|
|
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
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-12-23 13:03:40 -05:00
|
|
|
|
|
|
|
{{ if (default false .Site.Params.colorScheme.toggle) }}
|
|
|
|
<li id="dark-mode-toggle">
|
|
|
|
{{ partial "helper/icon" "toggle-left" }}
|
|
|
|
{{ partial "helper/icon" "toggle-right" }}
|
|
|
|
<span>{{ T "darkMode" }}</span>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
2020-09-14 07:38:24 -04:00
|
|
|
</ol>
|
2020-11-23 04:47:22 -05:00
|
|
|
</aside>
|