20 lines
864 B
HTML
20 lines
864 B
HTML
{{ if $.Param "enableSidebar" }}
|
|
{{ if and (or ($.Param "enableToc") ($.Param "toc")) (ne ($.Param "tocPosition") "outer") }}
|
|
|
|
<section class="sidebar">
|
|
<div class="toc__flexbox" data-position="{{ if $.Param "hideToc" }}absolute{{ else }}fixed{{ end }}">
|
|
<h6 class="toc__title">{{ i18n "toc-label" }}</h6>
|
|
{{ if $.Param "enableTocSwitch" }}
|
|
<label class="switch">
|
|
<input id="toggle-toc" aria-label="Toggle TOC" type="checkbox" {{ if $.Param "hideToc" }}{{ else }}checked{{ end }}>
|
|
<span class="slider round"></span>
|
|
</label>
|
|
{{ end }}
|
|
</div>
|
|
<div class="toc {{ if $.Param "hideToc" }}hide{{ end }}" data-dir="{{ if eq ($.Param "languagedir") "rtl" }}rtl{{ else }}ltr{{ end }}" data-folding="{{ if $.Param "tocFolding" }}true{{ else }}false{{ end }}">
|
|
{{ .TableOfContents }}
|
|
</div>
|
|
</section>
|
|
|
|
{{ end }}
|
|
{{ end }} |