From 1dc227f304f6534981c258bfd406926993b6f3d8 Mon Sep 17 00:00:00 2001 From: Dillon Date: Tue, 20 Aug 2019 03:32:12 +0800 Subject: [PATCH] fix: fix toc css bug --- assets/css/_page/_post.scss | 38 ++++++++++++++++++------------------- layouts/posts/single.html | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/assets/css/_page/_post.scss b/assets/css/_page/_post.scss index 09b1f2f..80430da 100644 --- a/assets/css/_page/_post.scss +++ b/assets/css/_page/_post.scss @@ -86,32 +86,32 @@ } .post-toc-mobile { - padding: 10px; + padding: 10px 0; details { summary { - display: block; - outline: none; - cursor: pointer; - display: flex; - justify-content: space-between; - font-size: 1.2em; - font-weight: bold; - line-height: 2em; - padding: 0 10px; - background: $code-background-color; + .post-toc-title { + display: block; + display: flex; + justify-content: space-between; + font-size: 1.2em; + font-weight: bold; + line-height: 2em; + padding: 0 10px; + background: $code-background-color; + + i.details { + line-height: 2em; + } + + .dark-theme & { + background: $code-background-color-dark; + } + } &::-webkit-details-marker { display: none; } - - i.details { - line-height: 2em; - } - - .dark-theme & { - background: $code-background-color-dark; - } } } diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 05e03a3..a271215 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -53,7 +53,7 @@
- {{ T "toc" }} +
{{ T "toc" }}
{{ $toc := .TableOfContents }} {{ $toc = replaceRE `id="TableOfContents"` `id="TableOfContentsMobile"` $toc }}