|
| 1 | +import type { Metadata } from "next"; |
| 2 | +import { Outfit, Space_Grotesk } from "next/font/google"; |
| 3 | +import "./meme.css"; |
| 4 | + |
| 5 | +import Script from "next/script"; |
| 6 | + |
| 7 | + |
| 8 | +const outfit = Outfit({ |
| 9 | + subsets: ["latin"], |
| 10 | + variable: "--font-outfit", |
| 11 | + display: "swap", |
| 12 | + weight: ["100", "200", "300", "400", "500", "600", "700", "800", "900"], |
| 13 | +}); |
| 14 | + |
| 15 | +const spaceGrotesk = Space_Grotesk({ |
| 16 | + subsets: ["latin"], |
| 17 | + variable: "--font-space-grotesk", |
| 18 | + display: "swap", |
| 19 | + weight: ["300", "400", "500", "600", "700"], |
| 20 | +}); |
| 21 | + |
| 22 | +export const metadata: Metadata = { |
| 23 | + title: "Devb.io - Effortless Portfolios for Developers", |
| 24 | + description: "Effortless Portfolios for Developers", |
| 25 | +}; |
| 26 | + |
| 27 | +export default function RootLayout({ |
| 28 | + children, |
| 29 | +}: Readonly<{ |
| 30 | + children: React.ReactNode; |
| 31 | +}>) { |
| 32 | + return ( |
| 33 | + <html lang="en"> |
| 34 | + <head> |
| 35 | + <script type="text/javascript"></script> |
| 36 | + <script |
| 37 | + data-name="BMC-Widget" |
| 38 | + data-cfasync="false" |
| 39 | + src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js" |
| 40 | + data-id="sunithvs" |
| 41 | + data-description="Support me on Buy me a coffee!" |
| 42 | + data-color="#B9FF66" |
| 43 | + data-position="Right" |
| 44 | + data-x_margin="18" |
| 45 | + data-y_margin="18" |
| 46 | + defer |
| 47 | + /> |
| 48 | + <Script id="clarity-script" strategy="afterInteractive"> |
| 49 | + {` |
| 50 | + (function(c,l,a,r,i,t,y){ |
| 51 | + c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; |
| 52 | + t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; |
| 53 | + y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); |
| 54 | + })(window, document, "clarity", "script", "${process.env.NEXT_PUBLIC_CLARITY_ID}"); |
| 55 | + `} |
| 56 | + </Script> |
| 57 | + {/* Google Analytics */} |
| 58 | + <Script |
| 59 | + src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID}`} |
| 60 | + strategy="afterInteractive" |
| 61 | + /> |
| 62 | + <Script id="google-analytics" strategy="afterInteractive"> |
| 63 | + {` |
| 64 | + window.dataLayer = window.dataLayer || []; |
| 65 | + function gtag(){dataLayer.push(arguments);} |
| 66 | + gtag('js', new Date()); |
| 67 | + gtag('config', '${process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID}'); |
| 68 | + `} |
| 69 | + </Script> |
| 70 | + </head> |
| 71 | + <body |
| 72 | + className={`${outfit.variable} ${spaceGrotesk.variable} font-outfit `} |
| 73 | + > |
| 74 | + |
| 75 | + |
| 76 | + {children} |
| 77 | + |
| 78 | + </body> |
| 79 | + </html> |
| 80 | + ); |
| 81 | +} |
0 commit comments