0001-hautes-alpes-2018-remove-theme-50361.patch
Makefile | ||
---|---|---|
44 | 44 |
# somme |
45 | 45 |
cd src/ && python3 render-imgs-categories.py ../static/somme-cd80/img/ --primary A8002B --secondary A8002B |
46 | 46 |
cd src/ && python3 render-imgs-dashboard.py ../static/somme-cd80/img/ --normal 4D4D4D --selected 87A738 --title FFFFFF --title-width 80 |
47 |
cd src/ && python3 render-imgs-categories.py ../static/hautes-alpes-2018/img/icon-rouge --primary B73720 --secondary B73720 |
|
48 |
cd src/ && python3 render-imgs-categories.py ../static/hautes-alpes-2018/img/icon-bleu --primary 1C515E --secondary 1C515E |
|
49 | 47 |
# tournai |
50 | 48 |
cd static/tournai/ && for F in assets/*.svg; do $(INKSCAPE) --without-gui --file $$F --export-area-drawing --export-area-snap --export-png img/$$(basename $$F .svg).png --export-width 40; done |
51 | 49 |
static/hautes-alpes-2018/_circle-steps.scss | ||
---|---|---|
1 |
div#steps { |
|
2 | ||
3 |
padding: 0 1em; |
|
4 | ||
5 |
ol li { |
|
6 |
display: flex; |
|
7 |
flex-direction: column; |
|
8 | ||
9 |
margin: 25px 0; |
|
10 |
padding: 0.5ex; |
|
11 |
position: relative; |
|
12 |
border: 0; |
|
13 | ||
14 |
span.marker { |
|
15 |
justify-content: center; |
|
16 |
align-items: center; |
|
17 |
display: inline-flex; |
|
18 |
margin: 0 auto 0.3em auto; |
|
19 |
width: 4vw; |
|
20 |
height: 4vw; |
|
21 |
color: gray; |
|
22 |
position: relative; |
|
23 |
border: 1px solid gray; |
|
24 |
border-radius: 50%; |
|
25 |
background: transparent; |
|
26 |
font-size: calc(12px + 1.2vw); |
|
27 |
font-weight: bold; |
|
28 |
text-align: center; |
|
29 |
vertical-align: middle; |
|
30 |
max-width: 100%; |
|
31 |
max-height: 100%; |
|
32 | ||
33 |
&::before { |
|
34 |
display: block; |
|
35 |
content: ' '; |
|
36 |
border-radius: 50%; |
|
37 |
position: absolute; |
|
38 |
background: $button-background; |
|
39 |
z-index: -1; |
|
40 |
padding: 6px; |
|
41 |
} |
|
42 |
} |
|
43 | ||
44 |
span.label { |
|
45 |
margin: 0 -1em; |
|
46 |
text-align: center; |
|
47 |
vertical-align: middle; |
|
48 |
} |
|
49 | ||
50 |
&.current { |
|
51 |
background: transparent; |
|
52 |
font-weight: bold; |
|
53 | ||
54 |
span.label { |
|
55 |
color: $title-color; |
|
56 |
} |
|
57 | ||
58 |
span.marker { |
|
59 |
color: white; |
|
60 |
border-color: $primary-color; |
|
61 |
background: $primary-color; |
|
62 |
} |
|
63 |
} |
|
64 |
} |
|
65 |
} |
|
66 |
@media screen and ($max-mobile-viewport) { |
|
67 |
div#gauche div#steps { |
|
68 | ||
69 |
order: 2; |
|
70 |
padding: 0; |
|
71 | ||
72 |
ol { |
|
73 |
display: flex; |
|
74 |
flex-direction: row; |
|
75 |
flex-flow: nowrap; |
|
76 |
justify-content: center; |
|
77 |
align-items: center; |
|
78 | ||
79 |
li { |
|
80 |
padding: 0 0.6em 1ex 0; |
|
81 | ||
82 |
span.marker { |
|
83 |
padding: 0.3em; |
|
84 |
border-radius: 50%; |
|
85 |
width: 4rem; // reset size without vw |
|
86 |
height: 4rem; |
|
87 |
} |
|
88 | ||
89 |
span.label { |
|
90 |
display: none; |
|
91 |
} |
|
92 |
} |
|
93 |
} |
|
94 |
} |
|
95 |
} |
static/hautes-alpes-2018/_custom.scss | ||
---|---|---|
1 |
div#main-content-wrapper { |
|
2 |
z-index: 1; |
|
3 |
max-width: 100%; |
|
4 |
} |
|
5 | ||
6 |
#document #corps, #page { |
|
7 |
z-index: 0; |
|
8 | ||
9 |
#messages { |
|
10 |
padding: $block-padding; |
|
11 |
margin: $messages-block-margin; |
|
12 |
max-width: $width; |
|
13 |
font-weight: 600; |
|
14 |
letter-spacing: 0.025em; |
|
15 |
} |
|
16 | ||
17 |
// override .errornotice (includes/misc) |
|
18 |
%custom-error-notice { |
|
19 |
@extend .errornotice; |
|
20 |
&::before { |
|
21 |
font-size: 30px; |
|
22 |
} |
|
23 |
} |
|
24 | ||
25 |
// error warnings (WCS) |
|
26 |
div.widget div.content div.error { |
|
27 |
@extend %custom-error-notice; |
|
28 |
margin-top: 0; |
|
29 |
} |
|
30 | ||
31 |
#messages li, |
|
32 |
div.infonotice, |
|
33 |
div.successnotice, |
|
34 |
div.warningnotice, |
|
35 |
div.errornotice { |
|
36 |
@extend %custom-error-notice; |
|
37 |
} |
|
38 | ||
39 |
// override includes/_forms.scss |
|
40 |
.fargo-pick-popup button, |
|
41 |
button.ui-button, |
|
42 |
a#a2-continue, |
|
43 |
div#content button, |
|
44 |
input[type=submit], |
|
45 |
div.buttons input { |
|
46 |
@extend %button-style; |
|
47 |
} |
|
48 | ||
49 |
// override includes/_wcs.scss |
|
50 |
ul#evolutions { |
|
51 |
li span.item { |
|
52 |
/* left circle icon */ |
|
53 |
background: $button-background !important; |
|
54 |
border-color: $button-background; |
|
55 |
color: $secondary-color !important; |
|
56 |
} |
|
57 | ||
58 |
div.evolution-metadata, li div.msg { |
|
59 |
background: $cell-background; |
|
60 |
} |
|
61 |
} |
|
62 | ||
63 |
// override fc.css |
|
64 |
div#fc-button a.button div { |
|
65 |
height: auto; |
|
66 |
} |
|
67 | ||
68 |
#main-content-wrapper { |
|
69 |
z-index: 1; |
|
70 |
max-width: 100%; |
|
71 |
} |
|
72 | ||
73 |
> .site-nav { |
|
74 |
display: flex; |
|
75 |
align-items: center; |
|
76 |
justify-content: center; |
|
77 |
// flexbug https://github.com/philipwalton/flexbugs#flexbug-2 |
|
78 |
max-width: 100%; |
|
79 |
background-color: $cell-background; |
|
80 |
font-size: 1.5rem; |
|
81 |
@media screen and ($max-mobile-viewport) { |
|
82 |
flex-direction: column; |
|
83 |
} |
|
84 | ||
85 |
> div { |
|
86 |
@media screen and ($max-mobile-viewport) { |
|
87 |
margin: $inner-nav-margin; |
|
88 |
} |
|
89 |
} |
|
90 | ||
91 |
div#nav { |
|
92 |
order: 0; |
|
93 |
flex-basis: 50%; |
|
94 |
background-color: transparent; |
|
95 |
height: unset; |
|
96 | ||
97 |
@media screen and ($max-mobile-viewport) { |
|
98 |
flex-basis: auto; |
|
99 |
width: 100%; |
|
100 | ||
101 |
> ul { |
|
102 |
display: flex; |
|
103 |
justify-content: space-around; |
|
104 |
align-items: center; |
|
105 |
// flexbug https://github.com/philipwalton/flexbugs#flexbug-2 |
|
106 |
max-width: 100%; |
|
107 | ||
108 |
> li { |
|
109 |
flex-wrap: wrap; |
|
110 |
a { |
|
111 |
line-height: 1em; |
|
112 |
} |
|
113 |
} |
|
114 | ||
115 |
ul { |
|
116 |
display: none; |
|
117 |
} |
|
118 |
} |
|
119 |
} |
|
120 |
// first-level menu |
|
121 |
ul:first-child { |
|
122 |
display: flex; |
|
123 |
justify-content: center; |
|
124 |
flex-wrap: wrap; |
|
125 |
height: unset; |
|
126 |
li { |
|
127 |
flex-grow: 0; |
|
128 |
} |
|
129 |
} |
|
130 | ||
131 |
ul { |
|
132 |
li { |
|
133 |
font-weight: 700; |
|
134 |
a { |
|
135 |
color: $font-color; |
|
136 |
line-height: 2.7em; |
|
137 |
padding: 0 0.7em; |
|
138 |
} |
|
139 | ||
140 |
&.selected, |
|
141 |
&:hover { |
|
142 |
> a { |
|
143 |
color: $primary-color; |
|
144 |
} |
|
145 |
} |
|
146 |
} |
|
147 |
} |
|
148 |
} |
|
149 |
// User authentication block |
|
150 |
.user-nav { |
|
151 |
flex-basis: 50%; |
|
152 |
order: 1; |
|
153 | ||
154 |
@media screen and ($max-mobile-viewport) { |
|
155 |
flex-basis: $nav-height; |
|
156 |
margin: 0; |
|
157 |
width: 100%; |
|
158 | ||
159 |
a { |
|
160 |
height: auto; |
|
161 |
transition: background 0.5s, color 0.5s; |
|
162 |
} |
|
163 |
span.connected-user { |
|
164 |
padding: 0; |
|
165 |
} |
|
166 |
} |
|
167 | ||
168 |
span.login, span.logged-in { |
|
169 |
display: flex; |
|
170 |
flex-direction: row; |
|
171 |
align-items: center; |
|
172 |
justify-content: center; |
|
173 |
// flexbug https://github.com/philipwalton/flexbugs#flexbug-2 |
|
174 |
max-width: 100%; |
|
175 |
padding: 0.5em; |
|
176 |
height: 100%; |
|
177 | ||
178 |
a { |
|
179 |
font-weight: 700; |
|
180 |
color: $font-color; |
|
181 |
height: auto; |
|
182 | ||
183 |
&.selected, |
|
184 |
&:hover { |
|
185 |
color: $primary-color; |
|
186 |
text-decoration: none; |
|
187 |
} |
|
188 |
} |
|
189 |
a.registration, span.sep, a.logout { |
|
190 |
padding-left: 1em; |
|
191 |
} |
|
192 |
} |
|
193 |
height: $nav-height; |
|
194 |
margin: $custom-nav-margin; |
|
195 |
} |
|
196 |
} |
|
197 |
} |
|
198 | ||
199 |
div#content { |
|
200 |
max-width: $width; |
|
201 |
margin: $content-block-margin; |
|
202 |
padding: $block-padding; |
|
203 | ||
204 |
#gauche, |
|
205 |
div#rub_service, |
|
206 |
div#services > ul > li, |
|
207 |
div.a2-block, |
|
208 |
div.a2-continue, |
|
209 |
div.block, |
|
210 |
div.cell { |
|
211 |
padding: $block-padding; |
|
212 |
background-color: $cell-background; |
|
213 |
margin: $inner-div-margin; |
|
214 |
} |
|
215 | ||
216 |
// override default _cells |
|
217 |
div#sidebar + div#columns-wrapper > div.a2-block, |
|
218 |
div#login-page.methods2 > div.block { |
|
219 |
margin: $inner-div-margin; |
|
220 |
} |
|
221 | ||
222 |
div#sidebar + div#columns-wrapper { |
|
223 |
#frontend-registration-email { |
|
224 |
float: left; |
|
225 |
max-width: calc(50% - 1em); |
|
226 |
} |
|
227 |
#frontend-registration-fc { |
|
228 |
float: right; |
|
229 |
max-width: calc(50% - 1em); |
|
230 |
} |
|
231 |
} |
|
232 | ||
233 |
div#gauche + div#rub_service { |
|
234 |
width: calc(79% - 1em); |
|
235 |
} |
|
236 | ||
237 |
#side { |
|
238 |
text-align: center; |
|
239 |
} |
|
240 | ||
241 |
form { |
|
242 |
margin: $form-margin; |
|
243 |
padding: $title-padding; |
|
244 |
background-color: $form-background; |
|
245 |
border: 0; |
|
246 | ||
247 |
.title label { |
|
248 |
display: block; |
|
249 |
margin-bottom: 0.3em; |
|
250 |
font-weight: 400; |
|
251 |
color: #B73720; |
|
252 |
} |
|
253 | ||
254 |
input#tracking-code, |
|
255 |
input[type="tel"], |
|
256 |
input[type="url"], |
|
257 |
input[type="date"], |
|
258 |
input[type="file"], |
|
259 |
input[type="text"], |
|
260 |
input[type="email"], |
|
261 |
input[type="number"], |
|
262 |
input[type="search"], |
|
263 |
input[type="password"], |
|
264 |
textarea, |
|
265 |
select { |
|
266 |
@include vendor-prefix(appearance, none); |
|
267 |
width: 100%; |
|
268 |
max-width: 70rem; |
|
269 |
background-color: #FFFFFF; |
|
270 |
font-family: $font-family; |
|
271 |
font-size: 1.5rem; |
|
272 |
padding: 0.8em 1em; |
|
273 |
line-height: normal; |
|
274 |
font-weight: 600; |
|
275 |
border: 1px solid transparent; |
|
276 |
border-radius: 5px; |
|
277 |
vertical-align: middle; |
|
278 | ||
279 |
&:focus { |
|
280 |
border-color: #AAA; |
|
281 |
} |
|
282 |
} |
|
283 | ||
284 |
h3, h4 { |
|
285 |
font-family: $font-family; |
|
286 |
font-weight: 400; |
|
287 | ||
288 |
&::before { |
|
289 |
color: $primary-color; |
|
290 |
} |
|
291 |
} |
|
292 | ||
293 |
h3 { |
|
294 |
font-size: 2.2rem; |
|
295 |
} |
|
296 | ||
297 |
} |
|
298 | ||
299 |
h1, |
|
300 |
h2, |
|
301 |
h3 { |
|
302 |
@extend %title-style; |
|
303 |
} |
|
304 | ||
305 |
h2 { |
|
306 |
font-size: 2.5rem; |
|
307 |
} |
|
308 | ||
309 |
h3 { |
|
310 |
font-size: 1.6rem; |
|
311 |
} |
|
312 | ||
313 |
div.buttons.submit { |
|
314 |
display: flex; |
|
315 |
justify-content: flex-start; |
|
316 |
flex-direction: row-reverse; |
|
317 |
flex-wrap: wrap; |
|
318 | ||
319 |
.cancel, |
|
320 |
[name="previous"] { |
|
321 |
background: $cell-background; |
|
322 |
} |
|
323 |
} |
|
324 | ||
325 |
button { |
|
326 |
@extend %button-style; |
|
327 |
} |
|
328 | ||
329 |
#tracking-code { |
|
330 |
h1, |
|
331 |
h2, |
|
332 |
h3 { |
|
333 |
padding: 0 5px; |
|
334 |
margin: $tracking-title-margin; |
|
335 |
line-height: normal; |
|
336 |
} |
|
337 |
a { |
|
338 |
padding: 0.5ex 0; |
|
339 |
} |
|
340 |
} |
|
341 | ||
342 |
input, |
|
343 |
textarea { |
|
344 |
@media screen and ($max-mobile-viewport) { |
|
345 |
max-width: 100%; |
|
346 |
} |
|
347 |
} |
|
348 | ||
349 |
div.cell.wcsformsofcategorycell { |
|
350 | ||
351 |
background-color: $category-title-background; |
|
352 |
border-color: $category-title-background; |
|
353 | ||
354 |
&.toggled { |
|
355 |
h2:first-child { |
|
356 |
color: $title-color; |
|
357 |
background-color: $category-title-background; |
|
358 |
} |
|
359 | ||
360 |
ul { |
|
361 |
background-color: $title-background; |
|
362 |
color: $title-color; |
|
363 |
padding: 0; |
|
364 | ||
365 |
li { |
|
366 |
a { |
|
367 |
padding: 1rem; |
|
368 |
color: $title-color; |
|
369 |
} |
|
370 |
a:hover { |
|
371 |
color: $title-color; |
|
372 |
background-color: $button-hover-background; |
|
373 |
} |
|
374 |
} |
|
375 |
} |
|
376 |
} |
|
377 | ||
378 |
h2:first-child { |
|
379 |
@extend %title-style; |
|
380 |
display: inline-block; |
|
381 |
padding-right: 1.5em; |
|
382 |
font-size: 1.6rem; |
|
383 |
color: $title-color; |
|
384 |
background-color: $category-title-background; |
|
385 |
text-transform: none; |
|
386 |
border: none; |
|
387 |
background-repeat: no-repeat; |
|
388 |
background-position: top left; |
|
389 |
padding-left: 140px; |
|
390 |
min-height: 95px; |
|
391 |
letter-spacing: 0.025em; |
|
392 |
line-height: 1.25; |
|
393 |
font-weight: 600; |
|
394 |
transition: all 0.3s; |
|
395 | ||
396 |
&:hover { |
|
397 |
background-color: $cell-entry-hover-background; |
|
398 |
} |
|
399 | ||
400 |
&::before { |
|
401 |
content: $minus-icon; |
|
402 |
font-family: FontAwesome; |
|
403 |
font-size: 0.9rem; |
|
404 |
position: relative; |
|
405 |
margin-bottom: 0.2em; |
|
406 |
-webkit-font-smoothing: antialiased; |
|
407 |
color: $primary-color; |
|
408 |
} |
|
409 | ||
410 |
&::after { |
|
411 |
content: $arrow-down-icon; |
|
412 |
font-family: FontAwesome; |
|
413 |
font-size: 10px; |
|
414 |
position: absolute; |
|
415 |
right: 1em; |
|
416 |
top: 1em; |
|
417 |
vertical-align: middle; |
|
418 |
} |
|
419 | ||
420 |
&.on { |
|
421 |
&::after { |
|
422 |
content: $arrow-up-icon; |
|
423 |
} |
|
424 |
} |
|
425 |
} |
|
426 | ||
427 |
@each $category in $category-slugs { |
|
428 |
@if $category-has-toggled-icons { |
|
429 |
&.#{$category} h2:first-child { background-image: url(img/icon-rouge/#{$category}.png), url(img/icon-rouge/#{$category}-on.png); } |
|
430 |
&.#{$category}.#{$_category_selector_class} h2:first-child { background-image: url(img/icon-rouge/#{$category}-on.png); } |
|
431 |
&.bleu { |
|
432 |
&.#{$category} h2:first-child { background-image: url(img/icon-bleu/#{$category}.png), url(img/icon-bleu/#{$category}-on.png); } |
|
433 |
&.#{$category}.#{$_category_selector_class} h2:first-child { background-image: url(img/icon-bleu/#{$category}-on.png); } |
|
434 |
} |
|
435 |
} @else { |
|
436 |
&.#{$category} h2:first-child { background-image: url(img/icon-rouge/#{$category}.png); } |
|
437 |
&.bleu.#{$category} h2:first-child { background-image: url(img/icon-bleu/#{$category}.png); } |
|
438 |
} |
|
439 |
} |
|
440 |
} |
|
441 |
} |
|
442 | ||
443 |
div.ui-dialog { |
|
444 | ||
445 |
div.ui-dialog-titlebar span.ui-dialog-title { |
|
446 |
@extend %title-style; |
|
447 |
font-size: 2.5rem; |
|
448 |
} |
|
449 | ||
450 |
button { |
|
451 |
@extend %button-style; |
|
452 | ||
453 |
&.ui-button { |
|
454 |
height: 5.5em; |
|
455 |
} |
|
456 |
} |
|
457 |
} |
|
458 | ||
459 |
@media screen and ($max-mobile-viewport) { |
|
460 |
div#content { |
|
461 |
padding: $mobile-block-padding; |
|
462 | ||
463 |
div#columns { |
|
464 |
flex-direction: column; |
|
465 |
padding: $mobile-block-padding; |
|
466 | ||
467 |
> div { |
|
468 |
padding: 0.1em; |
|
469 |
} |
|
470 |
div#gauche, div#rub_service { |
|
471 |
width: calc(100% - 1em); |
|
472 |
} |
|
473 | ||
474 |
#frontend-registration-fc, #frontend-registration-email { |
|
475 |
float: none; |
|
476 |
max-width: 100%; |
|
477 |
} |
|
478 | ||
479 |
} |
|
480 |
} |
|
481 |
} |
static/hautes-alpes-2018/_neutral-variant.scss | ||
---|---|---|
1 |
// main content wrapper variant |
|
2 |
$custom-header-height: 10em; |
|
3 |
$custom-mobile-header-height: 5em; |
|
4 |
$margin-center: 0 auto; |
|
5 | ||
6 |
.template-neutre { |
|
7 |
#page { |
|
8 |
display: block; |
|
9 |
font-weight: 400; |
|
10 |
font-size: 1.5rem; |
|
11 |
line-height: 1.4; |
|
12 |
margin-top: $custom-header-height; |
|
13 | ||
14 |
@media screen and ($max-mobile-viewport) { |
|
15 |
margin-top: $custom-mobile-header-height; |
|
16 |
} |
|
17 | ||
18 |
.site-header { |
|
19 |
background-color: white; |
|
20 |
position: fixed; |
|
21 |
top: 0; |
|
22 |
left: 0; |
|
23 |
right: 0; |
|
24 |
z-index: 2; |
|
25 |
} |
|
26 | ||
27 |
#header-wrapper { |
|
28 | ||
29 |
@media screen and ($max-mobile-viewport) { |
|
30 |
min-height: $custom-mobile-header-height; |
|
31 |
} |
|
32 | ||
33 |
#header { |
|
34 |
#top { |
|
35 |
display: flex; |
|
36 |
align-items: center; |
|
37 |
justify-content: center; |
|
38 |
margin: $margin-center; |
|
39 |
width: 100%; |
|
40 |
min-height: $custom-header-height; |
|
41 |
max-width: $width; |
|
42 | ||
43 |
> .cell { |
|
44 |
flex: 1 1 100%; |
|
45 | ||
46 |
&.top-logo { |
|
47 |
flex-basis: auto; |
|
48 |
} |
|
49 |
} |
|
50 |
} |
|
51 |
} |
|
52 |
#toplinks { |
|
53 |
display: none; |
|
54 |
} |
|
55 |
} |
|
56 | ||
57 |
.site-nav { |
|
58 |
display: flex; |
|
59 | ||
60 |
.user-nav { |
|
61 |
margin: $margin-center; |
|
62 |
} |
|
63 | ||
64 |
div#nav { |
|
65 |
margin: $margin-center; |
|
66 |
height: auto; |
|
67 | ||
68 |
ul { |
|
69 |
margin: 0; |
|
70 | ||
71 |
> li a { |
|
72 |
line-height: 2.7em; |
|
73 |
} |
|
74 | ||
75 |
> li:hover > ul { |
|
76 |
background: $cell-background; |
|
77 |
} |
|
78 |
@media screen and ($max-mobile-viewport) { |
|
79 |
height: 60px; |
|
80 | ||
81 |
> li a { |
|
82 |
line-height: 1em; |
|
83 |
} |
|
84 |
} |
|
85 |
} |
|
86 |
} |
|
87 |
} |
|
88 | ||
89 |
#nav-skip { |
|
90 |
display: none; |
|
91 |
} |
|
92 | ||
93 |
footer { |
|
94 |
padding-top: 20px; |
|
95 |
padding-bottom: 20px; |
|
96 |
color: $footer-color; |
|
97 |
background: $footer-background; |
|
98 | ||
99 |
a { |
|
100 |
color: $footer-color; |
|
101 |
} |
|
102 | ||
103 |
#footer-wrapper { |
|
104 |
margin: $margin-center; |
|
105 | ||
106 |
#footer { |
|
107 |
a { |
|
108 |
color: white; |
|
109 |
} |
|
110 |
} |
|
111 |
} |
|
112 |
} |
|
113 |
} |
|
114 |
} |
static/hautes-alpes-2018/_vars.scss | ||
---|---|---|
1 | ||
2 |
$primary-color: #B73720; /* red/bordeau */ |
|
3 |
$secondary-color: #1C515E; /* bleu */ |
|
4 |
$width: 1170px; |
|
5 |
$mobile-limit: 768px; |
|
6 |
$tablet-limit: 1024px; |
|
7 |
$font-color: #202020; |
|
8 |
$font-family: Asap, sans-serif; |
|
9 |
$font-size: 62.5%; |
|
10 |
$footer-color: #FFFFFF; |
|
11 |
$footer-background: #2B2B2B; |
|
12 |
$border-radius: 0px; |
|
13 |
$link-color: #202020; |
|
14 | ||
15 |
$title-background: transparent; |
|
16 |
$title-color: $font-color; |
|
17 |
$title-font-family: Asap, sans-serif; |
|
18 |
$title-font-size: 2.5rem; |
|
19 |
$title-padding: 1ex 0.5rem; |
|
20 |
$title-margin: 0; |
|
21 | ||
22 |
$nav-color: $font-color; |
|
23 |
$nav-active-color: transparent; |
|
24 |
$nav-height: 51px; |
|
25 |
$nav-item-hover-color: $nav-active-color; |
|
26 |
$nav-mobile-menu-background: white; |
|
27 | ||
28 |
$custom-nav-margin: 10px auto; |
|
29 |
$nav-button-background: #1C515E; |
|
30 |
$nav-button-color: white; |
|
31 |
$nav-menu-side: 90px; |
|
32 | ||
33 |
$form-style: light; |
|
34 |
$form-background: #F1F1F1; |
|
35 |
$form-margin: 0 0 3rem; |
|
36 |
$button-background: #ECB500; |
|
37 |
$button-hover-background: #FFCB20; |
|
38 |
$button-color: $font-color; |
|
39 |
$button-border: none; |
|
40 |
$button-border-radius: 8px; |
|
41 |
$button-margin: 2ex 0.5ex; |
|
42 |
$nav-item-hover-background: $button-background; |
|
43 | ||
44 |
$cell-background: #EFEFEF; |
|
45 |
$cell-entry-hover-background: #FFCB20; |
|
46 |
$cell-border: 0; |
|
47 |
$cell-entry-color: #202020; |
|
48 |
$inner-div-margin: 1.5rem 0.5rem; |
|
49 |
$block-padding: 1em; |
|
50 |
$mobile-block-padding: 0 0.1em; |
|
51 |
$content-block-margin: 0 auto; |
|
52 |
$messages-block-margin: 0px auto 0px auto; |
|
53 |
$inner-nav-margin: 0 auto; // !important; |
|
54 |
$nav-margin: 10px auto; |
|
55 |
$tracking-title-margin: 0.3em 0; |
|
56 | ||
57 |
$category-title-background: #ECB500; |
|
58 |
$category-color: $font-color; |
|
59 |
$category-has-toggled-icons: false; |
|
60 | ||
61 |
$arrow-down-icon: '\f107'; |
|
62 |
$arrow-up-icon: '\f106'; |
|
63 |
$arrow-right-icon: '\f105'; |
|
64 |
$minus-icon : '\f068'; |
|
65 | ||
66 |
%button-style { |
|
67 |
display: inline-block; |
|
68 |
margin: $button-margin; |
|
69 |
transition: all 0.2s; |
|
70 |
font-size: 1.5rem; |
|
71 |
padding: 0.5em 1em; |
|
72 |
font-weight: 600; |
|
73 |
letter-spacing: 0.025em; |
|
74 |
height: auto; |
|
75 |
} |
|
76 | ||
77 |
%title-style { |
|
78 |
margin: $title-margin; |
|
79 |
font-family: Asap, sans-serif; |
|
80 |
font-weight: 500; |
|
81 |
font-size: $title-font-size; |
|
82 |
line-height: 1.2; |
|
83 |
padding: $title-padding; |
|
84 |
} |
static/hautes-alpes-2018/config.json | ||
---|---|---|
1 |
{ |
|
2 |
"label": "Hautes-Alpes 2018", |
|
3 |
"variables": { |
|
4 |
"theme_color": "#B73720" |
|
5 |
} |
|
6 |
} |
static/hautes-alpes-2018/extra.js | ||
---|---|---|
1 |
/* globals $, window */ |
|
2 |
$(function() { |
|
3 |
$('div.wcsformsofcategorycell').delegate('h2', 'click', function() { |
|
4 |
$(this).parents('div.wcsformsofcategorycell').toggleClass('toggled'); |
|
5 |
$(this).toggleClass('on'); |
|
6 |
}); |
|
7 |
$(window).on('load', function () { |
|
8 |
$('#page').css('margin-top', $('#header-wrapper').css('height')); |
|
9 |
}); |
|
10 |
}) |
static/hautes-alpes-2018/style.scss | ||
---|---|---|
1 |
@charset "UTF-8"; |
|
2 | ||
3 |
@import '../includes/fonts/asap'; |
|
4 |
@import 'vars'; |
|
5 |
@import '../includes/publik'; |
|
6 |
@import '../includes/categories'; |
|
7 |
@import 'custom'; |
|
8 |
@import 'circle-steps'; |
|
9 |
@import 'neutral-variant'; |
templates/variants/hautes-alpes-2018/combo/page_template_commune.html | ||
---|---|---|
1 |
{% extends "combo/page_template_neutre.html" %} |
|
2 |
{% load combo i18n %} |
|
3 | ||
4 |
{% block nav %} |
|
5 |
{% endblock %} |
|
6 | ||
7 |
{% block columns %} |
|
8 |
<div class="column"> |
|
9 |
{% trans "Left column" as name %} |
|
10 |
{% placeholder "content" name=name %} |
|
11 |
</div> |
|
12 |
<div class="column"> |
|
13 |
{% trans "Right column" as name %} |
|
14 |
{% placeholder "right" name=name %} |
|
15 |
</div> |
|
16 |
{% endblock %} |
|
17 |
templates/variants/hautes-alpes-2018/combo/page_template_neutre.html | ||
---|---|---|
1 |
{% extends "theme.orig.html" %} |
|
2 | ||
3 |
{% load static i18n combo gadjo %} |
|
4 |
{% block extra_top_head %} |
|
5 |
{{ block.super }} |
|
6 |
<script src="{{site_base}}{% xstatic 'jquery' 'jquery.min.js' %}"></script> |
|
7 |
{% skeleton_extra_placeholder extra-top-head %} |
|
8 |
{% end_skeleton_extra_placeholder %} |
|
9 |
{% endblock %} |
|
10 | ||
11 |
{% block extra_scripts %} |
|
12 |
{% if portal_agent_url and portal_agent_title %} |
|
13 |
<script> |
|
14 |
const PUBLIK_PORTAL_AGENT_URL = "{{portal_agent_url|escapejs}}"; |
|
15 |
const PUBLIK_PORTAL_AGENT_TITLE = "{{portal_agent_title|escapejs}}"; |
|
16 |
</script> |
|
17 |
{% endif %} |
|
18 |
<script src="{{site_base}}{% static 'js/combo.public.js' %}?{% start_timestamp %}"></script> |
|
19 |
<script src="{{site_base}}{% static 'js/combo.back.js' %}?{% start_timestamp %}"></script> |
|
20 |
{% if not no_extra_js %} |
|
21 |
<script src="{{site_base}}{% static "" %}{{css_variant}}/extra.js?{% start_timestamp %}"></script> |
|
22 |
{% endif %} |
|
23 |
{% skeleton_extra_placeholder extra-head %} |
|
24 |
{% end_skeleton_extra_placeholder %} |
|
25 |
{% endblock %} |
|
26 | ||
27 |
{% block bodyattrs %} |
|
28 |
data-api-root="{{ site_base }}/api/" |
|
29 |
{% if check_badges %}data-check-badges="true"{% endif %} |
|
30 |
{% if page.picture %}data-picture="{{site_base}}{{page.picture.url}}"{% endif %} |
|
31 |
{% skeleton_extra_placeholder extra-body-args %} |
|
32 |
{% end_skeleton_extra_placeholder %} |
|
33 |
{% endblock %} |
|
34 | ||
35 |
{% block bodyclasses %}template-neutre page-{{ page.slug }} {% if pages %}section-{{pages.0.slug}}{% endif %} {% skeleton_extra_placeholder extra-body-class %} {% if user.is_authenticated %}authenticated-user{% else %}anonymous-user{% endif %} {% end_skeleton_extra_placeholder %} {% if page.picture %}has-picture{% endif %} {% endblock %} |
|
36 | ||
37 |
{% block title %} - {% if render_skeleton %}{% skeleton_extra_placeholder title %}{% firstof page_title site_title %}{% end_skeleton_extra_placeholder %}{% else %}{{page.title}}{% endif %}{% endblock %} |
|
38 | ||
39 |
{% block header-top %} |
|
40 |
{% endblock %} |
|
41 |
{% block header-title %} |
|
42 |
{% comment %} into #top {% endcomment %} |
|
43 |
{% placeholder "headerlogo" name="Logo haut" %} |
|
44 |
{% placeholder "headertitle" name="Titre haut" %} |
|
45 |
{% endblock %} |
|
46 |
{% block user-info %} |
|
47 |
{% endblock %} |
|
48 | ||
49 |
{% block nav %} |
|
50 |
<nav> |
|
51 |
<div id="nav" class="gru-nav"> |
|
52 |
{% block menu %} |
|
53 |
{% show_menu depth=2 ignore_visibility=True %} |
|
54 |
{% placeholder "menu_right" %} |
|
55 |
{% endblock %} |
|
56 |
</div> |
|
57 |
<div class="user-nav"> |
|
58 |
{% skeleton_extra_placeholder "user-nav-link" %} |
|
59 |
{% if user.is_authenticated %} |
|
60 |
<span class="logged-in"> |
|
61 |
{% if idp_account_url %}<a href="{{idp_account_url}}">{% endif %} |
|
62 |
<span class="connected-user">{{user.first_name}} {{user.last_name}}</span>{% if idp_account_url %}</a>{% endif %} |
|
63 |
<a accesskey="o" class="logout" href="{% url 'auth_logout' %}">Déconnexion</a> |
|
64 |
</span> |
|
65 |
{% else %} |
|
66 |
{% if idp_registration_url %} |
|
67 |
<span class="login"><a accesskey="2" href="{% url 'auth_login' %}">Connexion</a> <span class="sep">/</span> |
|
68 |
<a class="registration" href="{{idp_registration_url}}">Inscription</a></span> |
|
69 |
{% else %} |
|
70 |
<span class="login"><a accesskey="2" href="{% url 'auth_login' %}">Connexion <span class="sep">/</span> Inscription</a></span> |
|
71 |
{% endif %} |
|
72 |
{% endif %} |
|
73 |
{% end_skeleton_extra_placeholder %} |
|
74 |
</div> |
|
75 |
</nav> |
|
76 |
{% endblock %} |
|
77 | ||
78 |
{% block messages %} |
|
79 |
{{ block.super }} |
|
80 |
{% placeholder "messages" %} |
|
81 |
{% endblock %} |
|
82 | ||
83 |
{% block content %} |
|
84 |
{% block combo-content %} |
|
85 |
{% block page-content %} |
|
86 |
{% block sidebar %}{% endblock %} |
|
87 |
<div id="columns-wrapper"> |
|
88 |
{% block columns-top %}{% endblock %} |
|
89 |
<div id="columns" class="clearfix"> |
|
90 |
{% block columns %} |
|
91 |
{% trans "Content" as name %} |
|
92 |
{% placeholder "content" name=name %} |
|
93 |
{% endblock %} |
|
94 |
</div> |
|
95 |
{% block columns-bottom %}{% endblock %} |
|
96 |
</div> |
|
97 |
{% endblock %} |
|
98 |
{% endblock %} |
|
99 |
{% endblock %} |
|
100 | ||
101 |
{% block footer %} |
|
102 |
{% trans "Footer" as name %} |
|
103 |
{% placeholder "footer" acquired=True name=name %} |
|
104 |
{% endblock %} |
templates/variants/hautes-alpes-2018/prepare-template.py | ||
---|---|---|
1 |
#! /usr/bin/env python |
|
2 | ||
3 |
import os |
|
4 |
import subprocess |
|
5 |
import re |
|
6 |
import sys |
|
7 |
from lxml import etree |
|
8 |
from lxml.html import html_parser |
|
9 | ||
10 | ||
11 |
FILENAME = os.path.join('tmp.html') |
|
12 | ||
13 |
if os.path.exists(FILENAME): |
|
14 |
os.unlink(FILENAME) |
|
15 | ||
16 |
URL = 'https://www.hautes-alpes.fr/5448-services-en-ligne.htm' |
|
17 |
subprocess.call(['wget', '--quiet', '-O', FILENAME, '--convert-links', URL]) |
|
18 |
content = open(FILENAME).read().strip() |
|
19 |
if len(content) < 500: |
|
20 |
sys.exit(0) |
|
21 | ||
22 |
root = etree.fromstring(content, parser=html_parser) |
|
23 | ||
24 |
for script in root.xpath('//script'): |
|
25 |
# remove all google related tags |
|
26 |
if script.text and 'google' in script.text or 'google' in script.attrib.get('src', ''): |
|
27 |
parent = script.getparent() |
|
28 |
parent.remove(script) |
|
29 | ||
30 |
# remove title and breadcrumb |
|
31 |
for element in ('title', 'nav[@id="ariane"]', 'div[@id="cookie_cnil"]'): |
|
32 |
for useless in root.xpath('//%s' % element): |
|
33 |
parent = useless.getparent() |
|
34 |
parent.remove(useless) |
|
35 | ||
36 |
# clear "corps" container to put content into it |
|
37 |
for main in root.xpath('//main[@id="corps"]'): |
|
38 |
main.clear() |
|
39 |
main.attrib['id'] = 'corps' |
|
40 | ||
41 |
content = etree.tostring(root, method='html', pretty_print=True) |
|
42 | ||
43 |
# remove all references to downloaded temporary file |
|
44 |
content = content.replace(FILENAME, '') |
|
45 | ||
46 |
# remove copy of jquery |
|
47 |
content = re.sub('<script( type=.*)? src=.*jquery.min.js.*', '', content) |
|
48 |
content = re.sub('<script( type=.*)? src=.*formCtrl.*.js.*', '', content) |
|
49 | ||
50 |
content = content.replace('<body', r'<body {% block bodyargs %}{% endblock %} ') |
|
51 | ||
52 |
content = content.replace('</head>', '<title>{% block global_title %}{% endblock %}</title>\n</head>') |
|
53 | ||
54 |
content = content.replace('<head>', '<head>{% block head %}{% endblock %}') |
|
55 | ||
56 |
content = content.replace( |
|
57 |
'<main id="corps">', |
|
58 |
'''<main id="corps"> |
|
59 |
{% block nav %}{% endblock %} |
|
60 |
{% block messages %}{% endblock %} |
|
61 |
{% block local-content-wrapper %} |
|
62 |
{% endblock %}''', |
|
63 |
) |
|
64 | ||
65 |
content = content.replace('</body>', '{% block local-body-bottom %}{% endblock %}</body>') |
|
66 | ||
67 |
content = content.replace("SERVER_ROOT = '/'", 'SERVER_ROOT="//www.hautes-alpes.fr/"') |
|
68 | ||
69 |
content = content.replace( |
|
70 |
'<div id="toolbarTraduction">', '<div id="toolbarTraduction">{% block user-info %}{% endblock %}' |
|
71 |
) |
|
72 | ||
73 |
open(os.path.join('.', 'base-theme.html'), 'w').write(content) |
templates/variants/hautes-alpes-2018/theme.html | ||
---|---|---|
1 |
{% extends 'base-theme.html' %} |
|
2 |
{% load gadjo i18n static combo %} |
|
3 | ||
4 |
{% block global_title %} |
|
5 |
{% firstof global_title "Hautes-Alpes le département" %} {% block title %}{% endblock %} |
|
6 |
{% endblock %} |
|
7 | ||
8 |
{% block head %} |
|
9 |
{% if meta_robots %} |
|
10 |
<meta name="robots" content="{{ meta_robots }}" /> |
|
11 |
{% elif environment_label %} |
|
12 |
<meta name="robots" content="noindex, nofollow, noarchive, nosnippet, notranslate, noimageindex" /> |
|
13 |
{% endif %} |
|
14 |
{% block extra_top_head %} |
|
15 |
{% endblock %} |
|
16 |
{{ media }} |
|
17 |
<link rel="stylesheet" type="text/css" href="{{site_base}}{% static 'hautes-alpes-2018/style.css' %}?{% start_timestamp %}"> |
|
18 |
{% block extra_css %} |
|
19 |
{% endblock %} |
|
20 |
{% block extra_scripts %} |
|
21 |
{% endblock %} |
|
22 |
{% endblock %} |
|
23 | ||
24 |
{% block bodyargs %}class="touch-ok {% block bodyclasses %}{% endblock %}" {% block bodyattrs %}{% endblock %}{% endblock %} |
|
25 | ||
26 |
{% block nav %} |
|
27 |
<nav> |
|
28 |
<div id="nav" class="gru-nav"> |
|
29 |
{% block menu %} |
|
30 |
{% endblock %} |
|
31 |
</div> |
|
32 |
<div class="user-nav"> |
|
33 |
{% block user-info %} |
|
34 |
{% endblock %} |
|
35 |
</div> |
|
36 |
</nav> |
|
37 |
{% endblock %} |
|
38 | ||
39 |
{% block messages %} |
|
40 |
{% if messages %} |
|
41 |
<div id="messages"> |
|
42 |
<ul class="messages"> |
|
43 |
{% for message in messages %} |
|
44 |
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li> |
|
45 |
{% endfor %} |
|
46 |
</ul> |
|
47 |
</div> |
|
48 |
{% endif %} |
|
49 |
{% endblock %} |
|
50 | ||
51 |
{% block local-content-wrapper %} |
|
52 |
<div id="main-content-wrapper"> |
|
53 |
<div id="main-content"> |
|
54 |
<div id="content" class="gru-content"> |
|
55 |
{% block content %} |
|
56 |
{% endblock %} |
|
57 |
</div> |
|
58 |
</div> |
|
59 |
{% endblock %} |
|
60 | ||
61 |
{% block local-body-bottom %} |
|
62 |
{% if environment_label %}<span id="environment-label">{{ environment_label }}</span>{% endif %} |
|
63 |
<a style="display: none" href="#" accesskey="t">Retour en haut de page</a> |
|
64 |
{% include "includes/tracking.html" %} |
|
65 |
{% endblock %} |
templates/variants/hautes-alpes-2018/theme.orig.html | ||
---|---|---|
1 |
../../theme.html |
|
2 |
- |