diff --git a/src/lib.typ b/src/lib.typ index db10945..82ac6c1 100644 --- a/src/lib.typ +++ b/src/lib.typ @@ -2,7 +2,8 @@ // formats `body` as Departure Mono. for variable/highlighting purposes. #let sf(body) = text(font: "Departure Mono", body); -#let generic(numbering: true, author: "Jade", date: datetime.today().display(), title: "Document", doc) = { + +#let generic(numbering: true, author: "Jade", date: datetime.today().display(), title: "Document", doc, subtitle: "", coverpage: false, coverpage_footer: "", outline: false) = { // Word abbreviations show "afg": "Aufgabe"; show "def": "Definition"; @@ -32,6 +33,34 @@ author: (author), ) - doc + [ + #if coverpage { + page( + footer: if coverpage_footer != "" { + align( + center, + text(font: "B612", size: 8pt, coverpage_footer) + ) + }, + grid( + rows: 2, + columns: 1, + align(center + horizon)[ + #set text(font: "Departure Mono"); + #text(size: 48pt, title); + #v(0.33em); + #text(size: 24pt, subtitle); + #text(size: 18pt, fill: rgb("#666"), date) + ], + [] + ) + ) + } + #if outline [ + #outline(indent: 2em); + #pagebreak(); + ] + doc + ] }