From ce1fe100a2dc0aa0baada3c8f214d787333148ea Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 18 Mar 2019 16:16:58 +0000 Subject: use bootstrap --- app/templates/404.html | 2 +- app/templates/500.html | 2 +- app/templates/base.html | 59 ++++++++++++++++++++----------- app/templates/index.html | 2 +- app/templates/login.html | 2 +- app/templates/register.html | 42 +++++----------------- app/templates/reset_password.html | 28 +++++---------- app/templates/reset_password_request.html | 20 +++++------ 8 files changed, 67 insertions(+), 90 deletions(-) (limited to 'app/templates') diff --git a/app/templates/404.html b/app/templates/404.html index 7dde47e..51295c4 100644 --- a/app/templates/404.html +++ b/app/templates/404.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block content %} +{% block app_content %}

Page Not Found

Home

{% endblock %} diff --git a/app/templates/500.html b/app/templates/500.html index ca8830c..adda72b 100644 --- a/app/templates/500.html +++ b/app/templates/500.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block content %} +{% block app_content %}

An unexpected error has occurred

The administrator has been notified, apologies for the inconvenience.

Home

diff --git a/app/templates/base.html b/app/templates/base.html index 3070587..ee03e3d 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -1,21 +1,39 @@ - - - {% if title %} - {{ title }} - Annotate Change - {% else %} - Welcome to Annotate Change - {% endif %} - - -
Annotate Change: - Home - {% if current_user.is_anonymous %} - Login - {% else %} - Logout - {% endif %} +{% extends 'bootstrap/base.html' %} + +{% block title %} + {% if title %}{{ title }} -- AnnotateChange{% else %}Welcome to AnnotateChange{% endif %} +{% endblock %} + +{% block navbar %} + +{% endblock %} + +{% block content %} +
{% with messages = get_flashed_messages() %} {% if messages %}
    @@ -25,7 +43,8 @@
{% endif %} {% endwith %} - {% block content %} + + {% block app_content %} {% endblock %} - - +
+{% endblock %} diff --git a/app/templates/index.html b/app/templates/index.html index 3cf36ee..7c6793a 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block content %} +{% block app_content %}

Hi, {{ current_user.username }}!

{% endblock %} diff --git a/app/templates/login.html b/app/templates/login.html index 4d5181b..9b862f6 100644 --- a/app/templates/login.html +++ b/app/templates/login.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block content %} +{% block app_content %}

Sign In

{{ form.hidden_tag() }} diff --git a/app/templates/register.html b/app/templates/register.html index 487b860..c430b38 100644 --- a/app/templates/register.html +++ b/app/templates/register.html @@ -1,37 +1,11 @@ {% extends "base.html" %} +{% import 'bootstrap/wtf.html' as wtf %} -{% block content %} -

Register

- - {{ form.hidden_tag() }} -

- {{ form.username.label }}
- {{ form.username(size=32) }}
- {% for error in form.username.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form.email.label }}
- {{ form.email(size=64) }}
- {% for error in form.email.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form.password.label }}
- {{ form.password(size=32) }}
- {% for error in form.password.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form.password2.label }}
- {{ form.password2(size=32) }}
- {% for error in form.password2.errors %} - [{{ error }}] - {% endfor %} -

-

{{ form.submit() }}

-
+{% block app_content %} +

Register

+
+
+ {{ wtf.quick_form(form) }} +
+
{% endblock %} diff --git a/app/templates/reset_password.html b/app/templates/reset_password.html index da3aa95..cab00c9 100644 --- a/app/templates/reset_password.html +++ b/app/templates/reset_password.html @@ -1,23 +1,11 @@ {% extends "base.html" %} +{% import 'bootstrap/wtf.html' as wtf %} -{% block content %} -

Reset Your Password

-
- {{ form.hidden_tag() }} -

- {{ form.password.label }}
- {{ form.password(size=32) }}
- {% for error in form.password.errors %} - [{{ error }}] - {% endfor %} -

-

- {{ form.password2.label }}
- {{ form.password2(size=32) }}
- {% for error in form.password2.errors %} - [{{ error }}] - {% endfor %} -

-

{{ form.submit() }}

-
+{% block app_content %} +

Reset Your Password

+
+
+ {{ wtf.quick_form(form) }} +
+
{% endblock %} diff --git a/app/templates/reset_password_request.html b/app/templates/reset_password_request.html index 914c593..c516141 100644 --- a/app/templates/reset_password_request.html +++ b/app/templates/reset_password_request.html @@ -1,15 +1,11 @@ {% extends "base.html" %} +{% import 'bootstrap/wtf.html' as wtf %} -{% block content %} -

Reset Password

-
- {{ form.hidden_tag() }} -

- {{ form.email.label }}
- {{ form.email(size=64) }}
- {% for error in form.email.errors %} - [{{ error }}] - {% endfor %} -

-
+{% block app_content %} +

Reset Password

+
+
+ {{ wtf.quick_form(form) }} +
+
{% endblock %} -- cgit v1.2.3