logo

blog

My website can't be that messy, right? git clone https://anongit.hacktivis.me/git/blog.git/
commit: 4c0dcd52c641d289f0b1fd87c52fc3fa5d17b4a7
parent b7d6d7ff0ea496968cd92eb49d8655df06839f6a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  3 Oct 2025 09:29:50 +0200

css/index.in.css: add .section-count

Diffstat:

Mcss/index.in.css20++++++++++++++++++++
Mtemplates/head.shtml2+-
Mtemplates/head.xml2+-
3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/css/index.in.css b/css/index.in.css @@ -279,3 +279,23 @@ footer { text-align: center; clear: both; } + +/* class to be applied on elements like <main> or <article> */ +.section-count { + counter-reset: section subsection subsubsection; +} +.section-count h2:before { + content: counter(section) ". "; + counter-increment: section; + font-weight: normal; +} +.section-count h3:before { + content: counter(section) "." counter(subsection) ". "; + counter-increment: subsection; + font-weight: normal; +} +.section-count h4:before { + content: counter(section) "." counter(subsection) "." counter(subsubsection) ". "; + counter-increment: subsubsection; + font-weight: normal; +} diff --git a/templates/head.shtml b/templates/head.shtml @@ -1,6 +1,6 @@ <meta charset="utf-8"/> <meta name="color-scheme" content="dark light" /> - <link rel="stylesheet" type="text/css" href="/css/index.css?serial=2025100103"/> + <link rel="stylesheet" type="text/css" href="/css/index.css?serial=2025100303"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <link rel="vcs-git" href="https://hacktivis.me/git/blog/"/> <link rel="icon" type="text/css" href="/images/favicon.png?serial=2020111201"/> diff --git a/templates/head.xml b/templates/head.xml @@ -1,7 +1,7 @@ <xml> <meta charset="utf-8"/> <meta name="color-scheme" content="dark light" /> - <link rel="stylesheet" type="text/css" href="/css/index.css?serial=2025100103"/> + <link rel="stylesheet" type="text/css" href="/css/index.css?serial=2025100303"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <link rel="vcs-git" href="https://hacktivis.me/git/blog/"/> <link rel="icon" type="text/css" href="/images/favicon.png?serial=2020111201"/>