|
1 | | -"use client"; |
2 | 1 |
|
3 | 2 | import type { Metadata } from "next"; |
4 | | -import { Inter } from "next/font/google"; |
5 | 3 | import "./globals.css"; |
6 | | -import Titlebar from "./components/layout/titlebar"; |
7 | | -import { MCDUContextProvider } from "./context/mcduContext"; |
8 | | -import { useEffect, useState } from "react"; |
9 | | -import Footer from "./components/layout/footer"; |
10 | | -import { SimbriefContextProvider } from "./context/simbriefContext"; |
11 | | -import Link from "next/link"; |
12 | | -import { IoMdSettings } from "react-icons/io"; |
| 4 | +import Layout from "./components/layout/layout"; |
| 5 | +import type { Viewport } from 'next' |
13 | 6 |
|
14 | | -const inter = Inter({ subsets: ["latin"] }); |
15 | 7 |
|
16 | | -interface WindowProps extends Window { |
17 | | - __TAURI__?: boolean; |
| 8 | +export const viewport: Viewport = { |
| 9 | + colorScheme: 'dark', |
18 | 10 | } |
19 | | -declare const window: WindowProps; |
20 | 11 |
|
| 12 | +export const metadata: Metadata = { |
| 13 | + metadataBase: new URL("https://flightmetrics.vercel.app/"), |
| 14 | + title: "FlightMetrics - Your performance calculator", |
| 15 | + description: |
| 16 | + "TODO: Add description", |
| 17 | + generator: "Next.js", |
| 18 | + applicationName: "FlightMetrics", |
| 19 | + keywords: [ |
| 20 | + "FlightMetrics", |
| 21 | + "FlightMetrics" |
| 22 | + ], |
| 23 | + openGraph: { |
| 24 | + title: "FlightMetrics - Your performance calculator", |
| 25 | + description: |
| 26 | + "TODO: Add description", |
| 27 | + url: "https://flightmetrics.vercel.app/", |
| 28 | + siteName: "FlightMetrics", |
| 29 | + images: [ |
| 30 | + { |
| 31 | + url: "./public/metadata.jpg", |
| 32 | + width: 1200, |
| 33 | + height: 630, |
| 34 | + alt: "FlightMetrics - Your performance calculator", |
| 35 | + }, |
| 36 | + ], |
| 37 | + locale: "en-US", |
| 38 | + type: "website", |
| 39 | + }, |
| 40 | + twitter: { |
| 41 | + card: "summary_large_image", |
| 42 | + title: "FlightMetrics - Your performance calculator", |
| 43 | + description: |
| 44 | + "TODO : Add description", |
| 45 | + creator: "ZeroxyDev", |
| 46 | + creatorId: "0000000000", |
| 47 | + images: ["./public/metadata.jpg"], |
| 48 | + }, |
| 49 | + robots: { |
| 50 | + index: true, |
| 51 | + follow: true, |
| 52 | + nocache: false, |
| 53 | + googleBot: { |
| 54 | + index: true, |
| 55 | + follow: false, |
| 56 | + noimageindex: true, |
| 57 | + "max-video-preview": -1, |
| 58 | + "max-image-preview": "large", |
| 59 | + "max-snippet": -1, |
| 60 | + }, |
| 61 | + }, |
| 62 | + category: "service", |
| 63 | +}; |
21 | 64 |
|
22 | 65 | export default function RootLayout({ |
23 | 66 | children, |
24 | 67 | }: Readonly<{ |
25 | 68 | children: React.ReactNode; |
26 | 69 | }>) { |
27 | | - |
28 | | - const [isTauri, setIsTauri] = useState<boolean>(false); |
29 | | - |
30 | | - useEffect(() => { |
31 | | - document.addEventListener('contextmenu', event => event.preventDefault()); |
32 | | - |
33 | | - if (window?.__TAURI__) { |
34 | | - console.log('Tauri detected'); |
35 | | - setIsTauri(true); |
36 | | - } |
37 | | - }, []); |
| 70 | + |
38 | 71 |
|
39 | 72 | return ( |
40 | 73 | <html lang="en"> |
41 | | - <body className={`rounded-[40px] m-0 ${isTauri ? 'bg-transparent' : 'bg-[#000000] bg-[radial-gradient(#ffffff33_1px,#ffffff10_1px)] bg-[size:20px_20px]'} overflow-hidden`}> |
42 | | - <div style={{ height: isTauri ? '700px' : '100vh' }} className={`bg-[#000000] bg-[radial-gradient(#ffffff20_1px,#ffffff10_1px)] bg-[size:20px_20px] w-full ${isTauri ? 'h-[600px]' : 'h-screen'} flex justify-center items-center bordernone border-tertiary rounded-big`}> |
43 | | - {isTauri && <div className='h-12 mb-8 block z-20'><Titlebar /></div>} |
44 | | - {!isTauri &&<Link href={"/settings"} className="inline-flex z-50 fixed top-[20px] right-[20px] justify-center items-center w-[30px] h-[30px] cursor-pointer text-primary"><IoMdSettings/></Link>} |
45 | | - <div className='w-full z-10 flex justify-center items-center h-full '> |
46 | | - <SimbriefContextProvider> |
47 | | - <MCDUContextProvider> |
| 74 | + <body className="bg-transparent"> |
| 75 | + <Layout> |
48 | 76 | {children} |
49 | | - </MCDUContextProvider> |
50 | | - </SimbriefContextProvider> |
51 | | - </div> |
52 | | - {isTauri && <Footer/>} |
53 | | - </div> |
| 77 | + </Layout> |
54 | 78 | </body> |
55 | 79 | </html> |
56 | 80 | ); |
|
0 commit comments