mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-25 06:10:40 +00:00
fix: fix rendering issue for untranslated pages in bundle menu (#389)
This commit is contained in:
parent
0a5af2e8da
commit
6d82d6f851
@ -27,47 +27,48 @@
|
|||||||
{{ $id := substr (sha1 $this.Permalink) 0 8 }}
|
{{ $id := substr (sha1 $this.Permalink) 0 8 }}
|
||||||
{{ $doCollapse := and (isset . "sub") (or $this.Params.GeekdocCollapseSection (default false .Site.Params.GeekdocCollapseAllSections)) }}
|
{{ $doCollapse := and (isset . "sub") (or $this.Params.GeekdocCollapseSection (default false .Site.Params.GeekdocCollapseAllSections)) }}
|
||||||
|
|
||||||
|
{{ if or .external ($this.RelPermalink) }}
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
{{ if $doCollapse }}
|
{{ if $doCollapse }}
|
||||||
class="gdoc-nav__toggle" id="{{ printf "navtree-%s" $id }}"
|
class="gdoc-nav__toggle" id="{{ printf "navtree-%s" $id }}"
|
||||||
{{ if or $isCurrent $isAncestor }}checked{{ end }}
|
{{ if or $isCurrent $isAncestor }}checked{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
class="hidden"
|
class="hidden"
|
||||||
{{ end }}
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
{{ if $doCollapse }}
|
|
||||||
for="{{ printf "navtree-%s" $id }}" class="flex justify-between align-center"
|
|
||||||
{{ end }}
|
|
||||||
>
|
|
||||||
<span class="flex">
|
|
||||||
{{ if $icon }}
|
|
||||||
<svg class="gdoc-icon {{ .icon }}"><use xlink:href="#{{ .icon }}"></use></svg>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a
|
/>
|
||||||
href="{{ if .external }}
|
<label
|
||||||
{{ .ref }}
|
{{ if $doCollapse }}
|
||||||
{{ else }}
|
for="{{ printf "navtree-%s" $id }}" class="flex justify-between align-center"
|
||||||
{{ relref $current .ref }}
|
{{ end }}
|
||||||
{{ end }}"
|
>
|
||||||
class="gdoc-nav__entry{{- if not .external }}
|
<span class="flex">
|
||||||
{{- if $isCurrent }}{{ printf " is-active" }}{{ end }}
|
{{ if $icon }}
|
||||||
{{- end }}"
|
<svg class="gdoc-icon {{ .icon }}"><use xlink:href="#{{ .icon }}"></use></svg>
|
||||||
>
|
{{ end }}
|
||||||
{{ $name }}
|
<a
|
||||||
</a>
|
href="{{ if .external }}
|
||||||
</span>
|
{{ .ref }}
|
||||||
{{ if $doCollapse }}
|
{{- else -}}
|
||||||
<svg class="gdoc-icon toggle gdoc_keyboard_arrow_left">
|
{{ $this.RelPermalink }}
|
||||||
<use xlink:href="#gdoc_keyboard_arrow_left"></use>
|
{{- end }}"
|
||||||
</svg>
|
class="gdoc-nav__entry{{- if not .external }}
|
||||||
<svg class="gdoc-icon toggle gdoc_keyboard_arrow_down hidden">
|
{{- if $isCurrent }}{{ printf " is-active" }}{{ end }}
|
||||||
<use xlink:href="#gdoc_keyboard_arrow_down"></use>
|
{{- end }}"
|
||||||
</svg>
|
>
|
||||||
{{ end }}
|
{{ $name }}
|
||||||
</label>
|
</a>
|
||||||
|
</span>
|
||||||
|
{{ if $doCollapse }}
|
||||||
|
<svg class="gdoc-icon toggle gdoc_keyboard_arrow_left">
|
||||||
|
<use xlink:href="#gdoc_keyboard_arrow_left"></use>
|
||||||
|
</svg>
|
||||||
|
<svg class="gdoc-icon toggle gdoc_keyboard_arrow_down hidden">
|
||||||
|
<use xlink:href="#gdoc_keyboard_arrow_down"></use>
|
||||||
|
</svg>
|
||||||
|
{{ end }}
|
||||||
|
</label>
|
||||||
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<span class="flex">{{ $name }}</span>
|
<span class="flex">{{ $name }}</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user