From e35cf64e9047053c2fa430609bd422db2e4263a1 Mon Sep 17 00:00:00 2001 From: Florian Knoch Date: Wed, 8 May 2019 12:10:26 +0200 Subject: [PATCH] Introduce counter for tasks --- css/theme/latex.css | 14 ++++++++++++++ css/theme/source/latex.scss | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/css/theme/latex.css b/css/theme/latex.css index 46c2b28..e382e6e 100644 --- a/css/theme/latex.css +++ b/css/theme/latex.css @@ -549,3 +549,17 @@ p a:link, p a:hover, p a:active, p a:visited { p a:hover::before { height: 110%; } + +/* + * Counters for Tasks + * ================== + */ +body { + counter-reset: tasks; } + +[data-category^=Aufgabe] { + counter-increment: tasks; } + +.layout-content-only h2[data-category^=Aufgabe]::after, +.layout-wide-content h2[data-category^=Aufgabe]::after { + content: counter(tasks); } diff --git a/css/theme/source/latex.scss b/css/theme/source/latex.scss index 5035bbe..71e76e1 100644 --- a/css/theme/source/latex.scss +++ b/css/theme/source/latex.scss @@ -679,3 +679,20 @@ p a { } } + +/* + * Counters for Tasks + * ================== + */ +body { + counter-reset: tasks; +} + +[data-category^=Aufgabe] { + counter-increment: tasks; +} + +.layout-content-only h2[data-category^=Aufgabe]::after, +.layout-wide-content h2[data-category^=Aufgabe]::after { + content: counter(tasks); +}