@lab-anssi/ui-kit 1.8.4 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generateurImagesPlaceholders.d.ts +1 -1
- package/dist/generateurImagesPlaceholders.js +2 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/lab/vitrines-produits/briques/Brique.svelte +15 -1
- package/dist/lab/vitrines-produits/briques/Brique.svelte.d.ts +3 -1
- package/dist/lab/vitrines-produits/briques/BriqueTitreMultimedia.svelte +76 -0
- package/dist/lab/vitrines-produits/briques/BriqueTitreMultimedia.svelte.d.ts +20 -0
- package/dist/lab/vitrines-produits/briques/CarrouselTuiles.svelte +13 -31
- package/dist/lab/vitrines-produits/briques/LecteurVideo.svelte +57 -0
- package/dist/lab/vitrines-produits/briques/LecteurVideo.svelte.d.ts +21 -0
- package/dist/lab/vitrines-produits/briques/Tuile.svelte +77 -29
- package/dist/lab/vitrines-produits/briques/Tuile.svelte.d.ts +1 -1
- package/dist/lab/vitrines-produits/briques/marelle/Etape.svelte +159 -0
- package/dist/lab/vitrines-produits/briques/marelle/Etape.svelte.d.ts +20 -0
- package/dist/lab/vitrines-produits/briques/marelle/Marelle.svelte +121 -0
- package/dist/lab/vitrines-produits/briques/marelle/Marelle.svelte.d.ts +21 -0
- package/dist/types.d.ts +15 -0
- package/dist/webcomponents/lab-anssi-ui-kit.iife.js +32 -31
- package/dist/webcomponents/lab-anssi-ui-kit.jsx.d.ts +9 -0
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const genereImageDePlaceholder: (largeur: number, longeur: number) => string;
|
|
1
|
+
export declare const genereImageDePlaceholder: (largeur: number, longeur: number, texteAffiche?: string) => string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const genereImageDePlaceholder = (largeur, longeur) => {
|
|
2
|
-
return `https://placehold.co/${largeur}x${longeur}`;
|
|
1
|
+
export const genereImageDePlaceholder = (largeur, longeur, texteAffiche) => {
|
|
2
|
+
return `https://placehold.co/${largeur}x${longeur}${texteAffiche ? `?text=${encodeURIComponent(texteAffiche)}` : ''}`;
|
|
3
3
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export { default as Alerte } from "./Alerte.svelte";
|
|
2
2
|
export { default as CentreAide } from "./CentreAide.svelte";
|
|
3
3
|
export { default as ResumePssi } from "./lab/ResumePssi.svelte";
|
|
4
|
-
export { default as BriqueHero } from
|
|
5
|
-
export { default as CarrouselTuiles } from
|
|
4
|
+
export { default as BriqueHero } from "./lab/vitrines-produits/briques/BriqueHero.svelte";
|
|
5
|
+
export { default as CarrouselTuiles } from "./lab/vitrines-produits/briques/CarrouselTuiles.svelte";
|
|
6
6
|
export { default as MesServicesCyberBandeau } from "./mes-services-cyber/bandeau/Bandeau.svelte";
|
|
7
7
|
export { default as LienDiagnosticCyber } from "./mes-services-cyber/lien/LienDiagnosticCyber.svelte";
|
|
8
8
|
export { default as NavigationPiedDePage } from "./pied-de-page/NavigationPiedDePage.svelte";
|
|
9
9
|
export { default as SuiteCyberNavigation } from "./suite-cyber/navigation/Navigation.svelte";
|
|
10
|
+
export { default as BriqueTitreMultimedia } from "./lab/vitrines-produits/briques/BriqueTitreMultimedia.svelte";
|
|
11
|
+
export { default as Marelle } from "./lab/vitrines-produits/briques/marelle/Marelle.svelte";
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export { default as Alerte } from "./Alerte.svelte";
|
|
2
2
|
export { default as CentreAide } from "./CentreAide.svelte";
|
|
3
3
|
export { default as ResumePssi } from "./lab/ResumePssi.svelte";
|
|
4
|
-
export { default as BriqueHero } from
|
|
5
|
-
export { default as CarrouselTuiles } from
|
|
4
|
+
export { default as BriqueHero } from "./lab/vitrines-produits/briques/BriqueHero.svelte";
|
|
5
|
+
export { default as CarrouselTuiles } from "./lab/vitrines-produits/briques/CarrouselTuiles.svelte";
|
|
6
6
|
export { default as MesServicesCyberBandeau } from "./mes-services-cyber/bandeau/Bandeau.svelte";
|
|
7
7
|
export { default as LienDiagnosticCyber } from "./mes-services-cyber/lien/LienDiagnosticCyber.svelte";
|
|
8
8
|
export { default as NavigationPiedDePage } from "./pied-de-page/NavigationPiedDePage.svelte";
|
|
9
9
|
export { default as SuiteCyberNavigation } from "./suite-cyber/navigation/Navigation.svelte";
|
|
10
|
+
export { default as BriqueTitreMultimedia } from "./lab/vitrines-produits/briques/BriqueTitreMultimedia.svelte";
|
|
11
|
+
export { default as Marelle } from "./lab/vitrines-produits/briques/marelle/Marelle.svelte";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script>export let variation = "primaire";
|
|
2
|
+
export let sansMargeHaute = false;
|
|
3
|
+
export let sansMargeLaterale = false;
|
|
2
4
|
</script>
|
|
3
5
|
|
|
4
|
-
<section class={variation}>
|
|
6
|
+
<section class={variation} class:sans-marge-haute={sansMargeHaute} class:sans-marge-laterale={sansMargeLaterale}>
|
|
5
7
|
<div class="contenu-brique">
|
|
6
8
|
<slot />
|
|
7
9
|
</div>
|
|
@@ -40,8 +42,17 @@
|
|
|
40
42
|
section {
|
|
41
43
|
font-family: Marianne;
|
|
42
44
|
padding: 48px 16px;
|
|
45
|
+
box-sizing: border-box;
|
|
43
46
|
text-align: left;
|
|
44
47
|
color: white;
|
|
48
|
+
width: 100vw;
|
|
49
|
+
}
|
|
50
|
+
section.sans-marge-haute {
|
|
51
|
+
padding-top: 0;
|
|
52
|
+
}
|
|
53
|
+
section.sans-marge-laterale {
|
|
54
|
+
padding-left: 0;
|
|
55
|
+
padding-right: 0;
|
|
45
56
|
}
|
|
46
57
|
@media (min-width: 576px) {
|
|
47
58
|
section {
|
|
@@ -59,6 +70,9 @@ section.primaire {
|
|
|
59
70
|
section.transparent {
|
|
60
71
|
background: none;
|
|
61
72
|
}
|
|
73
|
+
section.secondaire {
|
|
74
|
+
background: var(--brique-background-secondaire);
|
|
75
|
+
}
|
|
62
76
|
|
|
63
77
|
.contenu-brique {
|
|
64
78
|
max-width: 1200px;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
variation?: "primaire" | "transparent";
|
|
4
|
+
variation?: "primaire" | "transparent" | "secondaire";
|
|
5
|
+
sansMargeHaute?: boolean;
|
|
6
|
+
sansMargeLaterale?: boolean;
|
|
5
7
|
};
|
|
6
8
|
events: {
|
|
7
9
|
[evt: string]: CustomEvent<any>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<svelte:options
|
|
2
|
+
customElement={{
|
|
3
|
+
tag: 'lab-anssi-titre-multimedia',
|
|
4
|
+
props: {
|
|
5
|
+
titre: { reflect: false, type: 'String', attribute: 'titre' },
|
|
6
|
+
multimedia: { reflect: false, type: 'Object', attribute: 'multimedia' },
|
|
7
|
+
}
|
|
8
|
+
}} />
|
|
9
|
+
|
|
10
|
+
<script>import Brique from "./Brique.svelte";
|
|
11
|
+
import LecteurVideo from "./LecteurVideo.svelte";
|
|
12
|
+
export let titre;
|
|
13
|
+
export let multimedia;
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<Brique variation="transparent">
|
|
17
|
+
<div class="bloc-multimedia">
|
|
18
|
+
<h2>{titre}</h2>
|
|
19
|
+
<div>
|
|
20
|
+
<LecteurVideo
|
|
21
|
+
source={multimedia.source}
|
|
22
|
+
sourceSousTitres={multimedia.sourcesoustitres}
|
|
23
|
+
imageDeCouverture={multimedia.imagedecouverture}
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</Brique>
|
|
28
|
+
|
|
29
|
+
<style>.visible-tablette {
|
|
30
|
+
display: none !important;
|
|
31
|
+
}
|
|
32
|
+
@media (min-width: 576px) {
|
|
33
|
+
.visible-tablette {
|
|
34
|
+
display: unset !important;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (min-width: 576px) {
|
|
39
|
+
.invisible-tablette {
|
|
40
|
+
display: none !important;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.visible-desktop {
|
|
45
|
+
display: none !important;
|
|
46
|
+
}
|
|
47
|
+
@media (min-width: 932px) {
|
|
48
|
+
.visible-desktop {
|
|
49
|
+
display: unset !important;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (min-width: 932px) {
|
|
54
|
+
.invisible-desktop {
|
|
55
|
+
display: none !important;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.bloc-multimedia {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 48px;
|
|
64
|
+
}
|
|
65
|
+
.bloc-multimedia h2 {
|
|
66
|
+
color: var(--titre-couleur-primaire);
|
|
67
|
+
font-size: 28px;
|
|
68
|
+
line-height: 36px;
|
|
69
|
+
margin: 0;
|
|
70
|
+
}
|
|
71
|
+
@media (min-width: 932px) {
|
|
72
|
+
.bloc-multimedia h2 {
|
|
73
|
+
font-size: 32px;
|
|
74
|
+
line-height: 40px;
|
|
75
|
+
}
|
|
76
|
+
}</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { Video } from "../../../types";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
titre: string;
|
|
6
|
+
multimedia: Video;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
exports?: {} | undefined;
|
|
13
|
+
bindings?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type BriqueTitreMultimediaProps = typeof __propDef.props;
|
|
16
|
+
export type BriqueTitreMultimediaEvents = typeof __propDef.events;
|
|
17
|
+
export type BriqueTitreMultimediaSlots = typeof __propDef.slots;
|
|
18
|
+
export default class BriqueTitreMultimedia extends SvelteComponent<BriqueTitreMultimediaProps, BriqueTitreMultimediaEvents, BriqueTitreMultimediaSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -23,14 +23,14 @@ const suivant = () => versDirection(1);
|
|
|
23
23
|
</script>
|
|
24
24
|
|
|
25
25
|
<div class="carrousel-tuiles primaire">
|
|
26
|
-
<Brique variation="transparent">
|
|
26
|
+
<Brique variation="transparent" sansMargeHaute sansMargeLaterale>
|
|
27
27
|
<div class="conteneur-tuiles" bind:this={elementCarrousel}>
|
|
28
|
-
{#each tuiles as tuile}
|
|
28
|
+
{#each tuiles as tuile, idx (idx)}
|
|
29
29
|
<Tuile
|
|
30
30
|
illustration={tuile.illustration}
|
|
31
31
|
titre={tuile.titre}
|
|
32
32
|
contenu={tuile.contenu}
|
|
33
|
-
|
|
33
|
+
position={idx === 0 ? "premiere" : idx === tuiles.length - 1 ? "derniere" : null}
|
|
34
34
|
/>
|
|
35
35
|
{/each}
|
|
36
36
|
</div>
|
|
@@ -72,14 +72,14 @@ const suivant = () => versDirection(1);
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.carrousel-tuiles {
|
|
75
|
-
|
|
75
|
+
--espacement: 16px;
|
|
76
|
+
padding: 0;
|
|
76
77
|
}
|
|
77
78
|
.carrousel-tuiles.primaire {
|
|
78
|
-
background: linear-gradient(to bottom, var(--centre-aide-background-entete) 0%, var(--centre-aide-background-entete)
|
|
79
|
+
background: linear-gradient(to bottom, var(--centre-aide-background-entete) 0%, var(--centre-aide-background-entete) 30%, transparent 30%, transparent 100%);
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
.conteneur-tuiles {
|
|
82
|
-
--espacement: 16px;
|
|
83
83
|
display: flex;
|
|
84
84
|
overflow-x: auto;
|
|
85
85
|
gap: var(--espacement);
|
|
@@ -88,29 +88,13 @@ const suivant = () => versDirection(1);
|
|
|
88
88
|
-webkit-overflow-scrolling: touch;
|
|
89
89
|
scrollbar-width: none;
|
|
90
90
|
-ms-overflow-style: none;
|
|
91
|
-
padding: 0
|
|
91
|
+
padding: 0 0;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.conteneur-tuiles::-webkit-scrollbar {
|
|
95
95
|
display: none;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.tuile-presentation:first-of-type {
|
|
99
|
-
margin-left: var(--espacement);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.tuile-presentation:last-of-type {
|
|
103
|
-
margin-right: var(--espacement);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.tuile-presentation {
|
|
107
|
-
box-sizing: border-box;
|
|
108
|
-
scroll-snap-align: center;
|
|
109
|
-
flex-shrink: 0;
|
|
110
|
-
width: calc(100vw - 60px);
|
|
111
|
-
max-width: 266px;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
98
|
.conteneur-actions {
|
|
115
99
|
display: flex;
|
|
116
100
|
margin-top: 32px;
|
|
@@ -130,6 +114,7 @@ const suivant = () => versDirection(1);
|
|
|
130
114
|
display: flex;
|
|
131
115
|
align-items: center;
|
|
132
116
|
gap: 8px;
|
|
117
|
+
font-family: Marianne;
|
|
133
118
|
}
|
|
134
119
|
|
|
135
120
|
.conteneur-actions .precedent:before,
|
|
@@ -138,7 +123,6 @@ const suivant = () => versDirection(1);
|
|
|
138
123
|
display: flex;
|
|
139
124
|
width: 24px;
|
|
140
125
|
height: 24px;
|
|
141
|
-
filter: brightness(0) invert(1);
|
|
142
126
|
line-height: 28px;
|
|
143
127
|
}
|
|
144
128
|
|
|
@@ -152,19 +136,17 @@ const suivant = () => versDirection(1);
|
|
|
152
136
|
text-decoration-thickness: 2px;
|
|
153
137
|
}
|
|
154
138
|
|
|
155
|
-
@media
|
|
156
|
-
.
|
|
139
|
+
@media (min-width: 932px) {
|
|
140
|
+
.carrousel-tuiles {
|
|
157
141
|
--espacement: 24px;
|
|
158
142
|
}
|
|
159
|
-
|
|
160
|
-
@media screen and (min-width: 1247px) {
|
|
161
|
-
.conteneur-actions {
|
|
143
|
+
.carrousel-tuiles .conteneur-actions {
|
|
162
144
|
display: none;
|
|
163
145
|
}
|
|
164
|
-
.tuile-presentation:first-of-type {
|
|
146
|
+
.carrousel-tuiles .tuile-presentation:first-of-type {
|
|
165
147
|
margin-left: 0;
|
|
166
148
|
}
|
|
167
|
-
.tuile-presentation:last-of-type {
|
|
149
|
+
.carrousel-tuiles .tuile-presentation:last-of-type {
|
|
168
150
|
margin-right: 0;
|
|
169
151
|
}
|
|
170
152
|
}</style>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script>export let source;
|
|
2
|
+
export let sourceSousTitres;
|
|
3
|
+
export let imageDeCouverture = "";
|
|
4
|
+
export let classe = "";
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<video
|
|
8
|
+
controls
|
|
9
|
+
class={classe}
|
|
10
|
+
src={source}
|
|
11
|
+
poster={imageDeCouverture}
|
|
12
|
+
>
|
|
13
|
+
<source src={source} type="video/mp4" />
|
|
14
|
+
<track
|
|
15
|
+
src={sourceSousTitres}
|
|
16
|
+
kind="captions"
|
|
17
|
+
srclang="fr"
|
|
18
|
+
label="Français"
|
|
19
|
+
/>
|
|
20
|
+
Votre navigateur ne supporte pas la fonctionnalité de lecture de vidéos.
|
|
21
|
+
</video>
|
|
22
|
+
|
|
23
|
+
<style>.visible-tablette {
|
|
24
|
+
display: none !important;
|
|
25
|
+
}
|
|
26
|
+
@media (min-width: 576px) {
|
|
27
|
+
.visible-tablette {
|
|
28
|
+
display: unset !important;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media (min-width: 576px) {
|
|
33
|
+
.invisible-tablette {
|
|
34
|
+
display: none !important;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.visible-desktop {
|
|
39
|
+
display: none !important;
|
|
40
|
+
}
|
|
41
|
+
@media (min-width: 932px) {
|
|
42
|
+
.visible-desktop {
|
|
43
|
+
display: unset !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media (min-width: 932px) {
|
|
48
|
+
.invisible-desktop {
|
|
49
|
+
display: none !important;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
video {
|
|
54
|
+
width: 100%;
|
|
55
|
+
max-width: 792px;
|
|
56
|
+
max-height: 446px;
|
|
57
|
+
}</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
source: string;
|
|
5
|
+
sourceSousTitres: string;
|
|
6
|
+
imageDeCouverture?: string;
|
|
7
|
+
classe?: string;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
exports?: {} | undefined;
|
|
14
|
+
bindings?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
export type LecteurVideoProps = typeof __propDef.props;
|
|
17
|
+
export type LecteurVideoEvents = typeof __propDef.events;
|
|
18
|
+
export type LecteurVideoSlots = typeof __propDef.slots;
|
|
19
|
+
export default class LecteurVideo extends SvelteComponent<LecteurVideoProps, LecteurVideoEvents, LecteurVideoSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>export let titre;
|
|
2
2
|
export let illustration;
|
|
3
3
|
export let contenu;
|
|
4
|
-
export let
|
|
4
|
+
export let position = null;
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
|
-
<div class="tuile {
|
|
7
|
+
<div class="tuile {position ?? ''}">
|
|
8
8
|
<div class="conteneur-image">
|
|
9
9
|
<img src={illustration.lien} alt={illustration.alt} />
|
|
10
10
|
</div>
|
|
@@ -12,35 +12,83 @@ export let classe = "";
|
|
|
12
12
|
<span>{contenu}</span>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
<style
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
padding: 32px;
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
align-items: center;
|
|
25
|
-
gap: 12px;
|
|
26
|
-
text-align: center;
|
|
27
|
-
color: var(--couleur-texte);
|
|
28
|
-
width: 384px;
|
|
29
|
-
min-width: 212px;
|
|
15
|
+
<style>.visible-tablette {
|
|
16
|
+
display: none !important;
|
|
17
|
+
}
|
|
18
|
+
@media (min-width: 576px) {
|
|
19
|
+
.visible-tablette {
|
|
20
|
+
display: unset !important;
|
|
30
21
|
}
|
|
22
|
+
}
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
font-style: normal;
|
|
36
|
-
font-weight: 700;
|
|
37
|
-
line-height: 28px;
|
|
24
|
+
@media (min-width: 576px) {
|
|
25
|
+
.invisible-tablette {
|
|
26
|
+
display: none !important;
|
|
38
27
|
}
|
|
28
|
+
}
|
|
39
29
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
30
|
+
.visible-desktop {
|
|
31
|
+
display: none !important;
|
|
32
|
+
}
|
|
33
|
+
@media (min-width: 932px) {
|
|
34
|
+
.visible-desktop {
|
|
35
|
+
display: unset !important;
|
|
45
36
|
}
|
|
46
|
-
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (min-width: 932px) {
|
|
40
|
+
.invisible-desktop {
|
|
41
|
+
display: none !important;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.tuile {
|
|
46
|
+
--couleur-texte: #000000;
|
|
47
|
+
border-radius: 8px;
|
|
48
|
+
border: 1px solid #ddd;
|
|
49
|
+
background: #fff;
|
|
50
|
+
padding: 32px;
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 12px;
|
|
55
|
+
text-align: center;
|
|
56
|
+
color: var(--couleur-texte);
|
|
57
|
+
min-width: 212px;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
scroll-snap-align: center;
|
|
60
|
+
flex-shrink: 0;
|
|
61
|
+
width: calc(100vw - 60px);
|
|
62
|
+
max-width: 384px;
|
|
63
|
+
}
|
|
64
|
+
.tuile.premiere {
|
|
65
|
+
margin-left: var(--espacement);
|
|
66
|
+
}
|
|
67
|
+
@media (min-width: 1200px) {
|
|
68
|
+
.tuile.premiere {
|
|
69
|
+
margin-left: 0;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
.tuile.derniere {
|
|
73
|
+
margin-right: var(--espacement);
|
|
74
|
+
}
|
|
75
|
+
@media (min-width: 1200px) {
|
|
76
|
+
.tuile.derniere {
|
|
77
|
+
margin-right: 0;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
p {
|
|
82
|
+
margin: 0;
|
|
83
|
+
font-size: 22px;
|
|
84
|
+
font-style: normal;
|
|
85
|
+
font-weight: 700;
|
|
86
|
+
line-height: 28px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
span {
|
|
90
|
+
font-size: 16px;
|
|
91
|
+
font-style: normal;
|
|
92
|
+
font-weight: 400;
|
|
93
|
+
line-height: 24px;
|
|
94
|
+
}</style>
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<script>export let index;
|
|
2
|
+
export let etapeMarelle;
|
|
3
|
+
const estPair = (index + 1) % 2 === 0;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div class={`marelle-etape ${estPair ? 'pair' : 'impair'}`}>
|
|
7
|
+
<div class="illustration">
|
|
8
|
+
<img src={etapeMarelle.illustration.lien} alt={etapeMarelle.illustration.alt} />
|
|
9
|
+
</div>
|
|
10
|
+
<div class="numero-etape">
|
|
11
|
+
<div class="encart-rond">
|
|
12
|
+
<span>{index + 1}</span>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="contenu">
|
|
16
|
+
<h4>{etapeMarelle.titre}</h4>
|
|
17
|
+
<p>{etapeMarelle.description}</p>
|
|
18
|
+
{#if etapeMarelle.lien}
|
|
19
|
+
<a href={etapeMarelle.lien.href} target={etapeMarelle.lien.target}>{etapeMarelle.lien.texte}</a>
|
|
20
|
+
{/if}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<style>.visible-tablette {
|
|
25
|
+
display: none !important;
|
|
26
|
+
}
|
|
27
|
+
@media (min-width: 576px) {
|
|
28
|
+
.visible-tablette {
|
|
29
|
+
display: unset !important;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media (min-width: 576px) {
|
|
34
|
+
.invisible-tablette {
|
|
35
|
+
display: none !important;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.visible-desktop {
|
|
40
|
+
display: none !important;
|
|
41
|
+
}
|
|
42
|
+
@media (min-width: 932px) {
|
|
43
|
+
.visible-desktop {
|
|
44
|
+
display: unset !important;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (min-width: 932px) {
|
|
49
|
+
.invisible-desktop {
|
|
50
|
+
display: none !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.marelle-etape {
|
|
55
|
+
display: grid;
|
|
56
|
+
row-gap: 32px;
|
|
57
|
+
grid-template-areas: "numero-etape" "contenu" "illustration";
|
|
58
|
+
}
|
|
59
|
+
@media (min-width: 932px) {
|
|
60
|
+
.marelle-etape {
|
|
61
|
+
grid-template-areas: "contenu numero-etape illustration";
|
|
62
|
+
grid-template-columns: 1fr 136px 1fr;
|
|
63
|
+
column-gap: 24px;
|
|
64
|
+
row-gap: 24px;
|
|
65
|
+
}
|
|
66
|
+
.marelle-etape.pair {
|
|
67
|
+
grid-template-areas: "illustration numero-etape contenu";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
.marelle-etape.pair .numero-etape {
|
|
71
|
+
justify-content: center;
|
|
72
|
+
}
|
|
73
|
+
@media (min-width: 932px) {
|
|
74
|
+
.marelle-etape.pair .numero-etape {
|
|
75
|
+
justify-content: end;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.marelle-etape.impair .numero-etape {
|
|
79
|
+
justify-content: center;
|
|
80
|
+
}
|
|
81
|
+
@media (min-width: 932px) {
|
|
82
|
+
.marelle-etape.impair .numero-etape {
|
|
83
|
+
justify-content: start;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
.marelle-etape .contenu {
|
|
87
|
+
grid-area: contenu;
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
justify-content: center;
|
|
91
|
+
gap: 8px;
|
|
92
|
+
}
|
|
93
|
+
.marelle-etape .numero-etape {
|
|
94
|
+
grid-area: numero-etape;
|
|
95
|
+
text-align: center;
|
|
96
|
+
z-index: 1;
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
}
|
|
100
|
+
.marelle-etape .numero-etape .encart-rond {
|
|
101
|
+
width: 72px;
|
|
102
|
+
height: 72px;
|
|
103
|
+
background: var(--brique-marelle-etapes-numero-etape-couleur);
|
|
104
|
+
border-radius: 50%;
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
}
|
|
109
|
+
.marelle-etape .numero-etape .encart-rond span {
|
|
110
|
+
color: #FFFFFF;
|
|
111
|
+
font-size: 2rem;
|
|
112
|
+
font-weight: bold;
|
|
113
|
+
}
|
|
114
|
+
@media (min-width: 932px) {
|
|
115
|
+
.marelle-etape .numero-etape .encart-rond span {
|
|
116
|
+
font-size: 2.5rem;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.illustration img {
|
|
121
|
+
width: 100%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.marelle-etape > div > h4 {
|
|
125
|
+
margin: 0;
|
|
126
|
+
font-size: 1.25rem;
|
|
127
|
+
line-height: 28px;
|
|
128
|
+
}
|
|
129
|
+
@media (min-width: 932px) {
|
|
130
|
+
.marelle-etape > div > h4 {
|
|
131
|
+
font-size: 1.375rem;
|
|
132
|
+
line-height: 28px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.marelle-etape > div > p {
|
|
137
|
+
margin: 0 0 8px 0;
|
|
138
|
+
font-size: 1rem;
|
|
139
|
+
line-height: 24px;
|
|
140
|
+
}
|
|
141
|
+
@media (min-width: 932px) {
|
|
142
|
+
.marelle-etape > div > p {
|
|
143
|
+
font-size: 1rem;
|
|
144
|
+
line-height: 24px;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.marelle-etape > div > p > b {
|
|
149
|
+
color: var(--brique-marelle-etapes-lien-couleur);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.marelle-etape > div > a {
|
|
153
|
+
color: var(--brique-marelle-etapes-lien-couleur);
|
|
154
|
+
display: inline-flex;
|
|
155
|
+
border: none;
|
|
156
|
+
text-decoration: underline;
|
|
157
|
+
text-underline-offset: 4px;
|
|
158
|
+
text-decoration-thickness: 1px;
|
|
159
|
+
}</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { EtapeMarelle } from "../../../../types";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
index: number;
|
|
6
|
+
etapeMarelle: EtapeMarelle;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
exports?: {} | undefined;
|
|
13
|
+
bindings?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type EtapeProps = typeof __propDef.props;
|
|
16
|
+
export type EtapeEvents = typeof __propDef.events;
|
|
17
|
+
export type EtapeSlots = typeof __propDef.slots;
|
|
18
|
+
export default class Etape extends SvelteComponent<EtapeProps, EtapeEvents, EtapeSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|