Redirect directly to the Typst editor
This commit is contained in:
10
ui.js
10
ui.js
@@ -1,4 +1,4 @@
|
||||
let tul_prdel = null;
|
||||
let tul_logo = null;
|
||||
|
||||
function get_step(id) {
|
||||
return steps[Object.keys(steps)[id]];
|
||||
@@ -218,7 +218,7 @@ async function run() {
|
||||
main_content.remove();
|
||||
|
||||
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")
|
||||
.style("opacity", 0)
|
||||
@@ -235,7 +235,7 @@ async function run() {
|
||||
`))
|
||||
.append(new ElementBuilder("p").append(new ElementBuilder("a")
|
||||
.text("Webové rozhraní Typstu otevřete kliknutím zde.")
|
||||
.href("https://typst.app")
|
||||
.href("https://typst.app/play/")
|
||||
.target("_blank"))))
|
||||
.append(new ElementBuilder("a.button.accent")
|
||||
.href(URL.createObjectURL(out_blob))
|
||||
@@ -249,7 +249,7 @@ async function run() {
|
||||
}
|
||||
|
||||
window.onload = async () => {
|
||||
let img = await fetch("tul_prdel.svg"); // Should already be cached by now (hopefully)
|
||||
tul_prdel = await img.text();
|
||||
let img = await fetch("tul_logo.svg"); // Should already be cached by now (hopefully)
|
||||
tul_logo = await img.text();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user