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>2020-06-04 15:28:40 +0300
committeramazingrise <8315221+AmazingRise@users.noreply.github.com>2020-06-04 15:28:40 +0300
commitecc7086da523397834a054cf5235cf7084b64f1e (patch)
treeb8960aaf2259e2ec9431229b5e522a363d8d8064 /layouts
parent2bcefea13b12d5531295ec625b22ff3cb972013e (diff)
Replace debounce, and add an option for ToC collapsing.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/head.html14
1 files changed, 5 insertions, 9 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 773bff3..588d07e 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -40,20 +40,16 @@
loadCSS("https://fonts.googleapis.com/css?family=Lora|Montserrat|Fira+Mono|Noto+Serif+SC|Material+Icons");
</script>
-<script src="{{.Site.BaseURL}}/js/table.js"></script>
-
{{ if .Params.enableMathJax }}
{{ partial "mathjax.html" . }}
{{ end }}
{{ if and (not (.Params.disableToC) ) (.IsPage) }}
-<script src="{{.Site.BaseURL}}/js/toc.js"></script>
-{{ else }}
-<style>
- .toc{
- display: none !important;
- }
-</style>
+ {{ if .Params.disableAutoCollapse }}
+ <script src="{{.Site.BaseURL}}/js/toc.js"></script>
+ {{ else }}
+ <script src="{{.Site.BaseURL}}/js/toc-collapse.js"></script>
+ {{ end }}
{{ end }}
{{ if and (.Site.Params.enableGitalk) (.IsPage) }}