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; 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 %}
@ -59,6 +74,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>
@ -105,9 +126,6 @@
for (item in list) { for (item in list) {
add(item); add(item);
} }
add("+");
add("+");
add("+");
displayList.hidden = false; displayList.hidden = false;
} }