diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-17 21:02:06 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-17 21:02:06 +0200 |
| commit | 9b26aecc75ca2ee2b4298d1e49a8876552fee633 (patch) | |
| tree | 412be4431bfd4c0c163883988c2bda14abf814d8 /layouts/partials/sidebar.html | |
| parent | 304cf8b6b2b6769200d6964e6869cbed086fd52f (diff) | |
| download | gohugo-theme-ed-9b26aecc75ca2ee2b4298d1e49a8876552fee633.tar.gz | |
Correct code formatting, minor html fix for footer
Diffstat (limited to 'layouts/partials/sidebar.html')
| -rw-r--r-- | layouts/partials/sidebar.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 41652db..713d81d 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -9,27 +9,27 @@ </div> <nav class="sidebar-nav"> - {{ $current := . }} - {{ range site.Menus.main }} - {{ $active := or ($current.IsMenuCurrent "main" .) ($current.HasMenuCurrent "main" .) }} - {{ $active = or $active (eq .URL $current.RelPermalink) }} - {{ $active = or $active (eq .Name $current.Title) }} + {{- $current := . -}} + {{- range site.Menus.main -}} + {{- $active := or ($current.IsMenuCurrent "main" .) ($current.HasMenuCurrent "main" .) -}} + {{- $active = or $active (eq .URL $current.RelPermalink) -}} + {{- $active = or $active (eq .Name $current.Title) }} <a class="sidebar-nav-item{{ if $active }} active{{ end }}" href="{{ .URL }}" id="menu-main-{{ .Identifier }}" {{- if eq .Params.external true }} target="_blank" rel="noopener noreferrer"{{ end }}> {{- print .Name | safeHTML -}} </a> - {{ end }} + {{- end }} - {{/* TODO: Add hypothesis support */}} + {{- /* TODO: Add hypothesis support */ -}} - {{ with site.Menus.feeds }} + {{- with site.Menus.feeds }} <div class="sidebar-nav-item"> - {{ range $i, $ := site.Menus.feeds }} + {{- range $i, $ := site.Menus.feeds }} {{ if $i }}<span aria-hidden="true">|</span>{{ end }} <a href="{{ .URL }}" id="menu-feeds-{{ .Identifier }}"> - {{ print .Name | safeHTML }} + {{- print .Name | safeHTML -}} </a> {{ end }} </div> |
