dhbw-abb-typst-template/src/pages/titlepage.typ

144 lines
3.1 KiB
Plaintext
Raw Normal View History

2024-06-27 13:57:04 +00:00
2024-06-28 09:54:30 +00:00
#let new_title_page(
thesis,
author) = context [
2024-06-27 13:57:04 +00:00
#let LogoHeight = 1.5cm
#set align(center)
// logo of ABB and DHBW
#grid(
// set width of columns
// we need two, so make both half the page width
columns: (50%, 50%),
// left align logo of ABB
2024-06-28 09:54:30 +00:00
align(left, image("res/ABB.svg", height: LogoHeight)),
2024-06-27 13:57:04 +00:00
// right align logo of DHBW
2024-06-28 09:54:30 +00:00
align(right, image("res/DHBW.svg", height: LogoHeight)))
2024-06-27 13:57:04 +00:00
// title
#v(2cm)
2024-06-28 09:54:30 +00:00
#text(size: 2em, weight: "semibold", thesis.title)
2024-06-27 13:57:04 +00:00
// subtitle
2024-06-28 09:54:30 +00:00
#text(size: 1.5em, thesis.subtitle)
2024-06-27 13:57:04 +00:00
// type of paper
#v(1cm)
2024-06-28 09:54:30 +00:00
#text(size: 1.5em, weight: "bold", thesis.kind)
2024-06-27 13:57:04 +00:00
// number of semester
2024-06-28 09:54:30 +00:00
#if text.lang == "de" [
Praxisphase des #author.semester Studienjahrs
] else if text.lang == "en" [
Practical phase of the #author.semester academic year
2024-06-27 13:57:04 +00:00
] else [
2024-06-28 09:54:30 +00:00
#context panic("no translation for language: ", text.lang)
2024-06-27 13:57:04 +00:00
]
2024-06-28 09:54:30 +00:00
// faculty
2024-06-27 13:57:04 +00:00
#pad(top: 0.5cm)[
2024-06-28 09:54:30 +00:00
#if text.lang == "de" [
an der Fakultät für #author.faculty
2024-06-27 13:57:04 +00:00
#linebreak()
2024-06-28 09:54:30 +00:00
im Studiengang #author.program
] else if text.lang == "en" [
at the Faculty of #author.faculty
2024-06-27 13:57:04 +00:00
#linebreak()
2024-06-28 09:54:30 +00:00
in the degree program #author.program
2024-06-27 13:57:04 +00:00
] else [
2024-06-28 09:54:30 +00:00
#context panic("no translation for language: ", text.lang)
2024-06-27 13:57:04 +00:00
]
]
// university
#pad(top: 0.5cm)[
2024-06-28 09:54:30 +00:00
#if text.lang == "de" [
2024-06-27 13:57:04 +00:00
an der
2024-06-28 09:54:30 +00:00
] else if text.lang == "en" [
2024-06-27 13:57:04 +00:00
at
] else [
2024-06-28 09:54:30 +00:00
#context panic("no translation for language: ", text.lang)
2024-06-27 13:57:04 +00:00
]
#linebreak()
2024-06-28 09:54:30 +00:00
#author.university
2024-06-27 13:57:04 +00:00
]
#set align(bottom + left)
2024-06-28 09:54:30 +00:00
#if text.lang == "de" [
2024-06-27 13:57:04 +00:00
#table(
columns: 2,
column-gutter: 1cm,
align: left,
stroke: none,
2024-06-28 09:54:30 +00:00
[*Verfasser:*],
author.name,
2024-06-27 13:57:04 +00:00
2024-06-28 09:54:30 +00:00
[*Bearbeitungszeitraum:*],
thesis.timeframe,
2024-06-27 13:57:04 +00:00
2024-06-28 09:54:30 +00:00
[*Matrikelnummer, Kurs:*],
str(author.matriculation-number) + ", " + author.course,
2024-06-27 13:57:04 +00:00
2024-06-28 09:54:30 +00:00
[*Ausbildungsbetrieb:*],
author.company,
2024-06-27 13:57:04 +00:00
2024-06-28 09:54:30 +00:00
[*Betrieblicher Betreuer:*],
author.supervisor,
2024-06-27 13:57:04 +00:00
2024-06-28 09:54:30 +00:00
[*Abgabedatum:*],
thesis.submission-date
2024-06-27 13:57:04 +00:00
)
2024-06-28 09:54:30 +00:00
] else if text.lang == "en" [
2024-06-27 13:57:04 +00:00
#table(
columns: 2,
column-gutter: 1cm,
align: left,
stroke: none,
2024-06-28 09:54:30 +00:00
[*Author:*],
author.name,
2024-06-27 13:57:04 +00:00
2024-06-28 09:54:30 +00:00
[*Editing period:*],
thesis.timeframe,
2024-06-27 13:57:04 +00:00
2024-06-28 09:54:30 +00:00
[*Matriculation number, course:*],
str(author.matriculation-number) + ", " + author.course,
2024-06-27 13:57:04 +00:00
2024-06-28 09:54:30 +00:00
[*Training company:*],
author.company,
2024-06-27 13:57:04 +00:00
2024-06-28 09:54:30 +00:00
[*Company supervisor:*],
author.supervisor,
2024-06-27 13:57:04 +00:00
2024-06-28 09:54:30 +00:00
[*Submission date:*],
thesis.submission-date
2024-06-27 13:57:04 +00:00
)
] else [
2024-06-28 09:54:30 +00:00
#context panic("no translation for language: ", text.lang)
2024-06-27 13:57:04 +00:00
]
#pad(
top: 1cm,
grid(
// set width of columns
// we need two, so make both half the page width
columns: (60%, 40%),
2024-06-28 09:54:30 +00:00
align(left, if text.lang == "de" [
2024-06-27 13:57:04 +00:00
Unterschrift des betrieblichen Betreuers
2024-06-28 09:54:30 +00:00
] else if text.lang == "en" [
2024-06-27 13:57:04 +00:00
Signature of the company supervisor
] else [
2024-06-28 09:54:30 +00:00
#context panic("no translation for language: ", text.lang)
2024-06-27 13:57:04 +00:00
]
),
align(right, {line(length: 6cm)})
)
)
#counter(page).update(1)
]