Files
Typst-Vorlage/frontpage.typ
2026-03-11 08:07:31 +01:00

99 lines
3.1 KiB
Typst
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Standard-Font (anpassbar)
#let base-font = "Libertinus Serif" // oder "Times New Roman", "TeX Gyre Pagella", ...
// Ein dünner grauer Trenner
#let rule() = line(length: 100%, stroke: 1pt + gray.darken(10%))
// ---- Exportierte API -------------------------------------------------------
/// Erzeugt eine Titelseite.
/// Parameter sind bewusst sprechend und optional, damit du flexibel bleibst.
#let cover-page = (
// Logos
uni-logo: none, // Pfad zur Uni/HS-Logo-Datei (PNG/SVG/PDF)
company-logo: none, // Pfad Firmenlogo (optional)
// Titel / Art / Abschluss
title: "",
subtitle: none, // z.B. "Bachelorarbeit"
degree: none, // z.B. "für die Prüfung zum"
// Studiengang / Hochschule / Standort
program: none, // z.B. "des Studiengangs Informatik"
institution: none, // z.B. "an der Dualen Hochschule BadenWürttemberg Heidenheim"
// Autor/Datum
author: "",
date: datetime,
processing_time: none,
matrikelnummer: none,
kurs: none,
ausbildungsbetrieb: none,
firmenort: none,
erstgutachter: none,
zweitgutachter: none,
// Layout-Parameter
page-size: "a4",
top-gap: 18%, // Abstand nach oben bis zum Logo-Block
logo-width: 110pt, // Zielbreite Logos
gap: 12pt, // Standard-Vertikalabstände
title-size: 16pt,
section-size: 11pt,
author-size: 12pt,
date-size: 12pt,
meta-label-style: text.with(weight: "bold"),
meta-value-style: text,
) => {
// Ganze Seite ohne Kopf/Fuß
page(
paper: page-size,
margin: 2.5cm,
header: none,
footer: none,
)[
#box(width: 100%, height: 15%)[
#columns(2, gutter: 8pt)[
#align(left, if (uni-logo != none and uni-logo != "" and uni-logo != ()) { image(uni-logo, width: logo-width) } else { [] })
#colbreak()
#v(6mm)
#align(right, if (company-logo != none and company-logo != "" and company-logo != ()) { image(company-logo, width: logo-width) } else { [] })
]
]
#align(center)[
#set text(size: 12pt)
//#v(10mm)
#text(size: 20pt, weight: 700)[#title]
#v(6mm)
#text(size: 16pt, weight: 700)[#subtitle]
#v(10mm)
für die Prüfung zum
#v(3mm)
#text(size: 14pt, weight: "bold")[#degree]
#v(10mm)
des #program
#v(0mm)
an der #institution
#v(16mm)
von
#v(2mm)
#text(size: 18pt, weight: "bold")[#author]
#v(8mm)
#let months = ("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember")
#text(size: date-size)[#months.at(date.month() - 1) #date.year()]
]
#place(bottom)[
#set text(size: 11pt)
#table(rows: 5, align: left, stroke: none, columns: (55%, 45%),
[*Bearbeitungszeitraum*], [#processing_time],
[*Matrikelnummer, Kurs*], [#matrikelnummer, #kurs],
[*Ausbildungsbetrieb, Firmenort*], [#ausbildungsbetrieb, #firmenort],
[*Erstgutachter*], [#erstgutachter],
[*Zweitgutachter*], [#zweitgutachter],
)
]
]
}