feat: update header with localized German date

This commit is contained in:
Popa committed 2026-09-14 01:50:40 +02:00
1 parent 011515ce92
commit 115569e400
3 files changed
+1563 -1477

No files matched your search

+21 -8
View File
@@ -1,8 +1,10 @@
#import "../config.typ": custom-raw-syntaxes
#import "../config.typ": custom-raw-syntaxes, months-de
#import "../helpers.typ": content-to-string, render-footnote-entry
#import "../theme.typ": base-theme, code-theme, colors, common-theme, credits, smallcaps
#import "../components/student-table.typ": exercise-overview
#set text(lang: "de")
/// Base template for exercise sheets.
#let base-template(
sheetnumber,
@@ -42,18 +44,29 @@
let font-size = base-theme.font-size
set page(
margin: (y: 3.5cm),
numbering: page-numbering,
header: context {
if counter(page).get().first() > 1 [
#set text(base-theme.header-size, weight: 450)
#grid(
columns: (2fr, 1fr, 2fr),
if counter(page).get().first() > 1 {
set text(base-theme.header-size, weight: 450)
grid(
columns: (3fr, 1fr, 3fr),
align: (start, center, end),
course, text(fill: colors.text)[#ttl], (prof, assistant).join([#h(0.25em)·#h(0.25em)]),
[
#text(weight: 800)[#course] \
#(prof, assistant).join([#h(0.25em)·#h(0.25em)])
],
text(fill: colors.text)[#ttl],
[
#let _month = datetime.today().month()
#students.join([#h(0.25em)·#h(0.25em)]) \
#datetime.today().day(). #months-de.at(_month - 1) #datetime.today().year()
],
)
#line(length: 100%, stroke: 0.4pt + colors.stroke)
]
line(length: 100%, stroke: 0.4pt + colors.stroke)
}
},
footer: context {
line(length: 100%, stroke: 0.4pt + colors.stroke)