{{ T "docs_label_browse" }}
{{ template "docs-browse-section" (dict "ctx" . "page" .) }}
{{ define "docs-browse-section" }} {{ $pages := .page.Pages }} {{ $sections := .page.Sections }} {{ with site.Params.language_alternatives }} {{ range . }} {{ with (where $.page.Translations ".Lang" . ) }} {{ $p := index . 0 }} {{ $pages = $pages | lang.Merge $p.Pages }} {{ $sections = $sections | lang.Merge $p.Sections }} {{ end }} {{ end }} {{ end }} {{ $pages := where $pages ".Params.toc_hide" "!=" true }} {{ $sections := where $sections ".Params.toc_hide" "!=" true }} {{ if not .page.Parent.IsHome }}
{{ if ge (len $pages) 1 }}
{{ $num_pages := len $pages }} {{ if gt $num_pages 0 }} {{ $column_size := (div $num_pages 3.0) | math.Ceil | int | default 1 }} {{ range $i, $e := $pages.ByWeight }} {{ $offset := mod $i $column_size | add 1 }} {{ if eq $offset 1 }}
{{ end }} {{ $isForeignLanguage := (ne .Lang $.ctx.Lang)}} {{ printf "%02d - %s" (add $i 1) .LinkTitle }}{{ if $isForeignLanguage }} ({{ .Lang | upper }}){{ end }}
{{ if or (eq $offset $column_size) (eq (add $i 1) $num_pages)}}
{{ end }} {{ end }} {{ end }}
{{ end }}
{{ end }} {{ range $sections.ByWeight }} {{ template "docs-browse-section" (dict "ctx" $.ctx "page" .) }} {{ end }} {{ end }}