From: Ciro Scognamiglio Date: Wed, 12 Feb 2014 18:01:12 +0000 (+0100) Subject: styled login form X-Git-Tag: myslice-1.1~340 X-Git-Url: http://git.onelab.eu/?p=unfold.git;a=commitdiff_plain;h=73136626a3010dac4fe3c42041a1c324aa659b1d styled login form --- diff --git a/auth/static/css/login.css b/auth/static/css/login.css index f31fe716..e69de29b 100644 --- a/auth/static/css/login.css +++ b/auth/static/css/login.css @@ -1,23 +0,0 @@ -p.login-status { - padding-top: 10px; - font-weight: bold; -} - -p.login { - font-style: italic; - margin-bottom: 0px; /* who says 10px ? */ -} -input.login { - width: auto; - margin: 5px; - padding: 3px 10px; -} -input.login[type="password"] { - border: solid 1px #444; - background-image: url( '../img/form_input_password.png' ); - background-repeat: repeat-x; - background-position: top; -} -input.login[type="submit"] { - margin-top: 20px; -} diff --git a/auth/templates/widget-login.html b/auth/templates/widget-login.html index 39a8bdc9..db7245cd 100644 --- a/auth/templates/widget-login.html +++ b/auth/templates/widget-login.html @@ -1,17 +1,26 @@ -{% insert_str prelude 'css/login.css' %} -

{{ state }}

-
-
- {% csrf_token %} - {% if next %} - - {% endif %} - -
- -
- -

- Can't access your account? -
+
+ {% if state %} + {{ state }} + {% endif %} +
+ {% csrf_token %} + {% if next %} + + {% endif %} +
+ + +
+
+ + +
+ + +
diff --git a/portal/homeview.py b/portal/homeview.py index c71481ad..efdf71e1 100644 --- a/portal/homeview.py +++ b/portal/homeview.py @@ -63,7 +63,7 @@ class HomeView (FreeAccessView): env['username']=the_user(request) env['topmenu_items'] = topmenu_items(None, request) if state: env['state'] = state - elif not env['username']: env['state'] = "Please sign in" + elif not env['username']: env['state'] = None # use one or two columns for the layout - not logged in users will see the login prompt env['layout_1_or_2']="layout-unfold2.html" if not env['username'] else "layout-unfold1.html" return render_to_response('home-view.html',env, context_instance=RequestContext(request)) diff --git a/portal/static/css/onelab_marko.css b/portal/static/css/onelab_marko.css index 1436169f..befd4c92 100644 --- a/portal/static/css/onelab_marko.css +++ b/portal/static/css/onelab_marko.css @@ -57,9 +57,7 @@ div.well-lg { div.onelab-title { background-color: rgba(168, 32, 202, 0.5) ; } -div.well { - background-color: rgba(0, 0, 0, 0.5) ; -} + h2.well.well-lg { border-radius:0; border: 0; @@ -189,28 +187,6 @@ ul.pagination li.active a { border: 1px solid #572bc9; } -.btn.btn-default { - background: #572bc9; - color: #ccc; - font-family: Ubuntu, Arial, sans-serif; - font-weight: bold; - border: 0px; -} - -.btn.btn-default:hover { - /* background: #4af25d; */ - background: #ff7394; - color: #333; - font-family: Ubuntu, Arial, sans-serif; - font-weight: bold; - border: 0px; -} - -input { - border-radius: 3px; - border: none; - border: 1px solid #ccc; -} div.dataTables_length label, @@ -384,6 +360,13 @@ div#secondary li { list-style:none; margin-right:30px; } +div#secondary li a { + color:black; +} +div#secondary li a:hover { + color:#270A5A; + text-decoration:none; +} div#secondary li:last-child { margin-right:0; } @@ -439,6 +422,45 @@ div#home-dashboard table { div#home-dashboard table td { text-align:center; padding:15px 0; + width:33%; +} +div#home-dashboard table tr:first-child td { + font-size:12pt; + font-weight:bold; + color:#270A5A; +} +div#home-dashboard table tr:last-child td { + text-align:left; +} +div#home-dashboard table td.support { + font-size:14pt; + vertical-align:top; + padding-left:11%; +} +div#home-dashboard table td.support a { +} +div#home-dashboard table td.support a:hover { + text-decoration:none; +} + + +.login-submit { + vertical-align:middle; + padding:0; +} +.lost-password { + font-size:10pt; + color:#CCCCCC; + text-align:right; + padding:0px; +} +.lost-password a { +} +.login-signup { + border-top:1px solid #CCCCCC; + text-align:center; + margin-top:15px; + padding:5px 0 0 0; } /**/ @@ -457,4 +479,16 @@ div#home-dashboard table td { .nav.nav-tabs li a:hover { } -/**/ \ No newline at end of file +/**/ +/* WELL */ +div.well { +} +/**/ +/* BUTTON */ +.btn.btn-default { + font-weight: bold; +} + +.btn.btn-default:hover { + font-weight: bold; +} \ No newline at end of file diff --git a/portal/templates/home-view.html b/portal/templates/home-view.html index ec1f54b6..cfd63a8a 100644 --- a/portal/templates/home-view.html +++ b/portal/templates/home-view.html @@ -1,14 +1,8 @@ -{# fine for either layout-unfold1.html (logged in) or layout-unfold2.html (needs a login prompt) #} -{% extends layout_1_or_2 %} - -{% block unfold_margin %} -{% include 'widget-login.html' %} -{% endblock unfold_margin %} +{% extends "layout-unfold1.html" %} {% block unfold_main %} - -
+
- {% endblock unfold_main %}