Added thesis title
This commit is contained in:
19
data.js
19
data.js
@@ -13,6 +13,23 @@ let steps = {
|
||||
type: ""
|
||||
}
|
||||
},
|
||||
thesis_title: {
|
||||
title: "Jak se bude práce jmenovat?",
|
||||
layout: thesis_title_layout,
|
||||
result: {
|
||||
cs: "",
|
||||
en: ""
|
||||
},
|
||||
finalize: (result) => {
|
||||
if(result.cs === "") {
|
||||
result.cs = "SEM DOPLŇTE ČESKÝ NÁZEV PRÁCE";
|
||||
}
|
||||
|
||||
if(result.en === "") {
|
||||
result.en = "SEM DOPLŇTE ANGLICKÝ NÁZEV PRÁCE";
|
||||
}
|
||||
}
|
||||
},
|
||||
author_info: {
|
||||
title: "Vaše údaje",
|
||||
layout: author_info_layout,
|
||||
@@ -118,7 +135,7 @@ const typst_header = `#import "template/template.typ": *
|
||||
#show: tultemplate2.with(
|
||||
faculty: "{faculty.name}",
|
||||
document: "{thesis_type.type}",
|
||||
title: (cs: "Návod na použití Typst TUL šablony"),
|
||||
title: (cs: "{thesis_title.cs}", en: "{thesis_title.en}"),
|
||||
author: "{author_info.name}",
|
||||
author_pronouns: "{author_info.pronouns}",
|
||||
<collaborators.has_supervisor: supervisor: "{collaborators.supervisor_name}",
|
||||
|
21
ui.js
21
ui.js
@@ -43,6 +43,27 @@ async function thesis_layout(content, result) {
|
||||
}
|
||||
}
|
||||
|
||||
async function thesis_title_layout(content, result) {
|
||||
let cs_name = new ElementBuilder("input")
|
||||
.type("text")
|
||||
.placeholder("Název práce (v češtině)")
|
||||
.on_input((e) => result.cs = e.target.value)
|
||||
.finish();
|
||||
|
||||
let en_name = new ElementBuilder("input")
|
||||
.type("text")
|
||||
.placeholder("Název práce (v angličtině)")
|
||||
.on_input((e) => result.en = e.target.value)
|
||||
.finish();
|
||||
|
||||
content.appendChild(cs_name);
|
||||
content.appendChild(en_name);
|
||||
content.appendChild(new ElementBuilder("div.vertical-spacer").finish());
|
||||
content.appendChild(new ElementBuilder("div.hint")
|
||||
.text("Pokud si zatím nejste jisti, můžete tato pole ponechat prázdná.")
|
||||
.finish());
|
||||
}
|
||||
|
||||
async function author_info_layout(content, result) {
|
||||
let author_name = new ElementBuilder("input")
|
||||
.type("text")
|
||||
|
Reference in New Issue
Block a user