Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <github@jimmycai.com>2022-03-04 12:24:21 +0300
committerGitHub <noreply@github.com>2022-03-04 12:24:21 +0300
commit985af924e7643d663a179198f55349e153536e43 (patch)
tree0e5cdf20a1ee20da71f813d876dd3e00c32068ea /layouts
parentc122e5e9a1cd4f71e069dc1d05d036a1b030db09 (diff)
feat: new left sidebar layout (#524)
* feat: more compact menu style * add compact option to sidebar * fix mobile menu style
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/sidebar/left.html40
1 files changed, 20 insertions, 20 deletions
diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html
index 44d5307..f255389 100644
--- a/layouts/partials/sidebar/left.html
+++ b/layouts/partials/sidebar/left.html
@@ -1,4 +1,4 @@
-<aside class="sidebar left-sidebar sticky">
+<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>
@@ -35,27 +35,27 @@
<h1 class="site-name"><a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a></h1>
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
</div>
-
- {{- with .Site.Menus.social -}}
- <ol class="social-menu">
- {{ range . }}
- <li>
- <a
- href='{{ .URL }}'
- {{ if eq (default true .Params.newTab) true }}target="_blank"{{ end }}
- {{ with .Name }}title="{{ . }}"{{ end }}
- >
- {{ $icon := default "link" .Params.Icon }}
- {{ with $icon }}
- {{ partial "helper/icon" . }}
- {{ end }}
- </a>
- </li>
- {{ end }}
- </ol>
- {{- end -}}
</header>
+ {{- with .Site.Menus.social -}}
+ <ol class="social-menu">
+ {{ range . }}
+ <li>
+ <a
+ href='{{ .URL }}'
+ {{ if eq (default true .Params.newTab) true }}target="_blank"{{ end }}
+ {{ with .Name }}title="{{ . }}"{{ end }}
+ >
+ {{ $icon := default "link" .Params.Icon }}
+ {{ with $icon }}
+ {{ partial "helper/icon" . }}
+ {{ end }}
+ </a>
+ </li>
+ {{ end }}
+ </ol>
+ {{- end -}}
+
<ol class="menu" id="main-menu">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}