feat: Added viewer
This commit is contained in:
81
viewer/app/layout.tsx
Normal file
81
viewer/app/layout.tsx
Normal file
@@ -0,0 +1,81 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
|
||||
import { AlertTriangle, InfoIcon, Menu } from 'lucide-react';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
|
||||
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
variable: "--font-geist-mono",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Mimořádný rozvrh SPŠE Ječná",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<div className="flex flex-col min-h-screen">
|
||||
<header className="sticky top-0 z-20 flex items-center justify-between px-4 py-3 border-b bg-background">
|
||||
<div className="flex items-center gap-3">
|
||||
<Button variant="ghost" size="icon" className="md:hidden">
|
||||
<Menu className="h-5 w-5" />
|
||||
</Button>
|
||||
<h1 className="text-lg font-semibold">
|
||||
Mimořádný rozvrh
|
||||
</h1>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Button variant="ghost" size="icon" title="Nahlásit chybu">
|
||||
<AlertTriangle className="h-5 w-5 text-amber-500" />
|
||||
<span className="sr-only">Nahlásit chybu</span>
|
||||
</Button>
|
||||
</div>
|
||||
</header>
|
||||
<div className="w-full flex justify-center pt-8">
|
||||
<Alert className="max-w-100">
|
||||
<InfoIcon />
|
||||
<AlertTitle>Pozor!</AlertTitle>
|
||||
<AlertDescription>
|
||||
Tento web není oficiální a není jakkoliv spojen se SPŠE Ječná.
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
</div>
|
||||
{children}
|
||||
<footer className="text-center text-xs text-white/70 pb-4">
|
||||
© 2026{" "}
|
||||
<a href="https://jzitnik.dev" target="_blank" className="underline hover:text-white/90">Jakub Žitník</a>{" "}
|
||||
•{" "}
|
||||
<a href="https://www.gnu.org/licenses/gpl-3.0.html" target="_blank" className="underline hover:text-white/90">Licencováno pod GNU GPL v3.0</a>
|
||||
</footer>
|
||||
</div>
|
||||
<Toaster />
|
||||
</ThemeProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user