summaryrefslogtreecommitdiff
path: root/layouts/partials/toc.html
diff options
context:
space:
mode:
authorReorx <novoreorx@gmail.com>2022-04-13 18:12:08 +0800
committerReorx <novoreorx@gmail.com>2022-04-13 18:12:08 +0800
commit08b21a18b086ea1985c2622afba2d62d50aed77d (patch)
treeb21b3ea4f8a5e3a29c9133710d9e9db586fe24b9 /layouts/partials/toc.html
parent21533a4e904954d06d0c620aaefce05aae689464 (diff)
support left/right side toc
Diffstat (limited to 'layouts/partials/toc.html')
-rw-r--r--layouts/partials/toc.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html
index 02a61e9..dfee81e 100644
--- a/layouts/partials/toc.html
+++ b/layouts/partials/toc.html
@@ -1,7 +1,7 @@
{{- $headers := findRE "<h[1-6].*?>(.|\n])+?</h[1-6]>" .Content -}}
{{- $has_headers := ge (len $headers) 1 -}}
{{- if $has_headers -}}
-<div class="toc{{- if (.Param "TocSide") -}}{{- print " side" -}}{{- end -}}">
+<div class="toc{{- if (.Param "TocSide") -}}{{- print " side " (.Param "TocSide") -}}{{- end -}}">
<details {{if (.Param "TocOpen") }} open{{ end }}>
<summary accesskey="c" title="(Alt + C)">
<span class="details">{{- i18n "toc" | default "Table of Contents" }}</span>