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. 35
      frontend/src/Editor.svelte

13
frontend/public/editor.html

@ -4,7 +4,7 @@
<meta charset='utf-8'> <meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'> <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'> <link rel='icon' type='image/png' href='/favicon.png'>
<style> <style>
@ -18,6 +18,17 @@
box-sizing: border-box; box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; 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> </style>
<link rel='stylesheet' href='/build/editor.css'> <link rel='stylesheet' href='/build/editor.css'>

2
frontend/public/grafik.html

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

35
frontend/src/Editor.svelte

@ -197,23 +197,25 @@
requires: [], requires: [],
position: [0, 0], position: [0, 0],
title: t.name, title: t.name,
points: t.points! points: t.points!,
})); }));
tasks.tasks = [...tasks.tasks, ...newDescriptors]; tasks.tasks = [...tasks.tasks, ...newDescriptors];
} }
async function loadMaxPoints() { async function loadMaxPoints() {
const loadedTasks = await Promise.all(tasks.tasks.map(async t => { const loadedTasks = await Promise.all(
tasks.tasks.map(async (t) => {
if (t.type != "open-data") { if (t.type != "open-data") {
return t return t;
} }
const a = await grabAssignment(t.taskReference) const a = await grabAssignment(t.taskReference);
return { ...t, points: a.points! } return { ...t, points: a.points! };
})) })
);
tasks = { ...tasks, tasks: loadedTasks } tasks = { ...tasks, tasks: loadedTasks };
alert("Načteno :)") alert("Načteno :)");
} }
function hideSelection() { function hideSelection() {
@ -233,8 +235,6 @@
<style> <style>
.container { .container {
/*display: flex;*/
/* flex-direction: row;*/
margin: 0; margin: 0;
height: 99vh; height: 99vh;
width: 100%; width: 100%;
@ -275,13 +275,25 @@
padding: 5px; padding: 5px;
} }
label {
display: block;
}
input:disabled {
color: #ccc;
}
button { button {
font-family: inherit;
font-size: inherit;
padding: 0.4em;
margin: 0 0 0.5em 0;
width: 45%; width: 45%;
border-radius: 0.5em; border-radius: 0.5em;
border: 2px solid white; border: 2px solid white;
background-color: transparent; background-color: transparent;
color: white; color: white;
transition: auto; transition: auto;
box-sizing: border-box;
} }
button:hover:not(:disabled) { button:hover:not(:disabled) {
@ -393,8 +405,7 @@
</button> </button>
<button <button
on:click={loadMaxPoints} 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ů Aktualizovat počty bodů
</button> </button>
</div> </div>