fix: fix toc css bug

This commit is contained in:
Dillon
2019-08-20 03:32:12 +08:00
parent d7d27e0afb
commit 1dc227f304
2 changed files with 20 additions and 20 deletions

View File

@@ -86,13 +86,12 @@
} }
.post-toc-mobile { .post-toc-mobile {
padding: 10px; padding: 10px 0;
details { details {
summary { summary {
.post-toc-title {
display: block; display: block;
outline: none;
cursor: pointer;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 1.2em; font-size: 1.2em;
@@ -101,10 +100,6 @@
padding: 0 10px; padding: 0 10px;
background: $code-background-color; background: $code-background-color;
&::-webkit-details-marker {
display: none;
}
i.details { i.details {
line-height: 2em; line-height: 2em;
} }
@@ -113,6 +108,11 @@
background: $code-background-color-dark; background: $code-background-color-dark;
} }
} }
&::-webkit-details-marker {
display: none;
}
}
} }
details[open] { details[open] {

View File

@@ -53,7 +53,7 @@
</div> </div>
<div class="post-toc-mobile" id="post-toc-mobile"> <div class="post-toc-mobile" id="post-toc-mobile">
<details> <details>
<summary class="post-toc-title">{{ T "toc" }}<i class="details icon fas fa-angle-down"></i></summary> <summary><div class="post-toc-title">{{ T "toc" }}<i class="details icon fas fa-angle-down"></i></div></summary>
<div class="post-toc-content"> <div class="post-toc-content">
{{ $toc := .TableOfContents }} {{ $toc := .TableOfContents }}
{{ $toc = replaceRE `id="TableOfContents"` `id="TableOfContentsMobile"` $toc }} {{ $toc = replaceRE `id="TableOfContents"` `id="TableOfContentsMobile"` $toc }}