feat: add multilingual mode support (#241)
BREAKING CHANGE: Layout file renamed ´layouts/partials/page-footer.html → layouts/partials/menu-nextprev.html`. If you use overrides, you might need to change the filenames as well.
This commit is contained in:
parent
42ebf067bb
commit
5c22ce57dc
88 changed files with 437 additions and 144 deletions
|
@ -27,6 +27,13 @@
|
|||
{{ $id := substr (sha1 $this.Permalink) 0 8 }}
|
||||
{{ $doCollapse := and (isset . "sub") (or $this.Params.GeekdocCollapseSection (default false .Site.Params.GeekdocCollapseAllSections)) }}
|
||||
|
||||
{{ if reflect.IsMap .name }}
|
||||
{{ $current.Scratch.Set "refName" (index .name $site.Language.Lang) }}
|
||||
{{ else }}
|
||||
{{ $current.Scratch.Set "refName" .name }}
|
||||
{{ end }}
|
||||
{{ $name := $current.Scratch.Get "refName" }}
|
||||
|
||||
|
||||
<input
|
||||
type="checkbox"
|
||||
|
@ -56,20 +63,20 @@
|
|||
{{ if $isCurrent }}is-active{{ end }}
|
||||
{{ end }}"
|
||||
>
|
||||
{{ .name }}
|
||||
{{ $name }}
|
||||
</a>
|
||||
</span>
|
||||
{{ if $doCollapse }}
|
||||
<svg class="icon gdoc_keyborad_arrow_left">
|
||||
<svg class="icon toggle gdoc_keyborad_arrow_left">
|
||||
<use xlink:href="#gdoc_keyborad_arrow_left"></use>
|
||||
</svg>
|
||||
<svg class="icon gdoc_keyborad_arrow_down hidden">
|
||||
<svg class="icon toggle gdoc_keyborad_arrow_down hidden">
|
||||
<use xlink:href="#gdoc_keyborad_arrow_down"></use>
|
||||
</svg>
|
||||
{{ end }}
|
||||
</label>
|
||||
{{ else }}
|
||||
<span class="flex">{{ .name }}</span>
|
||||
<span class="flex">{{ $name }}</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .sub }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue