From c5180a6c57c3ace8003e3d31694a899e52350179 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Tue, 24 Oct 2017 13:38:45 +0200 Subject: [PATCH] changed macro for horizontal white space --- ordr2/static/style.css | 4 ++ .../account/forgot_password_email.jinja2 | 13 ++--- .../account/forgot_password_form.jinja2 | 30 ++++++------ ordr2/templates/account/login.jinja2 | 49 ++++++++++--------- ordr2/templates/account/register.jinja2 | 13 +++-- .../account/registration_completed.jinja2 | 15 +++--- .../account/registration_confirmation.jinja2 | 14 +++--- ordr2/templates/account/reset_password.jinja2 | 12 ++--- ordr2/templates/layout.jinja2 | 9 +++- ordr2/templates/macros.jinja2 | 15 +----- ordr2/templates/pages/faq.jinja2 | 4 +- ordr2/templates/pages/welcome.jinja2 | 4 +- 12 files changed, 87 insertions(+), 95 deletions(-) diff --git a/ordr2/static/style.css b/ordr2/static/style.css index 1da274d..6b07e77 100644 --- a/ordr2/static/style.css +++ b/ordr2/static/style.css @@ -43,3 +43,7 @@ main h1 { .form-group.has-error .form-text:nth-of-type(1) { color: #e32 !important; } + +.form-group.has-error .form-text:nth-of-type(2) { + margin-top: -20px; +} diff --git a/ordr2/templates/account/forgot_password_email.jinja2 b/ordr2/templates/account/forgot_password_email.jinja2 index 6d8697e..1b43ee5 100644 --- a/ordr2/templates/account/forgot_password_email.jinja2 +++ b/ordr2/templates/account/forgot_password_email.jinja2 @@ -3,13 +3,10 @@ {% block title %} Ordr | Forgotten Password {% endblock title %} {% block content %} -
-
-

Password Reset Link

-

To reset your password, an email has been sent to you.

-

Please follow the link in the email to set a new password.

-
-
- {{ macros.center_column_hack() }} +

Password Reset Link

+

To reset your password, an email has been sent to you.

+

Please follow the link in the email to set a new password.

+ + {{ macros.white_space_column('col-6') }} {% endblock content %} diff --git a/ordr2/templates/account/forgot_password_form.jinja2 b/ordr2/templates/account/forgot_password_form.jinja2 index 77685a5..5ec26b9 100644 --- a/ordr2/templates/account/forgot_password_form.jinja2 +++ b/ordr2/templates/account/forgot_password_form.jinja2 @@ -3,22 +3,20 @@ {% block title %} Ordr | Forgotten Password {% endblock title %} {% block content %} -
-
-

Forgotten password?

-
- -
- - -
-
- - -
-
+

Forgotten password?

+
+ +
+ +
-
- {{ macros.center_column_hack() }} +
+ + +
+ + + {{ macros.white_space_column('col-6') }} + {% endblock content %} diff --git a/ordr2/templates/account/login.jinja2 b/ordr2/templates/account/login.jinja2 index dfb0481..018d7fb 100644 --- a/ordr2/templates/account/login.jinja2 +++ b/ordr2/templates/account/login.jinja2 @@ -3,34 +3,35 @@ {% block title %} Ordr | Login Failed {% endblock title %} {% block content %} -

Try again…

-

You entered the wrong username or password.

+

Try again…

+

You entered the wrong username or password.

-
- -
- -
- -
+ + +
+ +
+
-
- -
- -
+
+
+ +
+
-
-
-
- -
+
+
+
+
+
- +
+ -

- If you forgot your password you can reset it. -

- {{ macros.center_column_hack() }} +

+ If you forgot your password you can reset it. +

+ + {{ macros.white_space_column('col-6') }} {% endblock content %} diff --git a/ordr2/templates/account/register.jinja2 b/ordr2/templates/account/register.jinja2 index e619217..0444b2f 100644 --- a/ordr2/templates/account/register.jinja2 +++ b/ordr2/templates/account/register.jinja2 @@ -3,12 +3,11 @@ {% block title %} Ordr | Account Registration {% endblock title %} {% block content %} -
-
-

Account Registration

- {{ form.render()|safe }} -
-
- {{ macros.center_column_hack() }} + +

Account Registration

+ {{ form.render()|safe }} + + {{ macros.white_space_column('col-6') }} + {% endblock content %} diff --git a/ordr2/templates/account/registration_completed.jinja2 b/ordr2/templates/account/registration_completed.jinja2 index fb0d4ea..28bbe28 100644 --- a/ordr2/templates/account/registration_completed.jinja2 +++ b/ordr2/templates/account/registration_completed.jinja2 @@ -3,14 +3,11 @@ {% block title %} Ordr | Account Registration {% endblock title %} {% block content %} -
-
-

Account Registration Completed

-

Thank you for verifying your email address.

-

Before you can start ordering, an administrator must activate your account

-

You'll receive an email when your account is activated

-
-
- {{ macros.center_column_hack() }} +

Account Registration Completed

+

Thank you for verifying your email address.

+

Before you can start ordering, an administrator must activate your account

+

You'll receive an email when your account is activated

+ + {{ macros.white_space_column('col-6') }} {% endblock content %} diff --git a/ordr2/templates/account/registration_confirmation.jinja2 b/ordr2/templates/account/registration_confirmation.jinja2 index 6c043ff..b0fe485 100644 --- a/ordr2/templates/account/registration_confirmation.jinja2 +++ b/ordr2/templates/account/registration_confirmation.jinja2 @@ -3,13 +3,11 @@ {% block title %} Ordr | Account Registration {% endblock title %} {% block content %} -
-
-

Verify Your Email Address

-

To complete the registration process an email has been sent to you.

-

Please follow the link in the email to verify your address and complete the registration process

-
-
- {{ macros.center_column_hack() }} + +

Verify Your Email Address

+

To complete the registration process an email has been sent to you.

+

Please follow the link in the email to verify your address and complete the registration process

+ + {{ macros.white_space_column('col-6') }} {% endblock content %} diff --git a/ordr2/templates/account/reset_password.jinja2 b/ordr2/templates/account/reset_password.jinja2 index afd8d0d..5b9ecdc 100644 --- a/ordr2/templates/account/reset_password.jinja2 +++ b/ordr2/templates/account/reset_password.jinja2 @@ -3,12 +3,10 @@ {% block title %} Ordr | Reset Password {% endblock title %} {% block content %} -
-
-

Reset Your Password

- {{ form.render()|safe }} -
-
- {{ macros.center_column_hack() }} + +

Reset Your Password

+ {{ form.render()|safe }} + + {{ macros.white_space_column('col-6') }} {% endblock content %} diff --git a/ordr2/templates/layout.jinja2 b/ordr2/templates/layout.jinja2 index b6910c5..94feda7 100644 --- a/ordr2/templates/layout.jinja2 +++ b/ordr2/templates/layout.jinja2 @@ -85,7 +85,14 @@ {% block sidebar %} {% endblock sidebar %}
- {{ macros.flash_messages() }} + {% for queue in ('ok', 'warning', 'error') %} + {% for message in request.session.pop_flash(queue) %} + {% set css_class = 'danger' if queue == 'error' else queue %} +
+ {{message|safe}} +
+ {% endfor %} + {% endfor %} {% block content %}

No content

diff --git a/ordr2/templates/macros.jinja2 b/ordr2/templates/macros.jinja2 index 05ee087..5d595cb 100644 --- a/ordr2/templates/macros.jinja2 +++ b/ordr2/templates/macros.jinja2 @@ -1,14 +1,3 @@ -{% macro flash_messages() -%} - {% for queue in ('ok', 'warning', 'error') %} - {% for message in request.session.pop_flash(queue) %} - {% set css_class = 'danger' if queue == 'error' else queue %} -
- {{message|safe}} -
- {% endfor %} - {% endfor %} -{%- endmacro %} - -{% macro center_column_hack() -%} -
+{% macro white_space_column(size='col-2') -%} +
{%- endmacro %} diff --git a/ordr2/templates/pages/faq.jinja2 b/ordr2/templates/pages/faq.jinja2 index 01a5be0..2186a6b 100644 --- a/ordr2/templates/pages/faq.jinja2 +++ b/ordr2/templates/pages/faq.jinja2 @@ -68,5 +68,7 @@
- {{ macros.center_column_hack() }} + + {{ macros.white_space_column() }} + {% endblock content %} diff --git a/ordr2/templates/pages/welcome.jinja2 b/ordr2/templates/pages/welcome.jinja2 index 64edf4b..1f3c030 100644 --- a/ordr2/templates/pages/welcome.jinja2 +++ b/ordr2/templates/pages/welcome.jinja2 @@ -25,5 +25,7 @@

As soons as your purchase has arrived you will automatically get notified. Or you can use the orders overview to check what the working status is.

- {{ macros.center_column_hack() }} + + {{ macros.white_space_column() }} + {% endblock content %}