Download src/app/layout.tsx from AnesKAM/gen: direct link, hf CLI and curl.
- Browser
- Download file 2.25 kB
-
https://huggingface.co/spaces/AnesKAM/gen/resolve/main/src/app/layout.tsx
- Command line
-
hf download hf://spaces/AnesKAM/gen/src/app/layout.tsx
-
curl -L -o layout.tsx https://huggingface.co/spaces/AnesKAM/gen/resolve/main/src/app/layout.tsx
2.25 kB
| import type { Metadata, Viewport } from "next"; | |
| import type { ReactNode } from "react"; | |
| import { ThemeProvider } from "@/components/ThemeProvider"; | |
| import { ToastProvider } from "@/components/Toast"; | |
| import "./globals.css"; | |
| export const metadata: Metadata = { | |
| title: { | |
| default: "Fox — Private Search Engine", | |
| template: "%s · Fox", | |
| }, | |
| description: | |
| "Fox is a fast, private search engine with live results from DuckDuckGo — All, Images, News and Videos tabs, saved results, collections and search history.", | |
| applicationName: "Fox Search", | |
| icons: { | |
| icon: [ | |
| { url: "/favicon.ico", sizes: "any" }, | |
| { url: "/icons/favicon-16x16.png", type: "image/png", sizes: "16x16" }, | |
| { url: "/icons/favicon-32x32.png", type: "image/png", sizes: "32x32" }, | |
| { url: "/icons/favicon-48x48.png", type: "image/png", sizes: "48x48" }, | |
| { url: "/icons/icon-192.png", type: "image/png", sizes: "192x192" }, | |
| { url: "/icons/icon-512.png", type: "image/png", sizes: "512x512" }, | |
| ], | |
| shortcut: ["/favicon.ico"], | |
| apple: [{ url: "/icons/apple-touch-icon.png", sizes: "180x180", type: "image/png" }], | |
| }, | |
| manifest: "/manifest.webmanifest", | |
| appleWebApp: { | |
| capable: true, | |
| title: "Fox Search", | |
| statusBarStyle: "black-translucent", | |
| }, | |
| }; | |
| export const viewport: Viewport = { | |
| themeColor: "#14161a", | |
| width: "device-width", | |
| initialScale: 1, | |
| }; | |
| const THEME_INIT_SCRIPT = `(function(){try{var t=localStorage.getItem('fox_theme');if(t==='light'||t==='dark'){document.documentElement.setAttribute('data-theme',t);}else{document.documentElement.setAttribute('data-theme','dark');}}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();`; | |
| export default function RootLayout({ children }: { children: ReactNode }) { | |
| return ( | |
| <html lang="en" data-theme="dark" suppressHydrationWarning> | |
| <head> | |
| <script dangerouslySetInnerHTML={{ __html: THEME_INIT_SCRIPT }} /> | |
| ); | |
| } | |