Some changes in main page

This commit is contained in:
Rene Arumetsa
2026-05-01 11:17:36 +03:00
parent 403ff6adfb
commit c5bff17388
7 changed files with 30 additions and 15 deletions

View File

@@ -56,16 +56,16 @@ export default function HeroSection() {
10 000
</h2>
</div>
<div className="flex flex-col items-start md:items-end gap-2 mt-2">
<div className="flex flex-row items-center md:items-center gap-0 mt-2">
<Image
src="/images/landing/student_award.png"
src="/images/landing/student_award.webp"
width={180}
height={180}
alt="TalTech student award"
className="object-contain"
/>
<p className={`text-[32px] leading-none tracking-normal uppercase text-right text-[#EEE5E5] ${vipnagorgialla.className} font-bold italic`}>
{t("hero.award")}
<p className={`text-[32px] leading-none tracking-normal uppercase text-right align-middle text-[#EEE5E5] ${vipnagorgialla.className} font-bold italic`}>
{t("hero.awardPrefix")} <span className="text-[#00A3E0]">{t("hero.awardHighlight")}</span> {t("hero.awardSuffix")}
</p>
</div>
</div>

View File

@@ -16,6 +16,23 @@ type Slide = {
fullBrightness?: boolean;
};
// Helper to highlight "LAN" in "TIPILAN" with blue color
function highlightLAN(text: string) {
const parts = text.split(/(TIPILAN\w*)/gi);
return parts.map((part, i) => {
const upper = part.toUpperCase();
if (upper.startsWith("TIPILAN")) {
const suffix = part.slice(7); // Everything after "TIPILAN"
return (
<span key={i}>
TIPI<span className="text-[#00A3E0]">LAN</span>{suffix.toUpperCase()}
</span>
);
}
return part;
});
}
const slides: Slide[] = [
{ key: "compete", image: "/images/landing/compete_teaser.jpg", imageAlt: "Võistle", hero: "/images/landing/compete_hero.png", href: "/turniirid" },
{ key: "play", image: "/images/landing/play_teaser.png", imageAlt: "Mängi", hero: "/images/landing/play_hero.png", href: "/piletid", flip: true, fullBrightness: true },
@@ -62,7 +79,7 @@ export default function TeaserCarousel() {
<div className={`flex flex-col justify-between gap-4 px-8 py-8 md:px-12 md:py-10 ${slide.flip ? "md:[direction:ltr]" : ""}`}>
<div className="flex flex-col gap-3">
<h2 className={`${vipnagorgialla.className} font-bold italic text-[64px] leading-none tracking-normal uppercase text-[#EEE5E5]`}>
{t("heading")}
{highlightLAN(t("heading"))}
</h2>
<Link href={slide.href}>
<h3 className={`${vipnagorgialla.className} font-bold italic text-[clamp(2.5rem,2rem+2.5vw,5rem)] leading-none text-[#EEE5E5] hover:text-[#00A3E0] transition`}>