Project

General

Profile

0001-relayout-login-page.patch

Frédéric Péters, 02 June 2014 03:53 PM

Download (6.38 KB)

View differences:

Subject: [PATCH] relayout login page

 univcloud/static/css/style.css              | 97 ++++++++++++++++++++++++-----
 univcloud/static/js/univcloud.js            |  9 +++
 univcloud/templates/registration/login.html | 18 ++++--
 univcloud/templates/univcloud/base.html     |  2 +-
 4 files changed, 103 insertions(+), 23 deletions(-)
univcloud/static/css/style.css
72 72
  position: relative;
73 73
}
74 74

  
75
#wrap.login-page {
76
	width: 100%;
77
}
78

  
75 79
#logout {
76 80
  position: absolute;
77 81
  right: 0;
......
223 227
}
224 228

  
225 229
#login {
226
  float: right;
230
  position: absolute;
231
  top: 0px;
232
  right: 0px;
227 233
  /* background: #f5f5f5; */
228
  width: 40%;
229
  padding: 5px 10px 15px 10px;
230
  margin-top: 2%;
234
  width: 30%;
235
  min-width: 300px;
236
  padding: 5px 0px 15px 10px;
237
  margin-top: 24px;
231 238
  border-radius: 0px;
232 239
  /* box-shadow: 0 0 5px black; */
233 240
}
234 241

  
242
#login h2 {
243
        margin-top: 0;
244
        text-align: right;
245
        margin-right: 10px;
246
}
247

  
248
#login form {
249
        z-index: 1000;
250
        background: #001c3a;
251
        display: none;
252
        padding: 10px 0 0 10px;
253
}
254

  
235 255
#login label {
236 256
  display: inline-block;
237 257
  width: 10em;
......
239 259

  
240 260
#login input.submit {
241 261
  float: right;
262
  background: white;
263
  border: 0;
264
  padding: 5px;
265
  position: relative;
266
  right: -3px;
267
  top: 3px;
268
  font-size: 150%;
242 269
}
243 270

  
244 271
.close {
......
285 312
  height: 700px;
286 313
}
287 314

  
315
#favourite-idps {
316
	margin: 0;
317
	padding: 0;
318
        height: 50px;
319
}
320

  
321
#favourite-idps li {
322
	display: block;
323
	width: 25%;
324
	height: 50px;
325
	float: left;
326
	margin: 0;
327
	padding: 0;
328
	text-align: center;
329
}
330

  
331
#favourite-idps li:nth-child(1) { background: #008ba5; }
332
#favourite-idps li:nth-child(2) { background: #583ab3; }
333
#favourite-idps li:nth-child(3) { background: #2476eb; }
334
#favourite-idps li:nth-child(4) { background: white; }
335

  
336
#favourite-idps li a {
337
	padding: 10px;
338
	display: block;
339
	text-decoration: none;
340
	border: none;
341
}
342

  
343
#favourite-idps li:nth-child(4) a { color: black; font-size: 300%; padding: 0;}
344

  
288 345
#idplist {
289
  float: left;
290
  width: 35%;
291
  height: 100%;
292
  background-color: #f5f5f5;
346
  height: 9em;
347
  background-color: white;
293 348
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
294 349
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
295 350
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
296 351
  box-shadow: 0 0 5px black;
297 352
}
298 353

  
299
#idplist ul {
300
  height: 90%;
354
#idplist ul#idps {
355
  display: none;
301 356
  overflow-y: scroll;
302 357
  overflow-x: hidden;
303
  white-space: nowrap;
358
  height: 400px;
359
  position: absolute;
360
  background: white;
361
  z-index: 10000;
304 362
}
305 363

  
306
#idplist ul li {
364
#idplist ul#idps li {
307 365
  list-style-type: none;
308 366
  margin-left: -30px;
367

  
368
  display: block;
369
  width: 24%;
370
  float: left;
371
  padding: 1ex;
372
  white-space: normal;
309 373
}
310 374

  
311
#idplist ul li a {
375
#idplist ul#idps li a {
312 376
  color: black;
313 377
  border-bottom: 0;
314 378
}
......
317 381
  margin: 10px 10px;
318 382
  height: 1.5em;
319 383
  font-size: 1.2em;
320
  width: 90%;
384
  width: calc(100% - 20px);
385
  border: none;
321 386
}
322 387

  
323 388
#map {
324
  float: right;
325
  width: 63%;
389
  width: 100%;
326 390
  height: 100%;
327
  box-shadow: 0 0 5px black;
328 391
}
329 392

  
330 393
div.gridster > ul > li.dragging {
univcloud/static/js/univcloud.js
69 69
function refreshmarkers() {
70 70
	var listItems = $('ul#idps').children();
71 71
	var searchValue = $('input#search').val().toLowerCase();
72
	if (searchValue === '') {
73
		$('#idps').hide();
74
	} else {
75
		$('#idps').show();
76
	}
72 77
	var new_markers = new Array();
73 78
	for ( var i = listItems.length - 1; i >= 0; i-- ) {
74 79
		item = $(listItems[i]);
......
167 172
	};
168 173
});
169 174

  
175
$('#others').click(function() {
176
	$('#idps').toggle();
177
});
178

  
170 179
});
univcloud/templates/registration/login.html
12 12
{% endblock %}
13 13

  
14 14
{% block wrapper %}
15
<div id="wrap">
15
<div id="wrap" class="login-page">
16 16
{% endblock %}
17 17

  
18 18
{% block user-links %}
......
22 22

  
23 23
<div id="map-and-idplist">
24 24
<div id="idplist">
25
  <input type="text" id="search" x-webkit-speech speech>
25
  <input type="text" id="search" placeholder="Recherchez votre établissement d'origine ou cliquez sur le bouton ⋯ pour une liste complète" x-webkit-speech speech>
26
  <ul id="favourite-idps">
27
    <li><a href="#">Université de Paris 3 - Sorbonne Nouvelle ***TEST***</a></li>
28
    <li><a href="#">Montpellier Supagro</a></li>
29
    <li><a href="#">École central de Nantes</a></li>
30
    <li id="others"><a href="#">⋯</a></li>
31
  </ul>
26 32
  <ul id="idps">
27 33
  {% include "univcloud/idplist.html" %}
28 34
  </ul>
......
30 36
<div id="map"></div>
31 37
</div>
32 38

  
33
<div id="login">
39
<div id="login" style="display: none;">
40

  
41
        <h2 onclick="$('#login form').toggle();">Connexion locale</h2>
34 42

  
35
<h2>Connexion locale</h2>
43
<form method="post" id="login-form" action="{% url 'django.contrib.auth.views.login' %}">
36 44

  
37 45
{% if form.errors %}
38 46
<p>{% trans 'Mot de passe incorrect.' %}</p>
39 47
{% endif %}
40 48

  
41
<form method="post" id="login-form" action="{% url 'django.contrib.auth.views.login' %}">
42 49
{% csrf_token %}
43 50

  
44 51
<p>
......
52 59

  
53 60
<input type="submit" value="Se connecter" class="submit login" />
54 61
<input type="hidden" name="next" value="{{ next }}" />
62
<br style="clear: both;"/>
55 63
</form>
56 64

  
57 65
</div>
univcloud/templates/univcloud/base.html
18 18
  {% endblock %}
19 19
    {% if not popup %}
20 20
    <div id="header">
21
      <h1>Portail des services UnivCloud</h1>
21
      <h1>Accès eduspot</h1>
22 22
      <a href="#" id="portal">Retour au portail</a>
23 23
      <a href="/accounts/logout" id="logout">Déconnexion</a>
24 24
    </div>
25
-