{{ with .Site.Params.sidebar.avatar }} {{ if (default true .enabled) }}
{{ if not .local }} Avatar {{ else }} {{ $avatar := resources.Get (.src) }} {{ if $avatar }} {{ $avatarResized := $avatar.Resize "300x" }} Avatar {{ else }} {{ errorf "Failed loading avatar from %q" . }} {{ end }} {{ end }} {{ with $.Site.Params.sidebar.emoji }} {{ . }} {{ end }}
{{ end }} {{ end }}

{{ .Site.Title }}

{{ .Site.Params.sidebar.subtitle }}

{{- with .Site.Menus.social -}}
    {{ range . }}
  1. {{ $icon := default "link" .Params.Icon }} {{ with $icon }} {{ partial "helper/icon" . }} {{ end }}
  2. {{ end }}
{{- end -}}
    {{ $currentPage := . }} {{ range .Site.Menus.main }} {{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
  1. {{ $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://docs.stack.jimmycai.com/configuration/custom-menu.html" .URL }} {{ end }} {{ with $icon }} {{ partial "helper/icon" . }} {{ end }} {{- .Name -}}
  2. {{ end }}
    {{- $currentLanguageCode := .Language.Lang -}} {{ with .Site.Home.AllTranslations }}
  3. {{ partial "helper/icon" "language" }}
  4. {{ end }} {{ if (default false .Site.Params.colorScheme.toggle) }}
  5. {{ partial "helper/icon" "toggle-left" }} {{ partial "helper/icon" "toggle-right" }} {{ T "darkMode" }}
  6. {{ end }}