Browse Source

html: fixed some global issues with previously removed CSS

mj-deploy
Vašek Šraier 4 years ago
parent
commit
1097de13bb
  1. 13
      frontend/public/editor.html
  2. 2
      frontend/public/grafik.html
  3. 41
      frontend/src/Editor.svelte

13
frontend/public/editor.html

@ -4,7 +4,7 @@
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>Editor úloh</title>
<title>KSP kurz | Editor</title>
<link rel='icon' type='image/png' href='/favicon.png'>
<style>
@ -18,6 +18,17 @@
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
a {
color: rgb(0,100,200);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:visited {
color: rgb(0,80,160);
}
</style>
<link rel='stylesheet' href='/build/editor.css'>

2
frontend/public/grafik.html

@ -4,7 +4,7 @@
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>Graulohík</title>
<title>KSP kurz</title>
<style>
html, body {
height: 100%;

41
frontend/src/Editor.svelte

@ -197,23 +197,25 @@
requires: [],
position: [0, 0],
title: t.name,
points: t.points!
points: t.points!,
}));
tasks.tasks = [...tasks.tasks, ...newDescriptors];
}
async function loadMaxPoints() {
const loadedTasks = await Promise.all(tasks.tasks.map(async t => {
if (t.type != "open-data") {
return t
}
const a = await grabAssignment(t.taskReference)
return { ...t, points: a.points! }
}))
const loadedTasks = await Promise.all(
tasks.tasks.map(async (t) => {
if (t.type != "open-data") {
return t;
}
const a = await grabAssignment(t.taskReference);
return { ...t, points: a.points! };
})
);
tasks = { ...tasks, tasks: loadedTasks }
tasks = { ...tasks, tasks: loadedTasks };
alert("Načteno :)")
alert("Načteno :)");
}
function hideSelection() {
@ -233,8 +235,6 @@
<style>
.container {
/*display: flex;*/
/* flex-direction: row;*/
margin: 0;
height: 99vh;
width: 100%;
@ -275,13 +275,25 @@
padding: 5px;
}
label {
display: block;
}
input:disabled {
color: #ccc;
}
button {
font-family: inherit;
font-size: inherit;
padding: 0.4em;
margin: 0 0 0.5em 0;
width: 45%;
border-radius: 0.5em;
border: 2px solid white;
background-color: transparent;
color: white;
transition: auto;
box-sizing: border-box;
}
button:hover:not(:disabled) {
@ -389,12 +401,11 @@
on:click={loadYear}
disabled={!isLoggedIn()}
title={isLoggedIn() ? 'Nahraje všechny úlohy z jednoho ročníku, které tu ještě nejsou' : 'Je nutné být přihlášený a na stránce v KSP template.'}>
Nahrát celý ročník
Nahrát celý ročník
</button>
<button
on:click={loadMaxPoints}
title="Stáhne ke každé úloze maximální počet bodů"
>
title="Stáhne ke každé úloze maximální počet bodů">
Aktualizovat počty bodů
</button>
</div>