This commit is contained in:
Emily 2020-02-21 15:51:23 +01:00
commit 9b6ba6df85
3 changed files with 28 additions and 13 deletions

View File

@ -58,9 +58,23 @@
} }
displaylist list > a { displaylist list > a {
border: 2px solid black;
padding: 1em; padding: 1em;
} }
displaylist fallback {
padding: 1em;
}
list:not(:empty) + fallback {
display: none;
}
fallback {
display: grid;
place-content: center;
text-align: center;
}
</style> </style>
{% endblock %} {% endblock %}
@ -68,6 +82,12 @@
<displaylist hidden> <displaylist hidden>
<scrollcontainer> <scrollcontainer>
<list></list> <list></list>
<fallback>
<span>
There is no displays available.<br>
Create new displays in edit mode.
</span>
</fallback>
</scrollcontainer> </scrollcontainer>
</displaylist> </displaylist>
<display></display> <display></display>
@ -78,7 +98,6 @@
socket.on("connect", () => { socket.on("connect", () => {
socket.emit("display", {action: "list"}); socket.emit("display", {action: "list"});
//socket.emit("connect", {data: "ฅ^•ﻌ•^ฅ"});
}); });
socket.on("display", (json) => { socket.on("display", (json) => {
@ -102,8 +121,6 @@
});*/ });*/
function onDisplayList(list) { function onDisplayList(list) {
console.log(list);
function add(item) { function add(item) {
let displayOption = document.createElement("a"); let displayOption = document.createElement("a");
displayOption.innerText = item; displayOption.innerText = item;

View File

@ -10,10 +10,6 @@
socket.emit("display", {action: "list"}, ack = (list) => onDisplayListReceive(list)); socket.emit("display", {action: "list"}, ack = (list) => onDisplayListReceive(list));
}); });
socket.on("msg", (data) => {
console.log(data);
});
function onDisplayListReceive(list) { function onDisplayListReceive(list) {
clearDisplayList(); clearDisplayList();

View File

@ -4,6 +4,7 @@
<style> <style>
body { body {
font-size: 5vw; font-size: 5vw;
color: #EAEAEA;
} }
main { main {
@ -19,22 +20,23 @@
place-content: center; place-content: center;
place-items: center; place-items: center;
border: 2px solid black; border: 2px solid #333;
color: white; color: #919191;
text-decoration: none; text-decoration: none;
background-color: transparent; background-color: transparent;
transition: .2s ease background-color; transition: .2s ease background-color, .2s ease color;
} }
main a:hover, main a:focus { main a:hover, main a:focus {
background-color: #333; background-color: #000;
color: #EAEAEA;
} }
main a:active { main a:active {
background-color: #555; background-color: #333;
} }
</style> </style>
{% endblock %} {% endblock %}