Fallback msg

This commit is contained in:
Emily 2019-12-26 19:54:46 +01:00
parent 1c807c2af4
commit ffe93407c4

View File

@ -52,6 +52,21 @@
border: 2px solid black;
padding: 1em;
}
displaylist fallback {
padding: 1em;
}
list:not(:empty) + fallback {
display: none;
}
fallback {
display: grid;
place-content: center;
text-align: center;
}
</style>
{% endblock %}
@ -59,6 +74,12 @@
<displaylist hidden>
<scrollcontainer>
<list></list>
<fallback>
<span>
There is no displays available.<br>
Create new displays in edit mode.
</span>
</fallback>
</scrollcontainer>
</displaylist>
<display></display>
@ -105,9 +126,6 @@
for (item in list) {
add(item);
}
add("+");
add("+");
add("+");
displayList.hidden = false;
}