diff --git a/src/components/Navigation.astro b/src/components/Navigation.astro index 6437ccc..2cc066a 100644 --- a/src/components/Navigation.astro +++ b/src/components/Navigation.astro @@ -205,7 +205,9 @@ const { items } = menuTexts[currentLang] -
+
diff --git a/src/components/home/SectionSponsors.astro b/src/components/home/SectionSponsors.astro index 92fb5a7..4354547 100644 --- a/src/components/home/SectionSponsors.astro +++ b/src/components/home/SectionSponsors.astro @@ -32,10 +32,45 @@ const main = filterSponsorsByTier('main')
- - - - - + + + + +
diff --git a/src/components/home/sponsors/SponsorsGroup.astro b/src/components/home/sponsors/SponsorsGroup.astro index 3d69351..8ba5fb7 100644 --- a/src/components/home/sponsors/SponsorsGroup.astro +++ b/src/components/home/sponsors/SponsorsGroup.astro @@ -1,29 +1,24 @@ --- -import type { ISponsor, TSponsorTier } from '../../../types/sponsors' +import type { ISponsor } from '../../../types/sponsors' import { texts } from '../../../i18n/home' -import { TIER_COLORS } from '../../../constants' interface Props { - tierId: TSponsorTier lang: string title: string sponsors: ISponsor[] + bgColor: string + textColor: string + size: number } -const { title, sponsors, lang, tierId } = Astro.props +const { title, sponsors, lang, bgColor, textColor, size } = Astro.props const t = texts[lang as keyof typeof texts] - -const IMG_WITH_BY_TIER: Record = { - main: 200, - platinum: 150, - gold: 120, - silver: 100, - bronze: 80, -} ---
-

{title}

+

+ {title} +

{ sponsors.length > 0 ? (
@@ -37,7 +32,7 @@ const IMG_WITH_BY_TIER: Record = { {t['sponsors.altlogo'].replace('{name}', {sponsor.name} diff --git a/src/constants.ts b/src/constants.ts deleted file mode 100644 index 54c6b93..0000000 --- a/src/constants.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { TSponsorTier } from './types/sponsors' - -export const TIER_COLORS: Record = { - bronze: '#d97706', - silver: '#9ca3af', - gold: '#facc15', - platinum: '#4ade80', - main: '#c084fc', -} diff --git a/src/i18n/sponsors/ca.ts b/src/i18n/sponsors/ca.ts index 4a9e764..a1767c5 100644 --- a/src/i18n/sponsors/ca.ts +++ b/src/i18n/sponsors/ca.ts @@ -206,7 +206,7 @@ export const ca = { no_taxes: 'sense IVA', items: [ { - id: 'bronze', + color: 'text-tier-bronze', name: 'Bronze', emoji: '🟀', price: 'Preu 1.000€', @@ -214,7 +214,7 @@ export const ca = { bg: 'rgba(180, 83, 9, 0.1)', }, { - id: 'silver', + color: 'text-tier-silver', name: 'Plata', emoji: 'βšͺ', price: 'Preu 3.000€', @@ -222,7 +222,7 @@ export const ca = { bg: 'rgba(107, 114, 128, 0.1)', }, { - id: 'gold', + color: 'text-tier-gold', name: 'Or', emoji: '🌟', price: 'Preu 6.000€', @@ -230,7 +230,7 @@ export const ca = { bg: 'rgba(234, 179, 8, 0.1)', }, { - id: 'platinium', + color: 'text-tier-platinium', name: 'PlatΓ­', emoji: 'πŸ†', price: 'Preu 8.000€', @@ -238,7 +238,7 @@ export const ca = { bg: 'rgba(34, 197, 94, 0.1)', }, { - id: 'main', + color: 'text-tier-main', name: 'Principal', emoji: '🏰', price: 'Preu Personalitzat', diff --git a/src/i18n/sponsors/en.ts b/src/i18n/sponsors/en.ts index b4db4ec..bf9daf0 100644 --- a/src/i18n/sponsors/en.ts +++ b/src/i18n/sponsors/en.ts @@ -206,7 +206,7 @@ export const en = { no_taxes: 'VAT not included', items: [ { - id: 'bronze', + color: 'text-tier-bronze', name: 'Bronze', emoji: '🟀', price: 'Price €1,000', @@ -214,7 +214,7 @@ export const en = { bg: 'rgba(180, 83, 9, 0.1)', }, { - id: 'silver', + color: 'text-tier-silver', name: 'Silver', emoji: 'βšͺ', price: 'Price €3,000', @@ -222,7 +222,7 @@ export const en = { bg: 'rgba(107, 114, 128, 0.1)', }, { - id: 'gold', + color: 'text-tier-gold', name: 'Gold', emoji: '🌟', price: 'Price €6,000', @@ -230,7 +230,7 @@ export const en = { bg: 'rgba(234, 179, 8, 0.1)', }, { - id: 'platinum', + color: 'text-tier-platinum', name: 'Platinum', emoji: 'πŸ†', price: 'Price €8,000', @@ -238,7 +238,7 @@ export const en = { bg: 'rgba(34, 197, 94, 0.1)', }, { - id: 'main', + color: 'text-tier-main', name: 'Main', emoji: '🏰', price: 'Price Custom', diff --git a/src/i18n/sponsors/es.ts b/src/i18n/sponsors/es.ts index 105b16b..d92f0e0 100644 --- a/src/i18n/sponsors/es.ts +++ b/src/i18n/sponsors/es.ts @@ -206,7 +206,7 @@ export const es = { no_taxes: 'sin IVA', items: [ { - id: 'bronze', + color: 'text-tier-bronze', name: 'Bronce', emoji: '🟀', price: 'Precio 1.000€', @@ -214,7 +214,7 @@ export const es = { bg: 'rgba(180, 83, 9, 0.1)', }, { - id: 'silver', + color: 'text-tier-silver', name: 'Plata', emoji: 'βšͺ', price: 'Precio 3.000€', @@ -222,7 +222,7 @@ export const es = { bg: 'rgba(107, 114, 128, 0.1)', }, { - id: 'gold', + color: 'text-tier-gold', name: 'Oro', emoji: '🌟', price: 'Precio 6.000€', @@ -230,7 +230,7 @@ export const es = { bg: 'rgba(234, 179, 8, 0.1)', }, { - id: 'platinum', + color: 'text-tier-platinum', name: 'Platino', emoji: 'πŸ†', price: 'Precio 8.000€', @@ -238,7 +238,7 @@ export const es = { bg: 'rgba(34, 197, 94, 0.1)', }, { - id: 'main', + color: 'text-tier-main', name: 'Principal', emoji: '🏰', price: 'Precio Personalizado', diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 31186d5..852033e 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -34,9 +34,11 @@ const { title, description = 'PyconES 2026' } = Astro.props if (typeof localStorage !== 'undefined' && localStorage.getItem('theme')) { return localStorage.getItem('theme') } + if (window.matchMedia('(prefers-color-scheme: dark)').matches) { return 'dark' } + return 'light' })() diff --git a/src/pages/[lang]/sponsors.astro b/src/pages/[lang]/sponsors.astro index 188b3af..aec0a8c 100644 --- a/src/pages/[lang]/sponsors.astro +++ b/src/pages/[lang]/sponsors.astro @@ -2,7 +2,6 @@ import Layout from '../../layouts/Layout.astro' import { SPONSORS_EMAIL } from '../constants' import { texts } from '../../i18n/sponsors' -import { TIER_COLORS } from '../../constants' export function getStaticPaths() { return [{ params: { lang: 'es' } }, { params: { lang: 'en' } }, { params: { lang: 'ca' } }] @@ -350,17 +349,17 @@ const {

{tiers.title}

- +
{ tiers.items.map( - (t: { name: string; price: string; limit: string; emoji: string; id: string }) => ( + (t: { name: string; price: string; limit: string; emoji: string; color: string }) => (
{tiers.column1}