@@ -14,17 +17,16 @@
{{ .Content }}
- {{ if or .Params.math .Site.Params.math }}
- {{ partial "math.html" . }}
- {{ end }}
-
- {{ if and .Params.comment (eq .Site.Params.comment "disqus")}}
- {{ partial "disqus.html" . }}
- {{ end }}
-
- {{ if and .Params.comment (eq .Site.Params.comment "ovo")}}
- {{ partial "ovo.html" . }}
- {{ end }}
-
+{{ if or .Params.math .Site.Params.math }}
+{{ partial "math.html" . }}
{{ end }}
+{{ if and .Params.comment (eq .Site.Params.comment "disqus")}}
+{{ partial "disqus.html" . }}
+{{ end }}
+
+{{ if and .Params.comment (eq .Site.Params.comment "ovo")}}
+{{ partial "ovo.html" . }}
+{{ end }}
+
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html
new file mode 100644
index 0000000..6810b8a
--- /dev/null
+++ b/layouts/partials/toc.html
@@ -0,0 +1,6 @@
+
+ Table of Contents
+
+ {{ .TableOfContents }}
+
+
\ No newline at end of file
diff --git a/static/css/main.css b/static/css/main.css
index 9539f39..6def913 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -70,7 +70,7 @@ a:not(.icon):focus {
color: #fff;
}
-.icon:hover {
+a.icon:hover {
transform: translateY(-5px);
transition: transform .3s ease-in-out;
}
@@ -178,6 +178,16 @@ main {
padding: 2px 8px;
}
+details.toc ul {
+ list-style-type: none;
+ padding-inline-start: 1em;
+ margin: 0;
+}
+
+details.toc ul>li {
+ margin: 1em 0;
+}
+
@keyframes showup {
from {
opacity: 0;
@@ -238,4 +248,4 @@ main {
::-webkit-scrollbar-thumb:active {
background-color: rgb(128 128 128 / 100%);
-}
\ No newline at end of file
+}
diff --git a/static/js/main.js b/static/js/main.js
index 70636cf..5ca79f9 100644
--- a/static/js/main.js
+++ b/static/js/main.js
@@ -14,5 +14,8 @@ window.addEventListener('DOMContentLoaded', function () {
classList.add(newTheme);
localStorage.theme = newTheme;
themeSwitcher.innerHTML = text;
- })
+ });
+
+
+
});
\ No newline at end of file