|
49 | 49 | <a href="{{ relURL "community" }}"{{ if (eq $section "community") }} class="active"{{ end }}>Community</a> |
50 | 50 | </li> |
51 | 51 | </ul> |
| 52 | + </nav> |
52 | 53 |
|
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 }} |
65 | 66 |
|
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 }} |
78 | 78 | {{ end }} |
79 | 79 | {{ end }} |
80 | 80 | {{ end }} |
81 | 81 | {{ end }} |
82 | | - {{ partial "translations.html" . }} |
83 | | - {{ else if (and (ne $section "documentation") (ne $section "site")) }} |
84 | | - <hr class="sidebar"> |
85 | | - {{ partial "book.html" }} |
86 | 82 | {{ 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 }} |
88 | 88 | </aside> |
0 commit comments