From 4d4249a03cd30f69064d848f6d78e2ecbbe6de0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Tue, 20 Jan 2026 14:20:39 +0100 Subject: [PATCH] Change the email copy to mailto This replaces the mechanism to copy the sponsors emails to using the 'mailto:' attribute, in order to launch an email client and write the email directly. A suggested 'subject' was included as well, to simplify the contact from possible sponsors. --- src/pages/constants.ts | 1 + src/pages/index.astro | 31 +++---------------------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/src/pages/constants.ts b/src/pages/constants.ts index 6857489..aee943d 100644 --- a/src/pages/constants.ts +++ b/src/pages/constants.ts @@ -1 +1,2 @@ export const SPONSORS_EMAIL = 'sponsors@2026.es.pycon.org' +export const SPONSORS_SUBJECT = 'Interés de patrocinio para PyConES2026' diff --git a/src/pages/index.astro b/src/pages/index.astro index 513cb7d..cf9226b 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,7 +1,7 @@ --- import Layout from '../layouts/Layout.astro' import '@fontsource-variable/jetbrains-mono' -import { SPONSORS_EMAIL } from './constants' +import { SPONSORS_EMAIL, SPONSORS_SUBJECT } from './constants' --- @@ -29,6 +29,7 @@ import { SPONSORS_EMAIL } from './constants' id="actions" class="mt-12 flex flex-col md:flex-row gap-6 justify-center items-center opacity-0 transition-opacity duration-1000 ease-in" > + +
{ - try { - await navigator.clipboard.writeText(email) - - // Hide button, show confirmation - sponsorBtn.classList.add('hidden') - copyConfirmation.classList.remove('hidden') - copyConfirmation.focus() - - setTimeout(() => { - // Hide confirmation, show button and restore focus - copyConfirmation.classList.add('hidden') - sponsorBtn.classList.remove('hidden') - sponsorBtn.focus() - }, 2000) - } catch (err) { - console.error('Failed to copy', err) - window.location.href = `mailto:${email}` - } - } - } } //not needed now