Add paige.main.table_of_contents.class param
This commit is contained in:
@@ -323,6 +323,7 @@ paige:
|
|||||||
class: "display-5 fw-bold text-center" # Default is "display-5 fw-bold text-center"
|
class: "display-5 fw-bold text-center" # Default is "display-5 fw-bold text-center"
|
||||||
hide: false # Default is false
|
hide: false # Default is false
|
||||||
table_of_contents:
|
table_of_contents:
|
||||||
|
class: "border mb-3 pe-3 ps-3 pt-3 rounded" # Default is "border mb-3 pe-3 ps-3 pt-3 rounded"
|
||||||
hide: false # Default is false
|
hide: false # Default is false
|
||||||
max_width: "66ch" # Default is ""
|
max_width: "66ch" # Default is ""
|
||||||
content:
|
content:
|
||||||
|
@@ -1,9 +1,17 @@
|
|||||||
{{ $page := . }}
|
{{ $page := . }}
|
||||||
|
|
||||||
|
{{ $class := $page.Param "paige.main.table_of_contents.class" | default "border mb-3 pe-3 ps-3 pt-3 rounded" }}
|
||||||
|
|
||||||
{{ if and $page.Content ($page.Param "paige.main.table_of_contents.hide" | not) (not (eq ($page.Scratch.Get "paige_list_show_content") true)) (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
|
{{ if and $page.Content ($page.Param "paige.main.table_of_contents.hide" | not) (not (eq ($page.Scratch.Get "paige_list_show_content") true)) (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
|
||||||
<section class="paige-toc">
|
<section class="paige-toc">
|
||||||
<div class="border mb-3 pe-3 ps-3 pt-3 rounded">
|
{{ with $class }}
|
||||||
{{ $page.TableOfContents }}
|
<div class="{{ . }}">
|
||||||
</div>
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $page.TableOfContents }}
|
||||||
|
|
||||||
|
{{ if $class }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Reference in New Issue
Block a user