Browse code

Style Tocbot

Robert Cranston authored on 29/09/2019 01:20:16
Showing 1 changed files

... ...
@@ -28,6 +28,29 @@ $endif$
28 28
       transition: unset;
29 29
     }
30 30
   </style>
31
+  <style type="text/less">
32
+    a.toc-link {
33
+      text-decoration-line: unset;
34
+      &::before {
35
+        all: unset;
36
+      }
37
+      display: block;
38
+      color: Grey;
39
+      &:hover {
40
+        color: Indigo;
41
+      }
42
+      &.is-active-link {
43
+        color: Indigo;
44
+      }
45
+      .node-name--H(1);
46
+      .node-name--H(@heading) when (@heading <= 6) {
47
+        &.node-name--H@{heading} {
48
+          font-size: 1.0rem - 0.15 * (@heading - 2);
49
+        }
50
+        .node-name--H(@heading + 1);
51
+      }
52
+    }
53
+  </style>
31 54
   <style type="text/css">code{white-space: pre;}</style>
32 55
 $if(quotes)$
33 56
   <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
... ...
@@ -117,6 +140,7 @@ $endfor$
117 140
   tocbot.init({
118 141
     collapseDepth: 6,
119 142
     scrollSmooth: false,
143
+    headingSelector: 'h1, h2, h3, h4, h5, h6',
120 144
   });
121 145
 </script>
122 146
 <script>