Skip to content

Commit 9edc39b

Browse files
committed
feat: add ticket dates banner to homepage
Add a dedicated announcement banner showing Early Bird (5 June) and General Sale (19 June) ticket dates on the homepage. - New SectionDates component with gradient accent bar and tinted background - i18n texts for es, en, ca - Integrated between SectionMain and SectionCTAs
1 parent 711f11d commit 9edc39b

4 files changed

Lines changed: 100 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "2026.es.pycon.org",
3-
"version": "1.5.0",
3+
"version": "1.6.0",
44
"description": "",
55
"main": "index.js",
66
"scripts": {
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
import { texts } from '@/i18n/home'
3+
4+
interface Props {
5+
lang: string
6+
}
7+
8+
const { lang } = Astro.props
9+
const t = texts[lang as keyof typeof texts]
10+
11+
const dates = [
12+
{
13+
emoji: '🎫',
14+
label: t['tickets.earlybird.label'],
15+
date: t['tickets.earlybird.date'],
16+
accentBg: 'bg-pycon-orange/10',
17+
accentBorder: 'border-pycon-orange/25',
18+
accentText: 'text-pycon-orange',
19+
bar: 'bg-pycon-orange',
20+
},
21+
{
22+
emoji: '🎟️',
23+
label: t['tickets.general.label'],
24+
date: t['tickets.general.date'],
25+
accentBg: 'bg-amber-400/10',
26+
accentBorder: 'border-amber-400/25',
27+
accentText: 'text-amber-400',
28+
bar: 'bg-amber-400',
29+
},
30+
]
31+
---
32+
33+
<section aria-labelledby="tickets-heading">
34+
<div
35+
class="relative rounded-2xl border border-white/10 overflow-hidden"
36+
>
37+
{/* Gradient accent bar at top — visual separator */}
38+
<div
39+
class="h-1.5 w-full bg-gradient-to-r from-pycon-orange via-amber-400 to-pycon-yellow"
40+
aria-hidden="true"
41+
/>
42+
43+
{/* Background gradient — different from glassmorphism CTAs */}
44+
<div
45+
class="bg-gradient-to-b from-pycon-orange/5 via-amber-400/[0.04] to-transparent px-6 py-10 md:px-10 md:py-12"
46+
>
47+
<div class="flex flex-col items-center gap-2 text-center">
48+
<span class="text-3xl" aria-hidden="true">🎟️</span>
49+
<h2
50+
id="tickets-heading"
51+
class="text-xl md:text-2xl font-bold text-pycon-white"
52+
>
53+
{t['tickets.title']}
54+
</h2>
55+
</div>
56+
57+
<div
58+
class="mt-8 grid grid-cols-1 md:grid-cols-2 gap-4 max-w-2xl mx-auto"
59+
>
60+
{
61+
dates.map((d) => (
62+
<div
63+
class:list={[
64+
'flex flex-col items-center gap-2 rounded-xl border p-5 text-center',
65+
d.accentBg,
66+
d.accentBorder,
67+
]}
68+
>
69+
<span class="text-3xl" aria-hidden="true">{d.emoji}</span>
70+
<span class="text-xs uppercase tracking-widest font-semibold text-pycon-gray-25">
71+
{d.label}
72+
</span>
73+
<span class={['text-2xl md:text-3xl font-bold leading-tight', d.accentText].join(' ')}>
74+
{d.date}
75+
</span>
76+
</div>
77+
))
78+
}
79+
</div>
80+
</div>
81+
</div>
82+
</section>

src/components/index.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
import Layout from '@/layouts/Layout.astro'
33
import SectionMain from './home/SectionMain.astro'
4+
import SectionDates from './home/SectionDates.astro'
45
import SectionCTAs from './home/SectionCTAs.astro'
56
import SectionSponsors from './home/SectionSponsors.astro'
67
@@ -14,6 +15,7 @@ const { lang } = Astro.props
1415
<Layout title="PyConES 2026">
1516
<div class="flex flex-col gap-20">
1617
<SectionMain lang={lang} />
18+
<SectionDates lang={lang} />
1719
<SectionCTAs lang={lang} />
1820
<SectionSponsors lang={lang} />
1921
</div>

src/i18n/home.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ export const texts = {
2727
'cta.reviewers.description':
2828
'Buscamos personas que nos ayuden a revisar las propuestas que recibamos. Tu experiencia y criterio son clave para garantizar la calidad del programa. Si querés colaborar con la organización y ayudar a seleccionar las mejores charlas y talleres, ¡necesitamos tu ayuda!',
2929
'cta.reviewers.button': 'Quiero ser revisor/a',
30+
'tickets.title': '🎟️ Entradas',
31+
'tickets.earlybird.label': 'Early Bird',
32+
'tickets.earlybird.date': '5 de junio',
33+
'tickets.general.label': 'Venta General',
34+
'tickets.general.date': '19 de junio',
3035
},
3136
en: {
3237
'index.initializing': 'Initialising system...',
@@ -57,6 +62,11 @@ export const texts = {
5762
'cta.reviewers.description':
5863
'We are looking for people to help us review the proposals we receive. Your experience and judgement are key to ensuring the quality of the programme. If you want to collaborate with the organisation and help select the best talks and workshops, we need your help!',
5964
'cta.reviewers.button': 'I want to be a reviewer',
65+
'tickets.title': '🎟️ Tickets',
66+
'tickets.earlybird.label': 'Early Bird',
67+
'tickets.earlybird.date': 'June 5',
68+
'tickets.general.label': 'General Sale',
69+
'tickets.general.date': 'June 19',
6070
},
6171
ca: {
6272
'index.initializing': 'Inicialitzant sistema...',
@@ -87,5 +97,10 @@ export const texts = {
8797
'cta.reviewers.description':
8898
"Busquem persones que ens ajudin a revisar les propostes que rebem. La teva experiència i criteri són clau per garantir la qualitat del programa. Si vols col·laborar amb l'organització i ajudar a seleccionar les millors xerrades i tallers, necessitem la teva ajuda!",
8999
'cta.reviewers.button': 'Vull ser revisor/a',
100+
'tickets.title': '🎟️ Entrades',
101+
'tickets.earlybird.label': 'Early Bird',
102+
'tickets.earlybird.date': '5 de juny',
103+
'tickets.general.label': 'Venda General',
104+
'tickets.general.date': '19 de juny',
90105
},
91106
} as const

0 commit comments

Comments
 (0)