/** * 0x1 Standard App - Root Layout * Using app directory structure with beautiful light & dark theme */ import { Header } from "../components/Header"; import "./globals.css"; export const metadata = { title: "0x1 Framework Standard App", description: "Discover the powerful features of 0x1 Framework: ultra-fast performance, TypeScript support, and modern development experience.", image: "/og-image.png", url: "/pages/features", type: "website", authors: [{ name: "0x1 Framework" }], creator: "0x1 Framework", publisher: "0x1 Framework", themeColor: "#7c3aed", colorScheme: "light dark", }; // Ensure our code is compatible with client-side execution let themeInitScript = ''; // Only execute this code on the client side if (typeof window !== 'undefined') { themeInitScript = ` (function() { try { const savedTheme = localStorage.getItem('0x1-dark-mode'); if (savedTheme) { document.documentElement.classList.toggle('dark', savedTheme === 'dark'); } else if (window.matchMedia('(prefers-color-scheme: dark)').matches) { document.documentElement.classList.add('dark'); } } catch (e) { console.error('Error setting initial theme:', e); } })(); `; } // Export RootLayout as a named export and default export for maximum compatibility export default function RootLayout({ children }: { children: any }) { return ( 0x1 Standard App {/* Script to handle initial theme setting */} {themeInitScript &&