From 59f3040143176bc6e317621a8d8f75fa6b8e27c9 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Thu, 26 Jan 2017 14:05:02 +0200 Subject: [PATCH] Brush up styles in the login form --- webapp/static/css/login.css | 13 ++++++++++ webapp/templates/login.html | 47 +++++++++++++++++++++++++++++-------- webapp/views.py | 2 +- 3 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 webapp/static/css/login.css diff --git a/webapp/static/css/login.css b/webapp/static/css/login.css new file mode 100644 index 0000000..5c16cf1 --- /dev/null +++ b/webapp/static/css/login.css @@ -0,0 +1,13 @@ +#content-body { + width: 50vw; + max-width: 800px; + margin: 40px auto; +} + +#login-button { + float: right; +} + +#site-title { + margin-bottom: 20px; +} diff --git a/webapp/templates/login.html b/webapp/templates/login.html index 22d9c44..d38757a 100644 --- a/webapp/templates/login.html +++ b/webapp/templates/login.html @@ -3,17 +3,44 @@ SIK - Login + + + + + + + + + + -
{{ error }}
-
{% csrf_token %} -
Käyttäjätunnus - -
-
Salasana - -
- -
+
+

SIK Admin

+
{% csrf_token %} +
+ +
+ +
+
+
+ +
+ +
+
+
+
+
{{ error }}
+
+
+
+
+ +
+
+
+
diff --git a/webapp/views.py b/webapp/views.py index 8efa54c..7711971 100644 --- a/webapp/views.py +++ b/webapp/views.py @@ -22,7 +22,7 @@ def login_view(request, *args, **kwargs): login(request, user) original_site = request.GET.get("next",None) or "/" return redirect(original_site) - return render(request, "login.html", {"error":"kirjautuminen kosahti. koita uudelleen"}) + return render(request, "login.html", {"error" : "☹ Kirjautuminen kosahti. Yritä uudelleen!"}) # user got here by a get request user = request.user if user.is_authenticated():