From 2d29bc9d3b57cb30057b17cb5ef2910f12e8a1e1 Mon Sep 17 00:00:00 2001 From: Kresten Laust Date: Wed, 22 Nov 2023 23:22:34 +0100 Subject: [PATCH] Finished adding the blue box --- main.typ | 13 +++++++------ template.typ | 30 ++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/main.typ b/main.typ index 1350a7b..6d74699 100644 --- a/main.typ +++ b/main.typ @@ -3,17 +3,18 @@ // Take a look at the file `template.typ` in the file panel // to customize this template and discover how it works. #show: project.with( - title: "Explaining Quantum Mechanics to a Child, Like a Boss: Enable Understanding for Small People — A Long Title for a Report", + title: "Explaining Quantum Mechanics to a Child, Like a Boss: Enable Understanding for Small People", authors: ( - (name: "Kresten", email: "kresten@gmail.com"), - (name: "Author 2", email: "mail1@mail.dk"), - (name: "Author 3", email: "mail2@mail.dk"), - (name: "Author 4", email: "mail3@mail.dk"), - (name: "Author 5", email: "mail4@mail.dk"), + (name: "Kresten Mellemnavn Efternavn", email: "kresten@gmail.com"), + (name: "Peter Petersen", email: "mail1@mail.dk"), + (name: "Anders Andersen", email: "mail2@mail.dk"), + (name: "Lasse Lassesen", email: "mail3@mail.dk"), + (name: lorem(5), email: "mail4@mail.dk"), ), // Insert your abstract after the colon, wrapped in brackets. // Example: `abstract: [This is my abstract...]` abstract: lorem(59), + group_name: "cs-23-sw-1-p1-15", date: "November 22, 2023", logo: none, ) diff --git a/template.typ b/template.typ index cb121f2..41b171e 100644 --- a/template.typ +++ b/template.typ @@ -5,18 +5,21 @@ title: "Edit Title Here", abstract: [], authors: (), + group_name: "", date: none, logo: none, body, ) = { + let aaublue = rgb(33, 26, 82) // Set the document's basic properties. set document(author: authors.map(a => a.name), title: title) set page(numbering: "1", number-align: center) - locate ( - loc => if (1 == loc.page()) { - set page(background: image("AAUgraphics/aau_waves.svg", width: 100%, height: 100%)) + + set page(background: locate(loc => + if loc.page() == 1 { + image("AAUgraphics/aau_waves.svg", width: 100%, height: 100%) } - ) + )) // Save heading and body font families in variables. let body-font = "New Computer Modern" @@ -30,16 +33,27 @@ // Title page. // The page can contain a logo if you pass one with `logo: "logo.png"`. - v(0.6fr) + v(1.6fr) + box( + fill: aaublue, + inset: 18pt, + radius: 1pt, + clip: false, + [ + #set text(fill: white, 12pt) + #align(center, text(font: sans-font, 2em, weight: 700, title)) + #align(center, group_name) + #align(center)[ + #((..authors.map(author => author.name)).join(", ", last: " and ")) + ] + ] + ) if logo != none { align(right, image(logo, width: 100%)) } - //image("AAUgraphics/aau_waves.svg", width: 100%, height: 100%) v(9.6fr) text(1.1em, date) - v(1.2em, weak: true) - text(font: sans-font, 2em, weight: 700, title) // Author information. pad(