Tons of fixes to every page

This commit is contained in:
2026-05-02 20:18:48 +03:00
parent e2c3ec5b8a
commit 0368d64bcc
15 changed files with 490 additions and 286 deletions

View File

@@ -16,15 +16,71 @@ interface Sponsor {
}
const sponsors: Sponsor[] = [
{ href: "https://taltech.ee", src: "/sponsors/taltech-color.png", alt: "Taltech (Tallinna Tehnikaülikool)", width: 192, height: 192 },
{ href: "https://www.redbull.com/ee-et/", src: "/sponsors/redbull.png", alt: "Redbull", width: 80, height: 80 },
{ href: "https://www.simracing.ee/", src: "/sponsors/EVAL.png", alt: "EVAL", width: 200, height: 200 },
{ href: "https://www.facebook.com/bfglOfficial", src: "/sponsors/BFGL.png", alt: "BFGL", width: 192, height: 192 },
{ href: "https://www.tomorrow.ee/", src: "/sponsors/nt.png", alt: "Network Tomorrow", width: 300, height: 200 },
{ href: "https://k-space.ee/", src: "/sponsors/k-space_ee-white.png", alt: "K-Space", width: 200, height: 200, className: "not-dark:invert" },
{ href: "https://globalproductions.ee/", src: "/sponsors/Global-productions.png", alt: "Global Productions", width: 200, height: 200 },
{ href: "https://www.linkedin.com/company/gamedev-guild/", src: "/sponsors/estonian_gamedev_guild.png", alt: "Estonian Gamedev Guild", width: 200, height: 200, className: "not-dark:invert" },
{ href: "https://alzgamer.ee/", src: "/sponsors/alzgamer.png", alt: "AlzGamer", width: 200, height: 200 },
{
href: "https://taltech.ee",
src: "/sponsors/taltech-color.png",
alt: "Taltech (Tallinna Tehnikaülikool)",
width: 192,
height: 192,
},
{
href: "https://www.redbull.com/ee-et/",
src: "/sponsors/redbull.png",
alt: "Redbull",
width: 80,
height: 80,
},
{
href: "https://www.simracing.ee/",
src: "/sponsors/EVAL.png",
alt: "EVAL",
width: 200,
height: 200,
},
{
href: "https://www.facebook.com/bfglOfficial",
src: "/sponsors/BFGL.png",
alt: "BFGL",
width: 192,
height: 192,
},
{
href: "https://www.tomorrow.ee/",
src: "/sponsors/nt.png",
alt: "Network Tomorrow",
width: 300,
height: 200,
},
{
href: "https://k-space.ee/",
src: "/sponsors/k-space_ee-white.png",
alt: "K-Space",
width: 200,
height: 200,
className: "not-dark:invert",
},
{
href: "https://globalproductions.ee/",
src: "/sponsors/Global-productions.png",
alt: "Global Productions",
width: 200,
height: 200,
},
{
href: "https://www.linkedin.com/company/gamedev-guild/",
src: "/sponsors/estonian_gamedev_guild.png",
alt: "Estonian Gamedev Guild",
width: 200,
height: 200,
className: "not-dark:invert",
},
{
href: "https://alzgamer.ee/",
src: "/sponsors/alzgamer.png",
alt: "AlzGamer",
width: 200,
height: 200,
},
];
// Split sponsors into slides (6 per slide)
@@ -46,7 +102,10 @@ export default function Sponsors({
const t = useTranslations();
const [current, setCurrent] = useState(0);
const next = useCallback(() => setCurrent((c) => (c + 1) % slides.length), []);
const next = useCallback(
() => setCurrent((c) => (c + 1) % slides.length),
[],
);
useEffect(() => {
const id = setInterval(next, 5000);
@@ -55,7 +114,7 @@ export default function Sponsors({
return (
<div
className={`flex flex-col max-w-[1920px] h-[414px] mx-auto ${vipnagorgialla.className} font-bold italic border-b-3 border-[#1F5673] ${className}`}
className={`flex flex-col max-w-[1920px] xl:h-[414px] mx-auto ${vipnagorgialla.className} font-bold italic border-[#1F5673] ${className}`}
>
{showTitle && (
<h3 className="text-4xl md:text-5xl dark:text-[#EEE5E5] text-[#2A2C3F] px-12 pt-8 pb-4">
@@ -64,7 +123,7 @@ export default function Sponsors({
)}
{/* Carousel container */}
<div className="relative flex-1 overflow-hidden">
<div className="relative xl:flex-1 overflow-x-hidden overflow-y-visible">
<div
className="flex h-full transition-transform duration-500 ease-in-out"
style={{ transform: `translateX(-${current * 100}%)` }}
@@ -72,16 +131,21 @@ export default function Sponsors({
{slides.map((slideSponsors, slideIndex) => (
<div
key={slideIndex}
className="flex-none w-full h-full flex items-center justify-center gap-8 md:gap-12 px-12"
className="flex-none w-full xl:h-full grid grid-cols-2 sm:grid-cols-3 place-items-center gap-6 px-6 py-6 xl:flex xl:items-center xl:justify-center xl:gap-12 xl:px-12 xl:py-0"
>
{slideSponsors.map((sponsor, i) => (
<NextLink key={i} href={sponsor.href} target="_blank">
<NextLink
key={i}
href={sponsor.href}
target="_blank"
className="flex items-center justify-center w-full"
>
<Image
src={sponsor.src}
alt={sponsor.alt}
width={sponsor.width}
height={sponsor.height}
className={`object-contain max-h-[180px] ${sponsor.className || ""}`}
className={`object-contain max-h-[80px] max-w-[120px] sm:max-h-[110px] sm:max-w-[150px] md:max-h-[130px] md:max-w-[180px] lg:max-h-[140px] lg:max-w-[200px] xl:max-h-[180px] xl:max-w-[240px] ${sponsor.className || ""}`}
/>
</NextLink>
))}
@@ -97,7 +161,9 @@ export default function Sponsors({
key={i}
onClick={() => setCurrent(i)}
className={`w-3 h-3 rounded-full transition ${
i === current ? "bg-[#007CAB]" : "bg-[#1F5673] hover:bg-[#007CAB]/60"
i === current
? "bg-[#00A3E0]"
: "bg-[#1F5673] hover:bg-[#007CAB]/60"
}`}
aria-label={`Slide ${i + 1}`}
/>