From 34230bfae6a2d6dcbfc0af3ed6d97f8c82ae631c Mon Sep 17 00:00:00 2001 From: Graham Hay Date: Sun, 22 Feb 2015 14:00:33 +0000 Subject: [PATCH] Removed duplication from templates --- templates/layout.dtl | 27 ++++++++++++++++++ templates/login.dtl | 63 +++++++++++++---------------------------- templates/signup.dtl | 36 ++++------------------- templates/user_info.dtl | 33 ++++----------------- 4 files changed, 58 insertions(+), 101 deletions(-) create mode 100644 templates/layout.dtl diff --git a/templates/layout.dtl b/templates/layout.dtl new file mode 100644 index 0000000..137cc9c --- /dev/null +++ b/templates/layout.dtl @@ -0,0 +1,27 @@ + + + + + + + + + + + + + {% block header %}{% endblock %} + + + + + + +
+ {% block content %}{% endblock %} +
+ + diff --git a/templates/login.dtl b/templates/login.dtl index 506594c..de8acd5 100644 --- a/templates/login.dtl +++ b/templates/login.dtl @@ -1,46 +1,23 @@ - - - - - - - - - +{% extends "layout.dtl" %} +{% block header %} Log in - - - - - - - - - - -
- - - -
- - - - +{% endblock %} + + +{% block content %} +
+ + + + + +
+ +
+ +
+{% endblock %} diff --git a/templates/signup.dtl b/templates/signup.dtl index dc5d14c..7ed74e7 100644 --- a/templates/signup.dtl +++ b/templates/signup.dtl @@ -1,30 +1,11 @@ - - - - - - - - - - - Log in - - +{% extends "layout.dtl" %} +{% block header %} + Sign up +{% endblock %} - - - - - - -
- +{% block content %} - -
- - - - +{% endblock %} diff --git a/templates/user_info.dtl b/templates/user_info.dtl index feb2a92..3902aae 100644 --- a/templates/user_info.dtl +++ b/templates/user_info.dtl @@ -1,32 +1,9 @@ - - - - - - - - - +{% extends "layout.dtl" %} +{% block header %} User info +{% endblock %} - - - - - - - - -
- +{% block content %}

Email: {{ email }}

- -
- - - - +{% endblock %}