aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorTrack3 <pengliabc@live.cn>2018-12-24 22:17:22 +0800
committerTrack3 <pengliabc@live.cn>2018-12-24 22:17:22 +0800
commitfeb4c387174eb035abe10354f4dd626a5c399e90 (patch)
tree6120738f2efc44585027b2570302e8c2ae06febe /assets
parent0abf3ea0125f3666c486c0da9edb4d238e510103 (diff)
downloadhermit-feb4c387174eb035abe10354f4dd626a5c399e90.tar.gz
Add basic toc support
Diffstat (limited to 'assets')
-rw-r--r--assets/scss/style.scss50
1 files changed, 50 insertions, 0 deletions
diff --git a/assets/scss/style.scss b/assets/scss/style.scss
index 49a1dc1..7424f4d 100644
--- a/assets/scss/style.scss
+++ b/assets/scss/style.scss
@@ -587,6 +587,43 @@ hr.post-end {
}
}
+#toc {
+ position: fixed;
+ left: 50%;
+ top: 0;
+ display: none;
+}
+
+.toc-title {
+ margin-left: 1em;
+ margin-bottom: .5em;
+ font-size: .8em;
+ font-weight: bold;
+}
+
+#TableOfContents {
+ font-size: .8em;
+ @include dimmed;
+
+ ul {
+ padding-left: 1em;
+ margin: 0;
+ }
+
+ &>ul {
+ list-style-type: none;
+
+ ul ul {
+ font-size: .9em;
+ }
+ }
+
+ a:hover {
+ border-bottom: $theme 1px solid;
+ }
+}
+
+
.post-nav {
display: flex;
justify-content: space-between;
@@ -662,6 +699,13 @@ hr.post-end {
hr.post-end {
width: 30%;
}
+
+ #toc {
+ top: 13em;
+ display: block;
+ margin-left: 370px;
+ max-width: 220px;
+ }
}
@media (min-width: 1800px) {
@@ -695,6 +739,12 @@ hr.post-end {
hr.post-end {
width: 30%;
}
+
+ #toc {
+ top: 15em;
+ margin-left: 490px;
+ max-width: 300px;
+ }
}
@media (max-width: 760px) {