diff --git a/modoboa/auth/forms.py b/modoboa/auth/forms.py index 301fc69dd..143299654 100644 --- a/modoboa/auth/forms.py +++ b/modoboa/auth/forms.py @@ -5,11 +5,11 @@ from django.utils.translation import ugettext_lazy as _ class LoginForm(forms.Form): username = forms.CharField( label=_("Username"), - widget=forms.TextInput(attrs={"class": "span3"}) + widget=forms.TextInput(attrs={"class": "input-block-level"}) ) password = forms.CharField( label=_("Password"), - widget=forms.PasswordInput(attrs={"class": "span3"}) + widget=forms.PasswordInput(attrs={"class": "input-block-level"}) ) rememberme = forms.BooleanField( initial=False, diff --git a/modoboa/core/templates/settings.py b/modoboa/core/templates/settings.py index 2a721f2e1..d146549d9 100644 --- a/modoboa/core/templates/settings.py +++ b/modoboa/core/templates/settings.py @@ -165,6 +165,8 @@ INSTALLED_APPS += MODOBOA_APPS AUTH_USER_MODEL = 'admin.User' +#CUSTOM_LOGO = os.path.join(MEDIA_URL, "custom_logo.png") + AUTHENTICATION_BACKENDS = ( 'modoboa.lib.authbackends.SimpleBackend', ) diff --git a/modoboa/lib/templatetags/libextras.py b/modoboa/lib/templatetags/libextras.py index 9e10c0085..2ed64725c 100644 --- a/modoboa/lib/templatetags/libextras.py +++ b/modoboa/lib/templatetags/libextras.py @@ -232,3 +232,15 @@ def render_tags(tags): {% endfor %} """) return t.render(Context({"tags" : tags})) + + +@register.simple_tag +def get_modoboa_logo(): + try: + logo = settings.MODOBOA_CUSTOM_LOGO + except AttributeError: + logo = None + if logo is None: + return os.path.join(settings.STATIC_URL, "css/modoboa.png") + return logo + diff --git a/modoboa/static/css/custom.css b/modoboa/static/css/custom.css index e9cf7f9b9..d9ccd63be 100644 --- a/modoboa/static/css/custom.css +++ b/modoboa/static/css/custom.css @@ -11,12 +11,17 @@ body { overflow: hidden; } +#bottom-bar-middle { + text-align: center; +} + .navbar-text { color: #999999 !important; } .simplepagination ul { display: inline-block; + margin-bottom: 0; } .simplepagination li { @@ -101,4 +106,4 @@ body { .table-fixed { table-layout: fixed; -} \ No newline at end of file +} diff --git a/modoboa/static/css/default.css b/modoboa/static/css/default.css deleted file mode 100644 index 99ed02440..000000000 --- a/modoboa/static/css/default.css +++ /dev/null @@ -1,507 +0,0 @@ -html, body { - font-family: arial, helvetica, verdana, tahoma, sans-serif; - font-size: small; - background: #153F65; - margin: 0; - padding: 0; - height: 100%; - overflow: hidden; -} - -div#container { - height: auto !important; - height: 100%; - min-height: 100%; - position: relative; - background: white; -} - -@media screen { - body > div#footer { - position: fixed; - } -} - -div#topmenubar { - position: fixed; - border-bottom: 5px solid #333; - height: 30px; - bottom: auto; -} - -#usermenubox { - margin-right: 5px; -} - -div#footer { - position: absolute; - height: 30px; - bottom: 0px; - border-top: 5px solid #333; - color: white; - font-weight: bold; - font-size: 1em; -} - -#adminfo { - float: left; - padding: 5px; -} - -#navbar { - float: right; - padding: 5px; - margin: 0; - text-align: right; -} - -#navbar label { - color: white; - margin-right: 5px; - font-weight: bold; -} - -#navbar img { - margin-top: 5px; - margin-right: 5px; -} - -#menubar { - margin: 5px; - /*display: table;*/ - width: 735px; - margin-top: 35px; - z-index: 10; -} - -#topmenubar a, #topmenubar a:visited { - color: white; - font-weight: bold; -} - -#topmenubar label { - color: white; - font-weight: bold; -} - -/*#menubar a, #menubar a:visited { - color: black; - font-weight: bold; -} - -#menubar label { - color: black; - font-weight: bold; -}*/ - -#page { - width: 100%; - top: 35px; - bottom: 35px; - position: absolute; -} - -#content { - position: fixed; - overflow: auto; - /*padding: 5px;*/ - top: 130px; - bottom: 35px; - width: 100%; -} - -#subcontent { - margin: 5px; -} - -#header { - width: 100%; - padding: 5px 0; -} - -#header h1 { - font-size: medium; - width: 50%; - margin: 0 0 0 5px; -} - -#loginbox { - margin: 100px auto; - width: 610px; - padding-bottom: 15px; - border: 2px solid #333; - background: white; -} - -#loginbox h2 { - margin: 30px 10px 0 10px; - font-size: small; -} - -#loginbox h3 { - font-size: small; - text-align: center; -} - -#logo { - float: left; - text-align: center; - width: 300px; - margin-top: 10px; - border-right: 1px solid #ccc; -} - -#logo img { - height: 70px; -} - -#test { - float: right; - width: 300px; -} - - -.uibar { - background: #153F65; - padding: 0; - margin: 0 auto; - width: 100%; -} - -/*.menubar a, .menubar a:visited { - text-decoration: none; -} - -.menubar a:hover { - text-decoration: underline; -} - -.menubar ul { - margin: 0; - padding: 0; - list-style: none; - color: #2a4069; - float: left; -} - -.menubar li { - float: left; - display: inline; - margin: 4px 4px; -} - -.menubar li.selected { - background: #ffff77; -} - -.menubar img { - float: left; - margin: 0px 3px; - border: 0; -} - -.menubar .title { - color: white; -}*/ - -.menubardropdown ul { - background: white; - width: 120px; - border-bottom: 5px solid #ccc; - border-right: 5px solid #ccc; - border-left: 5px solid #ccc; - position: relative; - z-index: 2; - -} - -.menubardropdown label { - cursor: pointer; -} - -div.left { - float: left; -} - -div.right { - float: right; -} - -.logo { - float: right; - /*margin: 5px 0 0 5px;*/ - height: 80px; -} - -.dropdown { - /*position: absolute;*/ - /*width: 250px;*/ -} - -.dropdown li { - padding: 5px; - cursor: pointer; -} - -.dropdown ul { - list-style-type: none; -} - -.topdropdown ul { - background: #153F65; - border-bottom: 5px solid #333; - border-right: 5px solid #333; - border-left: 5px solid #333; - /*width: 150px;*/ - float: left; - position: relative; - z-index: 4; - font-size: small; -} - -.dropdown ul li { - display: block; - float: none; -} - -.spacer { - clear: both; -} - -/* Mootools tooltips */ -.tip { - color: #fff; - width: 139px; - z-index: 13000; - border: 1px solid #cccccc; -} - -.tip-title { - font-weight: bold; - font-size: 11px; - margin: 0; - color: #9FD4FF; - padding: 8px 8px 4px; - background: #eee; -} - -.tip-text { - font-size: 11px; - padding: 4px 8px 8px; - background: #eee; - color: black; -} - -img { - border: 0; -} - -table { - /*margin: 0 auto;*/ - width: 100%; - border-collapse: collapse; -} - -tr.odd { - background: white; -} - -tr.even { - background: #F4F6F8; -} - -th, td { - line-height: 15px; - padding: 5px; -} - -th { - background: #CEDBEC; - text-align: left; -} - -th.right { - text-align: right; -} - -th.center, td.center { - text-align: center; -} - -th[class*=sortable] { - cursor: pointer; - /*-moz-box-shadow: 0px -15px 10px -10px rgba(0,0,0,0.6) inset; - -webkit-box-shadow: 0px -15px 10px -10px rgba(0,0,0,0.6) inset;*/ -} - -th.selected { - background: #EEEEEE; -} - -td { - border-bottom: 1px solid #C8D6E8; -} - -tr.table-tr-selected { - background: #ffffcc; -} - -input { - border: 1px solid #cccccc; - color: inherit; - background-color: #eee; - padding: 2px; -} - -input:hover { - color: inherit; - background-color: #ffffcc; -} - -textarea { - border: 1px solid #cccccc; - background-color: #eee; - width: 300px; - height: 100px; - font-size: 1.1em; - font-family: arial, helvetica, verdana, tahoma, sans-serif; -} - -table.hr { - width: 80%; - margin: 10px auto; -} - -.hr td.odd { - background: #F7F9Fb; -} - -.hr td.even { - -} - -.unseen { - font-weight: bold; -} - -.toggler { - margin: 5px auto; - padding: 2px 5px; - background: #CEDBEC; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - /*border: 1px solid #CCC;*/ - font-size: 1.1em; -} - -.element { - padding-left: 10px; -} - -div.row { - margin: 10px; -} - -div.row label { - float: left; - width: 300px; - padding: 3px 0; -} - -.missing input, -.missing textarea { - background-color: #F9D2D2; -} - -.error { - margin: 0 auto; - padding: 5px; - background: red; - width: 500px; - text-align: center; - background-color: #F9D2D2; - border: 3px solid #FF2A2A; - color: #FF2A00; -} - -.info { - background-color: #DAF8DA; - color: #166D14; - padding: 10px; - width: 500px; - text-align: center; - margin: 50px auto; -} - -.errorlist ul { - float: left; - list-style: none; -} - -.errorlist li { - margin-left: 10px; - float: left; - display: inline; - color: red; -} - -.separator { - padding-left: 5px; - padding-right: 5px; -} - -/* Custom confirmation box */ -#dlg-buttons { - clear: both; - width: 100%; - text-align: center; - padding-top: 20px; -} - -#dlg-iconbox { - float: left; - margin-top: 20px; - width: 32px; -} - -#dlg-textbox { - float: left; - margin-left: 20px; - margin-top: 10px; - width: 80%; -} - -#dlg-textbox input { - float: left; - padding: 0; - margin: 0; -} - -#dlg-textbox label { - margin-left: 5px; -} - -#dlg-buttons { - position: absolute; - bottom: 15px; -} - -#dlg-buttons input { - width: 90px; - margin: 2px; -} - -/* Permission tables */ -#accordion { - margin: 5px; -} - -.element { - margin: 10px 5px 10px 5px; -} - -/* Parameters or Preferences */ -#footer > #update { - color: #000000; - margin: 2px; -} diff --git a/modoboa/static/css/login.css b/modoboa/static/css/login.css index 955aeab60..a3b222f56 100644 --- a/modoboa/static/css/login.css +++ b/modoboa/static/css/login.css @@ -1,14 +1,28 @@ #logo { margin-top: 60px; + text-align: center; + margin: 60px auto 20px; + max-width: 300px; } #logo img { - height: 100px; + height: auto; } .form-actions { background-color: transparent; padding-right: 0px; padding-left: 0px; + margin-bottom: 0px; } +.login-form { + margin: 0 auto; + max-width: 300px; + padding-bottom: 0; +} + +.login-error { + margin: 20px auto; + max-width: 300px; +} \ No newline at end of file diff --git a/modoboa/static/css/logo.png b/modoboa/static/css/logo.png deleted file mode 100644 index ce411b737..000000000 Binary files a/modoboa/static/css/logo.png and /dev/null differ diff --git a/modoboa/templates/common/pagination_bar.html b/modoboa/templates/common/pagination_bar.html index 953fa4a7a..621c5d81c 100644 --- a/modoboa/templates/common/pagination_bar.html +++ b/modoboa/templates/common/pagination_bar.html @@ -1,4 +1,4 @@ -
+