2
1
HEI-Typst-presentation/00-templates/template.typ

72 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2024-05-17 14:23:05 +00:00
#import "@preview/polylux:0.3.1": *
#import themes.clean: *
#let slide_template(
title: [Title],
subtitle: none,
authors: [],
2024-06-19 08:29:39 +00:00
date: datetime.today(),
2024-05-18 12:22:59 +00:00
duration: none,
2024-06-19 08:29:58 +00:00
fade: true,
2024-06-19 08:28:59 +00:00
handout: false,
2024-05-17 14:23:05 +00:00
doc,
) = {
2024-06-19 08:29:39 +00:00
//set text(font: "Inria Sans")
let date-text = if date.day() == 1 {
date.display("[weekday], [day padding:none]st of [month repr:long] [year]")
} else if date.day() == 2 {
date.display("[weekday], [day padding:none]nd of [month repr:long] [year]")
} else if date.day() == 3 {
date.display("[weekday], [day padding:none]rd of [month repr:long] [year]")
} else {
date.display("[weekday], [day padding:none]th of [month repr:long] [year]")
}
2024-05-17 14:23:05 +00:00
show: clean-theme.with(
//aspect-ratio: "4-3",
footer: [#authors #h(0.2cm)-#h(0.2cm) Bachelor thesis #datetime.today().display("[year]")],
short-title: [#title],
logo: image("./FR-DE_HEI_rvb.png"),
color: rgb("#ea366a"),
)
2024-06-19 08:28:59 +00:00
if handout {
enable-handout-mode(true)
}
2024-06-19 08:29:58 +00:00
let transition = if fade {
"fade"
} else {
"none"
}
2024-05-18 12:22:59 +00:00
if duration != none{
pdfpc.config(
duration-minutes: duration,
default-transition: (
2024-06-19 08:29:58 +00:00
type: transition,
2024-05-18 12:22:59 +00:00
)
)
} else {
pdfpc.config(
default-transition: (
2024-06-19 08:29:58 +00:00
type: transition,
2024-05-18 12:22:59 +00:00
)
)
}
2024-06-19 08:29:58 +00:00
2024-05-17 14:23:05 +00:00
title-slide(
title: [#title],
subtitle: [#subtitle],
authors: ([#authors]),
2024-06-19 08:29:39 +00:00
date: [#date-text],
2024-05-17 14:23:05 +00:00
)
doc
}