0001-core-refactorisation-of-wcs-steps-component-36765.patch
help/fr/misc-scss.page | ||
---|---|---|
519 | 519 |
</table> |
520 | 520 |
</section> |
521 | 521 | |
522 |
<section> |
|
523 |
<title>Bloc étapes d'une démarche</title> |
|
524 | ||
525 |
<p> |
|
526 |
Ces paramètres contrôlent le rendu du bloc présentant les étapes ou pages d'une démarche. |
|
527 |
</p> |
|
528 |
<p> |
|
529 |
Le rendu de ce bloc diffère automatiquement en fonction de la taille de l'écran et de la position de la <em>sidebar</em> <code>$form-sidebar-position</code> pour s'adapter aux différents terminaux : |
|
530 |
</p> |
|
531 |
<ul> |
|
532 |
<li><em>rendu mobile :</em> seul l'étape courante est affichée avec une indication du nombre totale d'étapes ;</li> |
|
533 |
<li><em>rendu horizontal :</em>Les marqueurs d'étapes (chiffres) s'affichent côte à côte et sur plusieurs lignes s'il le faut. Seul le label de l'étape en cours s'affiche ;</li> |
|
534 |
<li><em>rendu vertical :</em> (s'affiche uniquement si la variable <code>$form-sidebar-position</code> a la valeur <var>left</var> ou <var>right</var>) dispose les étapes les unes au dessous des autres avec chacune leur numéro et leur label</li>. |
|
535 |
</ul> |
|
536 |
<p> |
|
537 |
Plusieurs options sont également disponibles pour gérer le rendu du <em>marqueur d'étape</em> (chiffre). |
|
538 |
</p> |
|
539 | ||
540 |
<table shade="row"> |
|
541 |
<tr> |
|
542 |
<td><p><code>$wcs-steps-background</code></p></td> |
|
543 |
<td><p>Couleur de fond du bloc</p></td> |
|
544 |
<td><var>transparent</var></td> |
|
545 |
</tr> |
|
546 |
<tr> |
|
547 |
<td><p><code>$wcs-steps-spacing</code></p></td> |
|
548 |
<td> |
|
549 |
<p>Fixe la taille des espacements entre les différents blocs, mais également entre les marqueurs chiffres et leur label</p> |
|
550 |
</td> |
|
551 |
<td><var>0.35rem</var></td> |
|
552 |
</tr> |
|
553 |
<tr> |
|
554 |
<td><p><code>$wcs-step-color</code></p></td> |
|
555 |
<td><p>Couleur du texte des étapes non courantes</p></td> |
|
556 |
<td><var>#868686</var></td> |
|
557 |
</tr> |
|
558 |
<tr> |
|
559 |
<td><p><code>$wcs-step-current-color</code></p></td> |
|
560 |
<td><p>Couleur du texte de l'étape courantes</p></td> |
|
561 |
<td><var>$primary-color</var></td> |
|
562 |
</tr> |
|
563 |
<tr> |
|
564 |
<td><p><code>$wcs-step-background</code></p></td> |
|
565 |
<td><p>Couleur de fond des étapes</p></td> |
|
566 |
<td><var>transparent</var></td> |
|
567 |
</tr> |
|
568 |
<tr> |
|
569 |
<td><p><code>$wcs-step-current-background</code></p></td> |
|
570 |
<td><p>Couleur de fond de l'étape courante</p></td> |
|
571 |
<td><var>$wcs-step-background</var></td> |
|
572 |
</tr> |
|
573 |
<tr> |
|
574 |
<td><p><code>$wcs-step-border-bottom</code></p></td> |
|
575 |
<td> |
|
576 |
<p> |
|
577 |
Épaisseur et couleur du filet qui sépare les étapes en mode vertical et du filet présent sous les marqueurs en mode horizontal. |
|
578 |
la valeur <var>none</var> supprimera les filets. |
|
579 |
</p> |
|
580 |
</td> |
|
581 |
<td><var>1px solid $wcs-step-color</var></td> |
|
582 |
</tr> |
|
583 |
<tr> |
|
584 |
<td><p><code>$wcs-step-current-border-bottom</code></p></td> |
|
585 |
<td> |
|
586 |
<p> |
|
587 |
Épaisseur et couleur du filet de l'étape courante. |
|
588 |
Si <code>$wcs-step-border-bottom</code> est à <var>none</var>, ce filet sera automatiquement <var>none</var> également. |
|
589 |
</p> |
|
590 |
</td> |
|
591 |
<td><var>3px solid $wcs-step-current-color</var></td> |
|
592 |
</tr> |
|
593 |
<tr> |
|
594 |
<td><p><code>$wsc-step-before-piled</code></p></td> |
|
595 |
<td> |
|
596 |
<p> |
|
597 |
Cette option n'est valable qu'en mode vertical et si <code>$wcs-step-background</code> a une valeur différente de <var>transparent</var>. |
|
598 |
Avec la valeur <var>true</var>, elle va superposer les étapes passée les unes sur les autres pour gagner de la place. |
|
599 |
</p> |
|
600 |
</td> |
|
601 |
<td><var>false</var></td> |
|
602 |
</tr> |
|
603 |
<tr> |
|
604 |
<td><p><code>$wcs-step-marker-color</code></p></td> |
|
605 |
<td><p>Couleur du chiffre des marqueurs d'étapes non courantes</p></td> |
|
606 |
<td><var>$wcs-step-color</var></td> |
|
607 |
</tr> |
|
608 |
<tr> |
|
609 |
<td><p><code>$wcs-step-current-marker-color</code></p></td> |
|
610 |
<td><p>Couleur du chiffre du marqueur d'étape courante</p></td> |
|
611 |
<td><var>$wcs-step-current-color</var></td> |
|
612 |
</tr> |
|
613 |
<tr> |
|
614 |
<td><p><code>$wcs-step-marker-background</code></p></td> |
|
615 |
<td><p>Couleur de fond des marqueurs d'étapes non courantes</p></td> |
|
616 |
<td><var>$wcs-step-background</var></td> |
|
617 |
</tr> |
|
618 |
<tr> |
|
619 |
<td><p><code>$wcs-step-current-marker-background</code></p></td> |
|
620 |
<td><p>Couleur de fond du marqueur d'étape courante</p></td> |
|
621 |
<td><var>$wcs-step-current-background</var></td> |
|
622 |
</tr> |
|
623 |
<tr> |
|
624 |
<td><p><code>$wcs-step-marker-size</code></p></td> |
|
625 |
<td><p>Taille du marqueur. La taille du marquer n'influe pas sur la taille du chiffre</p></td> |
|
626 |
<td><var>2.1em</var></td> |
|
627 |
</tr> |
|
628 |
<tr> |
|
629 |
<td><p><code>$wcs-step-current-marker-enlarge</code></p></td> |
|
630 |
<td><p>Facteur d'agrandissement de la taille du marqueur courant. Une valeur de <var>1.1</var> agrandira le marqueur de 110%</p></td> |
|
631 |
<td><var>1</var></td> |
|
632 |
</tr> |
|
633 |
<tr> |
|
634 |
<td><p><code>$wcs-step-marker-type</code></p></td> |
|
635 |
<td> |
|
636 |
<p> |
|
637 |
Défini le style des marqueurs. Les marqueurs peuvent être sous forme de carrés (par défaut), de cercles mais également liés entre eux (par une ligne). |
|
638 |
Valeurs possibles: <var>tied</var>, <var>disc</var>, <var>disc tied</var>. |
|
639 |
Il est possible de gérer le rendu de la ligne avec les variables <code>$wcs-step-marker-tie-color</code> et <code>$wcs-step-marker-tie-width</code> |
|
640 |
</p> |
|
641 |
</td> |
|
642 |
<td><var>square</var></td> |
|
643 |
</tr> |
|
644 |
<tr> |
|
645 |
<td><p><code>$wcs-step-marker-background-type</code></p></td> |
|
646 |
<td> |
|
647 |
<p> |
|
648 |
Cette option ne fonctionnera que si <code>$wcs-step-marker-background</code> est une couleur pleine. |
|
649 |
Avec la valeur <var>gradient</var>, elle permet de générer un dégradé en fond des marqueurs non courant permettant de souligner visuellement la progression. |
|
650 |
</p> |
|
651 |
</td> |
|
652 |
<td><var>solid</var></td> |
|
653 |
</tr> |
|
654 |
<tr> |
|
655 |
<td><p><code>$wcs-step-current-label-color</code></p></td> |
|
656 |
<td> |
|
657 |
<p> |
|
658 |
Cette option ne fonctionnera que si <code>$wcs-step-marker-background</code> est une couleur pleine. |
|
659 |
Avec la valeur <var>gradient</var>, elle permet de générer un dégradé en fond des marqueurs non courant permettant de souligner visuellement la progression. |
|
660 |
</p> |
|
661 |
</td> |
|
662 |
<td><var>$wcs-step-current-color</var></td> |
|
663 |
</tr> |
|
664 |
<tr> |
|
665 |
<td><var>$wcs-step-current-color</var></td> |
|
666 |
<td><p>Couleur du label de l'étape courante</p></td> |
|
667 |
<td><var>solid</var></td> |
|
668 |
</tr> |
|
669 |
<tr> |
|
670 |
<td><code>$wcs-steps-small-layout-limit</code></td> |
|
671 |
<td><p>Fixe la valeur du point de rupture entre le rendu mobile et horizontal</p></td> |
|
672 |
<td><var>$very-small-limit</var></td> |
|
673 |
</tr> |
|
674 |
</table> |
|
675 |
</section> |
|
676 | ||
522 | 677 |
<section> |
523 | 678 |
<title>Cellules</title> |
524 | 679 |
static/includes/_wcs.scss | ||
---|---|---|
1 | 1 |
@import 'grid'; |
2 | 2 |
@import 'wcs/bulk'; |
3 |
@import 'wcs/nearby-form'; |
|
3 |
@import 'wcs/steps'; |
|
4 |
@import 'wcs/nearby-form'; |
static/includes/wcs/_bulk.scss | ||
---|---|---|
2 | 2 |
// possible values are: left, right, top |
3 | 3 |
$form-sidebar-position: left !default; |
4 | 4 | |
5 |
$responsive-steps: horizontal !default; |
|
6 | ||
7 | 5 |
// hide a bunch of elements |
8 | 6 |
div#droite, |
9 | 7 |
div#services > h3, |
10 |
div#steps h2, |
|
11 | 8 |
div#sidebox div#links { |
12 | 9 |
display: none; |
13 | 10 |
} |
... | ... | |
133 | 130 |
margin: 1em; |
134 | 131 |
} |
135 | 132 | |
136 |
// steps |
|
137 |
div#steps ol { |
|
138 |
margin: 0; |
|
139 |
padding: 0; |
|
140 |
list-style: none; |
|
141 |
color: #868686; |
|
142 | ||
143 |
& li { |
|
144 |
border: 0; |
|
145 |
border-bottom: 1px solid #ccc; |
|
146 |
margin-bottom: 1.5em; |
|
147 |
border-radius: $border-radius; |
|
148 |
padding: 0.7em; |
|
149 |
letter-spacing: 1px; |
|
150 |
} |
|
151 |
& li.current { |
|
152 |
border: 0; |
|
153 |
background: $title-background; |
|
154 |
color: $title-color; |
|
155 |
& span.label { |
|
156 |
font-weight: bold; |
|
157 |
} |
|
158 |
} |
|
159 |
& li span.marker { |
|
160 |
font-size: 250%; |
|
161 |
display: block; |
|
162 |
} |
|
163 |
} |
|
164 | 133 | |
165 | 134 | |
166 |
@if ($form-sidebar-position == top) { |
|
167 |
div#steps ol { |
|
168 |
text-align: center; |
|
169 |
li { |
|
170 |
display: inline-block; |
|
171 |
min-width: 7rem; |
|
172 |
max-width: 11rem; |
|
173 |
vertical-align: top; |
|
174 |
border-bottom: none; |
|
175 |
} |
|
176 |
} |
|
177 |
} |
|
178 | ||
179 |
@if ($responsive-steps == horizontal) { |
|
180 | 135 |
@media screen and (max-width: $mobile-limit) { |
136 |
// move #gauche on top and tracking code after steps |
|
181 | 137 |
div#gauche { |
182 | 138 |
float: none; |
183 | 139 |
width: 100%; |
... | ... | |
193 | 149 |
h3 { display: inline-block; } |
194 | 150 |
.text-tracking-code-short-text { display: none; } |
195 | 151 |
} |
196 |
div#steps { |
|
197 |
position: static; |
|
198 |
margin: 0; |
|
199 |
color: #aaa; |
|
200 |
white-space: nowrap; |
|
201 |
overflow: hidden; |
|
202 |
width: 100%; |
|
203 |
& ol { |
|
204 |
list-style: none; |
|
205 |
padding: 0 0; |
|
206 |
margin: 0; |
|
207 |
text-align: left; |
|
208 |
& li { |
|
209 |
border: none; |
|
210 |
display: inline-block; |
|
211 |
margin: 0; |
|
212 |
padding: 0 1em 0.7em 0; |
|
213 |
list-style: none; |
|
214 |
min-width: auto; |
|
215 |
border-radius: 0; |
|
216 |
& span.marker { |
|
217 |
float: none; |
|
218 |
display: inline; |
|
219 |
font-size: 26px; |
|
220 |
position: static; |
|
221 |
padding: 2px 9px; |
|
222 |
font-weight: bold; |
|
223 |
color: white; |
|
224 |
text-align: center; |
|
225 |
background: #ddd; |
|
226 |
border-radius: $border-radius; |
|
227 |
border: 1px solid #ddd; |
|
228 |
} |
|
229 |
} |
|
230 |
& li.current { |
|
231 |
background: inherit; |
|
232 |
color: inherit; |
|
233 |
& span.label { |
|
234 |
font-weight: normal; |
|
235 |
} |
|
236 |
& span.marker { |
|
237 |
background: $title-background; |
|
238 |
color: $title-color; |
|
239 |
border-radius: $border-radius; |
|
240 |
} |
|
241 |
} |
|
242 |
& li.step-before .label { |
|
243 |
display: none; |
|
244 |
} |
|
245 |
} |
|
246 |
} |
|
247 | 152 |
} |
248 |
} // @endif ($responsive-steps == horizontal) |
|
249 | 153 | |
250 | 154 |
@media screen and (max-width: $mobile-limit) { |
251 | 155 |
div#gauche + div#rub_service, |
static/includes/wcs/_steps.scss | ||
---|---|---|
1 |
/* |
|
2 |
* WCS Steps |
|
3 |
* |
|
4 |
* Affiche les étapes/pages d'un formulaire |
|
5 |
* |
|
6 |
* Template : wcs/front/formdata_steps.html |
|
7 |
* |
|
8 |
* $form-sidebar-position define Steps orientation |
|
9 |
* |
|
10 |
*/ |
|
11 | ||
12 |
// |
|
13 |
// Config |
|
14 |
// |
|
15 | ||
16 |
// Steps Bloc |
|
17 |
$wcs-steps-background: transparent !default; |
|
18 |
$wcs-steps-spacing: 0.35rem !default; // half of default 0.7rem used in publik |
|
19 | ||
20 |
// Step |
|
21 |
$wcs-step-color: #868686 !default; // color for default marker & label |
|
22 |
$wcs-step-current-color: $primary-color !default; |
|
23 |
$wcs-step-background: transparent !default; |
|
24 |
$wcs-step-current-background: $wcs-step-background !default; |
|
25 |
$wcs-step-border-bottom: 1px solid $wcs-step-color !default; |
|
26 |
$wcs-step-current-border-bottom: 3px solid $wcs-step-current-color !default; |
|
27 |
@if ($wcs-step-border-bottom == none) { |
|
28 |
$wcs-step-current-border-bottom: none; |
|
29 |
} |
|
30 |
// Step option |
|
31 |
$wsc-step-before-piled: false !default; |
|
32 | ||
33 |
// marker |
|
34 |
$wcs-step-marker-color: $wcs-step-color !default; |
|
35 |
$wcs-step-current-marker-color: $wcs-step-current-color !default; |
|
36 |
$wcs-step-marker-background: $wcs-step-background !default; |
|
37 |
$wcs-step-current-marker-background: $wcs-step-current-background !default; |
|
38 |
// marker options |
|
39 |
$wcs-step-marker-size: 2.1em !default; |
|
40 |
$wcs-step-current-marker-enlarge: 1 !default; |
|
41 |
$wcs-step-marker-type: square !default; // square || tied || disc || disc tied |
|
42 |
$wcs-step-marker-tie-color: $wcs-step-color !default; |
|
43 |
$wcs-step-marker-tie-width: 5px !default; |
|
44 |
$wcs-step-marker-background-type: solid !default; |
|
45 | ||
46 |
// Label |
|
47 |
$wcs-step-current-label-color: $wcs-step-current-color !default; |
|
48 | ||
49 |
// Breakpoints between small & horizontal layout |
|
50 |
$wcs-steps-small-layout-limit: $very-small-limit !default; |
|
51 | ||
52 |
// UTILS for custom code |
|
53 |
// media queries between small & horizontal layout |
|
54 |
$mq-max--wcs-steps-small-layout: "max-width: #{$wcs-steps-small-layout-limit}"; |
|
55 |
$mq-min--wcs-steps-horizontal-layout: "min-width: #{$wcs-steps-small-layout-limit+1}"; |
|
56 |
// Desktop Steps orientation sass mixins |
|
57 |
// Steps orientations depend on media-queries & $form-sidebar-position |
|
58 |
@mixin desktop-horizontal-steps() { |
|
59 |
@if ($form-sidebar-position == top) { |
|
60 |
@media (min-width: $mobile-limit + 1) { |
|
61 |
@content; |
|
62 |
} |
|
63 |
} |
|
64 |
} |
|
65 |
@mixin desktop-vertical-steps() { |
|
66 |
@if ($form-sidebar-position == left or $form-sidebar-position == right) { |
|
67 |
@media (min-width: $mobile-limit + 1) { |
|
68 |
@content; |
|
69 |
} |
|
70 |
} |
|
71 |
} |
|
72 | ||
73 | ||
74 | ||
75 |
/* |
|
76 |
* Default Steps (with SQUARES markers) |
|
77 |
*/ |
|
78 | ||
79 |
/* Steps bloc */ |
|
80 |
.wcs-steps { |
|
81 |
background: $wcs-steps-background; |
|
82 |
margin-bottom: 0.7rem; |
|
83 |
border-radius: $border-radius; |
|
84 | ||
85 |
@if $wcs-steps-background != transparent { |
|
86 |
padding: $wcs-steps-spacing; |
|
87 |
} |
|
88 | ||
89 |
// hide injected h2 |
|
90 |
h2 { |
|
91 |
display: none; |
|
92 |
} |
|
93 | ||
94 |
// hide if only one step |
|
95 |
&.steps-1 { |
|
96 |
display: none; |
|
97 |
} |
|
98 | ||
99 |
&--list { |
|
100 |
margin: 0; |
|
101 |
padding: 0; |
|
102 |
list-style: none; |
|
103 |
color: $wcs-step-color; |
|
104 |
} |
|
105 |
} |
|
106 | ||
107 |
/* Step item */ |
|
108 |
.wcs-step { |
|
109 |
border-radius: $border-radius; |
|
110 |
background-color: $wcs-step-background; |
|
111 |
display: -ms-flexbox; |
|
112 |
display: flex; |
|
113 | ||
114 |
&--marker { |
|
115 |
// marker is abbr tag |
|
116 |
text-decoration: none; |
|
117 |
box-sizing: border-box; |
|
118 | ||
119 |
font-size: 1em; |
|
120 |
text-align: center; |
|
121 | ||
122 |
display: -ms-flexbox; |
|
123 |
display: flex; |
|
124 | ||
125 |
color: $wcs-step-marker-color; |
|
126 |
background: $wcs-step-marker-background; |
|
127 |
border-radius: $border-radius; |
|
128 | ||
129 |
width: $wcs-step-marker-size; |
|
130 |
height: $wcs-step-marker-size; |
|
131 |
-ms-flex: 0 0 $wcs-step-marker-size; |
|
132 |
flex: 0 0 $wcs-step-marker-size; |
|
133 |
|
|
134 |
&-nb { |
|
135 |
margin: auto; |
|
136 |
} |
|
137 | ||
138 |
&-total { |
|
139 |
display: none; |
|
140 |
} |
|
141 |
} |
|
142 | ||
143 |
&--label { |
|
144 |
display: block; |
|
145 |
-ms-grid-row-align: center; |
|
146 |
align-self: center; |
|
147 |
letter-spacing: 1px; |
|
148 |
line-height: 1.25; |
|
149 |
} |
|
150 | ||
151 | ||
152 |
// If step is current |
|
153 |
&.current { |
|
154 |
font-weight: bold; |
|
155 |
background: $wcs-step-current-background; |
|
156 |
} |
|
157 | ||
158 |
&.current & { |
|
159 |
&--marker { |
|
160 |
background: $wcs-step-current-marker-background; |
|
161 |
color: $wcs-step-current-marker-color; |
|
162 |
@if ($wcs-step-current-marker-enlarge != 1) { |
|
163 |
transform: scale($wcs-step-current-marker-enlarge); |
|
164 |
} |
|
165 |
} |
|
166 |
&--label { |
|
167 |
color: $wcs-step-current-label-color; |
|
168 |
} |
|
169 |
} |
|
170 | ||
171 |
// If step is NOT current |
|
172 |
&:not(.current) & { |
|
173 |
&--label { |
|
174 |
display: none; |
|
175 |
} |
|
176 |
} |
|
177 |
} |
|
178 | ||
179 |
/* Sidebar on TOP, SMALL LAYOUT (very-small viewport) |
|
180 |
* Display only current step with nb and total in marker |
|
181 |
*/ |
|
182 |
@media ($mq-max--wcs-steps-small-layout) { |
|
183 |
.wcs-step { |
|
184 |
@if ($wcs-step-background != transparent or $wcs-step-current-background != transparent) { |
|
185 |
padding: $wcs-steps-spacing; |
|
186 |
} |
|
187 | ||
188 |
&--marker { |
|
189 | ||
190 |
$size: $wcs-step-marker-size + 0.8; |
|
191 | ||
192 |
width: $size; |
|
193 |
height: $size; |
|
194 |
-ms-flex: 0 0 auto; |
|
195 |
flex: 0 0 auto; |
|
196 |
-ms-flex-align: center; |
|
197 |
align-items: center; |
|
198 |
-ms-flex-pack: center; |
|
199 |
justify-content: center; |
|
200 | ||
201 |
&-nb { |
|
202 |
margin: 0; |
|
203 |
transform: translateY(-0.5em); |
|
204 |
-ms-flex-order: 1; |
|
205 |
order: 1; |
|
206 |
} |
|
207 | ||
208 |
&-total { |
|
209 |
display: block; |
|
210 |
transform: translateY(0.5em); |
|
211 |
font-size: 0.75em; |
|
212 |
font-weight: normal; |
|
213 |
-ms-flex-order: 3; |
|
214 |
order: 3; |
|
215 |
} |
|
216 | ||
217 |
// add slash |
|
218 |
&::before { |
|
219 |
content: ""; |
|
220 |
display: block; |
|
221 |
-ms-flex: 0 0 0.1em; |
|
222 |
flex: 0 0 0.1em; |
|
223 |
height: 2em; |
|
224 |
margin: 0 0.1em; |
|
225 |
background: currentColor; |
|
226 |
transform: rotate(30deg); |
|
227 |
-ms-flex-order: 2; |
|
228 |
order: 2; |
|
229 |
} |
|
230 |
} |
|
231 | ||
232 |
&--label { |
|
233 |
margin-left: $wcs-steps-spacing*2; |
|
234 |
} |
|
235 | ||
236 |
// If step is NOT current |
|
237 |
&:not(.current) { |
|
238 |
display: none; |
|
239 |
} |
|
240 |
} |
|
241 |
} |
|
242 | ||
243 |
/* Horizontal Layout |
|
244 |
* Sidebar on TOP, SMALL and more viewport |
|
245 |
* Diplay all marker, but only current Label |
|
246 |
*/ |
|
247 |
@media ($mq-min--wcs-steps-horizontal-layout) { |
|
248 | ||
249 |
.wcs-steps { |
|
250 |
&--list { |
|
251 |
position: relative; |
|
252 |
display: -ms-flexbox; |
|
253 |
display: flex; |
|
254 |
-ms-flex-wrap: wrap; |
|
255 |
flex-wrap: wrap; |
|
256 | ||
257 |
// keep space for label |
|
258 |
margin-bottom: 2em; |
|
259 |
} |
|
260 |
} |
|
261 | ||
262 |
.wcs-step { |
|
263 |
margin-bottom: $wcs-steps-spacing; |
|
264 |
margin-right: $wcs-steps-spacing*2; |
|
265 |
border-bottom: $wcs-step-border-bottom; |
|
266 |
&:last-child { |
|
267 |
margin-right: 0; |
|
268 |
} |
|
269 | ||
270 |
&--label { |
|
271 |
position: absolute; |
|
272 |
top: 100%; |
|
273 |
left: 0; |
|
274 |
width: 100%; |
|
275 |
padding-bottom: $wcs-steps-spacing; |
|
276 |
text-align: left; |
|
277 |
} |
|
278 | ||
279 |
&.current { |
|
280 |
border-bottom: $wcs-step-current-border-bottom; |
|
281 |
} |
|
282 |
} |
|
283 | ||
284 | ||
285 |
} |
|
286 | ||
287 | ||
288 |
@include desktop-horizontal-steps() { |
|
289 |
.wcs-steps { |
|
290 |
font-size: 1.25em; |
|
291 |
&--list { |
|
292 |
justify-content: center; |
|
293 |
} |
|
294 |
} |
|
295 |
.wcs-step { |
|
296 |
margin-bottom: $wcs-steps-spacing*3; |
|
297 |
margin-right: $wcs-steps-spacing*3; |
|
298 |
&--label { |
|
299 |
text-align: center; |
|
300 |
} |
|
301 |
} |
|
302 |
} |
|
303 | ||
304 |
/* Vertical Steps |
|
305 |
* Sidebar on LEFT or RIGHT, DESKTOP only |
|
306 |
* Display All steps with marker and label. One below the other. |
|
307 |
*/ |
|
308 |
@include desktop-vertical-steps() { |
|
309 |
.wcs-steps { |
|
310 |
font-size: 1.25em; |
|
311 | ||
312 |
// display even if only one step |
|
313 |
&.steps-1 { |
|
314 |
display: block; |
|
315 |
} |
|
316 | ||
317 |
&--list { |
|
318 |
-ms-flex-wrap: nowrap; |
|
319 |
flex-wrap: nowrap; |
|
320 |
-ms-flex-direction: column; |
|
321 |
flex-direction: column; |
|
322 |
// remove keep space for label |
|
323 |
padding-bottom: 0; |
|
324 |
} |
|
325 |
} |
|
326 | ||
327 |
.wcs-step { |
|
328 |
margin-bottom: $wcs-steps-spacing; |
|
329 |
|
|
330 |
@if $wcs-step-border-bottom != none { |
|
331 |
padding-bottom: $wcs-steps-spacing; |
|
332 |
} |
|
333 |
@if ($wcs-step-background != transparent or $wcs-step-current-background != transparent) { |
|
334 |
padding: $wcs-steps-spacing; |
|
335 |
} |
|
336 | ||
337 |
margin-right: 0; |
|
338 | ||
339 |
&--label { |
|
340 |
position: static; |
|
341 |
font-size: 0.7em; |
|
342 |
margin-left: $wcs-steps-spacing; |
|
343 |
padding-bottom: 0; |
|
344 |
} |
|
345 | ||
346 |
// If step is NOT current |
|
347 |
&:not(.current) & { |
|
348 |
&--label { |
|
349 |
display: block; |
|
350 |
} |
|
351 |
} |
|
352 |
} |
|
353 |
} |
|
354 | ||
355 | ||
356 |
/* |
|
357 |
* OPTION marker-background-type: gradient. |
|
358 |
* Generate automatically a gradient based on background-color |
|
359 |
*/ |
|
360 | ||
361 |
@if $wcs-step-marker-background-type == gradient { |
|
362 |
.wcs-step { |
|
363 |
&--marker { |
|
364 |
background-attachment: fixed; |
|
365 |
@media (min-width: $very-small-limit + 1) { |
|
366 |
background-image: linear-gradient(to right, lighten($wcs-step-marker-background, 10%), darken($wcs-step-marker-background, 10%)); |
|
367 |
} |
|
368 | ||
369 |
@include desktop-vertical-steps() { |
|
370 |
background-image: linear-gradient(to bottom, lighten($wcs-step_marker-background, 10%), darken($wcs-step_marker-background, 10%)); |
|
371 |
} |
|
372 |
} |
|
373 |
} |
|
374 |
} |
|
375 | ||
376 |
/* |
|
377 |
* OPTION Pile Step Before |
|
378 |
* Work only for |
|
379 |
* * horizontal mode: desktop breakpoint and sidebar on left or right |
|
380 |
* * with background-color on step |
|
381 |
*/ |
|
382 |
@if ($wsc-step-before-piled ) { |
|
383 |
@include desktop-vertical-steps() { |
|
384 |
.wcs-step { |
|
385 |
&:not(:first-child) { |
|
386 |
&.step-before, |
|
387 |
&.current { |
|
388 |
box-shadow: 0 -4px 4px -4px darken($wcs-step-background, 40%); |
|
389 |
} |
|
390 |
} |
|
391 | ||
392 |
&.step-before, |
|
393 |
&.current { |
|
394 |
z-index: 1; |
|
395 |
transition: margin 400ms, box-shadow 400ms; |
|
396 |
} |
|
397 |
|
|
398 |
&.step-before { |
|
399 |
margin-bottom: calc( (#{$wcs-step-marker-size} + #{$wcs-steps-spacing * 2}) / 2 * -1); |
|
400 | ||
401 |
&:hover { |
|
402 |
margin-bottom: $wcs-steps-spacing; |
|
403 | ||
404 |
& + .wcs-step { |
|
405 |
box-shadow: 0 0 0 0 darken($wcs-step-background, 40%); |
|
406 |
} |
|
407 |
} |
|
408 |
} |
|
409 |
} |
|
410 |
} |
|
411 |
} |
|
412 | ||
413 | ||
414 |
/* |
|
415 |
* OPTION marker type DISC |
|
416 |
*/ |
|
417 |
@if (str-index(quote($wcs-step-marker-type), 'disc')) { |
|
418 |
.wcs-step { |
|
419 |
&--marker { |
|
420 |
border-radius: 50% !important; |
|
421 | ||
422 |
@media ($mq-max--wcs-steps-small-layout) { |
|
423 |
$size: $wcs-step-marker-size + 1.4; |
|
424 |
width: $size; |
|
425 |
height: $size; |
|
426 |
} |
|
427 |
} |
|
428 |
} |
|
429 |
} |
|
430 | ||
431 |
/* |
|
432 |
* OPTION marker type TIED |
|
433 |
*/ |
|
434 |
@if (str-index(quote($wcs-step-marker-type), 'tied')) { |
|
435 |
|
|
436 |
.wcs-step { |
|
437 |
&:not(:last-child) { |
|
438 |
@media ($mq-min--wcs-steps-horizontal-layout) { |
|
439 |
&::after { |
|
440 |
content: ""; |
|
441 |
display: block; |
|
442 |
height: $wcs-step-marker-tie-width; |
|
443 |
-ms-flex: 0 0 calc(100% + #{$wcs-steps-spacing}); |
|
444 |
flex: 0 0 calc(100% + #{$wcs-steps-spacing}); |
|
445 |
background-color: $wcs-step-marker-tie-color; |
|
446 |
margin: auto; |
|
447 |
} |
|
448 |
} |
|
449 | ||
450 |
@include desktop-vertical-steps() { |
|
451 |
position: relative; |
|
452 | ||
453 |
&::after { |
|
454 |
height: calc(100% + #{$wcs-steps-spacing}); |
|
455 |
width: $wcs-step-marker-tie-width; |
|
456 | ||
457 |
position: absolute; |
|
458 |
z-index: 1; |
|
459 |
top: $wcs-steps-spacing; |
|
460 |
left: calc( (#{$wcs-step-marker-size} - #{$wcs-step-marker-tie-width}) / 2 ); |
|
461 | ||
462 |
@if $wcs-step-background != transparent { |
|
463 |
left: calc( (#{$wcs-step-marker-size} - #{$wcs-step-marker-tie-width}) / 2 + #{$wcs-steps-spacing}); |
|
464 |
} |
|
465 |
} |
|
466 |
} |
|
467 |
} |
|
468 | ||
469 |
&--marker { |
|
470 |
position: relative; |
|
471 |
z-index: 2; |
|
472 |
} |
|
473 |
} |
|
474 |
} |
templates/theme.html | ||
---|---|---|
49 | 49 |
</div> |
50 | 50 | |
51 | 51 |
<div id="page" {% block page-args %}{% endblock %}> |
52 |
<header role="banner"> |
|
52 |
<header role="banner" class="site-header">
|
|
53 | 53 |
<div id="header-wrapper" > |
54 | 54 |
{% block header-pre %}{% endblock %} |
55 | 55 |
<div id="header"> |
templates/wcs/front/formdata_steps.html | ||
---|---|---|
1 |
<header id="steps" class="wcs-steps steps-{{page_labels|length}}"> |
|
2 |
<ol class="wcs-steps--list"> |
|
3 |
{% for page_label in page_labels %} |
|
4 |
{% spaceless %} |
|
5 |
<li {% if forloop.counter != current_page_no %}aria-hidden="true"{% endif %} |
|
6 |
class="wcs-step |
|
7 |
{% if forloop.first %}first{% endif %} |
|
8 |
{% if forloop.last %}last{% endif %} |
|
9 |
{% if forloop.counter == current_page_no %}current{% endif %} |
|
10 |
{% if forloop.counter < current_page_no %}step-before{% endif %} |
|
11 |
{% if forloop.counter > current_page_no %}step-after{% endif %}" > |
|
12 |
<abbr |
|
13 |
{% if forloop.counter == current_page_no %} |
|
14 |
aria-label="Étape {{ forloop.counter }} sur {{ page_labels|length }}:" |
|
15 |
title="Étape {{ forloop.counter }} sur {{ page_labels|length }}" |
|
16 |
{% endif %} |
|
17 |
class="marker wcs-step--marker"> |
|
18 |
<span class="wcs-step--marker-nb"> |
|
19 |
{{ forloop.counter }} |
|
20 |
</span> |
|
21 |
<span class="wcs-step--marker-total"> |
|
22 |
{{ page_labels|length }} |
|
23 |
</span> |
|
24 |
</abbr> |
|
25 |
<span class="label wcs-step--label">{{ page_label }}</span> |
|
26 |
</li> |
|
27 |
{% endspaceless %} |
|
28 |
{% endfor %} |
|
29 |
</ol> |
|
30 |
</header> |
|
0 |
- |