Skip to content

Commit e5c04f9

Browse files
committed
feat: feat donwload programe button
1 parent 4765ddf commit e5c04f9

4 files changed

Lines changed: 44 additions & 15 deletions

File tree

src/components/ProgramaPage.astro

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,49 @@ const schedule = await getSchedule()
2020
<h1 id="schedule-title" class="text-3xl md:text-5xl font-bold text-center mb-6">{t.title}</h1>
2121
<p class="text-center text-base md:text-lg mb-10 max-w-2xl mx-auto opacity-80">{t.intro}</p>
2222

23-
<fieldset
24-
class="schedule-view-toggle max-w-3xl mx-auto mb-8 border border-white/10 rounded-xl p-3 flex flex-wrap items-center gap-2 bg-pycon-black/40"
25-
>
26-
<legend class="sr-only">{t.list.viewModeLegend}</legend>
27-
<label
28-
class="cursor-pointer px-4 py-2 rounded-lg text-sm has-[:checked]:bg-pycon-orange has-[:checked]:text-pycon-black has-[:checked]:font-semibold text-pycon-gray-25 transition-colors"
23+
<div class="max-w-3xl mx-auto mb-8 flex flex-col sm:flex-row justify-between items-center gap-4">
24+
<fieldset
25+
class="schedule-view-toggle border border-white/10 rounded-xl p-3 flex items-center gap-2 bg-pycon-black/40 w-full sm:w-auto justify-center sm:justify-start"
2926
>
30-
<input type="radio" name="schedule-view" value="list" class="sr-only" />
31-
{t.list.viewModeList}
32-
</label>
33-
<label
34-
class="cursor-pointer px-4 py-2 rounded-lg text-sm has-[:checked]:bg-pycon-orange has-[:checked]:text-pycon-black has-[:checked]:font-semibold text-pycon-gray-25 transition-colors"
27+
<legend class="sr-only">{t.list.viewModeLegend}</legend>
28+
<label
29+
class="cursor-pointer px-4 py-2 rounded-lg text-sm has-[:checked]:bg-pycon-orange has-[:checked]:text-pycon-black has-[:checked]:font-semibold text-pycon-gray-25 transition-colors"
30+
>
31+
<input type="radio" name="schedule-view" value="list" class="sr-only" />
32+
{t.list.viewModeList}
33+
</label>
34+
<label
35+
class="cursor-pointer px-4 py-2 rounded-lg text-sm has-[:checked]:bg-pycon-orange has-[:checked]:text-pycon-black has-[:checked]:font-semibold text-pycon-gray-25 transition-colors"
36+
>
37+
<input type="radio" name="schedule-view" value="grid" class="sr-only" />
38+
{t.list.viewModeGrid}
39+
</label>
40+
</fieldset>
41+
42+
<a
43+
href="https://drive.google.com/file/d/166Vn_s9v0vHaNlX4wxFfbnh9_2chzt-O/view?usp=drive_link"
44+
target="_blank"
45+
rel="noopener noreferrer"
46+
aria-label={`${t.downloadPdf} ${menuT.new_tab}`}
47+
class="inline-flex items-center gap-2 px-4 py-2.5 bg-pycon-orange text-pycon-black font-semibold rounded-xl hover:opacity-90 transition-opacity focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-pycon-yellow text-sm w-full sm:w-auto justify-center"
3548
>
36-
<input type="radio" name="schedule-view" value="grid" class="sr-only" />
37-
{t.list.viewModeGrid}
38-
</label>
39-
</fieldset>
49+
<svg
50+
class="w-4 h-4"
51+
viewBox="0 0 24 24"
52+
fill="none"
53+
stroke="currentColor"
54+
stroke-width="2.5"
55+
stroke-linecap="round"
56+
stroke-linejoin="round"
57+
aria-hidden="true"
58+
>
59+
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
60+
<polyline points="7 10 12 15 17 10" />
61+
<line x1="12" y1="15" x2="12" y2="3" />
62+
</svg>
63+
<span>{t.downloadPdf}</span>
64+
</a>
65+
</div>
4066

4167
<div id="schedule-list-view" class="schedule-view hidden" data-view="list">
4268
{

src/i18n/programa/ca.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export const ca = {
22
title: 'Programa',
33
seoDescription: 'Consulta el cronograma complet de xerrades, tallers i activitats de la PyConES 2026.',
44
intro: 'Explora totes les xerrades, tallers i activitats de la PyConES 2026.',
5+
downloadPdf: 'Descarregar programa en PDF',
56
locale: 'ca',
67
noscript: 'JavaScript està desactivat al teu navegador. Per veure el programa sense JavaScript,',
78
noscriptLink: 'fes clic aquí',

src/i18n/programa/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export const en = {
22
title: 'Programme',
33
seoDescription: 'Check out the full schedule of talks, workshops and activities at PyConES 2026.',
44
intro: 'Explore all the talks, workshops and activities at PyConES 2026.',
5+
downloadPdf: 'Download programme (PDF)',
56
locale: 'en',
67
noscript: 'JavaScript is disabled in your browser. To view the schedule without JavaScript,',
78
noscriptLink: 'click here',

src/i18n/programa/es.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export const es = {
22
title: 'Programa',
33
seoDescription: 'Consulta el cronograma completo de charlas, talleres y actividades de la PyConES 2026.',
44
intro: 'Explora todas las charlas, talleres y actividades de la PyConES 2026.',
5+
downloadPdf: 'Descargar programa en PDF',
56
locale: 'es',
67
noscript: 'JavaScript está deshabilitado en tu navegador. Para ver el programa sin JavaScript,',
78
noscriptLink: 'haz click aquí',

0 commit comments

Comments
 (0)