Merge branch 'gamerules' into resolve_conflicts

This commit is contained in:
Katri
2025-08-12 13:50:32 +03:00
committed by GitHub
5 changed files with 2319 additions and 400 deletions

View File

@@ -0,0 +1,44 @@
import { vipnagorgialla } from "@/components/Vipnagorgialla";
import path from "node:path";
import fs from "node:fs/promises";
import ReactMarkdown from "react-markdown";
type Props = {
params: Promise<{ slug: string }>;
};
export default async function RulePage({ params }: Props) {
const { slug } = await params;
const filePath = path.join(process.cwd(), "src/data/rules", `${slug}.md`);
let file: string;
try {
file = await fs.readFile(filePath, "utf8");
} catch {
file = `# ${slug.toUpperCase()} REEGLID\n\nSisu hetkel puudub.`;
}
const data = { title: undefined as string | undefined };
return (
<>
<h1
className={`not-prose ${vipnagorgialla.className} font-bold italic uppercase text-[64px] leading-[96px] tracking-[-0.02em] text-[#2A2C3F] dark:text-[#EEE5E5] mx-auto mt-16 mb-6 px-8`}
>
{data.title || `${slug.toUpperCase()} REEGLID`}
</h1>
<div
className={`mx-auto px-8 font-worksans
[&_ol]:ml-6
[&_ol_ol]:ml-10
[&_ol_ol_ol]:ml-14
[&_h2]:font-bold
`}
>
<ReactMarkdown>{file}</ReactMarkdown>
</div>
</>
);
}

View File

@@ -41,8 +41,9 @@ export default function Tourney() {
saavutatud kohale auhinnaks kas 600, 300 või 150.
</p>
<br />
<div className="flex flex-row flex-wrap gap-4 md:gap-8">
<Link href="/kodukord" target="_blank">
<div className={"flex flex-row flex-wrap gap-8"}>
<Link href="/reeglid/cs2" target="_blank">
<button
className={`px-4 py-2 bg-[#1F5673] cursor-pointer ${vipnagorgialla.className} font-bold italic`}
>
@@ -73,6 +74,7 @@ export default function Tourney() {
<SectionDivider />
{/* LoL turniir */}
<div className="grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-16 items-center mx-8 md:mx-16 lg:mx-32 xl:mx-48">
<div className="hidden md:block">
@@ -119,6 +121,8 @@ export default function Tourney() {
</button>
</a>
</div>
</div>
</div>