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"
|
||||
hide: false # Default is false
|
||||
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
|
||||
max_width: "66ch" # Default is ""
|
||||
content:
|
||||
|
@@ -1,9 +1,17 @@
|
||||
{{ $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>`) }}
|
||||
<section class="paige-toc">
|
||||
<div class="border mb-3 pe-3 ps-3 pt-3 rounded">
|
||||
{{ $page.TableOfContents }}
|
||||
</div>
|
||||
{{ with $class }}
|
||||
<div class="{{ . }}">
|
||||
{{ end }}
|
||||
|
||||
{{ $page.TableOfContents }}
|
||||
|
||||
{{ if $class }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user