From 0a1f8de9b4537f0e0d67e694ff8746003e20f3c8 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Wed, 13 Feb 2013 11:37:38 +0100 Subject: Rework the login and register forms --- hyperkitty/static/css/hyperkitty.css | 20 +++++++------ hyperkitty/static/img/login/persona-large.png | Bin 0 -> 3684 bytes hyperkitty/templates/base.html | 4 +-- hyperkitty/templates/login.html | 41 +++++++++++++------------- hyperkitty/templates/register.html | 20 ++++++++----- hyperkitty/views/accounts.py | 27 +++++++++++++---- hyperkitty/views/forms.py | 34 ++++++++++++--------- 7 files changed, 88 insertions(+), 58 deletions(-) create mode 100644 hyperkitty/static/img/login/persona-large.png diff --git a/hyperkitty/static/css/hyperkitty.css b/hyperkitty/static/css/hyperkitty.css index f08baaa..bc57a32 100644 --- a/hyperkitty/static/css/hyperkitty.css +++ b/hyperkitty/static/css/hyperkitty.css @@ -78,24 +78,26 @@ h1.lists { /* Login form */ -#loginform { +#login, +#register { text-align: left; width: 40em; margin: 0 auto; } -#loginform h2 { - margin-bottom: 1.5em; +#login h2, +#register h2 { + margin: 4em 0 1em 0; text-align: center; + font-size: 160%; } -.socialLogin { - list-style: none; - margin: 0px; +#login .social-login { + text-align: center; } -.socialLogin li { - float: left; - padding: 5px; +#login .social-login li { + margin: 0 20px; } + /* from Bootstrap's alert class */ .errorlist { list-style-type: none; diff --git a/hyperkitty/static/img/login/persona-large.png b/hyperkitty/static/img/login/persona-large.png new file mode 100644 index 0000000..ab88a71 Binary files /dev/null and b/hyperkitty/static/img/login/persona-large.png differ diff --git a/hyperkitty/templates/base.html b/hyperkitty/templates/base.html index d645dbe..85b044e 100644 --- a/hyperkitty/templates/base.html +++ b/hyperkitty/templates/base.html @@ -26,8 +26,8 @@
  • Logout
  • {{ user.username }}
  • {% else %} -
  • Login
  • -
  • Sign Up
  • +
  • Login
  • +
  • Sign Up
  • {% endif %} diff --git a/hyperkitty/templates/login.html b/hyperkitty/templates/login.html index 9bce6ee..17d8d4b 100644 --- a/hyperkitty/templates/login.html +++ b/hyperkitty/templates/login.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load i18n %} +{% load crispy_forms_tags %} {% block title %} @@ -8,37 +9,37 @@ {% block content %} -
    +
    -

    Login with username and password

    - - - - - -
      -
    • Google
    • - -
    • Yahoo
    • +

      Login with your email

      + + +

      Login with username and password

      + +
      + {% csrf_token %} + {{ form|crispy }} +
      +
      + +
      +
      +
      + +
    {% endblock %} diff --git a/hyperkitty/templates/register.html b/hyperkitty/templates/register.html index 7d665ab..71d4d6a 100644 --- a/hyperkitty/templates/register.html +++ b/hyperkitty/templates/register.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load i18n %} +{% load crispy_forms_tags %} {% block title %} @@ -8,17 +9,22 @@ {% block content %} -