summaryrefslogtreecommitdiffstats
path: root/layouts/partials/sidebar.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/sidebar.html')
-rw-r--r--layouts/partials/sidebar.html20
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>