From 89c447666dfc4c7743bd3dc8ef8ba63ff0059b4b Mon Sep 17 00:00:00 2001 From: ndsboy Date: Thu, 8 May 2025 19:00:46 +0000 Subject: [PATCH] fix: new typst version --- .devcontainer/devcontainer.json | 5 ----- protokoll.typ | 36 ------------------------------- protokoll.yml.template | 24 --------------------- templates/tmpl_doc.typ | 38 ++++++++++++++------------------- templates/tmpl_page.typ | 12 +++++------ 5 files changed, 21 insertions(+), 94 deletions(-) delete mode 100644 protokoll.typ delete mode 100644 protokoll.yml.template diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2f46afd..6d022d3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,14 +7,9 @@ "packages": "fonts-noto-core,fonts-ubuntu" } }, - "containerUser": "vscode", "containerEnv": { "TYPST_FONT_PATHS": "/usr/share/fonts" }, - "runArgs": [ - "--userns=keep-id", - "--security-opt=label=disable" - ], "customizations": { "vscode": { "extensions": [ diff --git a/protokoll.typ b/protokoll.typ deleted file mode 100644 index cc9f131..0000000 --- a/protokoll.typ +++ /dev/null @@ -1,36 +0,0 @@ -#import "templates/tmpl_page.typ": tmpl_page -#import "templates/form.typ": form, form_field -#let config = yaml("protokoll.yml") - -#show: doc => tmpl_page( - title: config.title, - subtext: [ - #config.date \ - #config.location \ - Protokoll: #config.author - Leitung: #config.lead - ], - doc, -) - -#set enum(numbering: "1.a.i.") -#eval(config.content, mode: "markup") - -#v(3em) -#form[Unterschrift][ - #form_field("Protokollant") - #if config.signature [ - #place(top+left)[ - #image("signature.png") - ] - ] -][ - #if config.lead != none [ - #form_field("Leitung") - #if config.signature [ - #place(top+left)[ - #image("signature_lead.png") - ] - ] - ] -] \ No newline at end of file diff --git a/protokoll.yml.template b/protokoll.yml.template deleted file mode 100644 index 98c30df..0000000 --- a/protokoll.yml.template +++ /dev/null @@ -1,24 +0,0 @@ -title: Mitgliederversammlung -date: Montag, 01.01.2024, 12:00 Uhr -location: Friedrichstraße 17, 72250 Freudenstadt -author: Autor -lead: Leitung # Optional -signature: false # wenn true wird signature.png (und ggf. signature_lead.png) geladen -content: | - Anwesend: alle - - Nicht anwesend: niemand - - = TOP 1 - Überschrift - - Hier könnte Ihre Werbung stehen! - - + Nummerierter Punkt 1 - + Nummerierter Punkt 2 - - Unterpunkt - - Weiterer Unterpunkt - + Nummerierter Punkt 3 - - = TOP 2 - Typst - - #link("https://typst.app/docs/tutorial/writing-in-typst/") diff --git a/templates/tmpl_doc.typ b/templates/tmpl_doc.typ index 737bbd6..8cf63bf 100644 --- a/templates/tmpl_doc.typ +++ b/templates/tmpl_doc.typ @@ -7,12 +7,8 @@ ) = { show: doc => common(title: title, doc) - set enum( - numbering: "(1)" - ) - set text( - size: 12pt, - ) + set enum(numbering: "(1)") + set text(size: 12pt) // Titelblatt align(center)[ @@ -23,7 +19,7 @@ #heading(outlined: false)[*#title*] ] ] - + #changes.at(-3) - #changes.at(-2) \ swablab e.V. \ Katharinenstr. 1 \ @@ -34,9 +30,9 @@ footer: [ #text(size: 10pt, fill: colors.subtext)[#changes.at(-3)] #h(2fr) - #text(size: 10pt, fill: colors.subtext)[#counter(page).display()] + #text(size: 10pt, fill: colors.subtext)[#context counter(page).display()] ], - margin: (bottom: 2.5cm) + margin: (bottom: 2.5cm), ) // Inhaltsverzeichnis @@ -49,9 +45,7 @@ outline(title: [*Inhaltsverzeichnis*]) - set par( - leading: 1em, - ) + set par(leading: 1em) pagebreak() @@ -80,13 +74,13 @@ #v(1.25em, weak: true) ] block(breakable: false)[ - #heading([Änderungen]) - #table( - columns: (auto, auto, 1fr), - inset: 8pt, - align: auto, - stroke: 0.5pt, - [*Version*], [*Änderungsdatum*], [*Änderungen*], - ..changes - )] -} \ No newline at end of file + #heading([Änderungen]) + #table( + columns: (auto, auto, 1fr), + inset: 8pt, + align: auto, + stroke: 0.5pt, + [*Version*], [*Änderungsdatum*], [*Änderungen*], + ..changes + )] +} diff --git a/templates/tmpl_page.typ b/templates/tmpl_page.typ index 2e7dd94..1759e50 100644 --- a/templates/tmpl_page.typ +++ b/templates/tmpl_page.typ @@ -22,18 +22,16 @@ top + right, dx: 2.5em, dy: -2.5em, - image("lightmode-swablab.png", width: 25%) + image("lightmode-swablab.png", width: 25%), ) - block(width: 100%-100pt, height: 70pt)[ - #par(justify: false)[ - #text(font: "Ubuntu", 18pt)[ - #heading(outlined: false)[*#title*] - ] + block(width: 100% - 100pt, height: 70pt)[ + #text(font: "Ubuntu", 18pt)[ + #heading(outlined: false)[*#title*] ] #subtext ] doc -} \ No newline at end of file +}