add optional toc and numbering fields

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-05-13 21:07:24 +05:30
parent 0c4333e325
commit 1e71b94f3a
6 changed files with 60 additions and 18 deletions

View File

@@ -117,6 +117,16 @@ h2 {
font-size: 2rem;
}
.post-preview-item {
list-style-type: none;
padding: 2rem;
border: 0.5rem dotted var(--violet);
}
.post-preview-item:not(:last-child) {
margin-bottom: 3rem;
}
.post-title {
text-align: center;
color: var(--fg5) !important;
@@ -149,13 +159,6 @@ article > section {
overflow: auto;
}
.toc {
padding: 2rem;
float: right;
border-radius: 1rem;
background: var(--bg1);
}
.post-teaser > .toc {
display: none;
}
@@ -176,6 +179,13 @@ pre {
overflow: scroll;
}
.toc {
background: var(--bg1);
border-radius: 1rem;
float: right;
max-width: 40%;
}
@media (max-width: 319px) {
body {
width: 90%;
@@ -189,10 +199,8 @@ pre {
display: block;
line-height: 1.6;
}
.sticky {
position: fixed;
top: 0;
background: white;
.toc {
padding: 1rem;
}
}
@@ -209,6 +217,9 @@ pre {
display: inline;
margin: 0 0.6rem;
}
.toc {
padding: 1rem;
}
}
@media (min-width: 640px) {
@@ -224,4 +235,7 @@ pre {
footer {
text-align: right;
}
.toc {
padding: 2rem;
}
}