Theme Update

This commit is contained in:
Francesco 2024-04-22 15:13:47 +02:00
parent 93515f310d
commit f2ebaae569
2 changed files with 69 additions and 32 deletions

View File

@ -249,3 +249,36 @@ footer a {
margin-top: 0; margin-top: 0;
margin-bottom: .5rem; margin-bottom: .5rem;
} }
/* Autonumbering */
.autonumber {
counter-reset: h2-counter 0;
}
.autonumber h2 {
counter-increment: h2-counter 1;
counter-reset: h3-counter 0;
}
.autonumber h3 {
counter-increment: h3-counter 1;
counter-reset: h4-counter 0;
}
.autonumber h4 {
counter-increment: h4-counter 1;
}
.autonumber h2:before {
content: counter(h2-counter) "\00a0\00a0";
}
.autonumber h3:before {
content: counter(h2-counter) "." counter(h3-counter) "\00a0\00a0";
}
.autonumber h4:before {
content: counter(h2-counter) "." counter(h3-counter) "." counter(h4-counter) "\00a0\00a0";
}

View File

@ -2,6 +2,8 @@
{{/* Intro */}} {{/* Intro */}}
<div {{ if .Param "autonumber" }} class="autonumber" {{end}}>
<div class=" single-intro-container"> <div class=" single-intro-container">
{{/* Title and Summary */}} {{/* Title and Summary */}}
@ -42,4 +44,6 @@
{{ .Content }} {{ .Content }}
</div> </div>
</div>
{{ end }} {{ end }}