diff options
author | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2020-06-04 15:28:40 +0300 |
---|---|---|
committer | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2020-06-04 15:28:40 +0300 |
commit | ecc7086da523397834a054cf5235cf7084b64f1e (patch) | |
tree | b8960aaf2259e2ec9431229b5e522a363d8d8064 /layouts | |
parent | 2bcefea13b12d5531295ec625b22ff3cb972013e (diff) |
Replace debounce, and add an option for ToC collapsing.
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/head.html | 14 |
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) }} |