Added thesis assignment format
This commit is contained in:
27
data.js
27
data.js
@@ -69,6 +69,16 @@ let steps = {
|
||||
}
|
||||
}
|
||||
},
|
||||
assignment: {
|
||||
title: "Jak vložit zadání?",
|
||||
layout: assignment_layout,
|
||||
result: {
|
||||
format: "empty"
|
||||
},
|
||||
finalize: (result) => {
|
||||
result.include_pdf = result.format === "external";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const faculties = {
|
||||
@@ -155,6 +165,15 @@ const pronouns_en = {
|
||||
}
|
||||
}
|
||||
|
||||
const assignment_formats = {
|
||||
"empty": {
|
||||
name: "Vložit do dokumentu prázdnou stránku.\nTuto stránku poté nahradíte podepsaným zadáním."
|
||||
},
|
||||
"external": {
|
||||
name: "Vložit do dokumentu zadání ve formě PDF."
|
||||
}
|
||||
}
|
||||
|
||||
const typst_header = `#import "template/template.typ": *
|
||||
|
||||
#show: tultemplate2.with(
|
||||
@@ -166,8 +185,8 @@ const typst_header = `#import "template/template.typ": *
|
||||
author_pronouns: "{author_info.pronouns}",
|
||||
<collaborators.has_supervisor: supervisor: "{collaborators.supervisor_name}",
|
||||
><collaborators.has_consultant: consultant: "{collaborators.consultant_name}",
|
||||
> citations: "citations.bib",
|
||||
assignment: "zadani.pdf"
|
||||
><assignment.include_pdf: assignment: "assignment.pdf",
|
||||
> citations: "citations.bib"
|
||||
)
|
||||
|
||||
= Nadpis
|
||||
@@ -229,6 +248,10 @@ async function generate_zip() {
|
||||
|
||||
out_zip.file("thesis.typ", generate_template());
|
||||
|
||||
if(!steps.assignment.result.include_pdf) {
|
||||
out_zip.remove("assignment.pdf");
|
||||
}
|
||||
|
||||
return await out_zip.generateAsync({ type: "blob" });
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user