Browse Source

changed macro for horizontal white space

master
Holger Frey 7 years ago
parent
commit
c5180a6c57
  1. 4
      ordr2/static/style.css
  2. 13
      ordr2/templates/account/forgot_password_email.jinja2
  3. 30
      ordr2/templates/account/forgot_password_form.jinja2
  4. 49
      ordr2/templates/account/login.jinja2
  5. 13
      ordr2/templates/account/register.jinja2
  6. 15
      ordr2/templates/account/registration_completed.jinja2
  7. 14
      ordr2/templates/account/registration_confirmation.jinja2
  8. 12
      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;
}

13
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"> <h1>Password Reset Link</h1>
<div class="col-6"> <p>To reset your password, an email has been sent to you.</p>
<h1>Password Reset Link</h1> <p>Please follow the link in the email to set a new password.</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> {{ macros.white_space_column('col-6') }}
</div>
</div>
{{ macros.center_column_hack() }}
{% endblock content %} {% endblock content %}

30
ordr2/templates/account/forgot_password_form.jinja2

@ -3,22 +3,20 @@
{% block title %} Ordr | Forgotten Password {% endblock title %} {% block title %} Ordr | Forgotten Password {% endblock title %}
{% block content %} {% block content %}
<div class="row"> <h1>Forgotten password?</h1>
<div class="col-6"> <form action="{{ request.resource_url(request.root, 'account', 'forgot-password') }}" method="POST" id="forgotten-password-form" class="form">
<h1>Forgotten password?</h1> <input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}">
<form action="{{ request.resource_url(request.root, 'account', 'forgot-password') }}" method="POST" id="forgotten-password-form" class="form"> <div class="form-group">
<input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}"> <label for="username_or_email" class="form-control-label">Username or Email:</label>
<div class="form-group"> <input name="username_or_email" id="username_or_email" type="text" class="form-control">
<label for="username_or_email" class="form-control-label">Username or Email:</label>
<input name="username_or_email" id="username_or_email" type="text" class="form-control">
</div>
<div class="form-group">
<button type="submit" name="submit" class="btn btn-sm btn-primary">Reset Password</button>
<button type="submit" name="cancel" class="btn btn-sm btn-secondary">Cancel</button>
</div>
</form>
</div> </div>
</div> <div class="form-group">
{{ macros.center_column_hack() }} <button type="submit" name="submit" class="btn btn-sm btn-primary">Reset Password</button>
<button type="submit" name="cancel" class="btn btn-sm btn-secondary">Cancel</button>
</div>
</form>
{{ macros.white_space_column('col-6') }}
{% endblock content %} {% endblock content %}

49
ordr2/templates/account/login.jinja2

@ -3,34 +3,35 @@
{% block title %} Ordr | Login Failed {% endblock title %} {% block title %} Ordr | Login Failed {% endblock title %}
{% block content %} {% block content %}
<h1>Try again…</h1> <h1>Try again…</h1>
<p class="alert alert-danger">You entered the wrong username or password.</p> <p class="alert alert-danger">You entered the wrong username or password.</p>
<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 class="form-group row"> </div>
<label for="password" class="col-2">Password</label> <div class="form-group">
<div class="col-6"> <label for="password" class="control-label">Password</label>
<input name="password" id="password>" type="password" class="form-control"> <div>
</div> <input name="password" id="password>" type="password" class="form-control">
</div> </div>
<div class="form-group row"> </div>
<div class="col-2"></div> <div class="form-group">
<div class="col-6"> <div></div>
<button type="submit" class="btn btn-sm btn-primary">Log in</button> <div>
</div> <button type="submit" class="btn btn-sm btn-primary">Log in</button>
</div> </div>
</form> </div>
</form>
<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 %}

13
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> {{ macros.white_space_column('col-6') }}
</div>
{{ macros.center_column_hack() }}
{% endblock content %} {% endblock content %}

15
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"> <h1>Account Registration Completed</h1>
<div class="col-6"> <p>Thank you for verifying your email address.</p>
<h1>Account Registration Completed</h1> <p>Before you can start ordering, an administrator must activate your account</p>
<p>Thank you for verifying your email address.</p> <p>You'll receive an email when your account is activated</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> {{ macros.white_space_column('col-6') }}
</div>
</div>
{{ macros.center_column_hack() }}
{% endblock content %} {% endblock content %}

14
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> {{ macros.white_space_column('col-6') }}
</div>
{{ macros.center_column_hack() }}
{% endblock content %} {% endblock content %}

12
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> {{ macros.white_space_column('col-6') }}
</div>
{{ 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 %}