Projet

Général

Profil

0001-new-theme-villeneuve-dascq-44400.patch

Thomas Jund, 24 juin 2020 14:08

Télécharger (39,1 ko)

Voir les différences:

Subject: [PATCH] new theme villeneuve-dascq (#44400)

 static/villeneuve-dascq/_custom.scss          | 1103 +++++++++++++++++
 static/villeneuve-dascq/_vars.scss            |   93 ++
 static/villeneuve-dascq/config.json           |   17 +
 static/villeneuve-dascq/extra.js              |  153 +++
 static/villeneuve-dascq/img/cross.svg         |   10 +
 static/villeneuve-dascq/img/deconnexion.svg   |    3 +
 static/villeneuve-dascq/img/home.svg          |    7 +
 static/villeneuve-dascq/img/skyline.svg       |  777 ++++++++++++
 static/villeneuve-dascq/img/user.svg          |   12 +
 .../img/vascq-logo-couleur.png                |  Bin 0 -> 38422 bytes
 .../villeneuve-dascq/img/vasqc-logo-blanc.png |  Bin 0 -> 22959 bytes
 static/villeneuve-dascq/style.scss            |    6 +
 .../villeneuve-dascq/combo/page_template.html |   38 +
 .../combo/page_template_3cols.html            |   15 +
 .../combo/page_template_homepage.html         |    9 +
 .../villeneuve-dascq/combo/search-cell.html   |    3 +
 .../combo/wcs/tracking_code_input.html        |    5 +
 .../variants/villeneuve-dascq/wcs/base.html   |   12 +
 18 files changed, 2263 insertions(+)
 create mode 100644 static/villeneuve-dascq/_custom.scss
 create mode 100644 static/villeneuve-dascq/_vars.scss
 create mode 100644 static/villeneuve-dascq/config.json
 create mode 100644 static/villeneuve-dascq/extra.js
 create mode 100644 static/villeneuve-dascq/img/cross.svg
 create mode 100644 static/villeneuve-dascq/img/deconnexion.svg
 create mode 100644 static/villeneuve-dascq/img/home.svg
 create mode 100644 static/villeneuve-dascq/img/skyline.svg
 create mode 100644 static/villeneuve-dascq/img/user.svg
 create mode 100644 static/villeneuve-dascq/img/vascq-logo-couleur.png
 create mode 100644 static/villeneuve-dascq/img/vasqc-logo-blanc.png
 create mode 100644 static/villeneuve-dascq/style.scss
 create mode 100644 templates/variants/villeneuve-dascq/combo/page_template.html
 create mode 100644 templates/variants/villeneuve-dascq/combo/page_template_3cols.html
 create mode 100644 templates/variants/villeneuve-dascq/combo/page_template_homepage.html
 create mode 100644 templates/variants/villeneuve-dascq/combo/search-cell.html
 create mode 100644 templates/variants/villeneuve-dascq/combo/wcs/tracking_code_input.html
 create mode 100644 templates/variants/villeneuve-dascq/wcs/base.html
static/villeneuve-dascq/_custom.scss
1
$header-height-desktop: 6.25rem;
2
$header-height-mobile: 5rem;
3
$nav-btn-width-desktop: calc( 3em + #{$nav-menu-side});
4
$nav-btn-width-mobile: $nav-menu-side;
5

  
6
// icon for url() function
7
// $property: "content" or "background-image";
8
// $color: hexa with no #
9
// $strokWidth: int, no unit;
10
@mixin arrowIcon($property: content, $color: 'fff', $strokeWidth: 3) {
11
#{$property}: url("data:image/svg+xml,%3Csvg viewBox='0 0 32.5 22' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m20 2 10 9-10 9m-20-9h30' fill='none' stroke='%23#{$color}' stroke-linejoin='round' stroke-width='#{$strokeWidth}'/%3E%3C/svg%3E")
12
}
13

  
14
//
15
// GENERIC
16
//
17

  
18
// Typo
19
html {
20
	@media ($max-mobile-viewport) {
21
		font-size: $fz-small;
22
	}
23
}
24

  
25
h1 {
26
	font-size: $fz-h1;
27
	font-weight: 900;
28
	line-height: 1.2;
29
}
30

  
31
h2 {
32
	font-size: $fz-h3;
33
	font-weight: 900;
34
}
35

  
36
h3 {
37
	font-size: $fz-h4;
38
	font-weight: bold;
39
}
40
h4 {
41
	font-size: $fz-h5;
42
	font-weight: bold;
43
}
44

  
45
// Utils
46
.gru-content div.cell.pk-transparent {
47
	box-shadow: none !important;
48
}
49

  
50
// Form
51
label {
52
	font-weight: bold;
53
}
54
input, textarea, select {
55
	font-weight: 800;
56
	font-size: $fz-h6;
57
}
58

  
59
//
60
// COMPONENTS
61
//
62

  
63
// button
64
%button {
65
	text-transform: uppercase;
66
	padding: 0.5em 1em;
67
}
68

  
69
%cancel-button {
70
	background-color: $gray-light;
71
	color: $font-color;
72
	&:hover {
73
		background-color: $gray-light;
74
		color: $font-color;
75
	}
76
}
77

  
78
// Notifs
79
#messages li.error, .errornotice,
80
#messages li.warning, .warningnotice,
81
#messages li.success, .successnotice,
82
#messages li.info, .infonotice {
83
	color: white;
84
}
85

  
86
div.meetings_table {
87
	& > div {
88
	}
89

  
90
	div.head {
91
		border-bottom: 2px solid $primary-color;
92
		font-weight: 900;
93
	}
94
	button {
95
		border: 2px solid white;
96
		box-shadow: 0 0 0 3px $button-background;
97
		&:hover, &:focus {
98
			box-shadow: 0 0 0 3px $primary-color, 0px 0px 10px #777 !important;
99
		}
100

  
101
		&:disabled {
102
			border: 2px solid white;
103
			box-shadow: 0 0 0 3px grayscale($button-background);
104
		}
105
	}
106

  
107
	div span {
108
		border-radius: 1em;
109
		margin: 0.7em;
110
		border: 1px solid transparent;
111

  
112
		&.disabled {
113
			background-color: $gray-light;
114
			opacity: 1;
115
		}
116
	}
117

  
118
	span.selectable {
119
		background-color: $green;
120
		&:hover {
121
			background-color: $green;
122
			color: black;
123
			border: 1px solid;
124
		}
125
		&.on {
126
			background: $primary-color;
127
			color: $button-color;
128
		}
129
	}
130

  
131
	&.mobile {
132
		> div {
133
			width: 100%;
134
		}
135
		div span {
136
			display: inline-block;
137
			padding: 0.5em;
138
			margin: 0.5em;
139
		}
140
		button {
141
			&.prev, &.next {
142
				margin: 0;
143
			}
144
		}
145
	}
146
}
147

  
148
//
149
// CELLS
150
//
151
%title {
152
	line-height: 1.2;
153
}
154
// vertical space
155
div#services > ul > li,
156
div#left div.a2-block, div#right div.a2-block,
157
.gru-content div.cell,
158
.block {
159
	margin-bottom: $columns-gutter / 2;
160
}
161
// Add box-shadow to cells
162
#columns .cell {
163
	box-shadow: 0 0 10px #ccc;
164
}
165
// foldable option
166
div.cell {
167
	&.foldable.folded {
168
		// don't hide cell picture
169
		> div > h2:first-child {
170
			+ picture {
171
				display: block;
172
			}
173
		}
174
	}
175
}
176

  
177
// Search cell
178
// Use search icon for search submit
179
.search-cell {
180
	.submit-button {
181
		&::before {
182
			content: "\f002";
183
			// content: "\f252";
184
			font-family: FontAwesome;
185
		}
186
	}
187
}
188
// Carrousel
189
.carrousel div.carrousel-content {
190
	input + div div.carrousel-item {
191
		padding: $theme-gutter*3 $theme-gutter-mobile*2 $theme-gutter*2;
192
		@media ($min-desktop-viewport) {
193
			padding: $theme-page-padding;
194
		}
195
	}
196
	.carrousel-item-title {
197
		@extend h1;
198
		@media (max-width: $very-small-limit) {
199
			font-size: $fz-h4;
200
		}
201
	}
202
	div.carrousel-nav {
203
		top: $theme-gutter-mobile*2;
204
		left: $theme-gutter-mobile*2;
205
		width: auto;
206
		@media ($min-desktop-viewport) {
207
			left: $theme-page-padding;
208

  
209
		}
210
		label:first-child {
211
			margin-left: 0;
212
		}
213
	}
214

  
215
	$btn-size: 50px;
216
	a.carrousel-next,
217
	a.carrousel-previous {
218
		@media ($min-desktop-viewport) {
219
			display: block;
220
		}
221
		width: $btn-size;
222
		height: $btn-size;
223
		border: 5px solid;
224
		border-radius: 50%;
225
		background: no-repeat center center;
226
		background-size: 1.5rem;
227
		@include arrowIcon($property: background-image);
228

  
229
		top: $theme-gutter;
230
		right: $theme-page-padding;
231
		&::after {
232
			content: none;
233
		}
234
	}
235
	a.carrousel-previous {
236
		left: auto;
237
		right: calc( #{$theme-page-padding} + #{$btn-size} + #{$theme-gutter} );
238
		transform: rotate(180deg);
239
		// right: calc( #{$theme-page-padding} );
240
	}
241
}
242
// tracking-code-input
243
.tracking-code-input-cell {
244
	input, button {
245
		line-height: 3rem;
246
		padding-top: 0;
247
		padding-bottom: 0;
248
	}
249
	input {
250
		margin-bottom: 1rem;
251
	}
252
	button {
253
		// reset
254
		@include vendor-prefix('appearance', 'none');
255
		border: none;
256
		background: none;
257
		padding: 0;
258
		color: inherit;
259

  
260
		text-transform: uppercase;
261
		font-weight: 900;
262

  
263
		.btn-label {
264
			@media ($max-mobile-viewport) {
265
				display: none;
266
			}
267
		}
268
		&:after {
269
			content: "";
270
			display: inline-block;
271
			width: 3rem;
272
			height: 3rem;
273
			vertical-align: middle;
274
			border-radius: 50%;
275
			border: 2px solid white;
276
			margin-left: .66em;
277
			background: center no-repeat;
278
			@include arrowIcon($property: 'background-image');
279
			background-size: 1.5rem;
280
		}
281
	}
282
}
283

  
284
//
285
// Links List
286
//
287
div#rub_service div.category ul,
288
div#services > ul > li > ul,
289
div#account-management ul,
290
div.links-list ul,
291
div.menucell ul,
292
div.wcsformcell,
293
div.categoriescell ul,
294
div.link-list-cell ul,
295
div.wcscurrentdraftscell ul,
296
div.wcscurrentformscell ul {
297
	padding: 0 $theme-gutter-mobile;
298

  
299
	& > li > a {
300
		// padding-right: 0;
301
		padding-left: 2.33em;
302
		position: relative;
303
		&::before {
304
			@include arrowIcon($color: str-slice('#{$link-color}', 2));
305
			display: inline-block;
306
			position: absolute;
307
			left: 1em;
308
			width: 1em;
309
			transform: translateX(-1em);
310
			transition: transform .5s;
311
		}
312
		&:hover::before {
313
			transform: translateX(-0.5em);
314
		}
315

  
316
	}
317
	li.required-authentication a:after {
318
		width: 1em;
319
		height: 1em;
320
		display: block;
321
		margin: auto;
322
		top: 0;
323
		bottom: 0;
324
		right: 0;
325
		left: auto;
326
	}
327
}
328

  
329
//
330
// LAYOUT
331
//
332
div#nav-wrapper,
333
.top-bandeau,
334
.pwa-navigation--wrapper {
335
	width: 100%;
336
	max-width: $width;
337
	margin-right: auto;
338
	margin-left: auto;
339
}
340
div#header,
341
div#nav-wrapper,
342
div#footer,
343
div#main-content-wrapper,
344
.top-bandeau,
345
.pwa-navigation--wrapper  {
346
	padding-left: $theme-gutter-mobile;
347
	padding-right: $theme-gutter-mobile;
348
	@media ($min-desktop-viewport) and (max-width: $width) {
349
		padding-left: $theme-gutter;
350
		padding-right: $theme-gutter;
351
	}
352
	@media (min-width: $width + 1) {
353
		padding-left: $theme-page-padding;
354
		padding-right: $theme-page-padding;
355
	}
356
}
357
.top-bandeau {
358
	padding-left: 0;
359
	@media ($max-mobile-viewport){
360
		padding-right: 0;
361
	}
362
}
363
.pwa-navigation--wrapper {
364
	.search-cell {
365
		 &::before {
366
		 	content: " ";
367
		 	display: block;
368
		 	height: 100%;
369
		 	position: absolute;
370
		 	left: 100%;
371
		 	top: 0;
372
		 	background-color: $gray-light;
373
			@media ($min-desktop-viewport) and (max-width: $width) {
374
			 	width: $theme-gutter;
375
			}
376
			@media (min-width: $width + 1) {
377
				width: $theme-page-padding;
378
			}
379
		 }
380
	}
381
}
382
#columns {
383
	@media ($max-mobile-viewport) {
384
		padding: 0;
385
	}
386
}
387

  
388

  
389

  
390
// 3cols layout
391
.theme-3cols-layout {
392
	@media ($min-desktop-viewport) {
393
		display: flex;
394
		> div {
395
			flex: 1 1 0;
396
		}
397
	}
398
	@media ($max-mobile-viewport) {
399
		#center div.cell {
400
			margin-left: 0;
401
			margin-right: 0;
402
		}
403
	}
404
}
405

  
406
//
407
// BLOCS
408
//
409

  
410
// Header
411
#top {
412
	display: flex;
413
	align-items: center;
414
}
415
#logo {
416
	padding: 0 !important;
417
	flex: 1;
418
	font-size: $fz-h5;
419
	a {
420
		font-weight: 800;
421
		display: block;
422
		box-sizing: content-box;
423
		display: flex;
424
		align-items: center;
425
		height: $header-height-desktop;
426
		background: url(img/vascq-logo-couleur.png) no-repeat;
427
		background-position: left top 5px;
428
		padding-left: 220px;
429
		background-size: 220px auto;
430
		margin-right: $theme-gutter-mobile;
431
		@media ($max-mobile-viewport) {
432
			height: $header-height-mobile;
433
			padding-left: 110px;
434
			background-size: 110px auto;
435
			background-position: left center;
436
			width: 0;
437
			text-indent: -10000em;
438
		}
439

  
440
		// separator
441
		&::after {
442
			content: "";
443
			display: inline-block;
444
			height: 2em;
445
			width: 1px;
446
			order: -1;
447
			margin: $theme-half-gutter;
448
			background-color: $primary-color;
449

  
450
		}
451

  
452
	}
453
}
454

  
455
// Toplinks
456
#toplinks {
457
	// reset
458
	position: static;
459
	border: none;
460
	border-radius: 0;
461
	background: none;
462
	box-shadow: none;
463
	padding: 0;
464
	line-height: 1.25;
465

  
466
	// Keep Space for burger btn
467
	margin-right: $nav-btn-width-mobile;
468
	@media ($min-desktop-viewport) {
469
		margin-right: $nav-btn-width-desktop;
470
	}
471

  
472
	// layout
473
	display: flex;
474
	align-items: center;
475
	> span {
476
		margin-right: $theme-gutter;
477
	}
478
	// login / registration & account in 2 lines
479
	.registration {
480
		display: block;
481
	}
482
	span.sep, .account-link {
483
		display: none;
484
	}
485

  
486
	// add icon
487
	> span {
488
		padding-left: calc( 20px + .66em);
489
		background: no-repeat left center;
490
		background-size: 20px auto;
491
		line-height: $fz-h4;
492
		&.login {
493
			background-image: url(img/user.svg);
494
		}
495
		&.logged-in {
496
			background-image: url(img/deconnexion.svg);
497
		}
498
		&.theme-back-home {
499
			background-image: url(img/home.svg);
500
			// hide back home link on mobile
501
			@media (max-width: $very-small-limit) {
502
				display: none;
503
			}
504
		}
505
	}
506

  
507
}
508

  
509
// Nav (hamburger in right)
510
div.gru-nav {
511
	position: relative;
512
	z-index: 1000;
513

  
514
	&-wrapper {
515
		margin-top: 0;
516
	}
517
	.gru-nav-button {
518
		margin-left: 0;
519
		text-align: right;
520

  
521
		// align button to toplinks
522
		position: absolute;
523
		top: calc(
524
			( (#{$header-height-mobile} - #{$nav-menu-side})
525
				/ 2 + #{$nav-menu-side}
526
			) * -1
527
		) ;
528
		right: 0;
529

  
530
		@media ($min-desktop-viewport) {
531
			// align button to toplinks
532
			top: calc(
533
				( (#{$header-height-desktop} - #{$nav-menu-side})
534
					/ 2 + #{$nav-menu-side}
535
				) * -1
536
			) ;
537
			width: $nav-btn-width-desktop;
538

  
539
			// Add menu label
540
			&::after {
541
				color: $link-color;
542
				content: attr(aria-label);
543
			}
544
		}
545

  
546
		+ ul {
547
			display: none;
548
		}
549
		&.toggled + ul {
550
			display: block;
551
		}
552

  
553
		+ ul {
554
			position: absolute;
555
			right: 0;
556
			min-width: 18em;
557
			max-width: 100%;
558
			border-top: 0;
559
			margin: 0;
560
			width: auto;
561
			border: .33em solid $nav-mobile-menu-background;
562

  
563
			li {
564
				a {
565
					padding-left: 2.33em;
566
					position: relative;
567
				}
568
				a::before {
569
					@include arrowIcon($color: str-slice('#{$nav-item-selected-color}', 2));
570
					display: inline-block;
571
					position: absolute;
572
					left: 1em;
573
					width: 1em;
574
					transform: translateX(-.5em);
575
					opacity: 0;
576
					transition: opacity .5s, transform .5s;
577

  
578
				}
579
				a:hover::before,
580
				&.selected a::before {
581
					opacity: 1;
582
					transform: translateX(0);
583
				}
584
			}
585

  
586
		}
587
	}
588
}
589

  
590

  
591
// Page title
592
.theme-page-header {
593
	text-align: center;
594
	color: $primary-color;
595

  
596
	// Hide Default title if a cell or custom title is defined
597
	> * + .theme-page-title--default {
598
		display: none;
599
	}
600

  
601
	// WCS title
602
	.wcs-page-title {
603
		position: relative;
604
		color: white;
605
		background-color: $primary-color;
606
		margin: 0;
607
		text-align: left;
608

  
609
		padding: $theme-gutter-mobile;
610
		margin-left: -$theme-gutter-mobile;
611
		margin-right: -$theme-gutter-mobile;
612
		@media ($min-desktop-viewport) {
613
			padding: $theme-gutter*2 $theme-gutter;
614
			margin-left: -$theme-gutter;
615
			margin-right: -$theme-gutter;
616

  
617
			// Category image
618
			padding-right: calc( 33.333% + #{$theme-gutter*2});
619
			// Form Category img
620
			&--image {
621
				position: absolute;
622
				top: 0;
623
				bottom: 0;
624
				right: 0;
625
				left: 66.666%;
626
				background-size: cover;
627
			}
628
		}
629
		@media (min-width: $width + 1) {
630
			padding-left: $theme-page-padding;
631
			padding-right: calc( 33.333% + #{$theme-page-padding} );
632
			margin-right: -$theme-page-padding;
633
			margin-left: -$theme-page-padding;
634
		}
635

  
636
	}
637
}
638

  
639
// Top bandeau
640
.top-bandeau {
641
	@media ($min-desktop-viewport) {
642
		background-color: $primary-color;
643
	}
644
	// top bandeau cell styles
645
	.cell:not(#carrousel) {
646
		color: white;
647
		background-color: $primary-color;
648
		padding: $theme-gutter;
649

  
650
		h2:first-child {
651
			font-weight: 800;
652
			margin-top: 0;
653
			margin-bottom: 0;
654
		}
655
		p {
656
			margin-top: 0;
657
		}
658
	}
659
	.carrousel + .cell {
660
		@media ($max-mobile-viewport) {
661
			position: relative;
662
			z-index: 101;
663
			margin-top: -#{$theme-gutter};
664
			margin-right: $theme-gutter-mobile;
665
			margin-left: $theme-gutter-mobile;
666
		}
667
	}
668
	.carrousel	{
669
		// stretch all flex space
670
		@media ($min-desktop-viewport) {
671
			position: relative;
672
			> div {
673
				position: absolute;
674
				top: 0;
675
				bottom: 0;
676
				left: 0;
677
				right: 0;
678
			}
679
			.carrousel-content {
680
				height: 100%;
681
			}
682
		}
683
	}
684
	// Desktop layout
685
	@media ($min-desktop-viewport) {
686
		display: flex;
687
		& > .cell:first-child {
688
			flex: 1 0 auto;
689
		}
690
		& > .cell:last-child {
691
			flex: 0 0 calc( (100% - #{$theme-gutter}) / 3 );
692
			@media (min-width: $width + 1) {
693
				flex: 0 0 calc( (100% - #{$theme-page-padding}) / 3 );
694

  
695
			}
696
		}
697
	}
698
}
699

  
700
// PWA nav & Search Form
701
.pwa-navigation--wrapper {
702
	@media ($min-desktop-viewport) {
703
		display: flex;
704
		justify-content: center;
705
		border-top: 2px solid $gray-light;
706
		border-bottom: 2px solid $gray-light;
707
		.pwa-navigation {
708
			flex: 0 1 66.666%;
709
			align-self: center;
710
		}
711
	}
712
	.search-cell,
713
	.search-cell > div {
714
		background-color: $gray-light;
715
	}
716
	.search-cell {
717
		@media ($max-mobile-viewport) {
718
			display: none;
719
		}
720
		padding: 0;
721
		background-color: $gray-light;
722
		position: relative;
723
		flex: 0 0 33.333%;
724

  
725
		> div {
726
			padding: 0 $theme-gutter;
727
		}
728
	}
729
	.combo-search-form {
730
		padding: $theme-gutter/2 0;
731
		display: flex;
732
		align-items: center;
733

  
734
		.combo-search-input {
735
			border: 1px solid transparent;
736
			margin: 0;
737
			padding-right: 2em;
738
		}
739
		.submit-button {
740
			// reset
741
			@include vendor-prefix('appearance', 'none');
742
			border: none;
743
			background: none;
744
			padding: 0;
745

  
746
			display: block;
747
			width: 2em;
748
			font-size: $fz-h6;
749
			text-align: center;
750
			position: absolute;
751
			right: 0;
752
		}
753
	}
754
}
755

  
756
// JS UI ANIMATION
757
// Fix cell on right of window when she's activated (input get focus)
758
// Use JS, see extra.js
759

  
760
body.no-overflow {
761
	overflow: hidden !important;
762
}
763
.pwa-navigation--wrapper .search-cell {
764
	$open-width: 30em;
765
	$btn-width: 1.8em;
766
	$time: 900ms;
767

  
768
	// button
769
	.top-search-close-btn {
770
		@extend %button;
771
		width: $btn-width;
772
		height: $btn-width;
773
		line-height: 0;
774
		padding: 0;
775
		margin: 0;
776

  
777
		position: fixed;
778
		top: $theme-gutter-mobile;
779
		right: $open-width - $btn-width / 2;
780
		&::before {
781
			content: "\f00d";
782
			font-family: fontawesome;
783
		}
784

  
785
		display: none;
786
	}
787
	// Mask
788
	.top-search-mask {
789
		position: fixed;
790
		top: 0;
791
		left: 0;
792
		right: 0;
793
		bottom: 0;
794
		z-index: 1999;
795
		background-color: black;
796
		opacity: 0;
797
		transition: opacity $time;
798
		display: none;
799
	}
800
	> div {
801
		transition:
802
			top $time,
803
			left $time,
804
			height $time,
805
			width $time;
806
		will-change: top, left, height, width;
807
	}
808
	.combo-search-input {
809
		transition: none;
810
		-webkit-appearance: textfield;
811
		appearance: textfield;
812
	}
813

  
814
	.combo-search-results {
815
		display: none;
816
	}
817

  
818
	&.search-cell-fixed {
819
		> div {
820
			position: fixed;
821
			z-index: 2000;
822
		}
823
		.top-search-mask {
824
			display: block;
825
		}
826

  
827
		// fixed on position
828
		&.search-cell-move-on-top {
829
			> div {
830
				top: 0 !important;
831
				right: 0 !important;
832
				left: calc(100vw - #{$open-width}) !important;
833
				height: 100% !important;
834
				width: $open-width !important;
835
				overflow-y: auto;
836
			}
837
			.combo-search-results,
838
			.top-search-close-btn {
839
				display: block;
840
			}
841
			.top-search-mask {
842
				opacity: .6;
843
			}
844
		}
845
	}
846
}
847

  
848
.pwa-navigation {
849
	@media ($max-mobile-viewport) {
850
		border-top: 2px solid $gray-light;
851
		left: 0;
852
	}
853
	@media ($min-desktop-viewport) {
854
		justify-content: center;
855
	}
856
	div > ul li a {
857
		text-transform: uppercase;
858
		color: $gray;
859
		font-weight: bold;
860
		display: flex;
861
		align-items: center;
862
		background-position: 50% 5px;
863
		background-size: auto calc( #{$nav-mobile-bottom-bar-height / 2} - 5px );
864
		span {
865
			height: auto;
866
			width: 100%;
867
		}
868

  
869
	}
870
	@media ($min-desktop-viewport) {
871
		position: static;
872
		z-index: 0;
873
		div > ul {
874
			justify-content: space-around;
875
			li {
876
				text-align: left;
877
				flex: 0 0 auto;
878
				a {
879
					$icon-width: 30px;
880
					padding: 0;
881
					padding-left: calc( #{$theme-gutter / 2 } + #{$icon-width} + 10px );
882
					padding-right: $theme-gutter / 2;
883
					background-position: #{$theme-gutter / 2} center;
884
					background-size: $icon-width auto;
885
					span {
886
						font-size: $fz-small;
887
					}
888
				}
889
			}
890
		}
891
	}
892
}
893

  
894

  
895
//
896
// WCS
897
//
898

  
899
// layout
900
@media ($min-desktop-viewport) {
901
	div#gauche {
902
		width: $sidebar-width;
903
		& + div#rub_service {
904
			width: calc( 100% - #{$sidebar-width});
905
			padding-left: $theme-gutter;
906
		}
907
	}
908
}
909
#rub_service {
910
	// Hide default title
911
	> h2:first-child {
912
		display: none;
913
	}
914
	form.quixote {
915
		padding: 0;
916
	}
917

  
918
	h3 {
919
		font-size: $fz-h4;
920
		font-weight: 900;
921
		color: $primary-color;
922
	}
923
	// buttons icons & colors
924
	.buttons button::before,
925
	.buttons button::after {
926
		display: inline-block;
927
		width: 1.5em;
928
		height: 1.5em;
929
		border-radius: 50%;
930
		border: 2px solid;
931
		margin: 0 .66em;
932
		background: no-repeat center;
933
		background-size: .75em auto;
934
		vertical-align: -.33em;
935
	}
936
	.submit-button button {
937
		background-color: $green;
938
		color: $font-color;
939
		&::after {
940
			content: "";
941
			@include arrowIcon($property: background-image, $color: str-slice('#{$font-color}', 2), $strokeWidth: 4);
942
			margin-right: 0;
943
		}
944
	}
945
	.previous-button button {
946
		background-color: $font-color;
947
		color: white;
948
		&::before {
949
			content: "";
950
			@include arrowIcon($property: background-image, $color: 'fff', $strokeWidth: 4);
951
			transform: rotate(0.5turn);
952
			margin-left: 0;
953
		}
954
	}
955
	.cancel-button button {
956
		&::before {
957
			content: "";
958
			background-image: url(img/cross.svg);
959
			margin-left: 0;
960
		}
961
	}
962

  
963
}
964
div#gauche {
965
	margin-top: 0;
966
	@media ($min-desktop-viewport) {
967
		background-image: linear-gradient(to top, transparent, $gray-light 200px);
968
	}
969

  
970
	@media ($min-desktop-viewport) {
971
		box-sizing: content-box;
972
		height: 100%;
973
		padding-left: $theme-gutter;
974
		margin-left: -$theme-gutter;
975
	}
976
	@media (min-width: $width + 1) {
977
		padding-left: $theme-page-padding;
978
		margin-left: -$theme-page-padding;
979
	}
980

  
981
	// Tracking code
982
	#tracking-code {
983
		font-size: 100%;
984
		margin-bottom: 0;
985
		.tracking-code-part {
986
			background-color: $font-color;
987
			color: white;
988
			padding: .66em;
989
			@media ($min-desktop-viewport) {
990
				padding-left: $theme-gutter;
991
				margin-left: -$theme-gutter;
992
			}
993
			@media (min-width: $width + 1) {
994
				padding-left: $theme-page-padding;
995
				margin-left: -$theme-page-padding;
996
			}
997
			// reset default styles
998
			* {
999
				color: inherit !important;
1000
				font-size: inherit !important;
1001
				display: inline;
1002
				padding: 0;
1003
			}
1004
			h3 {
1005
				font-weight: normal;
1006
				margin-right: .66em;
1007
			}
1008
			a {
1009
				font-weight: 900;
1010
			}
1011
		}
1012
		form {
1013
			margin: 1em 0;
1014
		}
1015
	}
1016

  
1017
}
1018

  
1019
// Steps
1020
.wcs-steps {
1021
	text-transform: uppercase;
1022
	font-weight: 600;
1023
	margin-bottom: 0;
1024
}
1025
.wcs-step {
1026
	@include desktop-vertical-steps() {
1027
		margin-bottom: 0;
1028
	}
1029
	&.step-before {
1030
		color: $primary-color;
1031
		.wcs-step--marker {
1032
			color: inherit;
1033
		}
1034
	}
1035
}
1036

  
1037

  
1038

  
1039
//
1040
// FOOTER
1041
//
1042

  
1043
footer {
1044
	// keep space for PWA nav
1045
	@media ($max-mobile-viewport) {
1046
		margin-bottom: $nav-mobile-bottom-bar-height;
1047
	}
1048

  
1049
}
1050
#footer {
1051
	padding-top: $theme-gutter;
1052
	padding-bottom: $theme-gutter;
1053
	.footer-imgs {
1054
		text-align: center;
1055
		line-height: 0;
1056
		.logo-blanc {
1057
			width: 200px;
1058
		}
1059
		.skyline {
1060
			width: 600px;
1061
		}
1062

  
1063
		@media ($min-desktop-viewport) {
1064
			text-align: justify;
1065
			&::after {
1066
				content: " ";
1067
				display: inline-block;
1068
				width: 90%;
1069
			}
1070
			.logo-blanc {
1071
				width: 25%;
1072
				max-width: 250px;
1073
			}
1074
			.skyline {
1075
				width: 70%;
1076
			}
1077
		}
1078
	}
1079

  
1080
	.menucell {
1081
		@media ($min-desktop-viewport) {
1082
			text-align: right;
1083
		}
1084
		li {
1085
			@media ($max-mobile-viewport) {
1086
				display: block;
1087
			}
1088
			a {
1089
				@media ($max-mobile-viewport) {
1090
					display: block;
1091
				}
1092
				color: white;
1093
				@media ($min-desktop-viewport) {
1094
					padding-right: 0;
1095
					padding-left: 3em;
1096
				}
1097
				&::before {
1098
					content: none;
1099
				}
1100
			}
1101
		}
1102
	}
1103
}
static/villeneuve-dascq/_vars.scss
1
// Colors
2

  
3
$blue: #5787f5;
4
$green: #8fe489;
5
$red: #e85f5b;
6
$black-blue: #172029;
7
$gray: rgb(78, 86, 96);
8
$gray-light: #f0f0f0;
9
$gray-dark: rgb(23, 32, 41);
10

  
11
// Fonts size:
12
$fz-h1: 2.8em; 	// 45px
13
$fz-h2: 2.5em; 	// 39px
14
$fz-h3: 1.875em;// 30px
15
$fz-h4: 1.55em;	// 25px
16
$fz-h5: 1.25em;	// 20px
17
$fz-h6: 1.125em;// 18px
18
$fz-small: 0.875em;	// 14px
19
$fz-xsmall: 0.75em;	// 12px
20

  
21
$theme-gutter: 2rem;
22
$theme-gutter-mobile: 1.25rem;
23
$theme-half-gutter: $theme-gutter / 2;
24
$theme-half-gutter-mobile: $theme-gutter / 2;
25

  
26
$theme-page-padding: 7.5rem;
27

  
28

  
29
// Core vars
30
$primary-color: $blue;
31
$font-family: muli, sans-serif;
32
$font-color: $gray-dark;
33
$link-color: $primary-color;
34

  
35
$very-small-limit: 560px;
36
$mobile-limit: 1023px;
37
$width: 1380px;
38
$columns-gutter: $theme-gutter * 2;
39

  
40
$nav-mobile-limit: 9999px;
41
$nav-active-color: transparent;
42
$nav-item-selected-color: $link-color;
43
$nav-item-selected-background: white;
44
$nav-button-background: none;
45
$nav-button-color: $link-color;
46
$nav-menu-side: 30px;
47
$nav-mobile-menu-background: $gray-light;
48
$nav-mobile-menu-item-color: $font-color;
49

  
50
$title-background: transparent !default;
51
$title-color: $primary-color;
52
$title-weight: 900;
53
$title-font-size: $fz-h4;
54
$title-padding: 1rem $theme-gutter-mobile ;
55

  
56
$cell-border: none;
57
$cell-border-radius: 10px;
58
$cell-title-cover-border: false;
59
$cell-image-padding: 0;
60

  
61
$cell-entry-color: $font-color;
62
$cell-entry-hover-color: $link-color;
63
$cell-entry-hover-background: none;
64

  
65
$carrousel-text-position: top left;
66
$carrousel-navigation-bullet-size: 1rem;
67
$carrousel-navigation-bullet-border: 2px solid white;
68
$carrousel-height: 25rem;
69

  
70
$error-color: #e95f5c;
71
$button-background: $primary-color;
72
$button-color: white;
73
$button-border-radius: 3em;
74
$buttons-order: cancel, previous (grow), submit;
75
$buttons-alignment: space-between;
76

  
77
$widget-border-radius: 5px;
78
$widget-border: 1px solid $primary-color;
79
$widget-focus-color: $primary-color;
80
$wcs-step-color: $font-color;
81
$wcs-step-current-color: white;
82
$wcs-step-current-background: $primary-color;
83
$wcs-step-border-bottom: 1px solid $primary-color;
84
$wcs-step-current-border-bottom: $wcs-step-border-bottom;
85
$wcs-steps-small-layout-limit: $mobile-limit;
86

  
87
$notification_error_color: $error-color;
88
$notification_warning_color: #EC892F;
89
$notification_success_color: #15b350;
90
$notification_info_color: #3562da;
91

  
92
$footer-full-width-background: false;
93
$footer-background: $primary-color;
static/villeneuve-dascq/config.json
1
{
2
  "label": "Villeneuve d'Ascq",
3
  "variables": {
4
    "pwa_display": "standalone",
5
    "theme_color": "#5787f5"
6
  },
7
  "settings": {
8
    "combo": {
9
      "COMBO_PUBLIC_TEMPLATES.update": {
10
        "three_columns": {
11
          "name": "trois colonnes",
12
          "template": "combo/page_template_3cols.html"
13
        }
14
      }
15
    }
16
  }
17
}
static/villeneuve-dascq/extra.js
1
// TOP Search CELL
2
// Fix cell On right of window when she's activated (input get focus)
3
(function(d){
4
	'use strict';
5
	let top_search;
6
	let el_to_move;
7
	let closeBtn;
8
	let mask;
9

  
10
	// CSS class name
11
	const fixed = "search-cell-fixed";
12
	const on_top = "search-cell-move-on-top";
13

  
14
	// Status
15
	let is_fixed = false;
16
	let is_fixed_on_top = false;
17

  
18
	const debug = function(func) {
19
		console.log(func);
20
		console.log("is_fixed", is_fixed);
21
		console.log("is_fixed_on_top", is_fixed_on_top);
22
	};
23

  
24
	const createCloseBtn = function(){
25
		closeBtn = d.createElement('button');
26
		closeBtn.className = "top-search-close-btn";
27
		closeBtn.setAttribute("aria-label", "Fermer la fenêtre de recherche");
28
		closeBtn.setAttribute("role", "button");
29
	};
30

  
31
	const addCloseBtn = function(){
32
		createCloseBtn();
33
		$(el_to_move).prepend(closeBtn);
34
	};
35

  
36
	const createMask = function() {
37
		mask = d.createElement('span');
38
		mask.className = "top-search-mask";
39
		mask.setAttribute("role", "button");
40

  
41
		top_search.append(mask);
42
	};
43

  
44
	const fixLayout = function() {
45
		if (is_fixed) return;
46

  
47
		const elLayout = el_to_move.getBoundingClientRect()
48

  
49
		el_to_move.style.top = elLayout.top + "px";
50
		el_to_move.style.left = elLayout.left + "px";
51
		el_to_move.style.height = elLayout.height + "px";
52
		el_to_move.style.width = elLayout.width + "px";
53

  
54
		top_search.style.height = elLayout.height + "px";
55

  
56
		top_search.classList.add(fixed);
57
		is_fixed = true;
58
	};
59

  
60
	const removeLayout = function() {
61
		if (!is_fixed) return;
62
		top_search.classList.remove(fixed);
63
		top_search.removeAttribute('style');
64
		el_to_move.removeAttribute('style');
65
		is_fixed = false;
66
	};
67

  
68
	const fixOnTop = function(callback) {
69
		if ( !is_fixed || top_search.classList.contains(on_top) ) return;
70
		top_search.classList.add(on_top);
71
		is_fixed_on_top = true;
72
	};
73

  
74
	const detachTop = function(callback) {
75
		if ( !is_fixed_on_top || !top_search.classList.contains(on_top) ) return;
76
		$(el_to_move).one('transitionend', function(e){
77
			e.stopPropagation();
78
			if (callback) {
79
				callback();
80
			}
81
		});
82
		top_search.classList.remove(on_top);
83
		is_fixed_on_top = false;
84
	};
85

  
86
	const open = function() {
87
		if (is_fixed_on_top) return;
88
		d.body.classList.add('no-overflow');
89
		fixLayout();
90
		setTimeout(function () {
91
			fixOnTop();
92
		}, 20);
93
	};
94

  
95
	const close = function() {
96
		if (!is_fixed_on_top) return;
97
		detachTop(function(){
98
			removeLayout();
99
			d.body.classList.remove('no-overflow');
100
		})
101
	};
102

  
103
	const init = function() {
104
		top_search = d.querySelector('.pwa-navigation--wrapper .search-cell');
105
		if (!top_search) return;
106

  
107
		el_to_move = top_search.querySelector('div');
108
		const form = top_search.querySelector('form');
109
		const input = top_search.querySelector('input');
110

  
111
		addCloseBtn();
112
		createMask();
113

  
114
		// when focus change
115
		document.addEventListener('focusin', function(e) {
116
			if (e.target === input && !is_fixed_on_top) {
117
					open();
118
			} else {
119
				// close if activeElement is not a child of el_to_move
120
				if ( !el_to_move.contains(d.activeElement) ) {
121
					close();
122
				}
123
			}
124
		});
125

  
126
		// Open Input click
127
		$(input).on('click keydown', function(){
128
			if (input === d.activeElement) {
129
				open();
130
			}
131
		});
132

  
133
		// open when submit form
134
		$(form).on('submit', open);
135

  
136
		// close esc
137
		document.addEventListener('keydown', function(e){
138
			if (e.keyCode === 27) {
139
				close();
140
			}
141
		});
142

  
143
		// close click btn
144
		$(closeBtn).on('click', close);
145

  
146
		// close on mask
147
		$(mask).on('click', close);
148
	};
149

  
150
	$(function() {
151
		init();
152
	});
153
})(document)
static/villeneuve-dascq/img/cross.svg
1
<?xml version="1.0" encoding="UTF-8"?>
2
<svg version="1.1" viewBox="0 0 12 12" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
3
<g transform="translate(0 -28.34)">
4

  
5

  
6
	<g transform="translate(-14.1 14.34)">
7
		<path d="m24.6 15.5-9 9m0-9 9 9" fill="none" stroke="#172029" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
8
	</g>
9
</g>
10
</svg>
static/villeneuve-dascq/img/deconnexion.svg
1
<?xml version="1.0" encoding="UTF-8"?>
2
<svg width="20" height="22" version="1.1" viewBox="0 0 20 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
3
<path d="m10 2.463c2.293 0 4.439 0.878 6.049 2.488 1.61 1.61 2.488 3.756 2.488 6.049 0 2.293-0.878 4.439-2.488 6.049-1.61 1.61-3.756 2.488-6.049 2.488-2.293 0-4.439-0.878-6.049-2.488-3.317-3.317-3.317-8.732 0-12.05 1.61-1.659 3.756-2.537 6.049-2.537m0-1.463c-2.537 0-5.122 0.9756-7.073 2.927-3.902 3.902-3.902 10.24 0 14.15 1.951 1.951 4.488 2.927 7.073 2.927 2.585 0 5.122-0.9756 7.073-2.927 3.902-3.902 3.902-10.24 0-14.15-1.951-1.951-4.537-2.927-7.073-2.927zm-4.494 4.871a0.7318 0.7318 0 0 0-0.5117 1.254l3.998 4.021-3.998 4.02a0.732 0.732 0 0 0 1.037 1.033l3.992-4.016 3.994 4.016a0.732 0.732 0 0 0 1.037-1.033l-3.998-4.02 3.998-4.021a0.7318 0.7318 0 0 0-0.5352-1.254 0.7318 0.7318 0 0 0-0.502 0.2227l-3.994 4.016-3.992-4.016a0.7318 0.7318 0 0 0-0.5254-0.2227z" fill="#5787f5" stroke-width=".4878"/></svg>
static/villeneuve-dascq/img/home.svg
1
<?xml version="1.0" encoding="UTF-8"?>
2
<svg width="20" height="22" version="1.1" viewBox="0 0 20 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
3
<style type="text/css">
4
	.st0{fill:none;stroke:#5787F5;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
5
</style>
6
<path d="m9.928 0.003906a0.984 1.009 0 0 0-0.6562 0.2871l-8.953 8.98a0.984 1.009 0 1 0 1.377 1.443l0.2949-0.2949v10.57a0.984 1.009 0 1 0 1.969 0v-10.9h12v10.9a0.984 1.009 0 1 0 1.967 0v-10.67l0.4004 0.3965a0.984 1.009 0 1 0 1.367-1.451l-9.053-8.98a0.984 1.009 0 0 0-0.7148-0.2832zm0.03516 2.416 5.701 5.656h-11.34l5.637-5.656zm-1.676 14.63a0.984 1.009 0 0 0-0.9844 1.01v2.926a0.984 1.009 0 1 0 1.969 0v-1.918h1.475v1.918a0.984 1.009 0 1 0 1.969 0v-2.926a0.984 1.009 0 0 0-0.9844-1.01h-3.443z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#5787f5" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
7
</svg>
static/villeneuve-dascq/img/user.svg
1
<?xml version="1.0" encoding="UTF-8"?>
2
<svg width="20" height="22" version="1.1" viewBox="0 0 20 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
3
<style type="text/css">
4
	.st0{fill:#5787F5;}
5
	
6
		.st1{fill-rule:evenodd;clip-rule:evenodd;fill:none;stroke:#5787F5;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
7
</style>
8
<g transform="translate(0 .5)">
9
	
10
	<path d="m10 10.49c-5.541 0-10 4.448-10 9.975a1.021 1.018 0 1 0 2.041 0c0-4.447 3.501-7.94 7.96-7.94 4.459 0 7.958 3.493 7.958 7.94a1.021 1.018 0 1 0 2.041 0c0-5.527-4.457-9.975-9.999-9.975zm0-8.957c1.939 0 3.469 1.527 3.469 3.461s-1.531 3.461-3.469 3.461c-1.939 0-3.571-1.527-3.571-3.461s1.633-3.461 3.571-3.461m0-2.036c-3.061 0-5.51 2.443-5.51 5.496 0 3.053 2.449 5.496 5.51 5.496 3.061 0 5.51-2.443 5.51-5.496 0-3.053-2.449-5.496-5.51-5.496z" clip-rule="evenodd" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#5787f5" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
11
</g>
12
</svg>
static/villeneuve-dascq/style.scss
1
@charset "UTF-8";
2
@import '../includes/fonts/muli';
3

  
4
@import 'vars';
5
@import '../includes/publik';
6
@import 'custom';
templates/variants/villeneuve-dascq/combo/page_template.html
1
{% extends "combo/page_template.html" %}
2
{% load combo static %}
3

  
4
{% block user-info %}
5
	<span class="theme-back-home">
6
		<a href="{{site_base}}" title="retour à l'accueil">Accueil</a>
7
	</span>
8
	{{ block.super }}
9
{% endblock %}
10

  
11
{% block before-main-content %}
12
	<div class="pwa-navigation--wrapper">
13
		{{ block.super }}
14
		{% placeholder "top-search" name="zone de recherche" %}
15
	</div>
16
{% endblock %}
17

  
18

  
19
{% block content-pre %}
20
	{% block main-header %}
21
	<header class="theme-page-header">
22
		{% placeholder "main-title" name="Titre de la page" %}
23
		{% if page.title %}
24
		<h1 class="theme-page-title--default">
25
			{{ page.title }}
26
		</h1>
27
		{% endif %}
28
	</header>
29
	{% endblock %}
30
{% endblock %}
31

  
32
{% block footer %}
33
	<div class="footer-imgs">
34
		<img class="logo-blanc" src="{{site_base}}{% static "" %}{{css_variant}}/img/vasqc-logo-blanc.png">
35
		<img class="skyline" src="{{site_base}}{% static "" %}{{css_variant}}/img/skyline.svg" >
36
	</div>
37
	{{ block.super }}
38
{% endblock %}
templates/variants/villeneuve-dascq/combo/page_template_3cols.html
1
{% extends "combo/page_template.html" %}
2

  
3
{% block combo-content %}
4
<div id="columns" class="theme-3cols-layout">
5
  <div id="left" class="column">
6
    {% placeholder "left" name="Colonne gauche" %}
7
  </div>
8
  <div id="center" class="column">
9
    {% placeholder "content" name="Colonne centrale" %}
10
  </div>
11
  <div id="right" class="column">
12
    {% placeholder "right" name="Colonne droite" %}
13
  </div>
14
</div>
15
{% endblock %}
templates/variants/villeneuve-dascq/combo/page_template_homepage.html
1
{% extends "combo/page_template_3cols.html" %}
2
{% load combo assets i18n %}
3

  
4
{% block before-main-content %}
5
  <div class="top-bandeau">
6
    {% placeholder "bandeau" name="Bandeau" %}
7
  </div>
8
  {{ block.super }}
9
{% endblock %}
templates/variants/villeneuve-dascq/combo/search-cell.html
1
{% extends "combo/search-cell.html" %}
2

  
3
{% block submit-content %}{% endblock %}
templates/variants/villeneuve-dascq/combo/wcs/tracking_code_input.html
1
{% extends "combo/wcs/tracking_code_input.html" %}
2

  
3
{% block submit-content %}
4
	<span class="btn-label">Valider</span>
5
{% endblock %}
templates/variants/villeneuve-dascq/wcs/base.html
1
{% extends "wcs/base.html" %}
2

  
3
{% block main-title %}
4
{% if title %}
5
<h1 class="wcs-page-title">
6
    {{ title }}
7
    <span
8
      class="wcs-page-title--image"
9
      style="background-image: url({{portal_url}}assets/wcs:category:picture:eservices:{{global_context.category_slug}})"></span>
10
</h1>
11
{% endif %}
12
{% endblock %}
0
-