Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions layouts/partials/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,40 +49,40 @@
<a href="{{ relURL "community" }}"{{ if (eq $section "community") }} class="active"{{ end }}>Community</a>
</li>
</ul>
</nav>

{{ $headings := .Params.headings }}
{{ if $headings }}
<ul id="toc">
<li> Table of Contents
<ul class="expanded">
{{ range $i, $item := $headings }}
<li><a href="#{{ .id }}">{{ .text }}</a> </li>
{{ end }}
</ul>
</li>
</ul>
{{ end }}
{{ $headings := .Params.headings }}
{{ if $headings }}
<ul id="toc">
<li> Table of Contents
<ul class="expanded">
{{ range $i, $item := $headings }}
<li><a href="#{{ .id }}">{{ .text }}</a> </li>
{{ end }}
</ul>
</li>
</ul>
{{ end }}

{{ if (eq .Params.Sidebar "book") }}
<hr class="sidebar">
{{- /* If this page displays a section of the ProGit book, map all the translations thereof */ -}}
{{ with $.Page.Params.book }}
{{ $cs_number := .section.cs_number }}
{{ range $.Page.Site.Data.book }}
{{ $language_code := .language_code }}
{{ range .chapters }}
{{ range .sections }}
{{ if (eq .cs_number $cs_number) }}
{{ $.Scratch.SetInMap "translations" $language_code .url }}
{{ end }}
{{ if (eq .Params.Sidebar "book") }}
<hr class="sidebar">
{{- /* If this page displays a section of the ProGit book, map all the translations thereof */ -}}
{{ with $.Page.Params.book }}
{{ $cs_number := .section.cs_number }}
{{ range $.Page.Site.Data.book }}
{{ $language_code := .language_code }}
{{ range .chapters }}
{{ range .sections }}
{{ if (eq .cs_number $cs_number) }}
{{ $.Scratch.SetInMap "translations" $language_code .url }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ partial "translations.html" . }}
{{ else if (and (ne $section "documentation") (ne $section "site")) }}
<hr class="sidebar">
{{ partial "book.html" }}
{{ end }}
</nav>
{{ partial "translations.html" . }}
{{ else if (and (ne $section "documentation") (ne $section "site")) }}
<hr class="sidebar">
{{ partial "book.html" }}
{{ end }}
Comment on lines -66 to +87
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the translated books may want to stay in the <nav> bar?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the translated books may want to stay in the

bar?

@dscho Maybe, yes. I didn't check the book yet. I should have. Putting it on my list.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dscho Why are book translations in the sidebar and man page translations at the top? I think they all should go in the top nav.

</aside>