1
0
mirror of https://gitlab.cvh-server.de/skrause/flashcards.git synced 2025-12-12 06:41:38 +01:00

more docs template cleanups

This commit is contained in:
2025-03-26 16:15:19 +01:00
parent 568e4a8db9
commit 6ee04e16bb
2 changed files with 9 additions and 19 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
.vscode/
.idea/
builddir/
*.pdf
.flatpak-builder/
repo/
app/

View File

@@ -1,15 +1,13 @@
#import "@preview/hydra:0.6.0": hydra
#let project(title: "", subtitle: "", authors: (), logo: none, body) = {
// Set the document's basic properties.
// Basic properties
set document(author: authors, title: title)
set text(lang: "de")
set heading(numbering: "1.1")
// Title page
set align(center)
// Title page.
v(1fr)
// Logo
@@ -20,15 +18,11 @@
// Title
text(2em, weight: 700, title)
linebreak()
v(0.1em)
v(1em)
// Subtitle
text(2em, weight: 400, subtitle)
v(1em)
// Author
grid(
..authors,
@@ -37,29 +31,24 @@
v(1fr)
pagebreak()
set align(left)
set page(numbering: "I", number-align: center)
// Table of contents
set align(left)
set page(numbering: "I", number-align: center)
outline(depth: 3)
pagebreak()
// Header
let show-header(ctx, candidates) = {
candidates.body
v(-0.8em)
line(length: 100%, stroke: 0.5pt)
}
set page(header: context {
// Main body
set page(numbering: "1", header: context {
hydra(1, skip-starting: false, display: show-header)
})
set page(numbering: "1")
counter(page).update(1)
// Main body
set par(justify: true)
body
}