toc bug fix

This commit is contained in:
zzossig 2020-01-22 21:22:19 +09:00
parent adc8e4b9ca
commit 29777fe6ab
1 changed files with 15 additions and 13 deletions

View File

@ -1,18 +1,20 @@
<div class="wrapper__right"> <div class="wrapper__right">
{{ if and (eq ($.Param "tocPosition") "outer") .IsPage }} {{ if and (eq ($.Param "tocPosition") "outer") .IsPage }}
{{ if or ($.Param "enableToc") ($.Param "toc") }} {{ if and (ne .Type "about") (ne .Type "contact") (ne .Type "gallery") }}
<div class="toc__flexbox--outer" data-position="fixed"> {{ if or ($.Param "enableToc") ($.Param "toc") }}
<h6 class="toc__title toc__title--outer">{{ i18n "toc-label" }}</h6> <div class="toc__flexbox--outer" data-position="fixed">
{{ if $.Param "enableTocSwitch" }} <h6 class="toc__title toc__title--outer">{{ i18n "toc-label" }}</h6>
<label class="switch"> {{ if $.Param "enableTocSwitch" }}
<input id="visible-toc" aria-label="Visible TOC" type="checkbox" {{ if $.Param "hideToc" }}{{ else }}checked{{ end }}> <label class="switch">
<span class="slider round"></span> <input id="visible-toc" aria-label="Visible TOC" type="checkbox" {{ if $.Param "hideToc" }}{{ else }}checked{{ end }}>
</label> <span class="slider round"></span>
{{ end }} </label>
</div> {{ end }}
<div class="toc toc__outer {{ if $.Param "hideToc" }}hide{{ end }}"> </div>
{{ .TableOfContents }} <div class="toc toc__outer {{ if $.Param "hideToc" }}hide{{ end }}">
</div> {{ .TableOfContents }}
</div>
{{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
</div> </div>