From a438fee238995d2d691bf6b6f71d0b67a7d58ca2 Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Fri, 26 Oct 2018 13:38:48 +0530 Subject: fix UI issues in website - separate header, body and footer using css ids in base.html to avoid text hiding in header and footer - remove unnecessary script tag and div tag from account/home.html - use django-crispy-forms to fix design issues in password_change_form, user_registration_form and user_login_form - fix UI issues in pages/info.html and pages_index.html --- sbhs/static/css/base.css | 28 +++-- sbhs/templates/account/account_index.html | 14 +-- sbhs/templates/account/home.html | 6 +- .../account/registration/password_change_form.html | 4 +- sbhs/templates/base.html | 128 +++++++++++---------- sbhs/templates/pages/info.html | 3 - sbhs/templates/pages/pages_index.html | 10 +- 7 files changed, 101 insertions(+), 92 deletions(-) diff --git a/sbhs/static/css/base.css b/sbhs/static/css/base.css index dd9ab77..6e356f7 100644 --- a/sbhs/static/css/base.css +++ b/sbhs/static/css/base.css @@ -1,5 +1,6 @@ .content { padding-top: 65px; + padding-bottom: 100px; } .footer{ position: fixed; @@ -12,18 +13,23 @@ box-sizing: border-box; width: 100%; font: bold 12px; - overflow: auto; - clear:both; - padding-top: 2px; - height: 10%; } - html, body{ - font-size:10px; - overflow:auto; + margin:0; + padding:0; height:100%; - overflow-x:hidden; - text-align:center; - width:1024px; - margin: 0px auto 0px auto; +} + +#container{ + min-height: 100%; + position: relative; +} + +#header{ + +} + +#body{ + padding: 10px; + padding-bottom: 60px: } diff --git a/sbhs/templates/account/account_index.html b/sbhs/templates/account/account_index.html index 60fece6..ce0754e 100644 --- a/sbhs/templates/account/account_index.html +++ b/sbhs/templates/account/account_index.html @@ -1,5 +1,5 @@ {% extends "base.html" %} - +{% load crispy_forms_tags %} {% block content %}
@@ -8,9 +8,9 @@
{% csrf_token %} - {{login_form.as_p}} - - + {{login_form|crispy}} +
+   Forgot Password?
@@ -18,10 +18,8 @@

Create Account

{% csrf_token %} - {{registration_form.as_p}} - {% for field in registration_form %} - - {% endfor %} + {{registration_form|crispy}} +
diff --git a/sbhs/templates/account/home.html b/sbhs/templates/account/home.html index 5f647bb..66dae1c 100644 --- a/sbhs/templates/account/home.html +++ b/sbhs/templates/account/home.html @@ -1,12 +1,8 @@ {% extends "base.html" %} - {% block content %}
- -
+

Welcome to Single Board Heater System Lab


You can: diff --git a/sbhs/templates/account/registration/password_change_form.html b/sbhs/templates/account/registration/password_change_form.html index 6fc6546..925b776 100644 --- a/sbhs/templates/account/registration/password_change_form.html +++ b/sbhs/templates/account/registration/password_change_form.html @@ -1,5 +1,5 @@ {% extends "base.html" %} - +{% load crispy_forms_tags %} {% block title %}Change you password{% endblock %} {% block content %} @@ -7,7 +7,7 @@

Change you password

Use the form below to change your password.

- {{ form.as_p }} + {{ form|crispy}}

{% csrf_token %}
diff --git a/sbhs/templates/base.html b/sbhs/templates/base.html index a1e36f2..099488b 100644 --- a/sbhs/templates/base.html +++ b/sbhs/templates/base.html @@ -20,73 +20,82 @@ {% endblock %} - {% block nav %} - {% endblock %}
+ +
+
+ + {% if messages %} +
+ {% for message in messages %} +
+ {{message|safe}} + x +
+ {% endfor %} +
+ {% endif %} + + {% block content %} + {% endblock %} + +
+
+ -