feat: add a table of content on blog posts
This commit is contained in:
parent
874def264c
commit
1f0c9ae560
5 changed files with 51 additions and 0 deletions
|
@ -266,6 +266,43 @@ main {
|
|||
}
|
||||
}
|
||||
|
||||
section.table-of-contents {
|
||||
font-size: 0.9em;
|
||||
margin-block-end: 2em;
|
||||
margin-inline-start: 1em;
|
||||
padding-inline-start: 1em;
|
||||
border-inline-start: 1px solid var(--pico-muted-color);
|
||||
|
||||
|
||||
p {
|
||||
margin-bottom: 0; /* reset pico styles */
|
||||
margin-block-end: 0.2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
nav {
|
||||
ol {
|
||||
&:last-of-type {
|
||||
margin-right: initial; /* reset pico styles */
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
margin-left: initial; /* reset pico styles */
|
||||
}
|
||||
|
||||
li {
|
||||
display: list-item; /* reset pico styles */
|
||||
padding: initial; /* reset pico styles */
|
||||
list-style-type: none;
|
||||
|
||||
ol {
|
||||
margin-inline-start: 1em !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul > li {
|
||||
list-style-type: disc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue