From fe14f7600ab7c4eaf7fdc193941dc7e3e6ba3253 Mon Sep 17 00:00:00 2001 From: henu Date: Tue, 31 Oct 2017 20:39:19 +0200 Subject: [PATCH 1/2] Create common base for all apps --- static/css/footer.css | 2 ++ {webapp/templates => templates}/base.html | 40 ++--------------------- webapp/templates/admin_index.html | 2 +- webapp/templates/contact.html | 2 +- webapp/templates/event_calendar.html | 2 +- webapp/templates/freshmen.html | 2 +- webapp/templates/guild.html | 2 +- webapp/templates/international.html | 2 +- webapp/templates/jobs.html | 2 +- webapp/templates/main_index.html | 8 +++-- webapp/templates/ohlhafv.html | 2 +- webapp/templates/ohlhafv_list.html | 2 +- webapp/templates/sosso.html | 2 +- webapp/templates/webapp_base.html | 36 ++++++++++++++++++++ 14 files changed, 56 insertions(+), 50 deletions(-) rename {webapp/templates => templates}/base.html (62%) create mode 100644 webapp/templates/webapp_base.html diff --git a/static/css/footer.css b/static/css/footer.css index 23fbc04..61bca94 100644 --- a/static/css/footer.css +++ b/static/css/footer.css @@ -1,4 +1,6 @@ footer { + position: absolute; + bottom: 0; background-color: #f5f5f5; } diff --git a/webapp/templates/base.html b/templates/base.html similarity index 62% rename from webapp/templates/base.html rename to templates/base.html index 755fb30..88ac035 100644 --- a/webapp/templates/base.html +++ b/templates/base.html @@ -1,16 +1,10 @@ - -{% load i18n %} -{% load static %} -{% load staticfiles %} - - + - {% trans "Aalto-yliopiston Sähköinsinöörikilta ry" %} @@ -30,36 +24,8 @@ }) - -
-
-
- {% block header %} - {% include "sik_header.html" %} - {% endblock %} -
-
-
-
- {% block navigation %} - {% include "navigation.html" %} - {% endblock %} -
-
-
-
- {% block content %} - {% endblock %} -
-
-
-
- {% block footer %} - {% include "footer.html" %} - {% endblock footer %} -
-
-
+ {% block body %} + {% endblock %} diff --git a/webapp/templates/admin_index.html b/webapp/templates/admin_index.html index 1af227e..0453ff1 100644 --- a/webapp/templates/admin_index.html +++ b/webapp/templates/admin_index.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp_base.html" %} {% load i18n %} {% block content %} diff --git a/webapp/templates/contact.html b/webapp/templates/contact.html index 01a5d0b..1be617e 100644 --- a/webapp/templates/contact.html +++ b/webapp/templates/contact.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp_base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/event_calendar.html b/webapp/templates/event_calendar.html index a2e99be..f6e1fc6 100644 --- a/webapp/templates/event_calendar.html +++ b/webapp/templates/event_calendar.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp_base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/freshmen.html b/webapp/templates/freshmen.html index 2702258..baaebc5 100644 --- a/webapp/templates/freshmen.html +++ b/webapp/templates/freshmen.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp_base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/guild.html b/webapp/templates/guild.html index adc37db..10c7e93 100644 --- a/webapp/templates/guild.html +++ b/webapp/templates/guild.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp_base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/international.html b/webapp/templates/international.html index f07c322..982f227 100644 --- a/webapp/templates/international.html +++ b/webapp/templates/international.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp_base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/jobs.html b/webapp/templates/jobs.html index d07cd96..de2a7b7 100644 --- a/webapp/templates/jobs.html +++ b/webapp/templates/jobs.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp_base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/main_index.html b/webapp/templates/main_index.html index bb4ee80..b75df86 100644 --- a/webapp/templates/main_index.html +++ b/webapp/templates/main_index.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp_base.html" %} {% load i18n %} {% block content %} @@ -6,11 +6,13 @@
-

{% trans "Copyright Aalto-yliopiston Sähköinsinöörikilta ry" %}

+

{% trans "Aalto-yliopiston Sähköinsinöörikilta ry" %}

-
Lisää vain vesi
+
+
Lisää vain vesi
+
diff --git a/webapp/templates/ohlhafv.html b/webapp/templates/ohlhafv.html index 05decc5..c4f658b 100644 --- a/webapp/templates/ohlhafv.html +++ b/webapp/templates/ohlhafv.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp_base.html" %} {% load bootstrap3 %} {% load i18n %} diff --git a/webapp/templates/ohlhafv_list.html b/webapp/templates/ohlhafv_list.html index 057ce06..a693237 100644 --- a/webapp/templates/ohlhafv_list.html +++ b/webapp/templates/ohlhafv_list.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp_base.html" %} {% load static %} {% load i18n %} diff --git a/webapp/templates/sosso.html b/webapp/templates/sosso.html index f96a7ff..cd3bdea 100644 --- a/webapp/templates/sosso.html +++ b/webapp/templates/sosso.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp_base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/webapp_base.html b/webapp/templates/webapp_base.html new file mode 100644 index 0000000..6e9dfd7 --- /dev/null +++ b/webapp/templates/webapp_base.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} + +{% load i18n %} +{% load static %} +{% load staticfiles %} + + +
+
+
+ {% block header %} + {% include "sik_header.html" %} + {% endblock %} +
+
+
+
+ {% block navigation %} + {% include "navigation.html" %} + {% endblock %} +
+
+
+
+ {% block content %} + {% endblock %} +
+
+
+
+ {% block footer %} + {% include "footer.html" %} + {% endblock footer %} +
+
+
From 6d18e4043100048f1dd3ef69ec4d379fdbf0cdbe Mon Sep 17 00:00:00 2001 From: henu Date: Tue, 31 Oct 2017 21:01:22 +0200 Subject: [PATCH 2/2] Fix login form styles --- static/css/footer.css | 2 -- templates/base.html | 5 +++ templates/login.html | 52 ++++++++++++++----------------- templates/login_base.html | 50 ++++++++++------------------- webapp/templates/webapp_base.html | 2 ++ 5 files changed, 48 insertions(+), 63 deletions(-) diff --git a/static/css/footer.css b/static/css/footer.css index 61bca94..23fbc04 100644 --- a/static/css/footer.css +++ b/static/css/footer.css @@ -1,6 +1,4 @@ footer { - position: absolute; - bottom: 0; background-color: #f5f5f5; } diff --git a/templates/base.html b/templates/base.html index 88ac035..5307718 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,4 +1,9 @@ + +{% load i18n %} +{% load static %} +{% load staticfiles %} + diff --git a/templates/login.html b/templates/login.html index 948c0f8..463ea05 100644 --- a/templates/login.html +++ b/templates/login.html @@ -2,34 +2,30 @@ {% load i18n %} {% block content %} -

SIK Admin

-
{% csrf_token %} -
- -
- -
+
+
+

SIK Admin

-
- -
- -
+
+ {% csrf_token %} +
+ + +
+
+ + +
+ +
+
{{ error }}
+
+
+ +
+
- -
-
-
{{ error }}
-
-
-
-
- -
-
- +
{% endblock content %} diff --git a/templates/login_base.html b/templates/login_base.html index 1aa3b9e..d0b0a8f 100644 --- a/templates/login_base.html +++ b/templates/login_base.html @@ -1,38 +1,22 @@ - +{% extends "base.html" %} {% load i18n %} {% load static %} - - - SIK - Login - +{% block body %} +{% block header %} +
+ {% include "sik_header.html" %} +
+{% endblock %} - - - - - - - - - - - {% block header %} -
- {% include "sik_header.html" %} -
- {% endblock %} - -
- {% block content %} - {% endblock %} -
- - - - \ No newline at end of file +
+ {% block content %} + {% endblock %} +
+ +{% endblock %} diff --git a/webapp/templates/webapp_base.html b/webapp/templates/webapp_base.html index 6e9dfd7..1744f55 100644 --- a/webapp/templates/webapp_base.html +++ b/webapp/templates/webapp_base.html @@ -4,6 +4,7 @@ {% load static %} {% load staticfiles %} +{% block body %}
@@ -34,3 +35,4 @@
+{% endblock %}