Skip to content

Commit 73b6ae3

Browse files
committed
Add challenge data configuration file
1 parent c2b3ac6 commit 73b6ae3

File tree

2 files changed

+63
-9
lines changed

2 files changed

+63
-9
lines changed

src/assets/data/challenge.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"edition": "2026",
3+
"date": "19 et 20 Mai 2026",
4+
"location": {
5+
"name": "La Belleviloise, 19-21 rue Boyer, 75020 Paris",
6+
"url": "https://maps.app.goo.gl/gezGPcSxkv8r2LA88"
7+
},
8+
"registration": {
9+
"status": "full",
10+
"url": "https://www.helloasso.com/associations/green-code-initiative/evenements/inscription-au-green-code-challenge-2026-adhoc"
11+
}
12+
}

src/components/challenge/ChallengeHero.vue

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,59 @@
11
<script setup lang="ts">
2+
import {
3+
date,
4+
edition,
5+
location,
6+
registration,
7+
} from "@/assets/data/challenge.json";
8+
import BackpackIcon from "@/assets/icons/backpack.svg";
29
import CalendarIcon from "@/assets/icons/calendar.svg";
310
import ExternalLinkIcon from "@/assets/icons/external_link.svg";
411
import HeartHandshakeIcon from "@/assets/icons/heart_handshake.svg";
512
import PinIcon from "@/assets/icons/pin.svg";
13+
import TicketCheckIcon from "@/assets/icons/ticket_check.svg";
614
</script>
715

816
<template>
917
<div class="container">
1018
<div class="content">
1119
<div class="top">
1220
<h1>
13-
<span class="green">Green</span> Code Challenge <small>2026</small>
21+
<span class="green">Green</span> Code Challenge
22+
<small>{{ edition }}</small>
1423
</h1>
1524
<a
16-
href="https://www.helloasso.com/associations/green-code-initiative/evenements/inscription-au-green-code-challenge-2026-adhoc"
25+
v-if="registration.status === 'open'"
26+
:href="registration.url"
1727
class="registration"
1828
target="_blank"
1929
>Je m'inscris <ExternalLinkIcon width="18" height="18"
2030
/></a>
21-
</div>
22-
<div class="meta-info">
31+
<div
32+
v-else-if="registration.status === 'full'"
33+
class="registration full"
34+
>
35+
<TicketCheckIcon width="24" height="24" />
36+
Événement complet
37+
<div class="thank">Merci !</div>
38+
</div>
2339
<a
24-
href="https://maps.app.goo.gl/gezGPcSxkv8r2LA88"
25-
class="badge"
40+
v-else-if="registration.status === 'onboarding'"
41+
href="https://github.com/green-code-initiative/creedengo-challenge"
42+
class="registration onboarding"
2643
target="_blank"
44+
><BackpackIcon width="24" height="24" /> Accéder au Starter pack</a
2745
>
46+
</div>
47+
<div class="meta-info">
48+
<a :href="location.url" class="badge" target="_blank">
2849
<PinIcon width="18" height="18" />
29-
La Belleviloise, 19-21 rue Boyer, 75020 Paris
50+
{{ location.name }}
3051
</a>
3152

3253
<div class="line">
3354
<div class="badge bold">
3455
<CalendarIcon width="18" height="18" />
35-
19 et 20 Mai 2026
56+
{{ date }}
3657
</div>
3758
<div class="badge">
3859
<HeartHandshakeIcon width="18" height="18" />
@@ -85,6 +106,7 @@ import PinIcon from "@/assets/icons/pin.svg";
85106
86107
.registration {
87108
display: flex;
109+
position: relative;
88110
align-items: center;
89111
padding: 8px 16px;
90112
gap: 8px;
@@ -95,9 +117,29 @@ import PinIcon from "@/assets/icons/pin.svg";
95117
font-weight: bold;
96118
border-radius: 100px;
97119
98-
&:hover {
120+
&:not(.full):hover {
99121
background: hsl(var(--primary-400));
100122
}
123+
124+
&.full {
125+
background: black;
126+
color: white;
127+
}
128+
129+
.thank {
130+
position: absolute;
131+
padding: 4px 8px;
132+
right: -10px;
133+
bottom: -20px;
134+
135+
background: hsl(var(--primary-300));
136+
color: hsl(var(--text-neutral));
137+
border-radius: 100px;
138+
139+
font-weight: 600;
140+
141+
transform: rotate(-5deg);
142+
}
101143
}
102144
103145
@media screen and (max-width: 960px) {

0 commit comments

Comments
 (0)