-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquests.html
524 lines (473 loc) · 18 KB
/
quests.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ateliernum</title>
<!-- start of favicon and its fallbacks -->
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/assets/favicons/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/assets/favicons/favicon-16x16.png"
/>
<link rel="manifest" href="/assets/favicons/site.webmanifest" />
<link
rel="mask-icon"
href="/assets/favicons/safari-pinned-tab.svg"
color="#5bbad5"
/>
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="theme-color" content="#ffffff" />
<!-- end of favicon and its fallbacks -->
<link rel="stylesheet" href="sizes.css" />
<link rel="stylesheet" href="theming.css" />
<link rel="stylesheet" href="global.css" />
<style>
body {
min-height: 100vh;
display: grid;
grid:
"header" auto
"main" 1fr
"footer" auto
/ 1fr;
}
main a {
color: var(--blue);
text-decoration: underline;
}
main {
display: flex;
flex-direction: column;
align-items: center;
--padding: var(--size-4);
max-width: calc(var(--reading-length) + 2 * var(--padding));
margin: 0 auto 0 auto;
padding: 0 var(--padding);
--inner-gap: var(--size-4);
& > * {
padding-block: var(--inner-gap);
}
& > *:first-child {
padding-top: calc(var(--inner-gap) * 2);
}
& > *:last-child {
padding-bottom: calc(var(--inner-gap) * 2);
}
}
an-quests {
display: flex;
flex-direction: column;
gap: var(--size-6);
width: 100%;
summary {
display: grid;
align-items: baseline;
gap: var(--size-4);
grid:
"title length" auto
"tags tags" auto
/ 1fr auto;
}
ul {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: var(--size-4);
}
}
footer {
display: flex;
padding: var(--size-7) 25%;
li a {
display: flex;
align-items: center;
gap: var(--size-2);
}
#legal-disclaimer a {
justify-content: end;
}
li:not(:last-child) {
margin-bottom: var(--size-4);
}
}
@media (width <= 800px) {
footer {
padding: var(--size-7);
}
}
an-controls {
width: 100%;
display: flex;
gap: var(--size-4);
position: sticky;
top: 0;
background-color: var(--background-color);
}
menu {
margin: 0;
padding: 0;
width: 100%;
flex: 1;
display: flex;
flex-wrap: wrap;
align-content: baseline;
gap: var(--size-4);
an-tag {
cursor: pointer;
}
}
an-tag {
display: inline-flex;
align-items: center;
gap: var(--size-2);
border-radius: 999px;
border: 1px solid var(--text-color);
width: fit-content;
height: min-content;
padding: var(--size-2) var(--size-4);
font-size: 0.75em;
font-weight: 600;
user-select: none;
}
an-tag.active {
background-color: var(--text-color);
color: var(--background-color);
}
an-vr {
width: 1px;
height: 100%;
border: 1px solid var(--text-color);
}
details {
padding: var(--size-4);
border: 1px solid var(--text-color);
h3:not(:first-child) {
margin-top: 2rem;
}
p {
margin: 0.5rem 0;
}
ol {
padding-left: 2rem;
}
& > *:not(summary, ol) {
padding: 0 1rem;
}
}
details > summary {
user-select: none;
}
details[open] > summary {
margin-bottom: 1rem;
}
details[open] {
padding-bottom: 1rem;
}
summary {
cursor: pointer;
}
summary:has(:first-child)::-webkit-details-marker,
summary:has(:first-child)::marker {
display: none;
content: "";
}
details summary > *:first-child::before {
content: "▶";
margin-right: 0.6em;
}
details[open] summary > *:first-child::before {
content: "▼";
}
</style>
</head>
<body>
<header class="paper2">
<a href="/">
<img src="/assets/images/logo_ateliernum.png" alt="" />
<h1>Ateliernum</h1>
</a>
<nav>
<ul>
<li><a href="/">Accueil</a></li>
<li><a href="/quests.html">Missions</a></li>
</ul>
</nav>
</header>
<main>
<div id="description">
Apprendre des choses c'est bien, les mettre en action c'est encore
mieux. <br />
Si vous êtes à cours d'idées vous trouverez ici une liste de missions
ouvertes à tous pour participer à la vie de l'atelier.
</div>
<an-controls>
<menu data-type="length">
<an-tag data-tag="short">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
<use
style="--color: var(--blue)"
href="length_icons.svg#short"
></use>
</svg>
<span>court</span>
</an-tag>
<an-tag data-tag="medium">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
<use
style="--color: var(--green)"
href="length_icons.svg#medium"
></use>
</svg>
<span>medium</span>
</an-tag>
<an-tag data-tag="long">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
<use
style="--color: var(--purple)"
href="length_icons.svg#long"
></use>
</svg>
<span>long</span>
</an-tag>
</menu>
<an-vr></an-vr>
<menu data-type="categories">
<an-tag data-tag="documentation">documentation</an-tag>
<an-tag data-tag="programmation">programmation</an-tag>
<an-tag data-tag="communication">communication</an-tag>
</menu>
</an-controls>
<an-quests>
<section data-length="medium">
<details>
<summary>
<h2>Écrire un template</h2>
<div>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
<use
style="--color: var(--green)"
href="length_icons.svg#medium"
></use>
</svg>
</div>
<ul>
<li>
<an-tag class="active" data-tag="documentation"
>documentation</an-tag
>
</li>
<li>
<an-tag class="active" data-tag="programmation"
>programmation</an-tag
>
</li>
</ul>
</summary>
<h3>Description</h3>
<p>
Le site de l'atelier numérique, celui sur lequel vous lisez ceci,
propose des projets clef-en-main appelés "templates" qui sont open
source et hebergés
<a href="https://github.com/AtelierNum/templates">ici.</a>
</p>
<p>
Créer un template serait un bon challenge technique
<u>et</u> design.
</p>
<p>Technique parce qu'il faut qu'il marche 😄.</p>
<p>
Design parce qu'il faut réussir à rendre la techno ou la technique
accessible.
</p>
<h3>Référent</h3>
<p>Valentin Dupas</p>
<h3>Process</h3>
<ol>
<li>
Si vous n'avez pas d'idée de template, vous pouvez en chercher
dans
<a href="https://github.com/AtelierNum/templates/issues"
>les issues du dépôt des templates</a
>.
</li>
<li>
Prendre connaissances des
<a
href="https://github.com/AtelierNum/templates/blob/main/CONTRIBUTING.md"
>critères de qualité</a
>.
</li>
<li>
Envoyer un email à Valentin Dupas pour expliquer ce que vous
comptez faire comme template et valider que le projet est
calibré correctement.
</li>
<li>Écrire le template</li>
<li>
L'envoyer à Valentin Dupas pour validation et intégration.
Idéalement sous forme de pull request dans le dépôt des
templates ou en personne sinon.
</li>
</ol>
</details>
</section>
<section data-length="short">
<details>
<summary>
<h2>Nous @ sur un de vos projets fait à l'atelier</h2>
<div>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
<use
style="--color: var(--blue)"
href="length_icons.svg#short"
></use>
</svg>
</div>
<ul>
<li>
<an-tag class="active" data-tag="communication"
>communication</an-tag
>
</li>
</ul>
</summary>
</details>
</section>
</an-quests>
</main>
<footer class="paper2">
<ul class="socials">
<li>
<a href="https://discord.gg/tF6qz8v"
><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
height="48"
width="48"
>
<path
fill="currentColor"
fill-rule="evenodd"
d="M9 3.5C7.17446 3.5 5.79321 3.80807 4.27964 4.55118C4.19318 4.59363 4.12081 4.66015 4.07125 4.74275C3.03206 6.47474 1 11.2959 1 17C1 17.1299 1.05053 17.2546 1.1409 17.3479C2.0917 18.3293 2.95713 19.0512 3.88473 19.5607C4.81779 20.0732 5.79045 20.3581 6.9403 20.4964C7.13603 20.52 7.32732 20.4263 7.42875 20.2572L7.93986 19.4054C7.19582 19.1454 6.43693 18.7996 5.96967 18.3323C5.67678 18.0394 5.67678 17.5646 5.96967 17.2717C6.26256 16.9788 6.73744 16.9788 7.03033 17.2717C7.28511 17.5265 7.88376 17.8166 8.72916 18.0879L8.73018 18.0882L8.73036 18.0879C9.42886 18.271 10.646 18.5 12 18.5C13.354 18.5 14.5711 18.271 15.2696 18.0879L15.2698 18.0882C15.2702 18.0881 15.2705 18.088 15.2708 18.0879C16.1162 17.8166 16.7149 17.5265 16.9697 17.2717C17.2626 16.9788 17.7374 16.9788 18.0303 17.2717C18.3232 17.5646 18.3232 18.0394 18.0303 18.3323C17.5631 18.7996 16.8042 19.1454 16.0601 19.4054L16.5713 20.2572C16.6727 20.4263 16.864 20.52 17.0597 20.4964C18.2096 20.3581 19.1822 20.0732 20.1153 19.5607C21.0429 19.0512 21.9083 18.3293 22.8591 17.3479C22.9495 17.2546 23 17.1299 23 17C23 11.2959 20.9679 6.47474 19.9287 4.74275C19.8792 4.66015 19.8068 4.59363 19.7204 4.55118C18.2068 3.80807 16.8255 3.5 15 3.5C14.7848 3.5 14.5937 3.63772 14.5257 3.84189L14.1895 4.85038C14.1071 4.82376 14.0161 4.79607 13.9172 4.76844C13.4386 4.63474 12.7672 4.5 12 4.5C11.2328 4.5 10.5614 4.63474 10.0828 4.76844C9.98392 4.79607 9.89287 4.82376 9.81051 4.85038L9.47434 3.84189C9.40628 3.63772 9.21522 3.5 9 3.5ZM10 12.75C10 13.7165 9.32843 14.5 8.5 14.5C7.67157 14.5 7 13.7165 7 12.75C7 11.7835 7.67157 11 8.5 11C9.32843 11 10 11.7835 10 12.75ZM15.5 14.5C16.3284 14.5 17 13.7165 17 12.75C17 11.7835 16.3284 11 15.5 11C14.6716 11 14 11.7835 14 12.75C14 13.7165 14.6716 14.5 15.5 14.5Z"
clip-rule="evenodd"
></path></svg
>Discord</a
>
</li>
<li>
<a href="https://www.instagram.com/ateliernum/"
><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
height="48"
width="48"
>
<path
fill="currentColor"
fill-rule="evenodd"
d="M7.5 0.75C3.77208 0.75 0.75 3.77208 0.75 7.5V16.5C0.75 20.2279 3.77208 23.25 7.5 23.25H16.5C20.2279 23.25 23.25 20.2279 23.25 16.5V7.5C23.25 3.77208 20.2279 0.75 16.5 0.75H7.5ZM2.25 7.5C2.25 4.6005 4.60051 2.25 7.5 2.25H16.5C19.3995 2.25 21.75 4.60051 21.75 7.5V16.5C21.75 19.3995 19.3995 21.75 16.5 21.75H7.5C4.6005 21.75 2.25 19.3995 2.25 16.5V7.5ZM19.5 6.25C19.5 6.94036 18.9404 7.5 18.25 7.5C17.5596 7.5 17 6.94036 17 6.25C17 5.55964 17.5596 5 18.25 5C18.9404 5 19.5 5.55964 19.5 6.25ZM12 7.75C9.65279 7.75 7.75 9.65279 7.75 12C7.75 14.3472 9.65279 16.25 12 16.25C14.3472 16.25 16.25 14.3472 16.25 12C16.25 9.65279 14.3472 7.75 12 7.75ZM6.25 12C6.25 8.82436 8.82436 6.25 12 6.25C15.1756 6.25 17.75 8.82436 17.75 12C17.75 15.1756 15.1756 17.75 12 17.75C8.82436 17.75 6.25 15.1756 6.25 12Z"
clip-rule="evenodd"
></path></svg
>Instagram</a
>
</li>
<li>
<a href="https://github.com/AtelierNum"
><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
height="48"
width="48"
>
<path
fill="currentColor"
d="M11.9962 1.28371C9.38562 1.28124 6.85951 2.2085 4.87051 3.8993C2.8815 5.59011 1.55961 7.93395 1.1417 10.5108C0.723797 13.0877 1.23719 15.7292 2.58989 17.9619C3.94259 20.1947 6.04618 21.8728 8.5237 22.6955C9.07204 22.791 9.2459 22.4691 9.2459 22.1787C9.2459 21.9159 9.25163 21.188 9.2459 20.2681C6.18899 20.9311 5.55754 18.8208 5.55754 18.8208C5.356 18.1569 4.92364 17.587 4.3386 17.214C3.34128 16.532 4.41311 16.5453 4.41311 16.5453C4.76132 16.5931 5.09399 16.7199 5.38572 16.9159C5.67744 17.1119 5.9205 17.3721 6.09632 17.6764C6.24505 17.9474 6.44604 18.1862 6.68766 18.3791C6.92928 18.5719 7.20674 18.7149 7.50399 18.7999C7.80123 18.8848 8.11237 18.9099 8.4194 18.8739C8.72642 18.8378 9.02325 18.7412 9.29271 18.5896C9.34339 18.0343 9.59069 17.5153 9.99006 17.1262C7.55122 16.8472 4.98628 15.9053 4.98628 11.6944C4.9708 10.6028 5.37617 9.5471 6.11829 8.74639C5.78201 7.79922 5.82029 6.75935 6.22529 5.83946C6.22529 5.83946 7.14905 5.54428 9.2459 6.9667C11.0468 6.47251 12.9475 6.47251 14.7483 6.9667C16.85 5.54523 17.7661 5.83946 17.7661 5.83946C18.1712 6.75922 18.2102 7.7989 17.875 8.74639C18.6173 9.54761 19.0221 10.6042 19.0051 11.6963C19.0051 15.9187 16.4363 16.8463 13.9889 17.1166C14.2518 17.3807 14.4549 17.6982 14.5846 18.0476C14.7143 18.397 14.7675 18.7701 14.7407 19.1418V22.1834C14.7407 22.4767 14.9184 22.8015 15.4763 22.6955C17.9544 21.8726 20.0584 20.1939 21.4111 17.9603C22.7637 15.7268 23.2766 13.0844 22.8577 10.5071C22.4388 7.92966 21.1155 5.58576 19.1251 3.89557C17.1347 2.20538 14.6074 1.27942 11.9962 1.28371V1.28371Z"
></path></svg
>GitHub</a
>
</li>
</ul>
<div class="flex-spacer"></div>
<ul id="legal-disclaimer">
<li>
<a href="/mentions.html">Mentions légales</a>
</li>
</ul>
</footer>
<script>
let lengthFilters = [];
let categoriesFilters = [];
const quests = document.querySelectorAll("an-quests");
document.querySelectorAll("an-controls an-tag").forEach((tagControl) => {
tagControl.addEventListener("click", () => {
tagControl.classList.toggle("active");
console.log(tagControl.parentElement.dataset["type"]);
switch (tagControl.parentElement.dataset["type"]) {
case "length":
if (!lengthFilters.includes(tagControl.dataset["tag"])) {
lengthFilters.push(tagControl.dataset["tag"]);
} else {
lengthFilters = lengthFilters.filter(
(tag) => tag != tagControl.dataset["tag"]
);
}
break;
case "categories":
if (!categoriesFilters.includes(tagControl.dataset["tag"])) {
categoriesFilters.push(tagControl.dataset["tag"]);
} else {
categoriesFilters = categoriesFilters.filter(
(tag) => tag != tagControl.dataset["tag"]
);
}
break;
}
if (lengthFilters.length == 0 && categoriesFilters.length == 0) {
document.querySelectorAll("an-quests > *").forEach((questEl) => {
questEl.style.display = "";
});
return;
}
document.querySelectorAll("an-quests > *").forEach((questEl) => {
console.log(questEl);
if (
lengthFilters.length != 0 &&
!lengthFilters.includes(questEl.dataset["length"])
) {
questEl.style.display = "none";
return;
}
// todo fill
const questCategories = Array.from(
questEl.querySelectorAll("an-tag")
).map((tagEl) => tagEl.dataset["tag"]);
console.log({ questCategories });
for (const category of categoriesFilters) {
if (!questCategories.includes(category)) {
questEl.style.display = "none";
return;
}
}
// todo finish
questEl.style.display = "";
});
console.log({ categoriesFilters, lengthFilters });
});
});
</script>
</body>
</html>