Spaces:
Paused
Paused
File size: 9,292 Bytes
72790d4 d3e44c7 d8804ab 72790d4 d8804ab 587459d bd47f11 72790d4 d3e44c7 72790d4 d8804ab 587459d d8804ab d3e44c7 72790d4 d3e44c7 d3bcad8 d3e44c7 587459d d3e44c7 587459d d3e44c7 587459d d8804ab d3bcad8 d3e44c7 d8804ab d3bcad8 d8804ab d3bcad8 d3e44c7 d8804ab 72790d4 d8804ab 587459d d8804ab bd47f11 72790d4 bd47f11 d3e44c7 bd47f11 d3e44c7 bd47f11 72790d4 d3e44c7 2cf1dfe d8804ab 587459d d8804ab 2cf1dfe d3e44c7 2cf1dfe 587459d d3e44c7 587459d d3e44c7 587459d d8804ab 72790d4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | import type { Metadata } from "next";
import {
Geist_Mono,
Geist,
Instrument_Serif,
IBM_Plex_Sans_Arabic,
} from "next/font/google";
import localFont from "next/font/local";
import "./globals.css";
import { Header } from "@/components/header";
import { Footer } from "@/components/footer";
import { cn } from "@/lib/utils";
import { ThemeProvider } from "@/components/theme-provider";
import Script from "next/script";
import { cookies, headers } from "next/headers";
const geist = Geist({ subsets: ["latin"], variable: "--font-sans" });
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
const instrumentSerif = Instrument_Serif({
variable: "--font-display",
subsets: ["latin"],
weight: "400",
});
const ibmPlexArabic = IBM_Plex_Sans_Arabic({
variable: "--font-arabic",
subsets: ["arabic"],
weight: ["300", "400", "500", "600", "700"],
});
const fastHand = localFont({
src: "./fonts/FastHand.otf",
variable: "--font-fast-hand",
});
const SITE_URL = (
process.env.NEXT_PUBLIC_SITE_URL ??
"https://darkslategrey-nightingale-132659.hostingersite.com"
).replace(/\/$/, "");
export const metadata: Metadata = {
metadataBase: new URL(SITE_URL),
title: "HUBAPI — Pre-Launch Marketing Showcase & Waitlist",
description:
"One planned gateway for multiple LLM providers. Access leading AI models through a unified API layer.",
alternates: {
canonical: SITE_URL,
languages: {
en: `${SITE_URL}/?lang=en`,
ar: `${SITE_URL}/?lang=ar`,
},
},
openGraph: {
title: "HUBAPI — Pre-Launch Marketing Showcase",
description:
"One planned gateway for multiple LLM providers. Standard REST API, multi-model access, unified billing, and a developer-first dashboard.",
url: SITE_URL,
siteName: "HUBAPI",
images: [
{
url: "/og-image.png",
width: 1200,
height: 630,
alt: "HUBAPI — Pre-Launch Marketing Showcase",
},
],
type: "website",
},
twitter: {
card: "summary_large_image",
title: "HUBAPI — Pre-Launch Marketing Showcase",
description:
"One planned gateway for multiple LLM providers. Standard REST API, multi-model access, unified billing, and a developer-first dashboard.",
images: ["/og-image.png"],
},
};
import { SplitFlapAudioProvider } from "@/components/ui/split-flap-text";
import { WaitlistSocialProofTicker } from "@/components/WaitlistSocialProofTicker";
import { LanguageProvider } from "@/components/LanguageContext";
import { SkipToContent } from "@/components/SkipToContent";
export default async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const cookieStore = await cookies();
const langCookie = cookieStore.get("hubapi_lang")?.value;
let lang = "en";
if (langCookie === "ar" || langCookie === "en") {
lang = langCookie;
} else {
const headersList = await headers();
const acceptLanguage = headersList.get("accept-language") || "";
if (acceptLanguage.toLowerCase().includes("ar")) {
lang = "ar";
}
}
const dir = lang === "ar" ? "rtl" : "ltr";
return (
<html
lang={lang}
dir={dir}
className={cn("font-sans", geist.variable)}
suppressHydrationWarning
>
<head>
{/* Google Tag Manager */}
<Script
id="gtm-head"
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-WHZJJT9H');`,
}}
/>
</Script>
</>
)}
<SkipToContent />
<Header />
{children}
<Footer />
<WaitlistSocialProofTicker />
</SplitFlapAudioProvider>
</ThemeProvider>
</LanguageProvider>
</body>
</html>
);
}
|