diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..3fad1b3 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,25 @@ + +Space Token Administration - {% block title %}{% endblock %} + + +
+
+ {% block header %}{% endblock %} +
+ {% for message in get_flashed_messages() %} +
{{ message }}
+ {% endfor %} + {% block content %}{% endblock %} +
\ No newline at end of file diff --git a/templates/edit.html b/templates/edit.html index 39ae520..780feff 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -1,22 +1,11 @@ - - - - - Token editieren - +{% extends 'base.html' %} +{% block header %} + {% block title %}

Token editieren

{% endblock %} - - -{% with messages = get_flashed_messages() %} - {% if messages %} - - {% endif %} -{% endwith %} -
+{% endblock %} + +{% block content %} +

Token {{ token }} editieren:

@@ -55,8 +44,7 @@ -
- +
- \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index e94c865..5d0ab7b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,11 +1,9 @@ - - - - - Space Zugangsverwaltung - - -

Space Zugangsverwaltung

+{% extends 'base.html' %} +{% block header %} + {% block title %}

Space Zugangsverwaltung

{% endblock %} +{% endblock %} + +{% block content %} Zustand der Tür: {% if door_state == 'closed' %}
@@ -18,12 +16,4 @@ Zustand der Tür: {% endif %}
Position Drehgeber: {{ encoder_position }} -

- Übersicht Tokens -

-

- Token registrieren -

- - - \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/templates/register.html b/templates/register.html index 1946540..80a262a 100644 --- a/templates/register.html +++ b/templates/register.html @@ -1,23 +1,12 @@ - - - - - Tokens registrieren - +{% extends 'base.html' %} +{% block header %} + {% block title %}

Token Registrierung

{% endblock %} - - -{% with messages = get_flashed_messages() %} - {% if messages %} - - {% endif %} -{% endwith %} -{% if token is not none %} - Letzter unregistrierter Token: {{ token['token'] }}
+{% endblock %} + +{% block content %} +{% if not token.vars %} + Letzter gelesener unregistrierter Token: {{ token['token'] }}
Gelesen: {{ token['timestamp']}}
@@ -62,9 +51,8 @@
{% else %} - Keine unregistrierten Tokens in Logfile gefunden. Bitte Token scannen und die Seite neu laden. + Keine unregistrierten Tokens in MQTT Nachrichten. Bitte Token scannen und die Seite neu laden. {% endif %} - - \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/templates/tokens.html b/templates/tokens.html index 41b4486..8060de6 100644 --- a/templates/tokens.html +++ b/templates/tokens.html @@ -1,21 +1,11 @@ - - - - - Tokens +{% extends 'base.html' %} +{% block header %} + {% block title %}

Token Übersicht

{% endblock %} - - -{% with messages = get_flashed_messages() %} - {% if messages %} - - {% endif %} -{% endwith %} +{% endblock %} + +{% block content %} @@ -50,7 +40,6 @@ {% endfor %}
Token NutzerIn
- - \ No newline at end of file +{% endblock %} \ No newline at end of file