Added boilerplate acknowledgement and keywords

This commit is contained in:
2025-10-07 12:03:40 +02:00
parent 48af642e4f
commit 670dd9596e
2 changed files with 37 additions and 1 deletions

25
data.js
View File

@@ -18,6 +18,10 @@ let steps = {
layout: language_layout, layout: language_layout,
result: { result: {
lang: "cs" lang: "cs"
},
finalize: (result) => {
result.is_cs = result.lang === "cs";
result.is_en = result.lang === "en";
} }
}, },
thesis_title: { thesis_title: {
@@ -101,6 +105,14 @@ let steps = {
finalize: (result) => { finalize: (result) => {
result.include_pdf = result.format === "external"; result.include_pdf = result.format === "external";
} }
},
finishing_touches: {
title: "Závěrečné detaily",
layout: finishing_touches_layout,
result: {
has_keywords: true,
has_acknowledgement: true
}
} }
} }
@@ -204,7 +216,18 @@ const typst_header = `#import "template/template.typ": *
document: "{thesis_type.type}", document: "{thesis_type.type}",
lang: "{language.lang}", lang: "{language.lang}",
title: (cs: "{thesis_title.cs}", en: "{thesis_title.en}"), title: (cs: "{thesis_title.cs}", en: "{thesis_title.en}"),
abstract: ( <finishing_touches.has_keywords: keywords: (
cs: ("DOPLŇTE", "SEM", "KLÍČOVÁ", "SLOVA"),
en: ("INSERT", "KEYWORDS", "HERE")
)
><finishing_touches.has_acknowledgement: acknowledgement: (
<language.is_cs:cs: "
Rád bych poděkoval všem, kteří přispěli ke vzniku tohoto dílka.
"><language.is_en:en: "
I would like to acknowledge everyone who contributed to the creation of this fine piece of work.
">
)
> abstract: (
cs: " cs: "
Sem vyplňte abstrakt své práce v češtině. Sem vyplňte abstrakt své práce v češtině.
", ",

13
ui.js
View File

@@ -178,6 +178,19 @@ async function assignment_layout(content, result) {
} }
} }
async function finishing_touches_layout(content, result) {
content.appendChild(new BinaryInputBuilder(result, "has_keywords")
.label("Vložit klíčová slova")
.finish());
content.appendChild(new BinaryInputBuilder(result, "has_acknowledgement")
.label("Vložit poděkování")
.finish());
content.appendChild(new ElementBuilder("div.vertical-spacer").finish());
content.appendChild(new ElementBuilder("div.hint")
.text("Generátor pouze vygeneruje ukázky, jak by tato pole měla vypadat. Samotná klíčová slova či poděkování si poté upravíte dle svých potřeb.")
.finish());
}
async function run() { async function run() {
startbutton.style.cursor = "auto"; startbutton.style.cursor = "auto";
startbutton.disabled = true; startbutton.disabled = true;