Browse Source

changed macro for horizontal white space

master
Holger Frey 7 years ago
parent
commit
c5180a6c57
  1. 4
      ordr2/static/style.css
  2. 7
      ordr2/templates/account/forgot_password_email.jinja2
  3. 8
      ordr2/templates/account/forgot_password_form.jinja2
  4. 21
      ordr2/templates/account/login.jinja2
  5. 9
      ordr2/templates/account/register.jinja2
  6. 7
      ordr2/templates/account/registration_completed.jinja2
  7. 8
      ordr2/templates/account/registration_confirmation.jinja2
  8. 8
      ordr2/templates/account/reset_password.jinja2
  9. 9
      ordr2/templates/layout.jinja2
  10. 15
      ordr2/templates/macros.jinja2
  11. 4
      ordr2/templates/pages/faq.jinja2
  12. 4
      ordr2/templates/pages/welcome.jinja2

4
ordr2/static/style.css

@ -43,3 +43,7 @@ main h1 {
.form-group.has-error .form-text:nth-of-type(1) { .form-group.has-error .form-text:nth-of-type(1) {
color: #e32 !important; color: #e32 !important;
} }
.form-group.has-error .form-text:nth-of-type(2) {
margin-top: -20px;
}

7
ordr2/templates/account/forgot_password_email.jinja2

@ -3,13 +3,10 @@
{% block title %} Ordr | Forgotten Password {% endblock title %} {% block title %} Ordr | Forgotten Password {% endblock title %}
{% block content %} {% block content %}
<div class="row">
<div class="col-6">
<h1>Password Reset Link</h1> <h1>Password Reset Link</h1>
<p>To reset your password, an email has been sent to you.</p> <p>To reset your password, an email has been sent to you.</p>
<p>Please follow the link in the email to set a new password.</p> <p>Please follow the link in the email to set a new password.</p>
</div>
</div> {{ macros.white_space_column('col-6') }}
{{ macros.center_column_hack() }}
{% endblock content %} {% endblock content %}

8
ordr2/templates/account/forgot_password_form.jinja2

@ -3,8 +3,6 @@
{% block title %} Ordr | Forgotten Password {% endblock title %} {% block title %} Ordr | Forgotten Password {% endblock title %}
{% block content %} {% block content %}
<div class="row">
<div class="col-6">
<h1>Forgotten password?</h1> <h1>Forgotten password?</h1>
<form action="{{ request.resource_url(request.root, 'account', 'forgot-password') }}" method="POST" id="forgotten-password-form" class="form"> <form action="{{ request.resource_url(request.root, 'account', 'forgot-password') }}" method="POST" id="forgotten-password-form" class="form">
<input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}"> <input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}">
@ -17,8 +15,8 @@
<button type="submit" name="cancel" class="btn btn-sm btn-secondary">Cancel</button> <button type="submit" name="cancel" class="btn btn-sm btn-secondary">Cancel</button>
</div> </div>
</form> </form>
</div>
</div> {{ macros.white_space_column('col-6') }}
{{ macros.center_column_hack() }}
{% endblock content %} {% endblock content %}

21
ordr2/templates/account/login.jinja2

@ -8,21 +8,21 @@
<form action="{{ request.resource_url(request.root, 'account', 'login') }}" method="POST" id="login-form"> <form action="{{ request.resource_url(request.root, 'account', 'login') }}" method="POST" id="login-form">
<input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}"> <input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}">
<div class="form-group row"> <div class="form-group">
<label for="username" class="col-2">Username</label> <label for="username" class="control-label">Username</label>
<div class="col-6"> <div>
<input name="username" id="username" type="text" class="form-control"> <input name="username" id="username" type="text" class="form-control">
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group">
<label for="password" class="col-2">Password</label> <label for="password" class="control-label">Password</label>
<div class="col-6"> <div>
<input name="password" id="password>" type="password" class="form-control"> <input name="password" id="password>" type="password" class="form-control">
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group">
<div class="col-2"></div> <div></div>
<div class="col-6"> <div>
<button type="submit" class="btn btn-sm btn-primary">Log in</button> <button type="submit" class="btn btn-sm btn-primary">Log in</button>
</div> </div>
</div> </div>
@ -31,6 +31,7 @@
<p> <p>
If you forgot your password you can <a href="{{ request.resource_url(context, 'forgot-password') }}">reset it</a>. If you forgot your password you can <a href="{{ request.resource_url(context, 'forgot-password') }}">reset it</a>.
</p> </p>
{{ macros.center_column_hack() }}
{{ macros.white_space_column('col-6') }}
{% endblock content %} {% endblock content %}

9
ordr2/templates/account/register.jinja2

@ -3,12 +3,11 @@
{% block title %} Ordr | Account Registration {% endblock title %} {% block title %} Ordr | Account Registration {% endblock title %}
{% block content %} {% block content %}
<div class="row">
<div class="col-6">
<h1>Account Registration</h1> <h1>Account Registration</h1>
{{ form.render()|safe }} {{ form.render()|safe }}
</div>
</div> {{ macros.white_space_column('col-6') }}
{{ macros.center_column_hack() }}
{% endblock content %} {% endblock content %}

7
ordr2/templates/account/registration_completed.jinja2

@ -3,14 +3,11 @@
{% block title %} Ordr | Account Registration {% endblock title %} {% block title %} Ordr | Account Registration {% endblock title %}
{% block content %} {% block content %}
<div class="row">
<div class="col-6">
<h1>Account Registration Completed</h1> <h1>Account Registration Completed</h1>
<p>Thank you for verifying your email address.</p> <p>Thank you for verifying your email address.</p>
<p>Before you can start ordering, an administrator must activate your account</p> <p>Before you can start ordering, an administrator must activate your account</p>
<p>You'll receive an email when your account is activated</p> <p>You'll receive an email when your account is activated</p>
</div>
</div> {{ macros.white_space_column('col-6') }}
{{ macros.center_column_hack() }}
{% endblock content %} {% endblock content %}

8
ordr2/templates/account/registration_confirmation.jinja2

@ -3,13 +3,11 @@
{% block title %} Ordr | Account Registration {% endblock title %} {% block title %} Ordr | Account Registration {% endblock title %}
{% block content %} {% block content %}
<div class="row">
<div class="col-6">
<h1>Verify Your Email Address</h1> <h1>Verify Your Email Address</h1>
<p>To complete the registration process an email has been sent to you.</p> <p>To complete the registration process an email has been sent to you.</p>
<p>Please follow the link in the email to verify your address and complete the registration process</p> <p>Please follow the link in the email to verify your address and complete the registration process</p>
</div>
</div> {{ macros.white_space_column('col-6') }}
{{ macros.center_column_hack() }}
{% endblock content %} {% endblock content %}

8
ordr2/templates/account/reset_password.jinja2

@ -3,12 +3,10 @@
{% block title %} Ordr | Reset Password {% endblock title %} {% block title %} Ordr | Reset Password {% endblock title %}
{% block content %} {% block content %}
<div class="row">
<div class="col-6">
<h1>Reset Your Password</h1> <h1>Reset Your Password</h1>
{{ form.render()|safe }} {{ form.render()|safe }}
</div>
</div> {{ macros.white_space_column('col-6') }}
{{ macros.center_column_hack() }}
{% endblock content %} {% endblock content %}

9
ordr2/templates/layout.jinja2

@ -85,7 +85,14 @@
{% block sidebar %} {% endblock sidebar %} {% block sidebar %} {% endblock sidebar %}
</div> </div>
<div class="col"> <div class="col">
{{ 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 %}
<div class="alert alert-{{ css_class }} role="alert">
{{message|safe}}
</div>
{% endfor %}
{% endfor %}
{% block content %} {% block content %}
<p>No content</p> <p>No content</p>

15
ordr2/templates/macros.jinja2

@ -1,14 +1,3 @@
{% macro flash_messages() -%} {% macro white_space_column(size='col-2') -%}
{% for queue in ('ok', 'warning', 'error') %} </div><div class="{{ size }}">
{% for message in request.session.pop_flash(queue) %}
{% set css_class = 'danger' if queue == 'error' else queue %}
<div class="alert alert-{{ css_class }} role="alert">
{{message|safe}}
</div>
{% endfor %}
{% endfor %}
{%- endmacro %}
{% macro center_column_hack() -%}
</div><div class="col-2"></div>
{%- endmacro %} {%- endmacro %}

4
ordr2/templates/pages/faq.jinja2

@ -68,5 +68,7 @@
</section> </section>
</div> </div>
</div> </div>
{{ macros.center_column_hack() }}
{{ macros.white_space_column() }}
{% endblock content %} {% endblock content %}

4
ordr2/templates/pages/welcome.jinja2

@ -25,5 +25,7 @@
<p>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.</p> <p>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.</p>
</div> </div>
</div> </div>
{{ macros.center_column_hack() }}
{{ macros.white_space_column() }}
{% endblock content %} {% endblock content %}