diff --git a/src/components/home/Hero.astro b/src/components/home/Hero.astro index cc7c4b8..2e23cde 100644 --- a/src/components/home/Hero.astro +++ b/src/components/home/Hero.astro @@ -16,8 +16,8 @@ import Cluster from '../ui-elements/Cluster.astro' CFP - - Voir les replays 2025 + + Accéder à la billetterie diff --git a/src/components/home/HomeTicketsBlock.astro b/src/components/home/HomeTicketsBlock.astro index 7d04179..0f2bc95 100644 --- a/src/components/home/HomeTicketsBlock.astro +++ b/src/components/home/HomeTicketsBlock.astro @@ -14,19 +14,18 @@ const { tickets } = Astro.props
- -

Billetterie

+ +
diff --git a/src/components/home/TicketCard.astro b/src/components/home/TicketCard.astro index a8e9f31..1c1ef9e 100644 --- a/src/components/home/TicketCard.astro +++ b/src/components/home/TicketCard.astro @@ -8,7 +8,19 @@ interface Props { } const { ticket } = Astro.props -const { name, price, url, startDate, endDate, ticketsCount, available, soldOut, highlighted, message } = ticket.data +const { + name, + price, + url, + startDate, + endDate, + ticketsCount, + available, + soldOut, + highlighted, + message, + displayNewsletterRegistration, +} = ticket.data ---

- {message} + + {message.split('\n').map((line) => ( + {line} + ))} +

) } @@ -54,8 +70,24 @@ const { name, price, url, startDate, endDate, ticketsCount, available, soldOut, ) } - {!available && !soldOut && Pas disponible} + { + !available && !soldOut && !displayNewsletterRegistration && ( + Pas disponible + ) + } {soldOut && Épuisé} + { + displayNewsletterRegistration && ( +

+ + S'inscrire à la newsletter + +

+ ) + }
diff --git a/src/content.config.ts b/src/content.config.ts index 8a9455d..969eb07 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -28,6 +28,7 @@ const ticketsCollection = defineCollection({ soldOut: z.boolean(), highlighted: z.boolean(), message: z.string().optional(), + displayNewsletterRegistration: z.boolean().optional(), }), }) diff --git a/src/data/tickets/tickets.json b/src/data/tickets/tickets.json index 70bd527..0b12311 100644 --- a/src/data/tickets/tickets.json +++ b/src/data/tickets/tickets.json @@ -1,23 +1,25 @@ [ { "id": "student", - "name": "Étudiant", - "price": 40, - "url": "http://billetweb.fr/sunny-tech-2025", + "name": "Étudiant et demandeur d'emploi", + "price": 44, + "url": "https://www.billetweb.fr/sunny-tech-2026", "ticketsCount": 18, - "available": true, - "soldOut": true, - "highlighted": false + "available": false, + "soldOut": false, + "highlighted": false, + "message": "La billetterie ouvrira bientôt, inscrivez-vous à la newsletter pour en être les premiers informés !" }, { "id": "default2", "name": "Standard", - "price": 100, - "url": "http://billetweb.fr/sunny-tech-2025", - "ticketsCount": 300, - "available": true, + "price": 110, + "url": "https://www.billetweb.fr/sunny-tech-2026", + "ticketsCount": 280, + "available": false, "soldOut": false, "highlighted": false, - "message": "Billetterie soldout, mais inscrivez-vous à la liste d'attente, on sait jamais :)" + "message": "La billetterie ouvrira bientôt, inscrivez-vous à la newsletter pour en être les premiers informés !\n100 places disponibles pour la Vague 1 le mardi 27 janvier à 10h\n100 places disponibles pour la Vague 2 le mercredi 15 avril à 20h30\n80 places disponibles pour la Vague 3 le samedi 25 avril à 14h", + "displayNewsletterRegistration": true } ]