Redirect directly to the Typst editor
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<h1>Generátor TUL Typst šablony</h1>
|
<h1>Generátor TUL Typst šablony</h1>
|
||||||
|
|
||||||
<img style="height: 100px; width: 100px;" src="tul_prdel.svg">
|
<img style="height: 100px; width: 100px;" src="tul_logo.svg">
|
||||||
|
|
||||||
<div class="paragraphs">
|
<div class="paragraphs">
|
||||||
<p>
|
<p>
|
||||||
|
1
tul_logo.svg
Normal file
1
tul_logo.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 6.0 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 6.1 KiB |
10
ui.js
10
ui.js
@@ -1,4 +1,4 @@
|
|||||||
let tul_prdel = null;
|
let tul_logo = null;
|
||||||
|
|
||||||
function get_step(id) {
|
function get_step(id) {
|
||||||
return steps[Object.keys(steps)[id]];
|
return steps[Object.keys(steps)[id]];
|
||||||
@@ -218,7 +218,7 @@ async function run() {
|
|||||||
main_content.remove();
|
main_content.remove();
|
||||||
|
|
||||||
let color = window.getComputedStyle(document.body).getPropertyValue("--" + steps.faculty.result.name + "-color");
|
let color = window.getComputedStyle(document.body).getPropertyValue("--" + steps.faculty.result.name + "-color");
|
||||||
let logo = tul_prdel.replaceAll('fill="#5948ad"', 'fill="' + color + '"');
|
let logo = tul_logo.replaceAll('fill="#5948ad"', 'fill="' + color + '"');
|
||||||
|
|
||||||
main_content = new ElementBuilder("div.main-content")
|
main_content = new ElementBuilder("div.main-content")
|
||||||
.style("opacity", 0)
|
.style("opacity", 0)
|
||||||
@@ -235,7 +235,7 @@ async function run() {
|
|||||||
`))
|
`))
|
||||||
.append(new ElementBuilder("p").append(new ElementBuilder("a")
|
.append(new ElementBuilder("p").append(new ElementBuilder("a")
|
||||||
.text("Webové rozhraní Typstu otevřete kliknutím zde.")
|
.text("Webové rozhraní Typstu otevřete kliknutím zde.")
|
||||||
.href("https://typst.app")
|
.href("https://typst.app/play/")
|
||||||
.target("_blank"))))
|
.target("_blank"))))
|
||||||
.append(new ElementBuilder("a.button.accent")
|
.append(new ElementBuilder("a.button.accent")
|
||||||
.href(URL.createObjectURL(out_blob))
|
.href(URL.createObjectURL(out_blob))
|
||||||
@@ -249,7 +249,7 @@ async function run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.onload = async () => {
|
window.onload = async () => {
|
||||||
let img = await fetch("tul_prdel.svg"); // Should already be cached by now (hopefully)
|
let img = await fetch("tul_logo.svg"); // Should already be cached by now (hopefully)
|
||||||
tul_prdel = await img.text();
|
tul_logo = await img.text();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user