Projet

Général

Profil

0001-rouen-customize-user-info-zone-25153.patch

Emmanuel Cazenave, 10 juillet 2018 11:03

Télécharger (6,74 ko)

Voir les différences:

Subject: [PATCH] rouen: customize user-info zone (#25153)

 static/rouen/_custom.scss                     | 50 ++++++++++++++++++-
 static/rouen/_vars.scss                       |  4 +-
 static/rouen/img/picto_btn_connexion.svg      | 14 ++++++
 .../variants/rouen/authentic2/accounts.html   | 16 ++++++
 .../variants/rouen/combo/page_template.html   | 19 +++++++
 5 files changed, 100 insertions(+), 3 deletions(-)
 create mode 100644 static/rouen/img/picto_btn_connexion.svg
 create mode 100644 templates/variants/rouen/authentic2/accounts.html
 create mode 100644 templates/variants/rouen/combo/page_template.html
static/rouen/_custom.scss
38 38
}
39 39

  
40 40
div#footer div#footer-logos {
41
	background: $primary-color;
42 41
	@include flex(1);
42
	background: $primary-color;
43 43
	margin: 0 0.4em 0 0;
44 44
	padding: 2em 0 2em 0;
45 45
	@media screen and (max-width: $custom-very-small-screen) {
......
101 101
}
102 102

  
103 103
div#footer div#footer-content {
104
	@include flex(3);
104 105
	background: $primary-color;
105 106
	padding: 2em 2em 2em 2em;
106 107
	border: 0;
107
	@include flex(3);
108 108
	font-size: 100%;
109 109
	font: inherit;
110 110
	vertical-align: baseline;
......
239 239
		}
240 240
	}
241 241
}
242

  
243
div#toplinks {
244
	border: none;
245
	border-radius: 0;
246
	box-shadow: none;
247
	margin-top: 0.5em;
248
	padding: 0;
249
	right: 0.2em;
250
	a.login,a.logout {
251
		@include flexbox();
252
		@include vendor-prefix(justify-content, flex-end);
253
		div.logtext {
254
			background: $primary-color;
255
			color: $black;
256
			font-size: 122%;
257
			font-weight: 700;
258
			height: 2em;
259
			padding: 0 0.5em;
260
			text-align: center;
261
			line-height: 2em;
262
		}
263
		div.logicon {
264
			background-color: $black;
265
			background-image: url(img/picto_btn_connexion.svg);
266
			background-position: center;
267
			background-repeat: no-repeat;
268
			background-size: 70%;
269
			content: "";
270
			width: 2em;
271
		}
272
	}
273
	a.registration {
274
		@include flexbox();
275
		@include vendor-prefix(justify-content, flex-end);
276
		color: $red;
277
		font-weight: 500;
278
		margin-top: 0.4em;
279
		span.pre-register {
280
			color: $light-black;
281
			margin-right: 0.2em;
282
		}
283
		span.register {
284
			text-decoration: underline;
285
		}
286
	}
287
}
static/rouen/_vars.scss
1 1
$black: #000;
2
$light-black: #333;
2 3
$pale-primary-color: #F4A7AA;
3 4
$primary-color: #EE787C;
5
$red: #C64A59;
4 6
$white: #FFF;
5 7

  
6 8
$button-background: $primary-color;
......
25 27
$sidebar-width: 240px;
26 28
$title-weight: bold;
27 29
$width: 1243.97px;
28
$custom-very-small-screen: 480px;
30
$custom-very-small-screen: 480px;
static/rouen/img/picto_btn_connexion.svg
1
<?xml version="1.0" encoding="utf-8"?>
2
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
3
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
	 width="516.4px" height="516.4px" viewBox="-39 162.5 516.4 516.4" style="enable-background:new -39 162.5 516.4 516.4;"
5
	 xml:space="preserve">
6
<style type="text/css">
7
	.st0{fill:#EE787C;}
8
</style>
9
<g>
10
	<path class="st0" d="M137.9,225.8c-44.9,44.9-44.9,117.6,0,162.5c9.6,9.6,21,17.2,33.5,23.9l0,200.8l47.8,47.8L267,613l-28.7-28.7
11
		l28.7-28.7L238.3,527l28.7-28.7v-86c11.5-5.7,22.9-13.4,33.5-23.9c44.9-44.9,44.9-117.6,0-162.5S182.9,180.9,137.9,225.8z
12
		 M247.9,288c-16.3,16.3-41.1,16.3-57.4,0c-16.3-16.3-16.3-41.1,0-57.4s41.1-16.3,57.4,0S264.1,271.7,247.9,288z"/>
13
</g>
14
</svg>
templates/variants/rouen/authentic2/accounts.html
1
{% extends "../../authentic2/accounts.html" %}
2

  
3
{% block user-info %}
4
          {% if user.is_authenticated %}
5
          <a accesskey="o" class="logout" href="{% url 'auth_logout' %}"><div class="logtext">D&eacute;connexion</div><div class="logicon"></div></a>
6
            {% if idp_account_url %}<a class="registration" href="{{idp_account_url}}">{% endif %}
7
            <span>{{user.first_name}} {{user.last_name}}</span>{% if idp_account_url %}</a>{% endif %}
8
          {% else %}
9
            {% if idp_registration_url %}
10
             <a accesskey="2" class="login" href="{% url 'auth_login' %}"><div class="logtext">Connexion</div><div class="logicon"></div></a>
11
             <a class="registration" href="{{idp_registration_url}}"><span class="pre-register">Pas de compte ?</span><span class="register">Enregistrez vous !</span></a>
12
            {% else %}
13
            <a accesskey="2" class="registration" href="{% url 'auth_login' %}">Connexion <span class="sep">/</span> Inscription</a>
14
            {% endif %}
15
          {% endif %}
16
{% endblock %}
templates/variants/rouen/combo/page_template.html
1
{% extends "../../combo/page_template.html" %}
2
{% load combo %}
3

  
4
{% block user-info %}
5
{% skeleton_extra_placeholder user-info %}
6
          {% if user.is_authenticated %}
7
          <a accesskey="o" class="logout" href="{% url 'auth_logout' %}"><div class="logtext">D&eacute;connexion</div><div class="logicon"></div></a>
8
            {% if idp_account_url %}<a class="registration" href="{{idp_account_url}}">{% endif %}
9
            <span>{{user.first_name}} {{user.last_name}}</span>{% if idp_account_url %}</a>{% endif %}
10
          {% else %}
11
            {% if idp_registration_url %}
12
             <a accesskey="2" class="login" href="{% url 'auth_login' %}"><div class="logtext">Connexion</div><div class="logicon"></div></a>
13
             <a class="registration" href="{{idp_registration_url}}"><span class="pre-register">Pas de compte ?</span><span class="register">Enregistrez vous !</span></a>
14
            {% else %}
15
            <a accesskey="2" class="registration" href="{% url 'auth_login' %}">Connexion <span class="sep">/</span> Inscription</a>
16
            {% endif %}
17
          {% endif %}
18
{% end_skeleton_extra_placeholder %}
19
{% endblock %}
0
-