Remove paige.table_of_contents.{class,hide}

This commit is contained in:
Will Faught
2023-02-25 14:10:21 -08:00
parent 7bb8fbac94
commit 136691fb7b
2 changed files with 4 additions and 14 deletions

View File

@@ -274,8 +274,6 @@ paige:
hide_page: false
style: ""
table_of_contents:
class: "border mb-3 pe-3 ps-3 pt-3 rounded"
hide: false
max_width: ""
```

View File

@@ -8,18 +8,10 @@
{{ $listshowcontent = $params.listshowcontent }}
{{ end }}
{{ $class := $page.Param "paige.table_of_contents.class" | default "border mb-3 pe-3 ps-3 pt-3 rounded" }}
{{ if and $page.Content ($page.Param "paige.table_of_contents.hide" | not) (not $listshowcontent) (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
{{ if and $page.Content (not $listshowcontent) (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
<section class="paige-toc">
{{ with $class }}
<div class="{{ . }}">
{{ end }}
{{ $page.TableOfContents }}
{{ if $class }}
</div>
{{ end }}
<div class="border mb-3 pe-3 ps-3 pt-3 rounded">
{{ $page.TableOfContents }}
</div>
</section>
{{ end }}