layout.tsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import type { Metadata } from "next";
  2. import { Inter } from "next/font/google";
  3. import "./globals.css";
  4. import { ThemeProvider } from "@/components/theme-provider";
  5. const inter = Inter({
  6. subsets: ["latin"],
  7. variable: "--font-sans",
  8. });
  9. export const metadata: Metadata = {
  10. title: "Stable Diffusion REST - Web UI",
  11. description: "Modern web interface for Stable Diffusion image generation",
  12. };
  13. export default function RootLayout({
  14. children,
  15. }: Readonly<{
  16. children: React.ReactNode;
  17. }>) {
  18. return (
  19. <html lang="en" suppressHydrationWarning>
  20. <head>
  21. {/* Load server configuration - this is dynamically generated by the server */}
  22. {/* Load synchronously to ensure config is available before React hydration */}
  23. <script src="/ui/config.js"></script>
  24. </head>
  25. <body className={`${inter.variable} font-sans antialiased`}>
  26. <ThemeProvider
  27. attribute="class"
  28. defaultTheme="system"
  29. enableSystem
  30. disableTransitionOnChange
  31. >
  32. {children}
  33. </ThemeProvider>
  34. </body>
  35. </html>
  36. );
  37. }