From 9e40022aca399315a01a09278b6c73ae88f0c041 Mon Sep 17 00:00:00 2001 From: jedi Date: Sun, 17 Oct 2021 22:45:49 +0200 Subject: [PATCH] refactor template structure --- .../templates/multimail/aliases.html | 2 +- .../multimail/templates/multimail/base.html | 61 +------- .../templates/multimail/domains.html | 2 +- .../multimail/templates/multimail/edit.html | 2 +- .../multimail/templates/multimail/index.html | 2 +- .../multimail/templates/multimail/login.html | 134 ++++++++---------- .../templates/multimail/mailboxes.html | 2 +- .../multimail/templates/multimail/page.html | 65 +++++++++ 8 files changed, 129 insertions(+), 141 deletions(-) create mode 100644 backend/multimail/templates/multimail/page.html diff --git a/backend/multimail/templates/multimail/aliases.html b/backend/multimail/templates/multimail/aliases.html index c5f8cd6..40f0396 100644 --- a/backend/multimail/templates/multimail/aliases.html +++ b/backend/multimail/templates/multimail/aliases.html @@ -1,4 +1,4 @@ -{% extends 'multimail/base.html' %} +{% extends 'multimail/page.html' %} {% block content %}

Aliases

diff --git a/backend/multimail/templates/multimail/base.html b/backend/multimail/templates/multimail/base.html index c43756d..22c75f6 100644 --- a/backend/multimail/templates/multimail/base.html +++ b/backend/multimail/templates/multimail/base.html @@ -22,65 +22,8 @@ -
- - - - - - -
- - - -
- {% block content %} - {% endblock %} -
-
- - -
- +{% block main %} +{% endblock %} diff --git a/backend/multimail/templates/multimail/domains.html b/backend/multimail/templates/multimail/domains.html index 6bbc39e..1f8a6ee 100644 --- a/backend/multimail/templates/multimail/domains.html +++ b/backend/multimail/templates/multimail/domains.html @@ -1,4 +1,4 @@ -{% extends 'multimail/base.html' %} +{% extends 'multimail/page.html' %} {% block content %}

Domains

diff --git a/backend/multimail/templates/multimail/edit.html b/backend/multimail/templates/multimail/edit.html index d3aa77a..71aec4d 100644 --- a/backend/multimail/templates/multimail/edit.html +++ b/backend/multimail/templates/multimail/edit.html @@ -1,4 +1,4 @@ -{% extends 'multimail/base.html' %} +{% extends 'multimail/page.html' %} {% load bootstrap4 %} {% block content %} diff --git a/backend/multimail/templates/multimail/index.html b/backend/multimail/templates/multimail/index.html index 2578207..16f350c 100644 --- a/backend/multimail/templates/multimail/index.html +++ b/backend/multimail/templates/multimail/index.html @@ -1,4 +1,4 @@ -{% extends 'multimail/base.html' %} +{% extends 'multimail/page.html' %} {% block content %}
diff --git a/backend/multimail/templates/multimail/login.html b/backend/multimail/templates/multimail/login.html index e2cfd8d..98c9ea1 100644 --- a/backend/multimail/templates/multimail/login.html +++ b/backend/multimail/templates/multimail/login.html @@ -1,83 +1,63 @@ -{% load static %} - - +{% extends 'multimail/base.html' %} - +{% block main %} - - - - - - Multimail - - - - - - - - - - - -
-
-
-
-

Sign in

-
- {% if form.non_field_errors %} - - {% endif %} -
{% csrf_token %} -
-
-
- -
- -
- {% if form.username.errors %} -

- {% for error in form.username.errors %} - {{ error|escape }}
+

+
+
+
+

Sign in

+
+ {% if form.non_field_errors %} + -
-
-
- -
- -
- {% if form.password.errors %} -

- {% for error in form.password.errors %} - {{ error|escape }}
- {% endfor %} -

- {% endif %} -
-
- -
- - -
+ +
+ {% endif %} +
{% csrf_token %} +
+
+
+ +
+ +
+ {% if form.username.errors %} +

+ {% for error in form.username.errors %} + {{ error|escape }}
+ {% endfor %} +

+ {% endif %} +
+
+
+
+ +
+ +
+ {% if form.password.errors %} +

+ {% for error in form.password.errors %} + {{ error|escape }}
+ {% endfor %} +

+ {% endif %} +
+
+ +
+ +
+
+
-
- - \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/backend/multimail/templates/multimail/mailboxes.html b/backend/multimail/templates/multimail/mailboxes.html index b2f8b8e..202519b 100644 --- a/backend/multimail/templates/multimail/mailboxes.html +++ b/backend/multimail/templates/multimail/mailboxes.html @@ -1,4 +1,4 @@ -{% extends 'multimail/base.html' %} +{% extends 'multimail/page.html' %} {% block content %}

Mailboxes

diff --git a/backend/multimail/templates/multimail/page.html b/backend/multimail/templates/multimail/page.html new file mode 100644 index 0000000..06b8bd0 --- /dev/null +++ b/backend/multimail/templates/multimail/page.html @@ -0,0 +1,65 @@ +{% extends 'multimail/base.html' %} +{% load static %} + +{% block main %} + +
+ + + + + + +
+ + + +
+ {% block content %} + {% endblock %} +
+
+ + +
+ +{% endblock %} \ No newline at end of file