##// END OF EJS Templates
login: optimized UI for login/register/password reset windows.
milka -
r4546:6e1aa266 default
parent child Browse files
Show More
@@ -1,337 +1,337 b''
1 1 //LOGIN
2 2
3 3
4 4 .loginbox {
5 max-width: 65%;
5 max-width: 960px;
6 6 margin: @pagepadding auto;
7 7 font-family: @text-light;
8 8 border: @border-thickness solid @grey5;
9 9 box-sizing: border-box;
10 10
11 11 @media (max-width:1200px) {
12 12 max-width: 85%;
13 13 }
14 14
15 15 @media (max-width:768px) {
16 16 max-width: 100%;
17 17 width: 100%;
18 18 margin: 0;
19 19 }
20 20
21 21 .title {
22 22 float: none;
23 23 }
24 24
25 25 .header-account {
26 26 min-height: 49px;
27 27 width: 100%;
28 28 padding: 0 @header-padding;
29 29 box-sizing: border-box;
30 30 position: relative;
31 31 vertical-align: bottom;
32 32
33 33 background-color: @grey1;
34 34 color: @grey5;
35 35
36 36 .title {
37 37 padding: 0;
38 38 overflow: visible;
39 39 }
40 40
41 41 &:before,
42 42 &:after {
43 43 content: "";
44 44 clear: both;
45 45 width: 100%;
46 46 }
47 47 }
48 48
49 49 .loginwrapper {
50 50 float: left;
51 51 height: 100%;
52 52 width: 100%;
53 53 padding: 35px 55px 35px 35px;
54 54 background-color: white;
55 55 box-sizing: border-box;
56 56
57 57 @media (max-width:414px) {
58 58 padding: 35px;
59 59 }
60 60 }
61 61
62 62 .left-column {
63 63 float: left;
64 64 position: relative;
65 65 width: 50%;
66 66 height: 100%;
67 67
68 68 @media (max-width:414px) {
69 69 display:none;
70 70 }
71 71 }
72 72
73 73 .right-column {
74 74 float: right;
75 75 position: relative;
76 76 width: 50%;
77 77
78 78 @media (max-width:414px) {
79 79 width: 100%;
80 80 }
81 81 }
82 82
83 83 .sign-in-image {
84 84 display: block;
85 85 width: 65%;
86 margin: 5% auto;
86 margin: 1% auto;
87 87 }
88 88
89 89 .sign-in-title {
90 90
91 91 h4 {
92 92 margin: @padding*2 0;
93 93 }
94 94 }
95 95
96 96 .form {
97 97 label {
98 98 display: block;
99 99 }
100 100
101 101 input {
102 102 width: 100%;
103 103 margin: 0 10% @padding 0;
104 104 .box-sizing(border-box) ;
105 105
106 106 &[type="checkbox"] {
107 107 clear: both;
108 108 width: auto;
109 109 margin: 0 1em @padding 0;
110 110 }
111 111 }
112 112
113 113 .checkbox {
114 114 display: inline;
115 115 width: auto;
116 116 }
117 117
118 118 .sign-in {
119 119 clear: both;
120 120 width: 100%;
121 121 margin: @padding 0;
122 122 }
123 123 .pwd_reset {
124 124 font-weight: normal;
125 125 }
126 126 .new_account {
127 127 font-weight: bold;
128 128 }
129 129 }
130 130 .register_message,
131 131 .activation_msg {
132 132 padding: 0 0 @padding;
133 133 }
134 134
135 135 .buttons,
136 136 .links {
137 137 padding: 0;
138 138 }
139 139
140 140 .buttons {
141 141 input {
142 142 margin-right: 0;
143 143 .box-sizing(border-box);
144 144 }
145 145
146 146 #sign_up, #send {
147 147 width: 100%;
148 148 }
149 149 }
150 150
151 151 .fields {
152 152 .field.field-compact {
153 153 margin-bottom: 0px;
154 154 }
155 155
156 156 .buttons {
157 157 margin: 0;
158 158 }
159 159
160 160 .field {
161 161 margin-bottom: 15px;
162 162
163 163 input {
164 164 width: 100%;
165 165 .box-sizing(border-box);
166 166 }
167 167
168 168 .input {
169 169 margin-left: 0;
170 170 }
171 171
172 172 .label {
173 173 padding-top: 0;
174 174 }
175 175 }
176 176 }
177 177
178 178 .checkbox {
179 179 margin: 0 0 @textmargin 0;
180 180
181 181 input[type="checkbox"] {
182 182 width: auto;
183 183 }
184 184
185 185 label {
186 186 padding: 0;
187 187 min-height: 0;
188 188 }
189 189 }
190 190
191 191 .activation_msg {
192 192 padding: @padding 0 0;
193 193 color: @grey4;
194 194 }
195 195
196 196 .links {
197 197 float: right;
198 198 margin: 0;
199 199 padding: 0;
200 200 line-height: 1;
201 201
202 202 p {
203 203 float: right;
204 204 margin: 0;
205 205 line-height: 1.5em;
206 206 }
207 207 }
208 208
209 209 p.help-block {
210 210 margin-left: 0;
211 211 }
212 212 }
213 213
214 214 .user-menu.submenu {
215 215 right: 0!important;
216 216 left: auto!important;
217 217 min-width: 290px;
218 218 }
219 219
220 220 .user-menu {
221 221 .bookmark-items {
222 222 border-top: @border-thickness solid @grey6;
223 223 margin-top: 1em;
224 224 padding: 1em .5em;
225 225 color: @grey3;
226 226 border-bottom: @grey3;
227 227
228 228 a {
229 229 padding: 0 !important;
230 230 }
231 231 }
232 232
233 233 }
234 234
235 235
236 236 #quick_login {
237 237 left: auto;
238 238 right: 0;
239 239 padding: @menupadding;
240 240 z-index: 999;
241 241 overflow: hidden;
242 242 background-color: @white;
243 243 border: 1px solid @grey5;
244 244 color: @grey2;
245 245 box-shadow: @dropdown-shadow;
246 246
247 247 h4 {
248 248 margin-bottom: 12px;
249 249 }
250 250
251 251 .form {
252 252 width: auto;
253 253 }
254 254
255 255 label, .field {
256 256 margin-bottom: 0;
257 257 }
258 258
259 259 .label {
260 260 padding-top: 0;
261 261 }
262 262
263 263 input {
264 264 min-width: 215px;
265 265 margin: 8px 0 @padding;
266 266 }
267 267
268 268 input[type="submit"] {
269 269 &:extend(.btn-primary);
270 270 width:100%;
271 271 min-width: 0;
272 272 }
273 273
274 274 .forgot_password,
275 275 .buttons .register {
276 276 a {
277 277 color: @rcblue;
278 278
279 279 &:hover {
280 280 color: @rcdarkblue;
281 281 }
282 282 }
283 283 }
284 284
285 285 .buttons {
286 286 margin: 0;
287 287 }
288 288
289 289 .buttons a {
290 290 padding: 8px 0;
291 291 line-height: 1.4em;
292 292 color: @grey4;
293 293
294 294 &:hover {
295 295 color: @rcblue;
296 296 }
297 297 }
298 298
299 299 #sign_in {
300 300 margin-bottom: 0
301 301 }
302 302
303 303 .big_gravatar {
304 304 float: left;
305 305 display: block;
306 306 padding: .5em;
307 307 }
308 308
309 309 .full_name {
310 310 margin: 0 0 0 70px;
311 311 padding-top: 1em;
312 312 }
313 313
314 314 .email {
315 315 margin: 0 0 0 70px;
316 316 font-family: @text-light;
317 317 }
318 318
319 319 ol.links {
320 320 clear:both;
321 321 margin: 0;
322 322 padding: @padding 0 0 0;
323 323
324 324 li {
325 325 input {
326 326 margin: @padding 0 0 0;
327 327 }
328 328 }
329 329 }
330 330 }
331 331 .submenu #quick_login li:hover {
332 332 background-color: transparent;
333 333 }
334 334
335 335 #quick_login_link:hover + #quick_login {
336 336 display: block;
337 337 }
@@ -1,106 +1,106 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/root.mako"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Sign In')}
6 6 %if c.rhodecode_name:
7 7 &middot; ${h.branding(c.rhodecode_name)}
8 8 %endif
9 9 </%def>
10 <style>body{background-color:#eeeeee;}</style>
10 11
11 <style>body{background-color:#eeeeee;}</style>
12 12 <div class="loginbox">
13 13 <div class="header-account">
14 14 <div id="header-inner" class="title">
15 15 <div id="logo">
16 16 <div class="logo-wrapper">
17 17 <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-60x60.png')}" alt="RhodeCode"/></a>
18 18 </div>
19 19 % if c.rhodecode_name:
20 20 <div class="branding">
21 21 <a href="${h.route_path('home')}">${h.branding(c.rhodecode_name)}</a>
22 22 </div>
23 23 % endif
24 24 </div>
25 25 </div>
26 26 </div>
27 27
28 28 <div class="loginwrapper">
29 29 <rhodecode-toast id="notifications"></rhodecode-toast>
30 30
31 <div class="left-column">
31 <div class="auth-image-wrapper">
32 32 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
33 33 </div>
34 34
35 <div id="login" class="right-column">
35 <div id="login">
36 36 <%block name="above_login_button" />
37 37 <!-- login -->
38 38 <div class="sign-in-title">
39 39 <h1>${_('Sign In using username/password')}</h1>
40 40 </div>
41 41 <div class="inner form">
42 42 ${h.form(request.route_path('login', _query={'came_from': c.came_from}), needs_csrf_token=False)}
43 43
44 44 <label for="username">${_('Username')}:</label>
45 45 ${h.text('username', class_='focus', value=defaults.get('username'))}
46 46 %if 'username' in errors:
47 47 <span class="error-message">${errors.get('username')}</span>
48 48 <br />
49 49 %endif
50 50
51 51 <label for="password">${_('Password')}:
52 52 %if h.HasPermissionAny('hg.password_reset.enabled')():
53 53 <div class="pull-right">${h.link_to(_('Forgot your password?'), h.route_path('reset_password'), class_='pwd_reset', tabindex="-1")}</div>
54 54 %endif
55 55
56 56 </label>
57 57 ${h.password('password', class_='focus')}
58 58 %if 'password' in errors:
59 59 <span class="error-message">${errors.get('password')}</span>
60 60 <br />
61 61 %endif
62 62
63 63 ${h.checkbox('remember', value=True, checked=defaults.get('remember'))}
64 64 <% timeout = request.registry.settings.get('beaker.session.timeout', '0') %>
65 65 % if timeout == '0':
66 66 <% remember_label = _('Remember my indefinitely') %>
67 67 % else:
68 68 <% remember_label = _('Remember me for {}').format(h.age_from_seconds(timeout)) %>
69 69 % endif
70 70 <label class="checkbox" for="remember">${remember_label}</label>
71 71
72 72 <p class="links">
73 73 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
74 74 ${h.link_to(_("Create a new account."), request.route_path('register'), class_='new_account')}
75 75 %endif
76 76 </p>
77 77
78 78 %if not h.HasPermissionAny('hg.password_reset.enabled')():
79 79 ## password reset hidden or disabled.
80 80 <p class="help-block">
81 81 ${_('Password reset is disabled.')} <br/>
82 82 ${_('Please contact ')}
83 83 % if c.visual.rhodecode_support_url:
84 84 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
85 85 ${_('or')}
86 86 % endif
87 87 ${_('an administrator if you need help.')}
88 88 </p>
89 89 %endif
90 90
91 91 ${h.submit('sign_in', _('Sign In'), class_="btn sign-in", title=_('Sign in to {}').format(c.rhodecode_edition))}
92 92
93 93 ${h.end_form()}
94 94 <script type="text/javascript">
95 95 $(document).ready(function(){
96 96 $('#username').focus();
97 97 })
98 98 </script>
99 99
100 100 </div>
101 101 <!-- end login -->
102 102
103 103 <%block name="below_login_button" />
104 104 </div>
105 105 </div>
106 106 </div>
@@ -1,103 +1,104 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/root.mako"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Reset Password')}
6 6 %if c.rhodecode_name:
7 7 &middot; ${h.branding(c.rhodecode_name)}
8 8 %endif
9 9 </%def>
10 10 <style>body{background-color:#eeeeee;}</style>
11 11
12 12 <div class="loginbox">
13 13 <div class="header-account">
14 14 <div id="header-inner" class="title">
15 15 <div id="logo">
16 16 <div class="logo-wrapper">
17 17 <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-60x60.png')}" alt="RhodeCode"/></a>
18 18 </div>
19 19 % if c.rhodecode_name:
20 20 <div class="branding">
21 21 <a href="${h.route_path('home')}">${h.branding(c.rhodecode_name)}</a>
22 22 </div>
23 23 % endif
24 24 </div>
25 25 </div>
26 26 </div>
27 27
28 28 <div class="loginwrapper">
29 29 <rhodecode-toast id="notifications"></rhodecode-toast>
30 <div class="left-column">
30
31 <div class="auth-image-wrapper">
31 32 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
32 33 </div>
33 34
34 35 %if h.HasPermissionAny('hg.password_reset.disabled')():
35 36 <div class="right-column">
36 37 <p>
37 38 ${_('Password reset is disabled. Please contact ')}
38 39 % if c.visual.rhodecode_support_url:
39 40 <a href="${c.visual.rhodecode_support_url}" target="_blank">${_('Support')}</a>
40 41 ${_('or')}
41 42 % endif
42 43 ${_('an administrator if you need help.')}
43 44 </p>
44 45 </div>
45 46 %else:
46 <div id="register" class="right-column">
47 <div id="register">
47 48 <!-- login -->
48 49 <div class="sign-in-title">
49 50 <h1>${_('Reset your Password')}</h1>
50 51 <h4>${h.link_to(_("Go to the login page to sign in."), request.route_path('login'))}</h4>
51 52 </div>
52 53 <div class="inner form">
53 54 ${h.form(request.route_path('reset_password'), needs_csrf_token=False)}
54 55 <label for="email">${_('Email Address')}:</label>
55 56 ${h.text('email', defaults.get('email'))}
56 57 %if 'email' in errors:
57 58 <span class="error-message">${errors.get('email')}</span>
58 59 <br />
59 60 %endif
60 61 <p class="help-block">${_('Password reset link will be sent to matching email address')}</p>
61 62
62 63 %if captcha_active:
63 64 <div class="login-captcha">
64 65 <label for="email">${_('Captcha')}:</label>
65 66 ${h.hidden('recaptcha_field')}
66 67 <div id="recaptcha"></div>
67 68
68 69 %if 'recaptcha_field' in errors:
69 70 <span class="error-message">${errors.get('recaptcha_field')}</span>
70 71 <br />
71 72 %endif
72 73 </div>
73 74 %endif
74 75
75 76 ${h.submit('send', _('Send password reset email'), class_="btn sign-in")}
76 77 <p class="help-block pull-right">
77 78 RhodeCode ${c.rhodecode_edition}
78 79 </p>
79 80
80 81 ${h.end_form()}
81 82 </div>
82 83 </div>
83 84 %endif
84 85 </div>
85 86 </div>
86 87
87 88 <script type="text/javascript">
88 89 $(document).ready(function(){
89 90 $('#email').focus();
90 91 });
91 92 </script>
92 93
93 94 % if captcha_active:
94 95 <script type="text/javascript">
95 96 var onloadCallback = function() {
96 97 grecaptcha.render('recaptcha', {
97 98 'sitekey' : "${captcha_public_key}"
98 99 });
99 100 };
100 101 </script>
101 102 <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>
102 103 % endif
103 104
@@ -1,148 +1,150 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/root.mako"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Create an Account')}
6 6 %if c.rhodecode_name:
7 7 &middot; ${h.branding(c.rhodecode_name)}
8 8 %endif
9 9 </%def>
10 10 <style>body{background-color:#eeeeee;}</style>
11 11
12 12 <div class="loginbox">
13 13 <div class="header-account">
14 14 <div id="header-inner" class="title">
15 15 <div id="logo">
16 16 <div class="logo-wrapper">
17 17 <a href="${h.route_path('home')}"><img src="${h.asset('images/rhodecode-logo-white-60x60.png')}" alt="RhodeCode"/></a>
18 18 </div>
19 19 % if c.rhodecode_name:
20 20 <div class="branding">
21 21 <a href="${h.route_path('home')}">${h.branding(c.rhodecode_name)}</a>
22 22 </div>
23 23 % endif
24 24 </div>
25 25 </div>
26 26 </div>
27 27
28 28 <div class="loginwrapper">
29 29 <rhodecode-toast id="notifications"></rhodecode-toast>
30 <div class="left-column">
30
31 <div class="auth-image-wrapper">
31 32 <img class="sign-in-image" src="${h.asset('images/sign-in.png')}" alt="RhodeCode"/>
32 33 </div>
33 <%block name="above_register_button" />
34 <div id="register" class="right-column">
34
35 <div id="register">
36 <%block name="above_register_button" />
35 37 <!-- login -->
36 38 <div class="sign-in-title">
37 39 % if external_auth_provider:
38 40 <h1>${_('Create an account linked with {}').format(external_auth_provider)}</h1>
39 41 % else:
40 42 <h1>${_('Create an account')}</h1>
41 43 % endif
42 44
43 45 <h4>${h.link_to(_("Go to the login page to sign in with an existing account."), request.route_path('login'))}</h4>
44 46 </div>
45 47 <div class="inner form">
46 48 ${h.form(request.route_path('register'), needs_csrf_token=False)}
47 49
48 50 <label for="username">${_('Username')}:</label>
49 51 ${h.text('username', defaults.get('username'))}
50 52 %if 'username' in errors:
51 53 <span class="error-message">${errors.get('username')}</span>
52 54 <br />
53 55 %endif
54 56
55 57 % if external_auth_provider:
56 58 ## store internal marker about external identity
57 59 ${h.hidden('external_identity', external_auth_provider)}
58 60 ## hide password prompts for social auth
59 61 <div style="display: none">
60 62 % endif
61 63
62 64 <label for="password">${_('Password')}:</label>
63 65 ${h.password('password', defaults.get('password'))}
64 66 %if 'password' in errors:
65 67 <span class="error-message">${errors.get('password')}</span>
66 68 <br />
67 69 %endif
68 70
69 71 <label for="password_confirmation">${_('Re-enter password')}:</label>
70 72 ${h.password('password_confirmation', defaults.get('password_confirmation'))}
71 73 %if 'password_confirmation' in errors:
72 74 <span class="error-message">${errors.get('password_confirmation')}</span>
73 75 <br />
74 76 %endif
75 77
76 78 % if external_auth_provider:
77 79 ## hide password prompts for social auth
78 80 </div>
79 81 % endif
80 82
81 83 <label for="firstname">${_('First Name')}:</label>
82 84 ${h.text('firstname', defaults.get('firstname'))}
83 85 %if 'firstname' in errors:
84 86 <span class="error-message">${errors.get('firstname')}</span>
85 87 <br />
86 88 %endif
87 89
88 90 <label for="lastname">${_('Last Name')}:</label>
89 91 ${h.text('lastname', defaults.get('lastname'))}
90 92 %if 'lastname' in errors:
91 93 <span class="error-message">${errors.get('lastname')}</span>
92 94 <br />
93 95 %endif
94 96
95 97 <label for="email">${_('Email')}:</label>
96 98 ${h.text('email', defaults.get('email'))}
97 99 %if 'email' in errors:
98 100 <span class="error-message">${errors.get('email')}</span>
99 101 <br />
100 102 %endif
101 103
102 104 %if captcha_active:
103 105 <div>
104 106 <label for="recaptcha">${_('Captcha')}:</label>
105 107 ${h.hidden('recaptcha_field')}
106 108 <div id="recaptcha"></div>
107 109 %if 'recaptcha_field' in errors:
108 110 <span class="error-message">${errors.get('recaptcha_field')}</span>
109 111 <br />
110 112 %endif
111 113 </div>
112 114 %endif
113 115
114 116 %if not auto_active:
115 117 <p class="activation_msg">
116 118 ${_('Account activation requires admin approval.')}
117 119 </p>
118 120 %endif
119 121 <p class="register_message">
120 122 ${register_message|n}
121 123 </p>
122 124
123 125 ${h.submit('sign_up',_('Create Account'), class_="btn sign-in", title=_('Create Account in {}').format(c.rhodecode_edition))}
124 126 ${h.end_form()}
125 127 </div>
126 128 <%block name="below_register_button" />
127 129 </div>
128 130 </div>
129 131 </div>
130 132
131 133
132 134 <script type="text/javascript">
133 135 $(document).ready(function(){
134 136 $('#username').focus();
135 137 });
136 138 </script>
137 139
138 140 % if captcha_active:
139 141 <script type="text/javascript">
140 142 var onloadCallback = function() {
141 143 grecaptcha.render('recaptcha', {
142 144 'sitekey' : "${captcha_public_key}"
143 145 });
144 146 };
145 147 </script>
146 148 <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>
147 149 % endif
148 150
General Comments 0
You need to be logged in to leave comments. Login now