Skip to content

Commit

Permalink
Conditionally add advisors when declared (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertjndw authored Jun 6, 2024
1 parent 33b5458 commit 511099b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions layout/titlepage.typ
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,26 @@

align(center, text(font: sans-font, 2em, weight: 500, titleGerman))

let entries = ()
entries.push(("Author: ", author))
entries.push(("Supervisor: ", supervisor))
// Only show advisors if there are any
if advisors.len() > 0 {
entries.push(("Advisors: ", advisors.join(", ")))
}
entries.push(("Start Date: ", startDate.display("[day].[month].[year]")))
entries.push(("Submission Date: ", submissionDate.display("[day].[month].[year]")))

pad(
top: 3em,
right: 15%,
left: 15%,
grid(
columns: 2,
gutter: 1em,
strong("Author: "), author,
strong("Supervisor: "), supervisor,
strong("Advisors: "), advisors.join(", "),
strong("Start Date: "), startDate.display("[day].[month].[year]"),
strong("Submission Date: "), submissionDate.display("[day].[month].[year]"),
..for (term, desc) in entries {
(strong(term), desc)
}
)
)

Expand Down

0 comments on commit 511099b

Please sign in to comment.