From 1ce8c04b642c7a886ca5c4c8fa1d43b9db4af939 Mon Sep 17 00:00:00 2001 From: Arto Reinik Date: Thu, 26 Mar 2026 12:38:35 +0200 Subject: [PATCH] frontend: fix hero section for mobile --- src/app/globals.css | 76 ++++++++++++++++++++++++++- src/components/teaser/HeroSection.tsx | 44 ++++++++++------ translations/en.json | 6 ++- translations/et.json | 6 ++- 4 files changed, 112 insertions(+), 20 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index db652f6..886c8fb 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -92,6 +92,15 @@ body { text-transform: uppercase; } +@utility text-btn { + font-family: var(--font-heading); + font-weight: 700; + font-style: italic; + font-size: 16px; + line-height: 100%; + text-transform: uppercase; +} + @utility text-p-lg { font-family: var(--font-body); font-weight: 400; @@ -106,7 +115,7 @@ body { line-height: 100%; } -@utility text-countdown { +@utility text-countdown-lg { font-family: var(--font-heading); font-weight: 700; font-style: italic; @@ -115,7 +124,16 @@ body { text-transform: uppercase; } -@utility text-countdown-label { +@utility text-countdown { + font-family: var(--font-heading); + font-weight: 700; + font-style: italic; + font-size: clamp(24px, 4vw, 32px); + line-height: 100%; + text-transform: uppercase; +} + +@utility text-countdown-label-lg { font-family: var(--font-heading); font-weight: 700; font-style: italic; @@ -124,6 +142,15 @@ body { text-transform: uppercase; } +@utility text-countdown-label { + font-family: var(--font-heading); + font-weight: 700; + font-style: italic; + font-size: 12px; + line-height: 100%; + text-transform: uppercase; +} + /* ===== 2026 Effect Utilities ===== */ @utility shadow-teaser { filter: drop-shadow(0px 0px 20px rgba(0, 0, 0, 0.5)); @@ -155,6 +182,27 @@ body { } } +@utility btn-primary { + background-color: var(--color-primary); + color: var(--color-bg-dark); + padding: 12px; + min-width: 48px; + display: inline-flex; + align-items: center; + justify-content: center; + gap: 8px; + cursor: pointer; + transition: background-color 0.1s, color 0.1s; + + &:hover { + background-color: var(--color-text-light); + } + + &:active { + background-color: var(--color-primary); + } +} + @utility btn-secondary-lg { background-color: color-mix(in srgb, var(--color-primary) 20%, transparent); color: var(--color-text-light); @@ -179,6 +227,30 @@ body { } } +@utility btn-secondary { + background-color: color-mix(in srgb, var(--color-primary) 20%, transparent); + color: var(--color-text-light); + box-shadow: inset 0 0 0 4px var(--color-primary); + padding: 12px; + min-width: 48px; + display: inline-flex; + align-items: center; + justify-content: center; + gap: 8px; + cursor: pointer; + transition: background-color 0.2s, color 0.2s; + + &:hover { + background-color: var(--color-primary); + color: var(--color-bg-dark); + } + + &:active { + background-color: color-mix(in srgb, var(--color-primary) 20%, transparent); + color: var(--color-text-light); + } +} + /* ===== Scrollbar hidden utility ===== */ @utility scrollbar-hidden { -ms-overflow-style: none; diff --git a/src/components/teaser/HeroSection.tsx b/src/components/teaser/HeroSection.tsx index 6017f42..bffcd39 100644 --- a/src/components/teaser/HeroSection.tsx +++ b/src/components/teaser/HeroSection.tsx @@ -17,7 +17,7 @@ export default function HeroSection({ onScrollDown }: HeroSectionProps) { const pad = (n: number) => String(n).padStart(2, "0"); return ( -
+
{/* Background */} {/* Center content */} -
+
{/* Logo */} {/* Countdown */} -
+
- {countdown.days} - {t("teaser.countdown.days")} + {countdown.days} + + {t("teaser.countdown.daysShort")} + {t("teaser.countdown.days")} +
- : + :
- {pad(countdown.hours)} - {t("teaser.countdown.hours")} + {pad(countdown.hours)} + + {t("teaser.countdown.hoursShort")} + {t("teaser.countdown.hours")} +
- : + :
- {pad(countdown.minutes)} - {t("teaser.countdown.minutes")} + {pad(countdown.minutes)} + + {t("teaser.countdown.minutesShort")} + {t("teaser.countdown.minutes")} +
- : + :
- {pad(countdown.seconds)} - {t("teaser.countdown.seconds")} + {pad(countdown.seconds)} + + {t("teaser.countdown.secondsShort")} + {t("teaser.countdown.seconds")} +
@@ -88,13 +100,13 @@ export default function HeroSection({ onScrollDown }: HeroSectionProps) { href="https://fienta.com/tipilan-2026" target="_blank" rel="noopener noreferrer" - className="btn-primary-lg text-btn-lg hover:opacity-80 text-center" + className="btn-primary lg:btn-primary-lg text-btn lg:text-btn-lg hover:opacity-80 text-center" > {t("teaser.tickets.buyButton")} {t("teaser.sponsors.contactButton")} diff --git a/translations/en.json b/translations/en.json index 7735e16..862fe06 100644 --- a/translations/en.json +++ b/translations/en.json @@ -2,9 +2,13 @@ "teaser": { "countdown": { "days": "days", + "daysShort": "day", "hours": "hours", + "hoursShort": "hour", "minutes": "minutes", - "seconds": "seconds" + "minutesShort": "min", + "seconds": "seconds", + "secondsShort": "sec" }, "carousel": { "heading": "Come to Tipi", diff --git a/translations/et.json b/translations/et.json index bfc4cb3..563ed62 100644 --- a/translations/et.json +++ b/translations/et.json @@ -2,9 +2,13 @@ "teaser": { "countdown": { "days": "päeva", + "daysShort": "päev", "hours": "tundi", + "hoursShort": "tund", "minutes": "minutit", - "seconds": "sekundit" + "minutesShort": "min", + "seconds": "sekundit", + "secondsShort": "sek" }, "carousel": { "heading": "Tule Tipi",