about summary refs log tree commit diff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/fcuny/blog/layouts/_default/single.html7
-rw-r--r--users/fcuny/blog/static/css/custom.css12
2 files changed, 19 insertions, 0 deletions
diff --git a/users/fcuny/blog/layouts/_default/single.html b/users/fcuny/blog/layouts/_default/single.html
index 356f344..b4c5443 100644
--- a/users/fcuny/blog/layouts/_default/single.html
+++ b/users/fcuny/blog/layouts/_default/single.html
@@ -29,6 +29,13 @@
   {{ end }}
 </div>
 
+{{ if .Params.toc }}
+<div class="toc">
+  <strong>Table of Contents</strong>
+  {{ .TableOfContents }}
+</div>
+{{ end }}
+
 {{ .Content }}
 
 {{ end }}
diff --git a/users/fcuny/blog/static/css/custom.css b/users/fcuny/blog/static/css/custom.css
index b4e37bc..8f776d7 100644
--- a/users/fcuny/blog/static/css/custom.css
+++ b/users/fcuny/blog/static/css/custom.css
@@ -140,3 +140,15 @@ nav.menu a.menu-active:hover {
 nav.menu a.menu-active {
     color: #007d9c;
 }
+
+.toc {
+    border: 1px solid black;
+    padding: 1rem;
+    margin-top: 1rem;
+    color: black;
+}
+
+.toc a,
+.toc a.visited {
+    color: black;
+}