Projet

Général

Profil

0001-haguenau-new-theme-56708.patch

Thomas Jund, 15 septembre 2021 17:29

Télécharger (17,8 ko)

Voir les différences:

Subject: [PATCH] haguenau: new theme (#56708)

 static/haguenau/_custom.scss                  | 544 ++++++++++++++++++
 static/haguenau/_vars.scss                    |  87 +++
 static/haguenau/config.json                   |  16 +
 static/haguenau/img/a11y.svg                  |  18 +
 static/haguenau/style.scss                    |   6 +
 .../haguenau/combo/page_template_sidebar.html |   6 +
 .../variants/haguenau/combo/search-cell.html  |   6 +
 templates/variants/haguenau/theme.html        |  24 +
 8 files changed, 707 insertions(+)
 create mode 100644 static/haguenau/_custom.scss
 create mode 100644 static/haguenau/_vars.scss
 create mode 100644 static/haguenau/config.json
 create mode 100644 static/haguenau/img/a11y.svg
 create mode 100644 static/haguenau/style.scss
 create mode 100644 templates/variants/haguenau/combo/page_template_sidebar.html
 create mode 100644 templates/variants/haguenau/combo/search-cell.html
 create mode 100644 templates/variants/haguenau/theme.html
static/haguenau/_custom.scss
1
//
2
//	TYPO
3
//
4

  
5
html {
6
	@media ($min-desktop-viewport) {
7
		font-size: calc(170% / 1.6);
8
	}
9
}
10

  
11
h1 {
12
	font-size: $fz-h1;
13
	color: $blue;
14
	font-style: italic;
15
	font-weight: 900;
16
}
17

  
18
h2 {
19
	font-size: $fz-h3;
20
	color: $green;
21
	text-transform: uppercase;
22
	font-style: italic;
23
	border-bottom: 1px solid;
24
	padding-bottom: .33em;
25
	margin-bottom: 1rem;
26
}
27

  
28
//
29
// Components
30
//
31

  
32
%button {
33
	display: inline-block;
34
	font-weight: 800;
35
	padding: 0.4em 1em;
36
	box-shadow: none;
37
	text-transform: uppercase;
38
	&:hover, &:focus {
39
		box-shadow: 0px 0px 5px $green;
40
	}
41

  
42
}
43

  
44
%cancel-button {
45
	&, &:hover {
46
		background-color: white;
47
		color: $blue;
48
		border-color: currentColor;
49
	}
50
}
51

  
52
%gray-button {
53
	@extend %button;
54
	&, &:hover {
55
		background-color: $gray-light;
56
		color: $blue;
57
		border-color: $gray-light;
58
	}
59
}
60

  
61
.white-btn {
62
	@extend %button;
63
	padding: calc(7em / 17) calc(15em  / 17);
64
	background-color: white;
65
	color: $blue;
66
	border-radius: 3em;
67
	line-height: 1;
68
	text-transform: none;
69

  
70
	&:hover {
71
		background-color: $green;
72
		color: white;
73
	}
74
}
75

  
76
//
77
//	HEADER
78
//
79

  
80
body {
81
	margin-top: 2em;
82
	@media ($min-desktop-viewport) {
83
		margin-top: 1em;
84
	}
85
}
86

  
87
#header-wrapper {
88
	background-image: linear-gradient(
89
		to bottom,
90
		transparent #{$logo-height/2}, #{$blue} #{$logo-height/2}
91
	);
92
}
93

  
94
h1#logo.has-logo {
95
	@media ($max-mobile-viewport) {
96
		padding-left: 0;
97
	}
98
	a {
99
		height: $logo-height;
100
		width: $logo-width;
101
	}
102
} 
103

  
104
// User-links
105
#toplinks {
106
	// display: flex;
107
	//justify-content: flex-end;
108
	position: static;
109
	border: none;
110
	box-shadow: none;
111
	padding: 0;
112
	background-color: transparent;
113
	border-radius: 0;
114
	max-width: none;
115
	font-size: $fz-small;
116
	text-align: right;
117
	padding-bottom: 1rem;
118
	@media ($max-mobile-viewport) {
119
		padding-top: 2rem;
120
	}
121

  
122
	a:not(.account-link) {
123
		@extend .white-btn;
124
	}
125
	.account-link {
126
		display: inline-block;
127
		color: white;
128
		margin-right: 1em;
129
		margin-bottom: 0.5em;
130
	}
131
}
132

  
133
//
134
//	NAV
135
//
136

  
137
@media ($min-desktop-viewport) {
138
	// Nav top right header
139
	$a11y-link-width: 50px;
140
	.site-nav {
141
		order: -1;
142
	}
143
	div.gru-nav {
144
		text-align: right;
145
		position: relative;
146
		z-index: 1000;
147
		height: 0;
148
		> ul {
149
			margin: 0;
150
			display: inline-flex;
151
			width: calc(100% - #{$logo-width} - #{$a11y-link-width});
152
			justify-content: space-around;
153
			> li a {
154
				padding-top: 0;
155
				padding-bottom: 0;
156
				display: flex;
157
				height: 100%;
158
				> span {
159
					margin: auto;
160
				}
161
			}
162
		}
163
	}
164
	.a11y-link {
165
		display: inline-block;
166
		img {
167
			width: $a11y-link-width;
168
			height: auto;
169
			vertical-align: bottom;
170
		}
171
	}
172
}
173
@media ($max-mobile-viewport) {
174
	div.gru-nav .gru-nav-button {
175
		// rounded btn
176
		border: 8px solid transparent;
177
		border-radius: 50%;
178
		width: $nav-menu-side;
179
		box-shadow: 0 0 0 1px white;
180
		&.toggled .icon-bar {
181
			border-color: white;
182
		}
183
	}
184
	// right-to-left adaptation
185
	@if $responsive-menu == left-to-right {
186
		body {
187
			border-left: none;
188
		}
189
		div.gru-nav .gru-nav-button {
190
			left: auto;
191
			right: 0.7rem;
192
			+ ul {
193
				transform: translateX(100%);
194
				left: auto;
195
				right: 0;
196
			}
197
		}
198
	}
199
}
200

  
201
// Top carrousel
202
.theme-top-carrousel {
203
	background-color: $blue;
204
	&--wrapper {
205
		max-width: $width;
206
		margin: 0 auto;
207
		box-shadow: 0 12px 0 0 $green;
208
		position: relative;
209
		z-index: 101;
210
	}
211

  
212
	div.carrousel-content {
213
		$content-mobile-height: 10rem;
214
		$content-desktop-width: 50%;
215
		input + div {
216
			@media ($max-mobile-viewport) {
217
				padding-bottom: $content-mobile-height;
218
			}
219
			@media ($min-desktop-viewport) {
220
				padding-right: $content-desktop-width;
221
			}
222
			div.carrousel-item {
223
				padding: 0;
224
				@media ($min-desktop-viewport) {
225
					align-items: stretch;
226
					justify-content: flex-start;
227
				}
228
				div.carrousel-item-content {
229
					background-color: white;
230
					color: $blue;
231
					padding: 1.5rem;
232
					padding-bottom: 2.5rem;
233
					margin-bottom: 0;
234
					font-style: italic;
235
					* {
236
						display: inline;
237
					}
238
					@media ($max-mobile-viewport) {
239
						flex-grow: 1;
240
						min-height: $content-mobile-height;
241
						margin-bottom: -1 * $content-mobile-height;
242
						text-align: center;
243
					}
244
					@media ($min-desktop-viewport) {
245
						transform: translateX(100%);
246
						flex: 0 0 100%;
247
						display: flex;
248
						align-items: flex-end;
249
						text-align: left;
250
						padding: 2rem;
251
						padding-bottom: 3rem;
252
					}
253
				}
254
			}
255
		}
256
		div.carrousel-nav {
257
			@media ($min-desktop-viewport) {
258
				width: 50%;
259
				left: 50%;
260
				text-align: left;
261
				padding-left: calc(2rem - 10px);
262
			}
263
		}
264
		a.carrousel-previous,
265
		a.carrousel-next {
266
			font-size: 14px;
267
			width: 2.5em;
268
			height: 2.5em;
269
			border-radius: 50%;
270
			border: 0.2em solid white;
271
			top: 0;
272
			bottom: 0;
273
			margin: auto 0;
274
			line-height: 2.4em;
275
			&:after {
276
				font-size: inherit;
277
			}
278
		}
279
		a.carrousel-next {
280
			right: calc(50% + 0.7rem);
281
		}
282
	}
283
}
284

  
285
//
286
//	MAIN
287
//
288

  
289
main {
290
	background-color: $gray_light;
291
	padding-top: 2rem;
292
	padding-bottom: 2rem;
293
	.page-template-two-columns-sidebar &,
294
	.page-template-standard-sidebar & {
295
		background-color: white;
296
		padding-top: 0;
297
		padding-bottom: 0;
298
	}
299
}
300

  
301
.gru-content { 
302
	flex-wrap: wrap;
303
}
304

  
305
.gru-content #theme-top-section {
306
	margin-top: 1rem;
307
	margin-bottom: 1rem;
308
	div.cell {
309
		margin-left: 0;
310
		margin-right: 0;
311

  
312
		&[class^='grid-'],
313
		&[class*=' grid-'] {
314
			padding-right: 0;
315
			margin-right: $grid-gutter;
316
		}
317
	}
318
}
319

  
320
.gru-content #sidebar {
321
	background-color: $gray-light;
322
	padding-top: 2rem;
323

  
324
	& + #columns-wrapper {
325
		padding-top: 2rem;
326
		padding-bottom: 2rem;
327
		@media ($min-desktop-viewport) {
328
			margin-left: 5em;
329
			flex: 1 0 0;
330
		}
331
	}
332
	@media ($max-mobile-viewport) {
333
		margin-left: 0;
334
		margin-right: 0;
335
	}
336

  
337
	@media (min-width: $width) {
338
		box-sizing: content-box;
339
		margin-left: calc(-50vw + #{$width/2});
340
		padding-left: calc(50vw - #{$width/2});
341
	}
342
}
343

  
344
//
345
//	CELLS
346
//
347

  
348
div.textcell {
349
	h1, h2 {
350
		margin: 0.7em 1rem;
351
	}
352
}
353

  
354
div.cell:not(.textcell) {
355
	p {
356
		color: $blue;
357
	}
358
}
359

  
360
div.searchcell form {
361
	align-items: center;
362
}
363

  
364
// custom styles
365
.list-of-forms-cell {
366
	$image-size: 3rem;
367
	.gru-content &.cell {
368
		background-color: white;
369
		border-radius: 5px;
370
		overflow: hidden;
371
		h2:first-child {
372
			font-size: $fz-h3;
373
			font-style: normal;
374
			text-align: left;
375
			padding-top: 1em;
376
			padding-bottom: 1em;
377
		}
378
		// Picture position
379
		&.has-asset-picture {
380
			h2:first-child {
381
				padding-left: $image-size + 2;
382
			}
383
			> div {
384
				display: flex;
385
				flex-wrap: wrap;
386
				align-items: center;
387

  
388
				> * {
389
					flex: 0 0 100%;
390
				}
391

  
392
				> h2:first-child {
393
					flex: 1 0 50%;
394
					margin-left: -1 * ($image-size + 1);
395
				}
396

  
397
				> picture {
398
					display: block;
399
					order: -1;
400
					flex: 0 0 $image-size;
401
					align-self: center;
402
					margin-left: 1rem;
403
					position: relative;
404
					z-index: 1;
405

  
406
					img {
407
						padding: 0;
408
						height: $image-size;
409
						width: $image-size;
410
						object-fit: contain;
411
					}
412
				}
413
			}
414
		}
415
	}
416
}
417

  
418
// Foldable icon
419
div.cell.foldable > div > h2:first-child {
420
	padding-right: 3em;
421
	&::after {
422
		width: 1em;
423
		height: 1em;
424
		border: 1px solid;
425
		padding: .2em;
426
		color: $green;
427
		text-align: center;
428
		box-sizing: content-box;
429
		border-radius: 50%;
430
		top: 0;
431
		bottom: 0;
432
		margin: auto;
433
		background-color: white;
434
	}
435
}
436

  
437
.wcs-forms-of-category-cell {
438
	@extend .list-of-forms-cell;
439
}
440

  
441
//
442
//	WCS
443
//
444

  
445
.wcs-page main {
446
	background-color: white;
447
}
448
// Steps
449
.wcs-steps {
450
	@media ($mq-max--wcs-steps-small-layout) {
451
		padding: 0;
452
	}
453
	@include desktop-vertical-steps() {
454
		padding: 0;
455
		padding-bottom: 2rem;
456
		@media (min-width: $width) {
457
			box-sizing: content-box;
458
			margin-left: calc(-50vw + #{$width/2});
459
			padding-left: calc(50vw - #{$width/2});
460
		}
461
	}
462
}
463
.wcs-step {
464
	@include desktop-vertical-steps() {
465
		margin-bottom: 0;
466
	}
467
	&.current &--label {
468
		@media ($mq-min--wcs-steps-horizontal-layout) and ($max-mobile-viewport) {
469
			color: $blue;
470
		}
471
	}
472
}
473
div#tracking-code {
474
	h3 {
475
		padding-left: 0;
476
		padding-bottom: 0;
477
	}
478
	a {
479
		font-size: 1rem;
480
		color: $blue;
481
		display: block;
482
		padding: 0.33em;
483
		border: 1px solid;
484
		border-radius: 5px;
485
		line-height: 1;
486
	}
487
}
488
div.gru-content div#rub_service {
489
	@media ($min-desktop-viewport) {
490
		padding-left: 4rem;
491
	}
492
	h2 {
493
		@extend h1;
494
		padding-left: 0.5rem;
495
	}
496
	h3 {
497
		@extend h2;
498
		padding-left: 0;
499
	}
500

  
501
	.submit-button button::after {
502
		content: "\f138";
503
		font-family: FontAwesome;
504
		margin-left: 0.66em;
505
	}
506
	.previous-button button {
507
		@extend %gray-button;
508
	}
509
}
510

  
511
//
512
//	A2
513
//
514

  
515
.authentic-page {
516
	main {
517
		background-image: linear-gradient(
518
			to bottom,
519
			$blue 200px,
520
			$gray-light 200px
521
		);
522
	}
523
	.gru-content {
524
		background-color: white;
525
		padding: 2rem;
526
		margin-bottom: 2rem;
527
		box-shadow: 0 12px 0 0 $green;
528

  
529
		.a2-block h2,
530
		.block h2 {
531
			@extend h2;
532
		}
533
	}
534
}
535

  
536
//
537
//	FOOTER
538
//
539

  
540
#footer-wrapper {
541
	margin-top: 0;
542
	padding-top: 2rem;
543
	padding-bottom: 2rem;
544
}
static/haguenau/_vars.scss
1
// Colors
2
$blue: #005694;
3
$green: #95C11F;
4
$gray_light: #E9E9E9;
5
$gray: #616161;
6

  
7
// fonts size
8
$fz-h1: calc(40em / 17);
9
$fz-h2: calc(23em / 17);
10
$fz-h3: calc(20em / 17);
11
$fz-small: calc(15em / 17);
12

  
13
// Layout
14
$logo-height: 84px;
15
$logo-width: 250px;
16

  
17
// Core vars
18
$primary-color: $blue;
19
$font-family: "Lato", sans-serif;
20
$font-color: $gray;
21
$link-color: $primary-color;
22
$width: 1120px;
23
$mobile-limit: 64em;
24
$very-small-limit: 560px;
25
$columns-gutter: 1.5rem;
26
$sidebar-columns-gutter: $columns-gutter;
27
$sidebar-width: calc(240em / 17 + #{$sidebar-columns-gutter});
28
$grid-gutter: $columns-gutter;
29

  
30
$nav-color: $blue;
31
$nav-item-selected-background: transparent;
32
$nav-item-selected-border: 3px solid $green;
33
$nav-item-selected-mode: bottom-border;
34
$nav-height: $logo-height / 2;
35
$nav-menu-color: $blue;
36
$nav-after-image: false;
37
$responsive-menu: left-to-right;
38
$nav-menu-side: 40px;
39
$nav-button-background: $blue;
40
$nav-button-color: white;
41
$nav-mobile-menu-background: $blue;
42
$nav-mobile-menu-item-color: white;
43
$nav-mobile-menu-item-hover-color: white;
44

  
45
$title-color: $blue;
46
$title-background: transparent;
47
$title-font-size: $fz-h3;
48
$title-weight: 900;
49
$title-transform: uppercase;
50
$title-font-style: italic;
51

  
52
$cell-background: transparent;
53
$cell-border: none;
54
$cell-title-cover-border: false;
55
$cell-entry-font-weight: 600;
56
$cell-entry-color: $blue;
57
$cell-entry-border-color: $blue;
58
$cell-entry-hover-color: $cell-entry-color;
59
$cell-entry-hover-background: $gray-light;
60

  
61
$carrousel-height: 280px;
62
$carrousel-text-position: bottom middle;
63
$carrousel-item-mask-color: transparent;
64
$carrousel-navigation-bullet-color: $blue;
65
$carrousel-navigation-bullet-border: 2px solid $blue;
66

  
67
$button-background: $blue;
68
$button-color: white;
69
$button-border-radius: 5px;
70
$button-border: 2px solid transparent;
71
$buttons-order: cancel (grow), previous, submit;
72

  
73
$widget-color: $blue;
74
$widget-border: 1px solid $blue;
75
$widget-border-radius: $button-border-radius;
76
$widget-unique-checkbox-position: left;
77

  
78
$wcs-steps-background: $gray-light;
79
$wcs-step-color: $blue;
80
$wcs-step-current-color: white;
81
$wcs-step-current-background: $blue;
82
$wcs-step-border-bottom: 2px solid;
83
$wcs-step-current-border-bottom: 2px solid $blue;
84

  
85
$footer-background: $blue;
86
$footer-color: white;
87
$footer-link-color: white;
static/haguenau/config.json
1
{
2
  "label": "Haguenau",
3
  "variables": {
4
    "pwa_display": "standalone",
5
    "theme_color": "#005694",
6
    "email_header_asset": "emails:logo"
7
  },
8
  "settings": {
9
    "combo": {
10
      "COMBO_ASSET_SLOTS.update": {
11
        "header:logo": { "label": "Têtière : logo" },
12
        "emails:logo": {"label": "Emails : logo"}
13
      }
14
    }
15
  }
16
}
static/haguenau/img/a11y.svg
1
<?xml version="1.0" encoding="UTF-8"?>
2
<svg width="55" height="22" version="1.1" viewBox="0 0 55 22" xmlns="http://www.w3.org/2000/svg">
3
  <defs>
4
    <style>.cls-1 {
5
        fill: #005694;
6
        fill-rule: evenodd;
7
      }</style>
8
    <style>.cls-1 {
9
        fill: #005694;
10
      }</style>
11
  </defs>
12
  <g transform="translate(-871.4 -819.2)" fill="#005694" fill-rule="evenodd" data-name="Groupe 91">
13
    <path class="cls-1" transform="translate(0 -1161)" d="m917.8 1991a0.8 0.8 0 0 0 0.8-0.793 4.365 4.365 0 1 0-8.73 0 0.793 0.793 0 1 0 1.586 0 2.781 2.781 0 0 1 4.015-2.49l-10.7 10.72a0.509 0.509 0 0 0 0 0.719l2.083 2.083a0.509 0.509 0 0 0 0.719 0z" data-name="Tracé 127"/>
14
    <path class="cls-1" transform="translate(-575.1)" d="m1489 821.8a7.144 7.144 0 0 0-7.144 7.144 0.795 0.795 0 0 0 1.589 0 5.556 5.556 0 1 1 11.11 0 4.294 4.294 0 0 1-1.428 3.1 5.681 5.681 0 0 0-1.784 4.042 3.184 3.184 0 0 1-3.175 3.175 0.793 0.793 0 1 0 0 1.586 4.762 4.762 0 0 0 4.761-4.761 4.129 4.129 0 0 1 1.4-3 5.834 5.834 0 0 0 1.808-4.143 7.145 7.145 0 0 0-0.417-2.409l4.069-4.059a0.521 0.521 0 0 0 0-0.729l-2.083-2.083a0.526 0.526 0 0 0-0.733 0l-3.622 3.619a7.1 7.1 0 0 0-4.353-1.482z" data-name="Tracé 128"/>
15
  </g>
16
  <path class="cls-1" d="m25.06 10.9a14.98 14.98 0 0 0-12.58-7.033c-0.161 0-0.319 0-0.477 8e-3l-0.753-3.539-1.155 0.246 0.718 3.376a14.63 14.63 0 0 0-10.76 6.891 13.74 13.74 0 0 0 2.151 2.894l-0.6-2.831-0.027-0.033a8.423 8.423 0 0 1 0.737-1l1.063 4.97a14.4 14.4 0 0 0 1.436 1.077l-1.51-7.087a13.26 13.26 0 0 1 1.02-0.872l1.862 8.753a13.28 13.28 0 0 0 1.33 0.577l-2.138-10.06c0.349-0.218 0.723-0.428 1.124-0.626l2.363 11.11q0.608 0.155 1.261 0.255l-0.9-4.228a4.33 4.33 0 0 0 1.505 1.167l0.68 3.2c0.282 0.017 0.569 0.027 0.862 0.027 0.117 0 0.234 0 0.35-5e-3l-0.606-2.847a4.377 4.377 0 0 0 0.539 0.034 4.326 4.326 0 0 0 0.662-0.05l1.36 6.402 1.154-0.246-0.754-3.542a16.12 16.12 0 0 0 10.08-6.983zm-16.66-1.044-0.793-3.729c0.373-0.142 0.765-0.271 1.175-0.384l0.518 2.436a4.3 4.3 0 0 0-0.9 1.677zm1.923-2.542-0.39-1.834c0.376-0.069 0.766-0.123 1.17-0.162l0.324 1.523a4.28 4.28 0 0 0-1.104 0.473zm2.279-0.622-0.306-1.436h0.193c0.282 0 0.557 9e-3 0.828 0.024a5.8 5.8 0 0 1 1.339 11.07l-0.3-1.422a4.311 4.311 0 0 0-1.752-8.23zm5.079 8.958a7.026 7.026 0 0 0-0.156-9.466 13.08 13.08 0 0 1 6 4.736 14.12 14.12 0 0 1-5.844 4.73z" fill="#005694" data-name="Tracé 126"/>
17
  <path d="m28.84 0.01609v21.97" fill="none" stroke="#005694" stroke-width="1px"/>
18
</svg>
static/haguenau/style.scss
1
@charset "UTF-8";
2
@import '../includes/fonts/lato';
3

  
4
@import 'vars';
5
@import '../includes/publik';
6
@import 'custom';
templates/variants/haguenau/combo/page_template_sidebar.html
1
{% extends "combo/page_template_sidebar.html" %}
2
{% load combo i18n %}
3

  
4
{# remove top-section #}
5
{% block content-top %}
6
{% endblock %}
templates/variants/haguenau/combo/search-cell.html
1
{% extends "combo/search-cell.html" %}
2

  
3
{% block cell-content %}
4
<h2>Rechercher</h2>
5
{{ block.super }}
6
{% endblock %}
templates/variants/haguenau/theme.html
1
{% extends "theme.html" %}
2
{% load gadjo static %}
3

  
4
{% block nav-bottom %}
5
	<a class="a11y-link" href="{{ a11y_url }}">
6
		<img src="{{site_base}}{% static "" %}{{css_variant}}/img/a11y.svg" alt="accessibilité" />
7
	</a>
8
{% endblock %}
9

  
10
{% block before-main-content %}
11
	<div class="theme-top-carrousel">
12
		<div class="theme-top-carrousel--wrapper">
13
			{% placeholder "top_carrousel" name="Carrousel Entête" %}
14
		</div>
15
	</div>
16
{% endblock %}
17

  
18

  
19
{% block content-top %}
20
	<div id="theme-top-section">
21
		{% placeholder "top-section" name="Haut de page" %}
22
	</div>
23
{% endblock %}
24

  
0
-