Skip to content

Commit

Permalink
feat(style): adjust mobile TOC style (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Mar 14, 2020
1 parent fc10c46 commit 344f2f8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
9 changes: 3 additions & 6 deletions assets/css/_page/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,11 @@

.home-social-links {
padding-top: .6rem;

i {
font-size: 1.45rem;
}
font-size: 1.5rem;
line-height: 1.5rem;

img {
width: 1.5rem;
height: 1.5rem;
max-height: 1.4rem;
}
}
}
Expand Down
21 changes: 13 additions & 8 deletions assets/css/_partial/_single/_toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@
details {
summary {
list-style: none;
background: darken($code-background-color, 3%);

.dark-theme & {
background: darken($code-background-color-dark, 3%);
}

.toc-title {
display: block;
Expand All @@ -89,14 +94,13 @@
font-weight: bold;
line-height: 2em;
padding: 0 .625rem;
background: $code-background-color;

i.details {
line-height: 2em;
}

.dark-theme & {
background: $code-background-color-dark;
&:hover {
cursor: pointer;
}
}

Expand All @@ -113,22 +117,23 @@
}

.toc-content {
border: 2px solid $code-background-color;
background-color: $code-background-color;

>nav>ul {
margin: .625rem 0;
> nav > ul {
margin: 0;
padding: .4rem .8rem;
}

ul {
padding-left: .625rem;
list-style: none;

ul {
padding-left: 1.25rem;
}
}

.dark-theme & {
border: 2px solid $code-background-color-dark;
background-color: $code-background-color-dark;
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion layouts/partials/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

{{- /* 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 -}}

{{- /* Smooth Scroll */ -}}
Expand Down

Large diffs are not rendered by default.

0 comments on commit 344f2f8

Please sign in to comment.