feat(style): adjust mobile TOC style (#155)

This commit is contained in:
Dillon
2020-03-15 00:39:23 +08:00
committed by GitHub
parent fc10c46d37
commit 344f2f809c
4 changed files with 22 additions and 16 deletions

View File

@@ -48,14 +48,11 @@
.home-social-links { .home-social-links {
padding-top: .6rem; padding-top: .6rem;
font-size: 1.5rem;
i { line-height: 1.5rem;
font-size: 1.45rem;
}
img { img {
width: 1.5rem; max-height: 1.4rem;
height: 1.5rem;
} }
} }
} }

View File

@@ -81,6 +81,11 @@
details { details {
summary { summary {
list-style: none; list-style: none;
background: darken($code-background-color, 3%);
.dark-theme & {
background: darken($code-background-color-dark, 3%);
}
.toc-title { .toc-title {
display: block; display: block;
@@ -89,14 +94,13 @@
font-weight: bold; font-weight: bold;
line-height: 2em; line-height: 2em;
padding: 0 .625rem; padding: 0 .625rem;
background: $code-background-color;
i.details { i.details {
line-height: 2em; line-height: 2em;
} }
.dark-theme & { &:hover {
background: $code-background-color-dark; cursor: pointer;
} }
} }
@@ -113,14 +117,15 @@
} }
.toc-content { .toc-content {
border: 2px solid $code-background-color; background-color: $code-background-color;
>nav>ul { > nav > ul {
margin: .625rem 0; margin: 0;
padding: .4rem .8rem;
} }
ul { ul {
padding-left: .625rem; list-style: none;
ul { ul {
padding-left: 1.25rem; padding-left: 1.25rem;
@@ -128,7 +133,7 @@
} }
.dark-theme & { .dark-theme & {
border: 2px solid $code-background-color-dark; background-color: $code-background-color-dark;
} }
} }
} }

View File

@@ -8,7 +8,11 @@
{{- /* iconfont */ -}} {{- /* iconfont */ -}}
{{- if $scratch.Get "iconfont" -}} {{- if $scratch.Get "iconfont" -}}
{{- slice "lib/iconfont/iconfont.css" | $scratch.Add "linkLocal" -}} {{- with $CDN.iconfontCSS -}}
{{- slice . | $scratch.Add "linkCDN" -}}
{{- else -}}
{{- slice "lib/iconfont/iconfont.css" | $scratch.Add "linkLocal" -}}
{{- end -}}
{{- end -}} {{- end -}}
{{- /* Smooth Scroll */ -}} {{- /* Smooth Scroll */ -}}