32 lines
1.9 KiB
HTML
32 lines
1.9 KiB
HTML
{{ $isPad := or (in (slice "archive" "posts" "page") .Type) }}
|
|
{{ $isPad = or $isPad (and (eq .Kind "page") (not (in (slice "about" "contact" "publication") .Type))) }}
|
|
{{ $isPad = or $isPad (and (eq .Kind "section") (eq .Type "publication")) }}
|
|
{{ $isPad = or $isPad (and (eq .Type "tags") (ne .Kind "taxonomyTerm")) }}
|
|
|
|
{{ if ne ($.Param "languagedir") "rtl" }}
|
|
<div class="wrapper__right hide" data-pad="{{ $isPad }}" dir="ltr">
|
|
<script>document.querySelector('.wrapper__right').classList.remove('hide')</script>
|
|
{{ if and (eq ($.Param "tocPosition") "outer") .IsPage }}
|
|
{{ if and (ne .Type "about") (ne .Type "contact") (ne .Type "gallery") }}
|
|
{{ if or ($.Param "enableToc") ($.Param "toc") }}
|
|
<div class="toc__flexbox--outer" data-position="fixed" data-dir="ltr" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">
|
|
<h6 class="toc__title toc__title--outer" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">{{ i18n "toc-label" }}</h6>
|
|
{{ if $.Param "enableTocSwitch" }}
|
|
<label class="switch" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">
|
|
<input id="visible-toc" aria-label="Visible TOC" type="checkbox" {{ if $.Param "hideToc" }}{{ else }}checked{{ end }}>
|
|
<span class="slider round"></span>
|
|
</label>
|
|
{{ end }}
|
|
</div>
|
|
<div class="toc toc__outer {{ if $.Param "hideToc" }}hide{{ end }}" data-dir="ltr" data-folding="{{ if $.Param "tocFolding" }}true{{ else }}false{{ end }}" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">
|
|
{{ .TableOfContents }}
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
{{ else if and (eq ($.Param "languagedir") "rtl") ($.Param "enableSidebarMenu") }}
|
|
<div class="wrapper__right" data-pad="{{ $isPad }}" dir="rtl">
|
|
|
|
</div>
|
|
{{ end }} |