hugo-theme-zzo/layouts/partials/sidebar/sidebar-single.html

20 lines
864 B
HTML
Raw Normal View History

{{ if $.Param "enableSidebar" }}
{{ if and (or ($.Param "enableToc") ($.Param "toc")) (ne ($.Param "tocPosition") "outer") }}
2019-11-04 13:09:44 +00:00
<section class="sidebar">
<div class="toc__flexbox" data-position="{{ if $.Param "hideToc" }}absolute{{ else }}fixed{{ end }}">
2019-11-04 13:09:44 +00:00
<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>
2020-01-31 06:06:30 +00:00
<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 }}">
2020-01-01 11:00:42 +00:00
{{ .TableOfContents }}
2019-11-04 13:09:44 +00:00
</div>
</section>
2019-11-04 13:09:44 +00:00
{{ end }}
2019-11-04 13:09:44 +00:00
{{ end }}