diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html index f255389..2d8b25b 100755 --- a/layouts/partials/sidebar/left.html +++ b/layouts/partials/sidebar/left.html @@ -7,30 +7,30 @@ {{ with .Site.Params.sidebar.avatar }} - {{ if (default true .enabled) }} - - + {{ if (default true .enabled) }} + + {{ if not .local }} - + {{ else }} - {{ $avatar := resources.Get (.src) }} - - {{ if $avatar }} - {{ $avatarResized := $avatar.Resize "300x" }} - - {{ else }} - {{ errorf "Failed loading avatar from %q" . }} - {{ end }} + {{ $avatar := resources.Get (.src) }} + + {{ if $avatar }} + {{ $avatarResized := $avatar.Resize "300x" }} + + {{ else }} + {{ errorf "Failed loading avatar from %q" . }} {{ end }} - - {{ with $.Site.Params.sidebar.emoji }} - {{ . }} {{ end }} - + + {{ with $.Site.Params.sidebar.emoji }} + {{ . }} {{ end }} + {{ end }} - + {{ end }} + {{ .Site.Title }} {{ .Site.Params.sidebar.subtitle }} @@ -38,37 +38,36 @@ {{- with .Site.Menus.social -}} - - {{ range . }} - - - {{ $icon := default "link" .Params.Icon }} - {{ with $icon }} - {{ partial "helper/icon" . }} - {{ end }} - - - {{ end }} - + + {{ range . }} + + + {{ $icon := default "link" .Params.Icon }} + {{ with $icon }} + {{ partial "helper/icon" . }} + {{ end }} + + + {{ end }} + {{- end -}} {{ $currentPage := . }} {{ range .Site.Menus.main }} - {{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }} + {{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) + ($currentPage.IsMenuCurrent "main" .)) }} - + {{ $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 }} + {{ errorf "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" . }} + {{ partial "helper/icon" . }} {{ end }} {{- .Name -}} @@ -78,23 +77,24 @@ {{- $currentLanguageCode := .Language.Lang -}} {{ with .Site.Home.AllTranslations }} - - {{ partial "helper/icon" "language" }} - - {{ range . }} - {{ .Language.LanguageName }} - {{ end }} - - + + {{ partial "helper/icon" "language" }} + + {{ range . }} + {{ + .Language.LanguageName }} + {{ end }} + + {{ end }} - + {{ if (default false .Site.Params.colorScheme.toggle) }} - - {{ partial "helper/icon" "toggle-left" }} - {{ partial "helper/icon" "toggle-right" }} - {{ T "darkMode" }} - + + {{ partial "helper/icon" "toggle-left" }} + {{ partial "helper/icon" "toggle-right" }} + {{ T "darkMode" }} + {{ end }} - + \ No newline at end of file