From 16b98dc8f9ca0adfb9a8dbd3062c378ee2f330ae Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 24 Jul 2020 23:53:25 +0530 Subject: [PATCH] toc: look cool - improve toc styling - make collapsable --- assets/css/main.css | 10 ++++++++-- layouts/_default/single.html | 14 ++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index b1874d7..5afb1a5 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -47,7 +47,13 @@ } .toc { - border-bottom: 1px solid var(--border); - font-size: 20px; + margin-bottom: 40px; + border: 1px solid var(--border); + border-radius: 4px; + padding: .5em; +} + +.toc .details { + display: inline; font-weight: 500; } \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index a2775fc..8ba8fc6 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -13,10 +13,16 @@ {{ if .Params.ShowToc }} -
-+Table of Contents- {{ .TableOfContents }} -
+ {{ .TableOfContents }} ++