All checks were successful
Blog Deployment / Check-Rebuild (push) Successful in 5s
Blog Deployment / Build (push) Has been skipped
Blog Deployment / Deploy-Staging (push) Successful in 10s
Blog Deployment / Test-Staging (push) Successful in 2s
Blog Deployment / Merge (push) Has been skipped
Blog Deployment / Deploy-Production (push) Has been skipped
Blog Deployment / Test-Production (push) Has been skipped
Blog Deployment / Clean (push) Has been skipped
Blog Deployment / Notify (push) Has been skipped
100 lines
4.3 KiB
HTML
100 lines
4.3 KiB
HTML
<aside class="sidebar left-sidebar sticky {{ if .Site.Params.sidebar.compact }}compact{{ end }}">
|
|
<button class="hamburger hamburger--spin" type="button" id="toggle-menu" aria-label="{{ T `toggleMenu` }}">
|
|
<span class="hamburger-box">
|
|
<span class="hamburger-inner"></span>
|
|
</span>
|
|
</button>
|
|
|
|
<header>
|
|
{{ with .Site.Params.sidebar.avatar }}
|
|
{{ if (default true .enabled) }}
|
|
<figure class="site-avatar" style="margin-left: auto; margin-right: auto;">
|
|
<a href="{{ .Site.BaseURL | relLangURL }}">
|
|
{{ if not .local }}
|
|
<img src="{{ .src }}" width="300" height="300" class="site-logo" loading="lazy" alt="Avatar">
|
|
{{ else }}
|
|
{{ $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 }}
|
|
{{ end }}
|
|
</a>
|
|
{{ with $.Site.Params.sidebar.emoji }}
|
|
<span class="emoji">{{ . }}</span>
|
|
{{ end }}
|
|
</figure>
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
<div class="site-meta" style="text-align: center;">
|
|
<h1 class="site-name"><a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a></h1>
|
|
<h2 class="site-description" style="font-size: 1.3rem;">{{ .Site.Params.sidebar.subtitle }}</h2>
|
|
</div>
|
|
</header>
|
|
|
|
{{- $page := . -}}
|
|
{{- with .Site.Menus.social -}}
|
|
<ol class="menu-social">
|
|
{{ range . }}
|
|
<li>
|
|
<a
|
|
href='{{ .URL }}'
|
|
{{ if eq (default true .Params.newTab) true }}target="_blank"{{ end }}
|
|
{{ with .Name }}title="{{ . }}"{{ end }}
|
|
rel="me"
|
|
>
|
|
{{ $icon := default "link" .Params.Icon }}
|
|
{{ with $icon }}
|
|
{{ partial "helper/icon" . }}
|
|
{{ end }}
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
{{- $currentLang := $page.Language.Lang -}}
|
|
{{- range $page.AllTranslations }}
|
|
{{- if ne .Language.Lang $currentLang }}
|
|
<li class="lang-toggle-icon">
|
|
<a href="{{ .Permalink }}" title="{{ .Language.LanguageName }}">
|
|
{{ partial "helper/icon" (printf "toggle_to_%s" .Language.Lang) }}
|
|
</a>
|
|
</li>
|
|
{{- end }}
|
|
{{- end }}
|
|
</ol>
|
|
{{- end -}}
|
|
|
|
<ol 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 }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
|
{{ $icon := default .Pre .Params.Icon }}
|
|
{{ if .Pre }}
|
|
{{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://stack.jimmycai.com/config/menu" .URL }}
|
|
{{ end }}
|
|
{{ with $icon }}
|
|
{{ partial "helper/icon" . }}
|
|
{{ end }}
|
|
<span>{{- .Name -}}</span>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
<li class="menu-bottom-section">
|
|
<ol class="menu">
|
|
{{ if (default false .Site.Params.colorScheme.toggle) }}
|
|
<li id="dark-mode-toggle">
|
|
{{ partial "helper/icon" "moon" }}
|
|
<span>{{ T "darkMode" }}</span>
|
|
</li>
|
|
{{ end }}
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
</aside>
|