Skip to content
Snippets Groups Projects
Commit 3de419d1 authored by Julian's avatar Julian
Browse files

Show maintenance message on splash screen

parent a77d523c
No related branches found
No related tags found
1 merge request!1154Resolve "Verify maintenance mode with GraphQL / reimplement maintenance mode handling"
......@@ -199,6 +199,7 @@ TEMPLATES = [
"maintenance_mode.context_processors.maintenance_mode",
"dynamic_preferences.processors.global_preferences",
"aleksis.core.util.core_helpers.custom_information_processor",
"aleksis.core.util.context_processors.need_maintenance_response_context_processor",
],
},
},
......
......@@ -12,13 +12,23 @@
This webbrowser doesn't support JavaScript, or its execution is blocked. Please use another browser to continue.
{% endblocktrans %}
</noscript>
{% if need_maintenance_response %}
<p>
{% blocktrans %}
The maintenance mode is currently enabled. Please try again later.
{% endblocktrans %}
</p>
{% endif %}
</div>
{% if not need_maintenance_response %}
<div class="lds-ellipsis">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
{% endif %}
<style>
#logo {
......@@ -36,7 +46,7 @@
max-height: calc(100vh - 10vh - calc(2 * min(85px, 15vh)));
}
noscript {
noscript, p {
font-family: Roboto, sans-serif;
font-weight: 400;
}
......
from maintenance_mode.http import need_maintenance_response
def need_maintenance_response_context_processor(request):
return {"need_maintenance_response": need_maintenance_response(request)}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment