Now asking whether to omit the Makefile
This commit is contained in:
33
data.js
33
data.js
@@ -107,13 +107,23 @@ let steps = {
|
||||
result.include_pdf = result.format === "external";
|
||||
}
|
||||
},
|
||||
finishing_touches: {
|
||||
title: "Závěrečné detaily",
|
||||
layout: finishing_touches_layout,
|
||||
other_details: {
|
||||
title: "Ostatní detaily",
|
||||
layout: other_details_layout,
|
||||
result: {
|
||||
has_keywords: true,
|
||||
has_acknowledgement: true
|
||||
}
|
||||
},
|
||||
toolchain: {
|
||||
title: "Jak budete používat Typst?",
|
||||
layout: toolchain_layout,
|
||||
result: {
|
||||
toolchain: "online"
|
||||
},
|
||||
finalize: (result) => {
|
||||
result.include_makefile = result.toolchain === "local";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,6 +220,15 @@ const assignment_formats = {
|
||||
}
|
||||
}
|
||||
|
||||
const toolchains = {
|
||||
"online": {
|
||||
name: "Pomocí webového editoru Typstu"
|
||||
},
|
||||
"local": {
|
||||
name: "Pomocí příkazové řádky"
|
||||
}
|
||||
}
|
||||
|
||||
const typst_header = `#import "template/template.typ": *
|
||||
|
||||
#show: tultemplate2.with(
|
||||
@@ -218,11 +237,11 @@ const typst_header = `#import "template/template.typ": *
|
||||
lang: "{language.lang}",
|
||||
title: (cs: "{thesis_title.cs}", en: "{thesis_title.en}"),
|
||||
branch: ({language.lang}: "SEM DOPLŇTE SPECIALIZACI"),
|
||||
<finishing_touches.has_keywords: keywords: (
|
||||
<other_details.has_keywords: keywords: (
|
||||
cs: ("DOPLŇTE", "SEM", "KLÍČOVÁ", "SLOVA"),
|
||||
en: ("INSERT", "KEYWORDS", "HERE")
|
||||
),
|
||||
><finishing_touches.has_acknowledgement: acknowledgement: (
|
||||
><other_details.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: "
|
||||
@@ -315,6 +334,10 @@ async function generate_zip() {
|
||||
out_zip.remove("assignment.pdf");
|
||||
}
|
||||
|
||||
if(!steps.toolchain.result.include_makefile) {
|
||||
out_zip.remove("Makefile");
|
||||
}
|
||||
|
||||
return await out_zip.generateAsync({ type: "blob" });
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user