commit 68495d7a470ec1795b3c631efdd34d585cb11249 Author: Gaspard Jankowiak Date: Tue Apr 14 15:47:13 2026 +0200 import diff --git a/src/lib.pdf b/src/lib.pdf new file mode 100644 index 0000000..908ef24 Binary files /dev/null and b/src/lib.pdf differ diff --git a/src/lib.typ b/src/lib.typ new file mode 100644 index 0000000..6b16793 --- /dev/null +++ b/src/lib.typ @@ -0,0 +1,67 @@ + +#let accent = rgb(75, 50, 200) +#let yellow = rgb(255, 243, 0, 100) +#let darkyellow = rgb(255, 213, 00, 150) + +#let document( + title: [Title], + task: [Task], + university: [Universität Graz], + institute: [Uni for Life], + course: [Course name], + instructor: [Instructor], + author: [Firstname Lastname], + date: [#datetime.today().display("[day]. [month repr:long] [year]")], + fontsize: 1.269em, + logo: "logo_uniforlife.svg", + lang: "de", + + body +) = { +let doublerule = [#set text(1pt, bottom-edge: "descender") + #line(length: 100%, stroke: darkyellow+2pt)#line(length: 100%, stroke: luma(150)+1pt) +] +show heading: smallcaps + +show link: it => underline(stroke: yellow+0.2em, offset: 0.15em, evade: false, background: true)[#it] + +let ulink(.. args) = { + [#underline(stroke: darkyellow+0.2em, offset: 0em, evade: false, background: true)[#link(.. args)]] +} + +set page( + margin: (top: 8em, bottom: 5em), + header: context { + if counter(page).get().first() == 1 [ + #set text(0.7em, top-edge: 1em) + #grid(inset: 0.1em, columns: (1fr, auto, 1fr), align: (left, center, right), + course, + [#emph(author)], + grid.cell(rowspan:3)[#image(logo, height: 3em)], + instructor, grid.cell(rowspan: 2)[#set text(1.3em); #align(bottom)[#task]], + date) + #doublerule + ] else [ + #set text(0.7em, top-edge: 1em) + #align(right)[#image(logo, height: 3em)] + #doublerule + ]}, +footer: context [ + #doublerule + #v(0.5em) + #align(center)[#counter(page).display("1 / 1", both: true)] +], +) + +let leading = 1.5em +let leading = leading - 0.75em // "Normalization" +set block(spacing: leading) +set par(spacing: leading, leading: leading, first-line-indent: 2em, justify: true) +set text(top-edge: 0.7em, fontsize, lang: lang) + +v(-0.5cm) +align(center)[#text(1.1em)[#underline(stroke: darkyellow+0.5em, extent: 0.1em, offset: 0.05em, evade: false, background: true)[#smallcaps([=== *#title*])]]] +v(0.5cm) + +body +} diff --git a/src/logo_uniforlife.svg b/src/logo_uniforlife.svg new file mode 100644 index 0000000..aae4feb --- /dev/null +++ b/src/logo_uniforlife.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/template/document.typ b/template/document.typ new file mode 100644 index 0000000..fa96ec7 --- /dev/null +++ b/template/document.typ @@ -0,0 +1,21 @@ +#import "@local/uniforlife-document:0.0.1": document + +#document( + title: [Antigravity cuisine], + task: [Recipe for fried eggs], + university: [University of Graz], + institute: [Uni for Life], + course: [Cooking 101], + instructor: [Lady Gaga], + author: [John Doe], + lang: "de", +)[ + + #lorem(100) + + #lorem(200) + + +// #bibliography("refs.bib") +] + diff --git a/typst.toml b/typst.toml new file mode 100644 index 0000000..9e233a0 --- /dev/null +++ b/typst.toml @@ -0,0 +1,16 @@ +[package] +name = "uniforlife-document" +version = "0.0.1" +entrypoint = "src/lib.typ" +authors = ["Gaspard Jankowiak"] +license = "MIT" +description = "An unofficial UniForLife-UniGraz housework template" +repository = "" +categories = ["presentation"] +disciplines = ["computer-science", "engineering"] +keywords = ["University of Graz", "template"] +compiler = "0.14.0" + +[template] +path = "template" +entrypoint = "document.typ"