Skip to content

Commit 1f2050d

Browse files
committed
sidebar: <nav> is only for sitewide navigation
Only put the navigation across other pages in the <nav> element.
1 parent 4d46d03 commit 1f2050d

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

layouts/partials/sidebar.html

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -49,40 +49,40 @@
4949
<a href="{{ relURL "community" }}"{{ if (eq $section "community") }} class="active"{{ end }}>Community</a>
5050
</li>
5151
</ul>
52+
</nav>
5253

53-
{{ $headings := .Params.headings }}
54-
{{ if $headings }}
55-
<ul id="toc">
56-
<li> Table of Contents
57-
<ul class="expanded">
58-
{{ range $i, $item := $headings }}
59-
<li><a href="#{{ .id }}">{{ .text }}</a> </li>
60-
{{ end }}
61-
</ul>
62-
</li>
63-
</ul>
64-
{{ end }}
54+
{{ $headings := .Params.headings }}
55+
{{ if $headings }}
56+
<ul id="toc">
57+
<li> Table of Contents
58+
<ul class="expanded">
59+
{{ range $i, $item := $headings }}
60+
<li><a href="#{{ .id }}">{{ .text }}</a> </li>
61+
{{ end }}
62+
</ul>
63+
</li>
64+
</ul>
65+
{{ end }}
6566

66-
{{ if (eq .Params.Sidebar "book") }}
67-
<hr class="sidebar">
68-
{{- /* If this page displays a section of the ProGit book, map all the translations thereof */ -}}
69-
{{ with $.Page.Params.book }}
70-
{{ $cs_number := .section.cs_number }}
71-
{{ range $.Page.Site.Data.book }}
72-
{{ $language_code := .language_code }}
73-
{{ range .chapters }}
74-
{{ range .sections }}
75-
{{ if (eq .cs_number $cs_number) }}
76-
{{ $.Scratch.SetInMap "translations" $language_code .url }}
77-
{{ end }}
67+
{{ if (eq .Params.Sidebar "book") }}
68+
<hr class="sidebar">
69+
{{- /* If this page displays a section of the ProGit book, map all the translations thereof */ -}}
70+
{{ with $.Page.Params.book }}
71+
{{ $cs_number := .section.cs_number }}
72+
{{ range $.Page.Site.Data.book }}
73+
{{ $language_code := .language_code }}
74+
{{ range .chapters }}
75+
{{ range .sections }}
76+
{{ if (eq .cs_number $cs_number) }}
77+
{{ $.Scratch.SetInMap "translations" $language_code .url }}
7878
{{ end }}
7979
{{ end }}
8080
{{ end }}
8181
{{ end }}
82-
{{ partial "translations.html" . }}
83-
{{ else if (and (ne $section "documentation") (ne $section "site")) }}
84-
<hr class="sidebar">
85-
{{ partial "book.html" }}
8682
{{ end }}
87-
</nav>
83+
{{ partial "translations.html" . }}
84+
{{ else if (and (ne $section "documentation") (ne $section "site")) }}
85+
<hr class="sidebar">
86+
{{ partial "book.html" }}
87+
{{ end }}
8888
</aside>

0 commit comments

Comments
 (0)