Add Dockerfile, add raw view

This commit is contained in:
2025-12-21 13:27:12 +01:00
parent 9bb649c9e2
commit b1541f8777
35 changed files with 2811 additions and 78 deletions

View File

@ -0,0 +1,33 @@
"use client";
import { X } from "lucide-react";
import { useRouter } from "next/navigation";
import { useEffect } from "react";
type RawCloseButtonProps = {
targetHref: string;
};
export default function RawCloseButton({ targetHref }: RawCloseButtonProps) {
const router = useRouter();
useEffect(() => {
const handleEsc = (e: KeyboardEvent) => {
if (e.key === "Escape") {
router.push(targetHref);
}
};
window.addEventListener("keydown", handleEsc);
return () => window.removeEventListener("keydown", handleEsc);
}, [targetHref, router]);
return (
<button
onClick={() => router.push(targetHref)}
className="absolute top-4 right-4 z-50 rounded-md bg-background/80 p-2 hover:bg-background/60 transition"
title="Close full view (ESC)"
>
<X className="w-6 h-6" />
</button>
);
}