Last active
February 21, 2025 02:04
-
-
Save New-dev0/ae7b275609aa72ed0d0f34d9c32291fe to your computer and use it in GitHub Desktop.
P5 layout js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './globals.css'; | |
import { Geist, Geist_Mono } from 'next/font/google'; | |
import Script from 'next/script'; | |
const geistSans = Geist({ | |
variable: '--font-geist-sans', | |
subsets: ['latin'], | |
}); | |
const geistMono = Geist_Mono({ | |
variable: '--font-geist-mono', | |
subsets: ['latin'], | |
}); | |
export const metadata = { | |
title: "SwitchX", | |
description: "SwitchX is a cutting-edge full stack AI developer, transforming ideas into intelligent solutions with seamless integration and innovative technology.", | |
openGraph: { | |
title: 'SwitchX', | |
description: 'SwitchX is a cutting-edge full stack AI developer, transforming ideas into intelligent solutions with seamless integration and innovative technology.', | |
images: [{ | |
url: 'https://switchx.dev/landing.png', | |
width: 1200, | |
height: 630, | |
}], | |
}, | |
twitter: { | |
card: 'summary_large_image', | |
title: 'SwitchX', | |
description: 'SwitchX is a cutting-edge full stack AI developer, transforming ideas into intelligent solutions with seamless integration and innovative technology.', | |
images: ['https://switchx.dev/landing.png'], | |
} | |
}; | |
export default function RootLayout({ children }) { | |
return ( | |
<html lang="en"> | |
<head> | |
<Script | |
src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.min.js" | |
strategy="beforeInteractive" | |
/> | |
<Script | |
src="https://cdn.jsdelivr.net/npm/[email protected]/lib/addons/p5.sound.min.js" | |
strategy="beforeInteractive" | |
/> | |
<Script | |
src="https://cdn.jsdelivr.net/npm/p5.collide2d" | |
strategy="beforeInteractive" | |
/> | |
<Script src="/helpers.js" strategy="beforeInteractive" /> | |
<Script src="/objects.js" strategy="beforeInteractive" /> | |
<Script src="/sketch.js" strategy="beforeInteractive" /> | |
<Script | |
src="https://dev-api.switchx.dev/script.js" | |
strategy="afterInteractive" | |
/> | |
</head> | |
<body | |
className={`${geistSans.variable} ${geistMono.variable} antialiased`} | |
> | |
{children} | |
<Script | |
src="https://dev-api.switchx.dev/script.js" | |
strategy="afterInteractive" | |
/> | |
</body> | |
</html> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment