format
This commit is contained in:
parent
4e4d0a6388
commit
3a6d8a070c
@ -129,14 +129,42 @@ h1:hover a, h2:hover a, h3:hover a, h4:hover a {
|
||||
|
||||
/* Auto Numbering */
|
||||
// https://codingnconcepts.com/hugo/auto-number-headings-hugo/
|
||||
body {counter-reset: h2}
|
||||
h2 {counter-reset: h3}
|
||||
h3 {counter-reset: h4}
|
||||
h4 {counter-reset: h5}
|
||||
body {
|
||||
counter-reset: h2
|
||||
}
|
||||
|
||||
article[autonumbering] h2:before {counter-increment: h2; content: counter(h2) " "}
|
||||
article[autonumbering] h3:before {counter-increment: h3; content: counter(h2) "." counter(h3) " "}
|
||||
article[autonumbering] h4:before {counter-increment: h4; content: counter(h2) "." counter(h3) "." counter(h4) " "}
|
||||
h2 {
|
||||
counter-reset: h3
|
||||
}
|
||||
|
||||
article[autonumbering] .table-of-contents ul { counter-reset: item }
|
||||
article[autonumbering] .table-of-contents li a:before { content: counters(item, ".") " "; counter-increment: item }
|
||||
h3 {
|
||||
counter-reset: h4
|
||||
}
|
||||
|
||||
h4 {
|
||||
counter-reset: h5
|
||||
}
|
||||
|
||||
article[autonumbering] h2:before {
|
||||
counter-increment: h2;
|
||||
content: counter(h2) " "
|
||||
}
|
||||
|
||||
article[autonumbering] h3:before {
|
||||
counter-increment: h3;
|
||||
content: counter(h2) "." counter(h3) " "
|
||||
}
|
||||
|
||||
article[autonumbering] h4:before {
|
||||
counter-increment: h4;
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) " "
|
||||
}
|
||||
|
||||
article[autonumbering] .table-of-contents ul {
|
||||
counter-reset: item
|
||||
}
|
||||
|
||||
article[autonumbering] .table-of-contents li a:before {
|
||||
content: counters(item, ".") " ";
|
||||
counter-increment: item
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user