From 02d9d03d873b666b37b865c2323078ce7c433558 Mon Sep 17 00:00:00 2001 From: olOwOlo <26087907+olOwOlo@users.noreply.github.com> Date: Tue, 5 Dec 2017 20:02:25 +0800 Subject: feat: auto expand and collapse toc --- src/css/_partial/_post/_toc.scss | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/css/_partial/_post/_toc.scss') diff --git a/src/css/_partial/_post/_toc.scss b/src/css/_partial/_post/_toc.scss index b5958c0..8327055 100644 --- a/src/css/_partial/_post/_toc.scss +++ b/src/css/_partial/_post/_toc.scss @@ -20,6 +20,10 @@ .post-toc-content { font-size: $post-toc-content; + &.always-active ul { + display: block; + } + >nav>ul { margin: 10px 0; } @@ -27,9 +31,14 @@ ul { padding-left: 20px; list-style: $post-toc-list-style; - + ul { padding-left: 15px; + display: none; + } + + .has-active > ul { + display: block; } } -- cgit v1.2.3