mirror of
https://github.com/kristoferssolo/LU-DF-Typst-Template.git
synced 2025-10-21 18:50:33 +00:00
feat: add documantation page
This commit is contained in:
parent
0986808ab3
commit
28f93156cb
@ -21,8 +21,19 @@
|
||||
email: "zk67890@edu.lu.lv",
|
||||
),
|
||||
),
|
||||
date: (
|
||||
advisors: (
|
||||
(
|
||||
title: "Mg. dat.",
|
||||
name: "Ivars Ozoliņš",
|
||||
),
|
||||
),
|
||||
reviewer: (
|
||||
name: "Jānis Ozols",
|
||||
),
|
||||
date: datetime(
|
||||
year: 2025,
|
||||
month: 1,
|
||||
day: 1,
|
||||
),
|
||||
place: "Rīga",
|
||||
bibliography: bibliography("bibliography.yml"),
|
||||
|
||||
16
src/lib.typ
16
src/lib.typ
@ -11,6 +11,7 @@
|
||||
// location, and email. Everything but but the `name` and `code` is optional.
|
||||
authors: (),
|
||||
advisors: (),
|
||||
reviewer: (),
|
||||
// The paper's abstract. Can be omitted if you don't have one.
|
||||
abstract: (
|
||||
primary: (
|
||||
@ -33,11 +34,7 @@
|
||||
university: "Latvijas Universitāte",
|
||||
faculty: [Eksakto zinātņu un tehnoloģiju fakultāte\ Datorikas nodaļa],
|
||||
thesis-type: "Bakalaura darbs",
|
||||
date: (
|
||||
year: none,
|
||||
month: none,
|
||||
day: none,
|
||||
),
|
||||
date: datetime.today(),
|
||||
place: none,
|
||||
logo: none,
|
||||
outline-title: "SATURS",
|
||||
@ -253,5 +250,12 @@
|
||||
// Display bibliography.
|
||||
bibliography
|
||||
|
||||
make-documentary-page()
|
||||
make-documentary-page(
|
||||
title,
|
||||
authors,
|
||||
advisors,
|
||||
reviewer,
|
||||
thesis-type,
|
||||
date,
|
||||
)
|
||||
}
|
||||
|
||||
@ -92,7 +92,68 @@
|
||||
|
||||
v(0.5fr)
|
||||
|
||||
align(center, upper([#place #date.year]))
|
||||
align(center, upper([#place #date.year()]))
|
||||
}
|
||||
|
||||
#let make-documentary-page() = {}
|
||||
#let make-documentary-page(
|
||||
title,
|
||||
authors,
|
||||
advisors,
|
||||
reviewer,
|
||||
thesis-type,
|
||||
date,
|
||||
) = {
|
||||
let vspace = 1fr
|
||||
set page(numbering: none)
|
||||
|
||||
let formatted-date = strong(date.display("[day].[month].[year]."))
|
||||
|
||||
heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
|
||||
[
|
||||
#thesis-type "*#title*" ir
|
||||
izstrādāts Latvijas Universitātes Eksakto zinātņu un tehnoloģiju fakultātē,
|
||||
Datorikas nodaļā.
|
||||
|
||||
#v(vspace / 3)
|
||||
Ar savu parakstu apliecinu, ka darbs izstrādāts patstāvīgi, izmantoti tikai tajā
|
||||
norādītie informācijas avoti un iesniegtā darba elektroniskā kopija atbilst
|
||||
izdrukai un/vai recenzentam uzrādītajai darba versijai.
|
||||
]
|
||||
|
||||
context {
|
||||
set par(
|
||||
first-line-indent: 1cm,
|
||||
hanging-indent: 1cm,
|
||||
)
|
||||
|
||||
v(vspace / 2)
|
||||
|
||||
[
|
||||
#if authors.len() > 1 { "Autori: " } else { "Autors: " }
|
||||
#authors.map(author => [*#author.name, #author.code*]).join(", ")
|
||||
~ #formatted-date
|
||||
]
|
||||
|
||||
v(vspace)
|
||||
[
|
||||
Rekomendēju darbu aizstāvēšanai\
|
||||
#if advisors.len() > 0 [
|
||||
Darba #if advisors.len() > 1 { "vadītāji:" } else { "vadītājs:" }
|
||||
#advisors.map(advisor => [*#advisor.title #advisor.name*]).join("\n")
|
||||
~ #formatted-date
|
||||
]
|
||||
]
|
||||
|
||||
v(vspace)
|
||||
[Recenzents: *#reviewer.name*]
|
||||
|
||||
|
||||
v(vspace)
|
||||
[
|
||||
Darbs iesniegs #formatted-date\
|
||||
Kvalifikācijas darbu pārbaudījumu komisijas sekretārs (elektronisks paraksts)
|
||||
]
|
||||
|
||||
v(vspace)
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,9 +22,11 @@
|
||||
name: "Ivars Ozoliņš",
|
||||
),
|
||||
),
|
||||
date: (
|
||||
date: datetime(
|
||||
year: 2025,
|
||||
),
|
||||
month: 1,
|
||||
day: 1,
|
||||
), // defaults to datetime.today()
|
||||
place: "Rīga",
|
||||
bibliography: bibliography("bibliography.yml"),
|
||||
abstract: (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user