initial commit

This commit is contained in:
Ivan Rezchikov
2026-06-18 22:37:03 +03:00
parent d5d42a2141
commit 6c89f21039
30 changed files with 1506 additions and 95 deletions
+35
View File
@@ -0,0 +1,35 @@
import Image from "next/image";
import { Button } from "./ui/button";
import Link from "next/link";
export default function Footer() {
return (
<footer className="flex flex-col w-full px-16 py-8 gap-8 bg-muted">
<div className="flex items-center gap-4">
<Image
src="/emblem.png"
width={28}
height={28}
alt="Emblem of the European Federation"
/>
<h3>This is an official site of the European Federation</h3>
</div>
<div className="flex flex-row gap-32">
<div className="flex flex-col gap-2">
<Link href="/" className="text-black/60 cursor-pointer hover:underline underline-offset-8 decoration-2">Main</Link>
<Link href="/news" className="text-black/60 cursor-pointer hover:underline underline-offset-8 decoration-2">News</Link>
<Link href="/congress" className="text-black/60 cursor-pointer hover:underline underline-offset-8 decoration-2">The Congress</Link>
</div>
<div className="flex flex-col gap-2">
<Link href="/president" className="text-black/60 cursor-pointer hover:underline underline-offset-8 decoration-2">President</Link>
<Link href="/vice-president" className="text-black/60 cursor-pointer hover:underline underline-offset-8 decoration-2">Vice-President</Link>
<Link href="/government" className="text-black/60 cursor-pointer hover:underline underline-offset-8 decoration-2">Federal Government</Link>
</div>
<div className="flex flex-col gap-2">
<Link href="/regions" className="text-black/60 cursor-pointer hover:underline underline-offset-8 decoration-2">Regions</Link>
</div>
</div>
<p>© 2026 European Federation. All rights reserved.</p>
</footer>
)
}
+36
View File
@@ -0,0 +1,36 @@
import Image from "next/image";
import { Button } from "./ui/button";
import login from "@/app/actions/login";
import { getCurrentUser } from "@/lib/user";
export default async function Header() {
const user = await getCurrentUser();
return (
<header className="relative flex items-center justify-between w-full h-16 px-8 bg-gray-100">
<div />
<div className="absolute left-1/2 -translate-x-1/2 flex items-center gap-4">
<Image
src="/emblem.png"
width={28}
height={28}
alt="Emblem of the European Federation"
/>
<h3>European Federation</h3>
</div>
{
user ? (
<div className="flex items-center gap-4">
<span className="">
{user.firstName} {user.secondName}
</span>
</div>
) : (
<form action={login}>
<Button size="lg" type="submit">Sign in with Kotosoft ID</Button>
</form>
)
}
</header>
)
}
+49
View File
@@ -0,0 +1,49 @@
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { Slot } from "radix-ui"
import { cn } from "@/lib/utils"
const badgeVariants = cva(
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-2xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
secondary:
"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
destructive:
"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
outline:
"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
ghost:
"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
link: "text-primary underline-offset-4 hover:underline",
},
},
defaultVariants: {
variant: "default",
},
}
)
function Badge({
className,
variant = "default",
asChild = false,
...props
}: React.ComponentProps<"span"> &
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
const Comp = asChild ? Slot.Root : "span"
return (
<Comp
data-slot="badge"
data-variant={variant}
className={cn(badgeVariants({ variant }), className)}
{...props}
/>
)
}
export { Badge, badgeVariants }
+65
View File
@@ -0,0 +1,65 @@
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { Slot } from "radix-ui"
import { cn } from "@/lib/utils"
const buttonVariants = cva(
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-base font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/80",
outline:
"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent dark:hover:bg-input/30",
secondary:
"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
ghost:
"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
destructive:
"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
link: "text-primary underline-offset-4 hover:underline",
},
size: {
default:
"h-8 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",
xs: "h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",
sm: "h-7 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
lg: "h-9 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
icon: "size-8",
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
"icon-sm": "size-7",
"icon-lg": "size-9",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
}
)
function Button({
className,
variant = "default",
size = "default",
asChild = false,
...props
}: React.ComponentProps<"button"> &
VariantProps<typeof buttonVariants> & {
asChild?: boolean
}) {
const Comp = asChild ? Slot.Root : "button"
return (
<Comp
data-slot="button"
data-variant={variant}
data-size={size}
className={cn(buttonVariants({ variant, size, className }))}
{...props}
/>
)
}
export { Button, buttonVariants }