all repos — h3rald @ 2f211197d0cd98998c4b4c1a0987a867212a1acc

The sources of https://h3rald.com

Added support for document headings.
h3rald h3rald@h3rald.com
Fri, 06 Dec 2013 20:00:19 +0100
commit

2f211197d0cd98998c4b4c1a0987a867212a1acc

parent

3ef6a1bf2e2dbd76b979f625c7d463a60f9df433

1 files changed, 75 insertions(+), 0 deletions(-)

jump to
A headings.css

@@ -0,0 +1,75 @@

+h2 { + counter-reset:h3; + counter-increment: h2; +} +h2::before { + content: counter(h2) " " "\2013" " "; +} +h3 { + counter-reset:h4; + counter-increment: h3; +} +h3::before { + content: counter(h2) "." counter(h3) " " "\2013" " "; +} +h4 { + counter-reset:h5; + counter-increment: h4; +} +h4::before { + content: counter(h2) "." counter(h3) "." counter(h4) " " "\2013" " "; +} +h5 { + counter-reset:h6; + counter-increment: h5; +} +h5::before { + content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " " "\2013" " "; +} +h6 { + counter-increment: h6; +} +h6::before { + content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " " "\2013" " "; +} + +/***************/ + +#toc { + counter-reset: toc2; +} + +#toc li li a { + counter-reset:toc3; + counter-increment: toc2; +} +#toc li li a::before { + content: counter(toc2) " " "\2013" " "; +} +#toc li li li a { + counter-reset:toc4; + counter-increment: toc3; +} +#toc li li li a::before { + content: counter(toc2) "." counter(toc3) " " "\2013" " "; +} +#toc li li li li a { + counter-reset:toc5; + counter-increment: toc4; +} +#toc li li li li a::before { + content: counter(toc2) "." counter(toc3) "." counter(toc4) " " "\2013" " "; +} +#toc li li li li li a { + counter-reset:toc6; + counter-increment: toc5; +} +#toc li li li li li a::before { + content: counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) " " "\2013" " "; +} +#toc li li li li li li a { + counter-increment: toc6; +} +#toc li li li li li li a::before { + content: counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) "." counter(toc6) " " "\2013" " "; +}