Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramazingrise <8315221+AmazingRise@users.noreply.github.com>2021-05-14 12:43:01 +0300
committeramazingrise <8315221+AmazingRise@users.noreply.github.com>2021-05-14 12:43:01 +0300
commit785ad8425cbc1390e28180486c550f5e3a4232f6 (patch)
tree96360d3136a083008ab3d1129e04e1aa96af2449 /layouts
parenta7921db8468668c981d89e1f5ea8991e94e67187 (diff)
Add auto scroll for ToC.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/toc.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html
index ee6736e..16978d1 100644
--- a/layouts/partials/toc.html
+++ b/layouts/partials/toc.html
@@ -23,7 +23,11 @@
{{ end }}
{{ if gt $next_heading $prev_heading }}
{{ range seq (sub $next_heading $prev_heading) }}
- <ul class="collapse" data-toggle="collapse">
+ {{ if site.Params.enableAutoCollapse }}
+ <ul class="collapse" data-toggle="collapse">
+ {{ else }}
+ <ul>
+ {{ end }}
{{ end }}
{{ end }}
{{ $anchorId := (replaceRE ".* id=\"(.*?)\".*" "$1" $header ) }}