# HG changeset patch # User Goffi # Date 1606476243 -3600 # Node ID 1de599c5a68f3a90260f11aba2f6fcf5898a6772 # Parent a587d664f62ccc89b4a4ad729d8da62a2436d6da bulma (base): loading screen: when the `loading_screen` variable is set before extending `base/base.html`, a loading modal is shown (and must be removed via JavaScript). This avoids the user to try to use an interface which is not reactive or working normally because JS is not fully loaded yet. diff -r a587d664f62c -r 1de599c5a68f sat_templates/templates/bulma/base/base.html --- a/sat_templates/templates/bulma/base/base.html Fri Nov 27 12:15:39 2020 +0100 +++ b/sat_templates/templates/bulma/base/base.html Fri Nov 27 12:24:03 2020 +0100 @@ -76,6 +76,19 @@ {% if atom_url is defined %} {{ icon_defs('feed') }} {% endif %} + {% if loading_screen %} + + {% endif %} {% if main_menu %} {% block main_menu %} {{ component.menu(main_menu, class="main_menu") }} diff -r a587d664f62c -r 1de599c5a68f sat_templates/templates/bulma/photo/album.html --- a/sat_templates/templates/bulma/photo/album.html Fri Nov 27 12:15:39 2020 +0100 +++ b/sat_templates/templates/bulma/photo/album.html Fri Nov 27 12:24:03 2020 +0100 @@ -1,5 +1,6 @@ {# FIXME: Q&D way to add a CSS from node_modules, it should be imported directly with the python module #} {{ css_files.append(build_path+"node_modules/swiper/swiper-bundle.min.css") or "" }} +{% set loading_screen = true %} {% extends 'base/base.html' %} {% import 'components/avatar.html' as avatar with context %} {% import 'input/textbox.html' as textbox with context %} diff -r a587d664f62c -r 1de599c5a68f sat_templates/templates/bulma/static/styles_noscript.css --- a/sat_templates/templates/bulma/static/styles_noscript.css Fri Nov 27 12:15:39 2020 +0100 +++ b/sat_templates/templates/bulma/static/styles_noscript.css Fri Nov 27 12:24:03 2020 +0100 @@ -1,3 +1,9 @@ + +#loading_screen { + /* Loading screen doesn't make sense without JS, and must never be displayed */ + display: none; +} + /********** * Panels * **********/