feat: add a table of content on blog posts

This commit is contained in:
Bruno Carlin 2025-07-06 14:22:12 +02:00
parent 874def264c
commit 1f0c9ae560
Signed by: bcarlin
GPG key ID: 8E254EA0FFEB9B6D
5 changed files with 51 additions and 0 deletions

View file

@ -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;
}