mirror of
https://github.com/Lapikud/tipilan.git
synced 2026-09-22 15:22:59 +00:00
First draft
This commit is contained in:
102
src/app/[locale]/miniturniirid/page.tsx
Normal file
102
src/app/[locale]/miniturniirid/page.tsx
Normal file
@@ -0,0 +1,102 @@
|
||||
import { vipnagorgialla } from "@/components/Vipnagorgialla";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { getTranslations, setRequestLocale } from "next-intl/server";
|
||||
import { miniTournaments } from "@/data/miniturniirid";
|
||||
|
||||
/** Horizontal padding used by the page (64px at the design width). */
|
||||
const GUTTER = "px-4 sm:px-8 lg:px-16";
|
||||
|
||||
// TODO: replace with the real mini-tournaments rules URL once it exists.
|
||||
// Placeholder points at the TipiLAN ruleset repo root.
|
||||
const RULES_URL =
|
||||
"https://git.edunaut.ee/slunk/TipiLAN_reeglistik_ruleset";
|
||||
|
||||
/**
|
||||
* One mini-tournament tile: a cyan-bordered cover image above a bold caption
|
||||
* "Title – Prize". Games without artwork yet fall back to a text tile.
|
||||
*/
|
||||
function MiniCard({ title, prize, image }: (typeof miniTournaments)[number]) {
|
||||
return (
|
||||
<div className="flex flex-col gap-3">
|
||||
<div className="relative aspect-video border-[3px] border-[#00A3E0] overflow-hidden bg-[#0E0F19]">
|
||||
{image ? (
|
||||
<Image
|
||||
src={image}
|
||||
alt={title}
|
||||
fill
|
||||
className="object-cover"
|
||||
sizes="(max-width: 768px) 100vw, 33vw"
|
||||
/>
|
||||
) : (
|
||||
<span
|
||||
className={`${vipnagorgialla.className} absolute inset-0 flex items-center justify-center p-4 text-center font-bold italic uppercase text-white/85 leading-tight text-[clamp(1rem,0.8rem+1vw,1.5rem)]`}
|
||||
>
|
||||
{title}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<span className="font-bold text-white leading-tight text-[clamp(1rem,0.85rem+0.8vw,1.5rem)]">
|
||||
{title} – {prize}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default async function MiniTournaments({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>;
|
||||
}) {
|
||||
const { locale } = await params;
|
||||
setRequestLocale(locale);
|
||||
const t = await getTranslations({ locale });
|
||||
|
||||
return (
|
||||
<div className="bg-[#0E0F19] min-h-screen pt-16 md:pt-20">
|
||||
<div className="mx-auto w-full max-w-[1920px]">
|
||||
{/* Header */}
|
||||
<div className={`${GUTTER} pt-12 md:pt-16`}>
|
||||
<h1
|
||||
className={`${vipnagorgialla.className} font-bold italic uppercase text-[#EEE5E5] leading-none text-[clamp(1.75rem,1.4rem+3vw,3.5rem)]`}
|
||||
>
|
||||
{t("minipage.title")}
|
||||
</h1>
|
||||
<p className="mt-4 text-[#00A3E0] italic text-lg md:text-xl">
|
||||
{t("minipage.date")}
|
||||
</p>
|
||||
<p className="mt-4 text-[#EEE5E5] max-w-2xl text-base md:text-lg">
|
||||
{t("minipage.description")}
|
||||
</p>
|
||||
|
||||
{/* Buttons */}
|
||||
<div className="mt-8 flex flex-wrap gap-4">
|
||||
<Link
|
||||
href={RULES_URL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={`${vipnagorgialla.className} font-bold italic leading-none text-lg uppercase px-4 py-3 border-4 border-[#00A3E0] bg-transparent text-[#00A3E0] hover:bg-[#00A3E0] hover:text-[#0A121F] transition`}
|
||||
>
|
||||
{t("minipage.readRules")}
|
||||
</Link>
|
||||
<Link
|
||||
href="/piletid"
|
||||
className={`${vipnagorgialla.className} font-bold italic leading-none text-lg uppercase px-4 py-3 border-4 border-transparent bg-[#00A3E0] hover:bg-[#E5E5EE] text-[#0A121F] transition`}
|
||||
>
|
||||
{t("minipage.buyTicket")}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Game grid */}
|
||||
<div className={`${GUTTER} py-12 md:py-16`}>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 lg:gap-8">
|
||||
{miniTournaments.map((game) => (
|
||||
<MiniCard key={game.title} {...game} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
78
src/data/miniturniirid.ts
Normal file
78
src/data/miniturniirid.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
// Content for the Miniturniirid (mini-tournaments) page.
|
||||
//
|
||||
// Game titles and prize amounts are proper nouns / language-neutral, so they
|
||||
// live here as plain strings rather than in the translation files (same
|
||||
// convention as src/data/expo.ts). Page headings and button labels are
|
||||
// translated (see the `minipage` block in translations/et.json + en.json).
|
||||
//
|
||||
// Source of truth: the organizers' "MINITURNIIRID" sheet in Google Drive
|
||||
// (TipiLAN 2026 → Messiala, last modified 2026-09-06). Total funded prize pool
|
||||
// is 1600€ across all tournaments. Buckshot Roulette is intentionally NOT here:
|
||||
// per the sheet it is a showcase/side activity, not a funded mini-tournament.
|
||||
//
|
||||
// Cover images live in public/images/miniturniirid/. `image` is optional: games
|
||||
// without artwork yet (Avatar Legends, osu!, Counter-Strike 1.6, Rocket League,
|
||||
// Quake) fall back to a text tile showing the title.
|
||||
|
||||
export interface MiniTournament {
|
||||
/** Game name (proper noun, shown as-is). */
|
||||
title: string;
|
||||
/** Prize pool for this tournament, e.g. "350€", or a non-cash prize ("Kinkekott"). */
|
||||
prize: string;
|
||||
/** Cover image under /public. Rendered object-cover. Optional. */
|
||||
image?: string;
|
||||
}
|
||||
|
||||
export const miniTournaments: MiniTournament[] = [
|
||||
{ title: "WRC", prize: "350€", image: "/images/miniturniirid/wrc.jpg" },
|
||||
{
|
||||
title: "Gran Turismo 7",
|
||||
prize: "200€",
|
||||
image: "/images/miniturniirid/gran_turismo.jpg",
|
||||
},
|
||||
{
|
||||
title: "Super Smash Bros. Ultimate",
|
||||
prize: "100€",
|
||||
image: "/images/miniturniirid/super_smash_bros.jpg",
|
||||
},
|
||||
{
|
||||
title: "Street Fighter 6",
|
||||
prize: "100€",
|
||||
image: "/images/miniturniirid/street_fighter.jpg",
|
||||
},
|
||||
{ title: "Tekken 8", prize: "100€", image: "/images/miniturniirid/tekken8.jpg" },
|
||||
{ title: "2XKO", prize: "100€", image: "/images/miniturniirid/2xko.png" },
|
||||
{
|
||||
title: "Invincible Vs.",
|
||||
prize: "100€",
|
||||
image: "/images/miniturniirid/invincible_vs.png",
|
||||
},
|
||||
{
|
||||
title: "Marvel Tokon",
|
||||
prize: "100€",
|
||||
image: "/images/miniturniirid/marvel_tokon.png",
|
||||
},
|
||||
{ title: "FC 26", prize: "100€", image: "/images/miniturniirid/fc26.jpg" },
|
||||
{
|
||||
title: "Avatar Legends",
|
||||
prize: "100€",
|
||||
image: "/images/miniturniirid/avatar_legends.jpg",
|
||||
},
|
||||
{ title: "osu!", prize: "100€", image: "/images/miniturniirid/osu.jpg" },
|
||||
{
|
||||
title: "Dwarf Escape",
|
||||
prize: "50€",
|
||||
image: "/images/miniturniirid/dwarf_escape.png",
|
||||
},
|
||||
{
|
||||
title: "Counter-Strike 1.6",
|
||||
prize: "50€",
|
||||
image: "/images/miniturniirid/cs16.jpg",
|
||||
},
|
||||
{
|
||||
title: "Rocket League",
|
||||
prize: "50€",
|
||||
image: "/images/miniturniirid/rocket_league.jpg",
|
||||
},
|
||||
{ title: "Quake", prize: "Kinkekott", image: "/images/miniturniirid/quake.jpg" },
|
||||
];
|
||||
Reference in New Issue
Block a user