feat(article): Optimized TOC style

This commit is contained in:
mapleafgo 2021-09-03 10:42:08 +08:00
parent 5bf8bdcde2
commit f0cdcba23b
2 changed files with 18 additions and 4 deletions

View File

@ -184,6 +184,17 @@
} }
} }
.widget-head {
display: flex;
align-items: center;
.widget-title {
font-size: 1.6rem;
font-weight: bold;
color: var(--body-text-color);
}
}
.widget--toc { .widget--toc {
background-color: var(--card-background); background-color: var(--card-background);
border-radius: var(--card-border-radius); border-radius: var(--card-border-radius);
@ -220,6 +231,7 @@
} }
li { li {
list-style-type: none;
margin: 15px 20px; margin: 15px 20px;
padding: 5px; padding: 5px;

View File

@ -43,10 +43,12 @@
{{ if (.Scratch.Get "hasTOC") }} {{ if (.Scratch.Get "hasTOC") }}
<aside class="sidebar right-sidebar sticky"> <aside class="sidebar right-sidebar sticky">
<section class="widget archives"> <section class="widget archives">
<div class="widget-icon"> <div class="widget-head">
{{ partial "helper/icon" "hash" }} <div class="widget-icon">
{{ partial "helper/icon" "hash" }}
</div>
<h2 class="widget-title">{{ T "article.tableOfContents" }}</h2>
</div> </div>
<h2 class="widget-title section-title">{{ T "article.tableOfContents" }}</h2>
<div class="widget--toc"> <div class="widget--toc">
{{ .TableOfContents }} {{ .TableOfContents }}