Projet

Général

Profil

0001-new-theme-isere-cd38-48886.patch

Thomas Jund, 26 novembre 2020 16:45

Télécharger (41,6 ko)

Voir les différences:

Subject: [PATCH] new theme: isere-cd38 (#48886)

 static/isere-cd38/_custom.scss                | 591 ++++++++++++++++++
 static/isere-cd38/_vars.scss                  |  76 +++
 static/isere-cd38/config.json                 |  22 +
 static/isere-cd38/crossmenu.json              |   1 +
 static/isere-cd38/extra.js                    | 469 ++++++++++++++
 static/isere-cd38/style.scss                  |   7 +
 .../isere-cd38/combo/cells/a-la-une/form.html |   6 +
 .../isere-cd38/combo/page_template.html       |   5 +
 .../combo/page_template_homepage.html         |  32 +
 9 files changed, 1209 insertions(+)
 create mode 100644 static/isere-cd38/_custom.scss
 create mode 100644 static/isere-cd38/_vars.scss
 create mode 100644 static/isere-cd38/config.json
 create mode 100644 static/isere-cd38/crossmenu.json
 create mode 100644 static/isere-cd38/extra.js
 create mode 100644 static/isere-cd38/style.scss
 create mode 100644 templates/variants/isere-cd38/combo/cells/a-la-une/form.html
 create mode 100644 templates/variants/isere-cd38/combo/page_template.html
 create mode 100644 templates/variants/isere-cd38/combo/page_template_homepage.html
static/isere-cd38/_custom.scss
1
//
2
// Typo
3
//
4

  
5
html {
6
	@media ($min-desktop-viewport) {
7
		font-size: 1.125em;
8
	}
9
}
10
h1, .h1, h2, .h2, h3, .h3, h4, .h4 {
11
	font-family: $raleway;
12
	font-weight: bold;
13
}
14
h1, .h1 { font-size: $fz-h1; }
15
h2, .h2 { font-size: $fz-h2; }
16
h3, .h3 { font-size: $fz-h3; }
17
h4, .h4 { font-size: $fz-h4; }
18

  
19

  
20
.section-title {
21
	font-size: $fz-h2;
22
	font-family: $raleway;
23
	text-transform: uppercase;
24
	color: $cyan-dark;
25
	background: transparent;
26
	padding: 0;
27
	margin-top: 0;
28
	@media ($max-mobile-viewport) {
29
		font-weight: normal;
30
		font-size: $fz-h4;
31
	}
32
}
33

  
34
.underlined-title {
35
	text-transform: none;
36
	font-family: $raleway;
37
	font-size: $fz-h2;
38
	color: $cyan-dark;
39
	padding: 0;
40
	background: transparent;
41
	border-bottom: 2px solid $cyan-dark;
42
	padding-bottom: .33em;
43
}
44

  
45
.h2-txt {
46
	@extend .underlined-title;
47
	margin-bottom: 0.75em !important;
48
	@media (max-width: $very-small-limit) {
49
		font-size: $fz-h3;
50
		font-weight: normal;
51
	}
52
}
53
.h3-txt {
54
	color: $cyan-dark;
55
	border-bottom: none !important;
56
	@media (max-width: $very-small-limit) {
57
		font-weight: normal;
58
	}
59
}
60

  
61

  
62
// Desktop
63
//	50px => 2.75em
64
//		Titre home page av image
65
// 	34px => 1.8em
66
//		titre rubrique desktop
67
//		Titre form
68
//	24px => 1.3em
69
//		nav items
70
//		sous-titre form
71
//		titre cell
72
//	22px => 1.2em
73
//		connexion
74
//		texte cell
75
//		links-list
76
//		footer
77
//		button
78
//	18px
79
//		texte form
80
//		Steps
81

  
82
// Mobile
83
//	20px 1.3em
84
//		Titre formulaire
85
//		Nav items
86
//	18px
87
//		Steps
88
//	16px
89
//		titre rubrique,
90
//		Sous titre form
91
//		titre cell
92
// 		button
93
//	14px
94
//		base texte
95
//		Labels
96
//		Liens connexion
97

  
98
//
99
//	Forms
100
//
101
%button {
102
	transition: all 0.2s ease;
103
	&:hover {
104
		transform: scale(1.01);
105
	}
106
}
107
%cancel-button {
108
	background-color: $gray-dark;
109
	&:hover {
110
		background-color: $gray-dark;
111
	}
112
}
113

  
114
// notifications
115
@mixin custom-notif($color, $symbol, $bgcolor) {
116
	background: linear-gradient(to right,
117
		$color 3rem,
118
		$bgcolor 3.01em
119
	);
120
	color: black;
121
	&::before {
122
		display: block;
123
		width: 3rem;
124
		left: 0;
125
		text-align: center;
126
		content: $symbol;
127
		color: white;
128
		font-size: $fz-h2;
129
		font-family: $raleway;
130
		font-weight: 700;
131
	}
132
}
133

  
134
#messages li.error,
135
.errornotice,
136
.pk-error {
137
	@include custom-notif(
138
		$notification_error_color,
139
		"X",
140
		adjust-color($notification_error_color, $lightness: 52%, $saturation: -60%)
141
	);
142
}
143

  
144
#messages li.warning,
145
.warningnotice,
146
.pk-attention {
147
	@include custom-notif(
148
		$notification_warning_color,
149
		"!",
150
		adjust-color($notification_warning_color, $lightness: 35%, $saturation: -20%)
151
	);
152
}
153

  
154
#messages li.success,
155
.successnotice
156
#messages li.info,
157
.infonotice,
158
.pk-information {
159
	@include custom-notif(
160
		$notification_info_color,
161
		"i",
162
		adjust-color($notification_info_color, $lightness: 60%, $saturation: -20%)
163
	);
164
}
165

  
166
//
167
// LAYOUT
168
//
169
// sidebar <-> columns gutter
170
@media ($min-desktop-viewport) {
171
	.gru-content {
172
		#sidebar {
173
			div.cell {
174
				@if $sidebar-position == left {
175
					margin-right: $sidebar-columns-gutter;
176
				} @else {
177
					margin-left: $sidebar-columns-gutter;
178
				}
179
			}
180
		}
181
	}
182
}
183
// 3cols layout
184
.theme-3cols-layout {
185
	@media ($min-desktop-viewport) {
186
		display: flex;
187
		margin-left: -#{$columns-gutter / 2};
188
		margin-right: -#{$columns-gutter / 2};
189
		> div {
190
			flex: 1 1 0;
191
			> .cell {
192
				margin-left: #{$columns-gutter / 2} !important;
193
				margin-right: #{$columns-gutter / 2} !important;
194
			}
195
		}
196
	}
197
	@media ($max-mobile-viewport) {
198
		#center div.cell {
199
			margin-left: 0;
200
			margin-right: 0;
201
		}
202
	}
203
}
204
// homepage
205
.page-template-homepage {
206
	#content {
207
		flex-wrap: wrap;
208
		#columns-wrapper {
209
			flex: 1 0 calc(100% - #{$sidebar-max-width});
210
		}
211
		.toutes-demarches {
212
			flex: 0 0 100%;
213
			order: 2;
214
			@media ($max-mobile-viewport) {
215
				padding-left: 1rem;
216
				padding-right: 1rem;
217
			}
218
		}
219
	}
220
}
221

  
222

  
223
//
224
// HEADER
225
//
226
div#header {
227
	padding: 0;
228
	padding-left: 100px; // isère widget width;
229
	padding-right: $nav-menu-side + 0.5rem;
230
	@media (min-width: $nav-mobile-limit + 0.001) {
231
		padding-right: $yellow-border-mobile;
232
	}
233
	@media ($min-desktop-viewport) {
234
		padding-left: #{$yellow-border-desktop + $main-padding-desktop};
235
		padding-right: $yellow-border-desktop;
236
	}
237
}
238
#top {
239
	display: flex;
240
	height: $header-height-mobile;
241
	@media (min-width: $nav-mobile-limit + 0.001) {
242
		height: $header-height-desktop;
243
	}
244
}
245
h1#logo.has-logo {
246
	flex-grow: 1;
247
	padding: 0;
248
	background: none;
249
	padding-top: 1rem;
250
	padding-bottom: 1rem;
251

  
252
	a {
253
		display: block;
254
		height: 100%;
255
		min-width: 80px;
256
		margin-right: 1rem;
257
	}
258
}
259
// user links
260
#toplinks {
261
	position: static;
262
	border-radius: 0;
263
	box-shadow: none;
264
	border: none;
265
	padding: 0;
266
	font-family: $raleway;
267
	font-size: $fz-small;
268
	font-weight: bold;
269
	align-self: center;
270
	a {
271
		display: block;
272
	}
273
	@media (min-width: $nav-mobile-limit + 0.001) {
274
		align-self: flex-start;
275
		background-color: $gold;
276
		padding: 0 1em;
277
		font-size: 1rem;
278
		line-height: 2em;
279
		a {
280
			display: inline;
281
			color: black;
282
		}
283
	}
284
}
285

  
286

  
287
//
288
// NAV
289
//
290
#nav {
291
	margin-top: 0;
292
	@media (min-width: $nav-mobile-limit + 0.001) {
293
		padding: 3px #{$yellow-border-mobile + $main-padding-mobile};
294
	}
295
	@media ($min-desktop-viewport) {
296
		padding: 3px #{$yellow-border-desktop + $main-padding-desktop};
297
	}
298
}
299
#nav-button .icon-bar {
300
	border-width: 2px;
301
}
302
.gru-nav > ul {
303
	margin: 0;
304
	font-size: $fz-h4;
305
}
306
// Nav mobile (hamburger in right)
307
@media (max-width: $nav-mobile-limit) {
308
	div.gru-nav-wrapper {
309
		margin-top: 0;
310
	}
311
	div.gru-nav {
312
		position: relative;
313
		.gru-nav-button {
314
			margin-left: 0;
315
			// align button to toplinks
316
			position: absolute;
317
			top: calc(
318
				( (#{$header-height-mobile} - #{$nav-menu-side})
319
					/ 2 + #{$nav-menu-side}
320
				) * -1
321
			) ;
322
			right: 0;
323
		}
324
		ul li a {
325
			padding: 1rem !important;
326
			text-align: center;
327
		}
328
	}
329
}
330

  
331
//
332
// Page picture
333
//
334
body.has-picture nav::after {
335
	@extend .h1;
336
	color: white;
337
	display: flex;
338
	align-items: center;
339
	justify-content: center;
340
	text-align: center;
341
	top: 0;
342
	padding: $yellow-border-desktop + $main-padding-desktop;
343
	white-space: pre-wrap;
344

  
345
    @media (max-width: $nav-mobile-limit) {
346
      content: none !important;
347
    }
348
}
349

  
350

  
351
//
352
// MAIN
353
//
354
main {
355
	background-color: $gold;
356
}
357
div#main-content-wrapper {
358
	background-color: white;
359
	border: solid $gold;
360
	border-width: 0 $yellow-border-mobile;
361
	@media ($min-desktop-viewport) {
362
		border-width: 0 $yellow-border-desktop;
363
		padding: 3rem;
364
	}
365
}
366
// Sidebar
367
.gru-content #sidebar {
368
	@media ($max-mobile-viewport) {
369
		order: 0;
370
		background-color: $gray-light;
371
		margin-left: -#{$yellow-border-mobile};
372
		margin-right: -#{$yellow-border-mobile};
373
		max-width: none;
374
		padding: #{$yellow-border-mobile + $main-padding-mobile};
375
	}
376
}
377
// columns
378
#columns-wrapper {
379
	@media ($max-mobile-viewport) {
380
		padding: $main-padding-mobile;
381
	}
382
}
383

  
384
//
385
// CELLS
386
//
387
// sidebar cells
388
#sidebar {
389
	div.cell {
390
		border: none;
391
		h2:first-child {
392
			@extend .section-title;
393
			& ~ * {
394
				padding: 0;
395
			}
396
		}
397
	}
398
}
399
// columns cells
400
.gru-content .cell {
401
	&.wcs-forms-of-category-cell, &.link-list-cell {
402
		// cell picture to left of title
403
		&.has-asset-picture {
404
			$image-width: 3rem;
405
			> div {
406
				display: flex;
407
				flex-wrap: wrap;
408
				position: relative;
409
				> h2:first-child {
410
					flex: 1 0 calc(100% - #{$image-width});
411
					margin-left: -#{$image-width};
412
					padding-left: calc(#{$image-width} + .5rem);
413
					+ picture {
414
						display: block;
415
						order: -1;
416
						flex: 0 0 auto;
417
						align-self: center;
418
						z-index: 1;
419
						img {
420
							width: $image-width;
421
						}
422
						~ * {
423
							flex: 0 0 100%;
424
						}
425
					}
426
				}
427
			}
428
		}
429
	}
430
	&.foldable {
431
		> div > h2:first-child {
432
			&::after {
433
				content: "\f068";	// minus
434
				font-weight: normal;
435
				font-size: .6em;
436
				background-color: white;
437
				color: $cyan-dark;
438
				border-radius: 50%;
439
				width: 1em;
440
				height: 1em;
441
				line-height: 1em;
442
				text-align: center;
443
				box-sizing: content-box;
444
				padding: 0.3em;
445
				bottom: 0;
446
				top: 0;
447
				margin-top: auto;
448
				margin-bottom: auto;
449
			}
450
		}
451
		&.folded > div > h2:first-child {
452
			&::after {
453
				content: "\f067";  // plus
454
			}
455
		}
456
	}
457
	// Text cell
458
	&.text-cell {
459
		border: none;
460
		> div > h2:first-child {
461
			@extend .h2-txt;
462
			margin: 0.7rem 1rem;
463
		}
464
		h2 {
465
			@extend .h2-txt;
466
			margin: 0.7rem 1rem;
467
		}
468
		h3 {
469
			@extend .h3-txt;
470
		}
471
	}
472

  
473
}
474
// "A la une" form cell
475
.cell.a-la-une.wcs-form-cell {
476
	border: none;
477
	> div {
478
		@media ($max-mobile-viewport) {
479
			display: flex;
480
		}
481
		picture {
482
			@media ($max-mobile-viewport) {
483
				flex: 0 0 50%;
484
				max-width: 250px;
485
				display: flex;
486
			}
487
			@media ($min-desktop-viewport) {
488
				display: block;
489
			}
490
			img {
491
				width: 100%;
492
				max-height: 200px;
493
				object-fit: cover;
494
			}
495
		}
496
		[class^="wcs-form-"] {
497
			flex: 1 1 auto;
498
			display: flex;
499
			a {
500
				width: 100%;
501
				padding: 1rem;
502
				&:hover {
503
					background-color: $cyan-xlight;
504
					color: black
505
				}
506
				@media ($max-mobile-viewport) {
507
					display: flex;
508
					align-items: center;
509
				}
510
				@media ($min-desktop-viewport) {
511
					text-align: center;
512
				}
513
			}
514
		}
515
	}
516
}
517

  
518
//
519
// WCS
520
//
521
.wcs-steps {
522
	@media ($max-mobile-viewport) {
523
		border: 1px solid $cyan-dark;
524
		padding: $wcs-steps-spacing;
525
	}
526
}
527
div#rub_service {
528
	h2 {
529
		@extend .h2-txt;
530
		@media ($min-desktop-viewport) {
531
			margin-left: 0.5rem;
532
			margin-right: 0.5rem;
533
		}
534
	}
535
	h3 {
536
		@extend .h3-txt;
537
	}
538
	form.quixote {
539
		@media ($max-mobile-viewport) {
540
			padding: 0;
541
		}
542
	}
543
	.buttons {
544
		.SubmitWidget {
545
			flex-grow: 1;
546
			max-width: 12.5em;
547
			&:not(:first-child) {
548
				padding-left: 1.5rem;
549
			}
550
			@media (max-width: $very-small-limit) {
551
				flex: 1 1 50%;
552
				max-width: none;
553
				&.previous-button {
554
					padding-left: 0;
555
				}
556
			}
557
			> .content, button {
558
				display: block;
559
				width: 100%;
560
				margin: 0;
561
			}
562
		}
563
		.submit-button {
564
			flex-grow: 2;
565
			max-width: 25em;
566
			@media (max-width: $very-small-limit) {
567
				flex: 1 1 100%;
568
				max-width: none;
569
			}
570
		}
571
	}
572
}
573

  
574

  
575

  
576
//
577
// FOOTER
578
//
579
#footer-wrapper {
580
	margin-top: 0;
581
}
582

  
583

  
584
//
585
// Isere Widget
586
//
587
.isereMegaMenu {
588
	position: absolute;
589
	top: 0;
590
	left: 0;
591
}
static/isere-cd38/_vars.scss
1
// Colors
2
$gold: #FECE15;
3
$cyan-dark: hsl(184,43%,26%);
4
$cyan-xlight: hsl(184,15%,90%);
5
$gray-light: #F5F5F5;
6
$gray-dark: #4D4D4D;
7

  
8
// fonts
9
$raleway: raleway, sans-serif;
10
$source-sans: 'Source Sans Pro', sans-serif;
11
$fz-h1: 2.75em;
12
$fz-h2: 1.8em;
13
$fz-h3: 1.3em;
14
$fz-h4: 1.2em;
15
$fz-small: 0.875em;
16

  
17
// layout
18
$header-height-desktop: 7.5rem;
19
$header-height-mobile: 4.3rem;
20
$yellow-border-desktop: 4.5rem;
21
$yellow-border-mobile: 1rem;
22
$main-padding-desktop: 3rem;
23
$main-padding-mobile: 1rem;
24
$sidebar-columns-gutter: $main-padding-desktop;
25

  
26
// Core vars
27
$primary-color: $cyan-dark;
28
$link-color: $cyan-dark;
29

  
30
$width: 1920px;
31
$mobile-limit: 70em;
32
$nav-mobile-limit: 50em;
33
$very-small-limit: 560px;
34
$font-family: $source-sans;
35
$sidebar-position: right;
36
$sidebar-max-width: 400px;
37
$sidebar-width: 26%;
38
$sidebar-min-width: 290px;
39

  
40
$nav-background: $cyan-dark;
41
$nav-full-width-background: true;
42
$nav-color: white;
43
$nav-active-color: white;
44
$nav-item-selected-color: $cyan-dark;
45
$nav-menu-side: 3rem;
46
$nav-button-background: transparent;
47
$nav-button-color: $gray-dark;
48
$nav-mobile-menu-background: white;
49
$nav-mobile-menu-item-color: $cyan-dark;
50
$nav-mobile-menu-item-hover-background: $cyan-dark;
51
$nav-mobile-menu-item-hover-color: white;
52

  
53
$title-font-size: $fz-h3;
54
$title-background: $cyan-dark;
55
$title-color: white;
56
$title-font-style: $raleway;
57
$title-weight: bold;
58
$title-transform: uppercase;
59

  
60
$cell-border: 1px solid $cyan-dark;
61
$cell-title-cover-border: false;
62
$cell-background: transparent;
63
$cell-entry-color: $gray-dark;
64
$cell-entry-hover-color: black;
65
$cell-entry-border-color: $cyan-dark;
66
$cell-entry-hover-background: $cyan-xlight;
67

  
68
$button-background: $cyan-dark;
69
$buttons-order: submit, previous, cancel;
70

  
71
$notification_error_color: #D40000;
72
$notification_warning_color: #F9C92F;
73
$notification_success_color: $cyan-dark;
74
$notification_info_color: $cyan-dark;
75

  
76
$footer-background: $cyan-dark;
static/isere-cd38/config.json
1
{
2
  "label": "Isère (CD38)",
3
  "variables": {
4
    "pwa_display": "standalone",
5
    "theme_color": "#FECE15",
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
        "footer:logo": {"label": "Pied de page : logo"},
13
        "emails:logo": {"label": "Emails : logo"}
14
      },
15
      "COMBO_CELL_ASSET_SLOTS.update": {
16
        "wcs_wcsformcell": {
17
          "picture": {"prefix": "Image"}
18
        }
19
      }
20
    }
21
  }
22
}
static/isere-cd38/crossmenu.json
1
{"data":{"title":"Les sites du d\u00e9partement","account":{"title":"Mon compte","link":"https:\/\/www.isere.fr\/espace-perso"},"menu":[{"title":"Le D\u00e9partement","path":"","icon":"https:\/\/menutrans.isere.fr\/sites\/default\/files\/menu_icons\/icoDepartement_0.png","sub":[{"title":"isere.fr","path":"https:\/\/www.isere.fr","description":null},{"title":"Is\u00e8re Mag","path":"https:\/\/iseremag.fr\/","description":null},{"title":"Erecrute","path":"https:\/\/erecrute.cg38.fr\/,DanaInfo=erecrute-juniper.cg38.local,SSO=U+","description":null},{"title":"March\u00e9s publics","path":"https:\/\/www.isere.fr\/marches-publics","description":null},{"title":"Cartographies","path":"https:\/\/www.isere.fr\/cartographie","description":null}]},{"title":"Solidarit\u00e9 - Sant\u00e9","path":"","icon":"https:\/\/menutrans.isere.fr\/sites\/default\/files\/menu_icons\/icoSolidarite.png","sub":[{"title":"Is\u00e8re B\u00e9n\u00e9volat","path":"https:\/\/iserebenevolat.fr\/","description":null},{"title":"Is\u00e8reAdom","path":"https:\/\/www.isereadom.fr\/","description":null},{"title":"MDA 38","path":"https:\/\/www.isere.fr\/mda38\/Pages\/default.aspx","description":null},{"title":"Stop HPV","path":"https:\/\/www.stophpv.fr\/","description":null}]},{"title":"Education - Sport - Jeunesse","path":"","icon":"https:\/\/menutrans.isere.fr\/sites\/default\/files\/menu_icons\/icoEducation.png","sub":[{"title":"ENT","path":"https:\/\/www.colleges-isere.fr\/","description":null},{"title":"Cyclo Alpes","path":"https:\/\/www.cyclo-alpes.com\/","description":null},{"title":"Sport Is\u00e8re","path":"https:\/\/sport.isere.fr","description":"Site Sport Is\u00e8re"},{"title":"Is\u00e8re Outdoor","path":"https:\/\/www.isereoutdoor.fr\/accueil\/","description":null},{"title":"Course de la r\u00e9sistance","path":"https:\/\/coursedelaresistance.fr\/","description":null},{"title":"ODPE","path":"https:\/\/www.isere.fr\/odpe","description":"Observatoire d\u00e9partemental de la protection de l\u2019enfance de l\u2019Is\u00e8re"}]},{"title":"Mobilit\u00e9","path":"","icon":"https:\/\/menutrans.isere.fr\/sites\/default\/files\/menu_icons\/icoMobilite.png","sub":[{"title":"Itinis\u00e8re","path":"https:\/\/www.itinisere.fr\/","description":null},{"title":"Transis\u00e8re","path":"https:\/\/www.transisere.fr\/","description":null},{"title":"Transaltitude","path":"https:\/\/www.transaltitude.fr\/fr\/","description":null},{"title":"Covoit.net","path":"https:\/\/covoit.net\/","description":null},{"title":"Mov\u0027Ici","path":"https:\/\/movici.auvergnerhonealpes.fr\/","description":null},{"title":"A\u00e9roport Grenoble Alpes Is\u00e8re","path":"https:\/\/www.grenoble-airport.com\/","description":null}]},{"title":"D\u00e9veloppement du territoire - Environnement","path":"","icon":"https:\/\/menutrans.isere.fr\/sites\/default\/files\/menu_icons\/icoDeveloppement.png","sub":[{"title":"Is\u00e8re THD","path":"https:\/\/www.iserethd.fr\/","description":null},{"title":"SYMBHI","path":"https:\/\/symbhi.fr\/","description":null},{"title":"Observatoire de l\u0027eau","path":"https:\/\/www.isere.fr\/observatoire-eau\/Pages\/default.aspx","description":null},{"title":"Is\u00e8re Lombri","path":"https:\/\/www.isere-lombri.fr\/","description":null},{"title":"Biodiversit\u00e9","path":"https:\/\/biodiversite.isere.fr\/","description":null}]},{"title":"Culture - Ev\u00e9nements","path":"","icon":"https:\/\/menutrans.isere.fr\/sites\/default\/files\/menu_icons\/icoCulture.png","sub":[{"title":"Culture Is\u00e8re","path":"https:\/\/culture.isere.fr\/","description":null},{"title":"Mus\u00e9es Is\u00e8re","path":"https:\/\/musees.isere.fr\/","description":"Acc\u00e8s aux mus\u00e9es Is\u00e9rois"},{"title":"Archives d\u00e9partementales","path":"https:\/\/archives.isere.fr\/","description":null},{"title":"M\u00e9diath\u00e8que d\u00e9partementale","path":"https:\/\/mediatheque-departementale.isere.fr\/","description":null},{"title":"Domaine de Vizille - Mus\u00e9e de la R\u00e9volution fran\u00e7aise","path":"https:\/\/musees.isere.fr\/musee\/domaine-de-vizille-musee-de-la-revolution-francaise","description":null},{"title":"Maison Berg\u00e8s","path":"https:\/\/musees.isere.fr\/musee\/maison-berges","description":null},{"title":"Mus\u00e9e de l\u2019Ancien \u00c9v\u00each\u00e9","path":"https:\/\/musees.isere.fr\/musee\/musee-de-lancien-eveche","description":null},{"title":"Mus\u00e9e Arcabas en Chartreuse","path":"https:\/\/musees.isere.fr\/musee\/musee-arcabas-en-chartreuse","description":null},{"title":"Mus\u00e9e arch\u00e9ologique Saint-Laurent","path":"https:\/\/musees.isere.fr\/musee\/musee-archeologique-saint-laurent","description":null},{"title":"Mus\u00e9e Champollion","path":"https:\/\/musees.isere.fr\/musee\/musee-champollion","description":null},{"title":"Mus\u00e9e dauphinois","path":"https:\/\/musees.isere.fr\/musee\/musee-dauphinois","description":null},{"title":"Mus\u00e9e H\u00e9bert","path":"https:\/\/musees.isere.fr\/musee\/musee-hebert","description":null},{"title":"Mus\u00e9e Hector-Berlioz","path":"https:\/\/musees.isere.fr\/musee\/musee-hector-berlioz","description":null},{"title":"Mus\u00e9e de la R\u00e9sistance et de la D\u00e9portation de l\u0027Is\u00e8re","path":"https:\/\/musees.isere.fr\/musee\/musee-de-la-resistance-et-de-la-deportation-de-lisere","description":null},{"title":"Mus\u00e9e de Saint-Antoine-l\u2019Abbaye","path":"https:\/\/musees.isere.fr\/musee\/musee-de-saint-antoine-labbaye","description":null},{"title":"PAYSAGE \u003E PAYSAGES","path":"https:\/\/www.paysage-paysages.fr\/","description":null},{"title":"Festival Berlioz","path":"https:\/\/www.festivalberlioz.com\/","description":null},{"title":"Les all\u00e9es chantent","path":"https:\/\/www.les-allees-chantent.fr\/","description":null},{"title":"AIDA 38","path":"https:\/\/www.aida38.fr\/","description":null}]},{"title":"Tourisme - Attractivit\u00e9","path":"","icon":"https:\/\/menutrans.isere.fr\/sites\/default\/files\/menu_icons\/icoSport_0.png","sub":[{"title":"Is\u00e8re Tourisme","path":"https:\/\/www.isere-tourisme.com\/","description":null},{"title":"Is\u00e8re Tourisme Pro","path":"https:\/\/pro.isere-tourisme.com\/","description":null},{"title":"Tous sur le web","path":"https:\/\/www.toussurleweb.com\/","description":null},{"title":"Is\u00e8re Outdoor","path":"https:\/\/carto.isere.fr\/isere-outdoor\/","description":null},{"title":"Cyclo Alpes","path":"https:\/\/www.cyclo-alpes.com\/","description":null},{"title":"Rencontres du Tourisme","path":"https:\/\/www.rencontres-tourisme-isere.com\/","description":null}]}],"social_network":[{"title":"Facebook","link":"https:\/\/www.facebook.com\/isere.le.departement\/"},{"title":"Instagram","link":"https:\/\/www.instagram.com\/isere.le.departement\/"},{"title":"Linkedin","link":"https:\/\/fr.linkedin.com\/company\/d%C3%A9partement-de-l-is%C3%A8re"},{"title":"Twitter","link":"https:\/\/twitter.com\/CDIsere"},{"title":"YouTube","link":"https:\/\/www.youtube.com\/channel\/UCtDk8_0fQyBMPyzUsy3Px-Q"}]},"method":"GET"}
static/isere-cd38/extra.js
1
(function (funcName, baseObj) {
2
  // jQuery's $(document).ready() equivalent function
3

  
4
  funcName = funcName || "docReady";
5
  baseObj = baseObj || window;
6
  var readyList = [];
7
  var readyFired = false;
8
  var readyEventHandlersInstalled = false;
9

  
10
  function ready() {
11
    if (!readyFired) {
12
      readyFired = true;
13
      for (var i = 0; i < readyList.length; i++) {
14

  
15
        readyList[i].fn.call(window, readyList[i].ctx);
16
      }
17

  
18
      readyList = [];
19
    }
20
  }
21

  
22
  function readyStateChange() {
23
    if (document.readyState === "complete") {
24
      ready();
25
    }
26
  }
27

  
28
  baseObj[funcName] = function (callback, context) {
29
    if (typeof callback !== "function") {
30
      throw new TypeError("callback for docReady(fn) must be a function");
31
    }
32
    if (readyFired) {
33
      setTimeout(function () {
34
        callback(context);
35
      }, 1);
36
      return;
37
    } else {
38
      readyList.push({fn: callback, ctx: context});
39
    }
40
    if (document.readyState === "complete") {
41
      setTimeout(ready, 1);
42
    } else if (!readyEventHandlersInstalled) {
43
      if (document.addEventListener) {
44
        document.addEventListener("DOMContentLoaded", ready, false);
45
        window.addEventListener("load", ready, false);
46
      } else {
47
        document.attachEvent("onreadystatechange", readyStateChange);
48
        window.attachEvent("onload", ready);
49
      }
50
      readyEventHandlersInstalled = true;
51
    }
52
  }
53
})("docReady", window);
54

  
55
(function () {
56

  
57
  /*
58
  * ===== Documentation ======
59
  * to activate this script put this tag in your HTML
60
  *  <section id="js_isereMegaMenu"></section>
61
  *
62
  * == CSS confs
63
  * Add "isereMegaMenu--fixed" class to parent element to applay fixed styles
64
  * Add "isereMegaMenu--hideLogin" to hide login button
65
  *
66
  * === Switchers
67
  * if show_isereMegaMenu_state_in_html = true, a class 'js_isereMegaMenu--open' will be added to <html> element
68
  * if variable 'domainWidgetIsere' is not defined, a default value will be assined => 'https://menutrans.isere.fr'
69
  *
70
  * */
71

  
72
  if (typeof jQuery == 'undefined') {
73
    docReady(main);
74
  } else {
75
    jQuery(document).ready(main());
76
  }
77

  
78
  function main() {
79
    //Temporaire : pour surpasser le cache locale du navigateur
80
    let versionNum = Math.random().toString(36).substring(7);
81
    function _addClass(el, NewClass) {
82
      var lesClass = el.className.toString();
83
      lesClass = lesClass + " " + NewClass;
84
      el.className = lesClass;
85
      return true;
86
    }
87

  
88
    function _removeClass(el, NewClass) {
89
      var regEx = new RegExp("\\b" + NewClass + "\\b");
90

  
91
      el.className = el.className.toString().replace(regEx, "");
92
      if (el.className == '') {
93
        el.removeAttribute('class');
94
      }
95
      return true;
96
    }
97

  
98
    function _checkClass(el, NewClass) {
99
      let lesClass = el.className;
100
      return true;
101
    }
102

  
103
    function _toggleClass(el, classToToggle) {
104
      let lesClass = el.className.toString();
105
      if (lesClass.indexOf(classToToggle) == -1) {
106
        _addClass(el, classToToggle);
107
      } else {
108
        _removeClass(el, classToToggle);
109
      }
110
      return true;
111
    }
112

  
113
    if (typeof domainWidgetIsere == 'undefined') {
114
      console.warn('Warning: The variable domainWidgetIsere was undifined: Default value is loaded.')
115
      var domainWidgetIsere = 'https://menutrans.isere.fr';
116

  
117
      //pour les tests/debug en preprod
118
      // var domainWidgetIsere = "https://preprod-menutrans.isere.fr";
119
    }
120

  
121

  
122
    //css stylesheet
123
    let css_link = document.createElement('link');
124
    css_link.type = "text/css";
125
    css_link.rel = "preload stylesheet";
126
    css_link.as = "style";
127
    css_link.href = domainWidgetIsere + "/widgets/css/crossmenu.style.css?=" + versionNum;
128
    document.head.appendChild(css_link);
129

  
130
    let jsonp_url = "/static/thomas/crossmenu.json",
131
      request = new XMLHttpRequest();
132

  
133
    request.open('GET', jsonp_url, true);
134
    request.withCredentials = true;
135

  
136
    request.onload = function () {
137
      console.log(this.responseText);
138
      if (this.status >= 200 && this.status < 400) {
139

  
140
        // solution temporaire des que tout les sites integrons les nouvelles modifications
141
        if (document.getElementById('js_isereMegaMenu')) {
142
          var isereMegaMenu = document.getElementById('js_isereMegaMenu')
143
        } else if (document.getElementById('containerWidget')){
144
          var isereMegaMenu = document.getElementById('containerWidget');
145
        } else {
146
           console.error('Error: cannot find the <section id="js_isereMegaMenu"></section> element, please add it to DOM');
147
        }
148
        isereMegaMenu.classList.add('isereMegaMenu');
149

  
150
        //Creates shade elemenet and inserts into wrapper element
151
        let shadeBlack = document.createElement('span');
152
        shadeBlack.className = 'isereMegaMenu__shadow isereMegaMenu__shadow--fadeIn_start'
153
        shadeBlack.id = 'js_isereMegaMenu__shadow'
154
        isereMegaMenu.insertBefore(shadeBlack, isereMegaMenu.firstChild)
155

  
156
        // creates container
157
        let widgetLinks = document.createElement('div');
158
        widgetLinks.className = 'isereMegaMenu__widgetLinks';
159
        isereMegaMenu.appendChild(widgetLinks);
160

  
161

  
162
        //le div principal
163
        let menuWidget = document.createElement('div');
164
        menuWidget.className = 'isereMegaMenu__menuWidget';
165
        menuWidget.style.height = 0;
166
        menuWidget.style.visibility = 'hidden';
167
        widgetLinks.appendChild(menuWidget);
168

  
169
        //le bouton du menu
170
        var buttonSVG = "<svg class ='isereMegaMenu__btnTgl__img' xmlns='http://www.w3.org/2000/svg' baseProfile='tiny' viewBox='0 0 140 93' height='42' width='65' overflow='scroll' xmlns:v='https://vecta.io/nano'><path fill='#f4f3f3' d='M0 0h139.75v93.188H0z'/><circle fill='#1b619d' cx='96.458' cy='17.292' r='9.208'/><path fill='#fcd312' d='M47.375 63.833v29.355h92.375V.738s-26 63.595-92.375 63.095z'/><path fill='#1b619d' d='M105.75 36.164S93 35.667 87.937 47.584c-.698 10.415 0 40.25 0 40.25h17.507l.306-51.67z'/><path fill='#505150' d='M22.76 59.664l-16.2-16.2a2 2 0 0 1 0-2.829l1.89-1.89a2 2 0 0 1 2.826-.003l12.9 12.838 12.9-12.838a2 2 0 0 1 2.826.003l1.89 1.89a2 2 0 0 1 0 2.829l-16.2 16.2a2 2 0 0 1-2.829 0h0z'/></svg>";
171
        let menuButton = document.createElement('span');
172
        menuButton.id = 'js_isereMegaMenu__btnTgl'
173
        menuButton.className = 'isereMegaMenu__btnTgl'
174
        menuButton.title = 'Menu Isere'
175
        menuButton.innerHTML = buttonSVG;
176
        menuButton.style.opacity = '0';
177
        widgetLinks.appendChild(menuButton);
178

  
179

  
180
        //le Close Button
181
        let menuCloseButton = document.createElement('span');
182
        menuCloseButton.id = 'js_isereMegaMenu__close';
183
        menuCloseButton.className = 'isereMegaMenu__close';
184
        menuCloseButton.innerText = 'Fermer';
185
        menuWidget.appendChild(menuCloseButton);
186

  
187
        //le div header
188
        let divTop = document.createElement('div');
189
        divTop.className = 'isereMegaMenu__header';
190
        menuWidget.appendChild(divTop);
191

  
192
        let logoLink = document.createElement('a');
193
        logoLink.href = 'https://www.isere.fr/';
194
        logoLink.className = 'isereMegaMenu__header__logo';
195
        logoLink.title = 'isere logo';
196
        divTop.appendChild(logoLink);
197

  
198
        // Prepare JSON from menutrans
199
        let data = JSON.parse(this.response).data;
200

  
201

  
202
        if (data.title != '') {
203
          var spanTitle = document.createElement('span');
204
          spanTitle.className = 'isereMegaMenu__header__title';
205
          spanTitle.innerText = data.title;
206
          divTop.appendChild(spanTitle);
207
        }
208

  
209

  
210
        //Lien de connexion
211
        if (typeof data.account !== 'undefined' && data.account.link != '') {
212
          // login link
213
          var linkLogin = document.createElement('a');
214
          linkLogin.target = "_blank";
215
          linkLogin.className = 'isereMegaMenu__header__login';
216
          linkLogin.href = data.account.link;
217
          linkLogin.title = data.account.title;
218
          divTop.appendChild(linkLogin);
219
        }
220

  
221
        // Big menu wrapper
222
        let divContent = document.createElement('nav');
223
        menuWidget.appendChild(divContent);
224

  
225
        // Big menu
226
        let menu = document.createElement('ul');
227
        menu.className = 'isereMegaMenu__menu';
228
        divContent.appendChild(menu);
229

  
230

  
231
        data.menu.forEach(function (value) {
232
          //Menu item
233
          var menuItem = document.createElement('li');
234
          menuItem.className = 'js_isereMegaMenu__menu__item isereMegaMenu__menu__item  isereMegaMenu__menu__item--withChild ';
235

  
236
          //Menu item link
237
          var linkA = document.createElement('a');
238
          linkA.className = 'isereMegaMenu__menu__item__link';
239
          linkA.href = 'javascript:void(0)';
240
          linkA.innerText = value.title;
241
          menuItem.appendChild(linkA);
242

  
243
          if (value.icon) {
244
            menuItem.classList.add('isereMegaMenu__menu__item--avecImage');
245

  
246
            // Debug : on force le HTTPS sur les îcones pour éviter les bugs mixed content
247
            if (value.icon.substr(0, 5) !== 'https') {
248
              value.icon = value.icon.replace('http', 'https');
249
            }
250

  
251
            switch (value.title) {
252
              case 'Le Département':
253
                menuItem.classList.add('isereMegaMenu__menu__item--departement');
254
                break;
255
              case 'Solidarité - Santé':
256
                menuItem.classList.add('isereMegaMenu__menu__item--solidarite');
257
                break;
258
              case 'Education - Sport - Jeunesse':
259
                menuItem.classList.add('isereMegaMenu__menu__item--education');
260
                break;
261
              case 'Mobilité':
262
                menuItem.classList.add('isereMegaMenu__menu__item--developpement');
263
                break;
264
              case 'Développement du territoire - Environnement':
265
                menuItem.classList.add('isereMegaMenu__menu__item--mobilite');
266
                break;
267
              case 'Culture - Evénements':
268
                menuItem.classList.add('isereMegaMenu__menu__item--culture');
269
                break;
270
              case 'Tourisme - Attractivité':
271
                menuItem.classList.add('isereMegaMenu__menu__item--sport');
272
                break;
273
              default:
274
                menuItem.classList.add('isereMegaMenu__menu__item--departement');
275
            }
276
          }
277

  
278
          if (value.color) {
279
            linkA.dataset.color = value.color;
280
          }
281

  
282
          //Sub menu
283
          if ("sub" in value) {
284

  
285
            // sub menu
286
            var subMenu = document.createElement('ul');
287
            subMenu.className = "isereMegaMenu__menu__item__sub";
288
            menuItem.appendChild(subMenu);
289

  
290
            // iteration sur les listed des sumenus
291
            value.sub.forEach(function (subValue) {
292
              // sub menu item
293
              let subMenuItem = document.createElement('li');
294
              subMenuItem.className = 'isereMegaMenu__menu__item__sub__item';
295
              subMenu.appendChild(subMenuItem);
296

  
297
              // sub menu item link
298
              let subLinkA = document.createElement('a');
299
              subLinkA.className = 'isereMegaMenu__menu__item__sub__item__link';
300
              subLinkA.href = subValue.path;
301
              if (subValue.description != null) {
302
                subLinkA.title = subValue.description;
303
              }
304
              subLinkA.innerText = subValue.title;
305
              subMenuItem.appendChild(subLinkA);
306

  
307
              if (value.color) {
308
                subLinkA.dataset.color = value.color;
309
              }
310
            });
311

  
312

  
313
          } else {
314
            // Si pas de sub items
315
            menuItem = document.createElement('li')
316

  
317
            var linkA = document.createElement('a');
318
            linkA.href = 'javascript:void(0)';
319
            linkA.className = "lien";
320
            linkA.innerText = value.title;
321

  
322
            if (value.color) {
323
              linkA.dataset.color = value.color;
324
            }
325

  
326
            menuItem.appendChild(linkA);
327
          }
328
          menu.appendChild(menuItem);
329
        });
330

  
331

  
332
        // Footer social icons
333
        var socialNetwork = document.createElement('ul');
334
        socialNetwork.className = 'isereMegaMenu__social';
335

  
336
        data.social_network.forEach(function (value) {
337
          if (value.link != '') {
338
            //social icon item
339
            var menuItem = document.createElement('li');
340
            menuItem.className = "isereMegaMenu__social__item isereMegaMenu__social__item--" + value.title.toLowerCase();
341

  
342
            //social icon item link
343
            var menuItem__link = document.createElement('a');
344
            menuItem__link.href = value.link;
345
            menuItem__link.className = 'isereMegaMenu__social__item__link';
346
            menuItem__link.title = value.title;
347
            menuItem__link.setAttribute('aria-label', value.title);
348

  
349
            menuItem.appendChild(menuItem__link);
350
          }
351
          socialNetwork.appendChild(menuItem);
352

  
353
        });
354

  
355
        menuWidget.appendChild(socialNetwork);
356

  
357
        function calcBigMenuHeight() {
358
          //get and store full height of the menu
359
          menuWidget.style.height = 'auto';
360
          menuWidget.dataset.height = menuWidget.offsetHeight + 'px';
361
          menuWidget.style.height = 0;
362
        }
363

  
364
        calcBigMenuHeight();
365

  
366

  
367
        isereMegaMenu.addEventListener('click', function (event) {
368
          // loop parent nodes from the target to the delegation node
369
          for (var target = event.target; target && target != this; target = target.parentNode) {
370

  
371
            //TODO convert this to swith statement
372
            if (target.matches('.isereMegaMenu__menu__item__link')) {
373

  
374
              //open submenus
375
              var childSub = target.nextElementSibling;
376

  
377
              //checks if submenu is open
378
              if (target.parentNode.className.indexOf('--open') !== -1) {
379
                target.parentNode.classList.remove('isereMegaMenu__menu__item--open');
380
                childSub.removeAttribute('style');
381
              } else {
382
                target.parentNode.classList.add('isereMegaMenu__menu__item--open');
383
                childSub.style.height = childSub.dataset.height;
384
              }
385

  
386

  
387
              break;
388
            } else if (target.matches('#js_isereMegaMenu__btnTgl')) {
389

  
390
              //big button menu OPEN
391
              event.preventDefault();
392
              setTimeout(calcBigMenuHeight(), 300);
393

  
394
              isereMegaMenu.classList.add('isereMegaMenu--open')
395
              if (typeof show_isereMegaMenu_state_in_html != 'undefined') {
396
                document.getElementsByTagName('html')[0].classList.add('js_isereMegaMenu--open');
397
              }
398

  
399
              menuWidget.style.visibility = 'visible';
400

  
401
              //To wait for animation to be finished
402
              setTimeout(function () {
403
                menuWidget.style.height = menuWidget.dataset.height;
404
                setTimeout(function () {
405
                  menuWidget.style.height = 'auto';
406

  
407
                }, 500);
408
                setTimeout(function () {
409
                  isereMegaMenu
410
                    .querySelectorAll('.isereMegaMenu__menu__item__sub')
411
                    .forEach(function (value) {
412
                      var el = value, old = el.style.height;
413

  
414
                      el.style.height = 'auto';
415
                      el.dataset.height = (el.offsetHeight + 10) + 'px';
416
                      el.style.height = old;
417
                    })
418
                }, 600);
419
              }, 100);
420

  
421
              //shade appear animation
422
              shadeBlack.classList.toggle('isereMegaMenu__shadow--show');
423
              shadeBlack.classList.add('isereMegaMenu__shadow--fadeIn');
424
              shadeBlack.classList.remove('isereMegaMenu__shadow--fadeIn_start');
425
              shadeBlack.classList.remove('isereMegaMenu__shadow--fadeOut');
426

  
427
              break;
428
            } else if (target.matches('#js_isereMegaMenu__close') || target.matches('#js_isereMegaMenu__shadow')) {
429

  
430
              //Close button/shade for  menu CLOSE
431
              event.preventDefault();
432
              isereMegaMenu.classList.remove('isereMegaMenu--open');
433
              if (typeof show_isereMegaMenu_state_in_html != 'undefined') {
434
                document.getElementsByTagName('html')[0].classList.remove('js_isereMegaMenu--open');
435
              }
436

  
437
              var nowHeight = menuWidget.offsetHeight + 'px'
438

  
439
              menuWidget.style.height = nowHeight;
440
              menuWidget.dataset.height = nowHeight;
441

  
442
              setTimeout(function () {
443
                menuWidget.style.height = 0;
444
              }, 100);
445

  
446
              //shade disappear animation
447
              shadeBlack.classList.remove('isereMegaMenu__shadow--show');
448
              shadeBlack.classList.remove('isereMegaMenu__shadow--fadeIn');
449
              shadeBlack.classList.add('isereMegaMenu__shadow--fadeOut');
450
            } else if (target.matches('.isereMegaMenu__menu__item__sub__item__link')) {
451
              // control animation of selected link
452
              break;
453
            } else {
454
            }
455

  
456
          }
457
        }, false);
458

  
459
      } else {
460

  
461
      }
462
    };
463
    request.onerror = function () {
464
      console.log(this);
465
    };
466
    request.send();
467
  }
468
})();
469

  
static/isere-cd38/style.scss
1
@charset "UTF-8";
2
@import '../includes/fonts/source-sans-pro';
3
@import '../includes/fonts/raleway';
4

  
5
@import 'vars';
6
@import '../includes/publik';
7
@import 'custom';
templates/variants/isere-cd38/combo/cells/a-la-une/form.html
1
{% extends "combo/wcs/form.html" %}
2

  
3
{% block cell-content %}
4
{% include "combo/asset_picture_fragment.html" %}
5
{{ block.super }}
6
{% endblock %}
templates/variants/isere-cd38/combo/page_template.html
1
{% extends "combo/page_template.html" %}
2

  
3
{% block body-bottom %}
4
	<section id="js_isereMegaMenu" class="isereMegaMenu--hideLogin"></section>
5
{% endblock %}
templates/variants/isere-cd38/combo/page_template_homepage.html
1
{% extends "combo/page_template_sidebar.html" %}
2
{% load combo assets %}
3

  
4
{% block extra_css %}
5
<style>
6
  body.has-picture nav::after {
7
    content: "{% firstof titre_bandeau|safe "Vos démarches en ligne \A auprès du Département de l’isère"  %}";
8
  }
9
</style>
10
{% endblock %}
11

  
12
{% block columns %}
13
  <h2 class="section-title">À la une</h2>
14
	{% placeholder "une" name="À la une" %}
15
{% endblock %}
16

  
17
{% block content-bottom %}
18
  <div class="toutes-demarches">
19
    <h2 class="section-title">Toutes les démarches</h2>
20
    <div class="theme-3cols-layout">
21
      <div class="column">
22
        {% placeholder "left" name="Démarches colonne gauche" %}
23
      </div>
24
      <div class="column">
25
        {% placeholder "content" name="Démarches colonne centrale" %}
26
      </div>
27
      <div class="column">
28
        {% placeholder "right" name="Démarche colonne droite" %}
29
      </div>
30
    </div>
31
  </div>
32
{% endblock %}
0
-