mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
feat(www): content changes
This commit is contained in:
parent
98fb8cb2fd
commit
337950bcdb
8 changed files with 70 additions and 14 deletions
|
|
@ -46,11 +46,28 @@ export async function generateMetadata({
|
|||
};
|
||||
}
|
||||
|
||||
const baseUrl =
|
||||
process.env.NEXT_PUBLIC_BASE_URL ||
|
||||
(process.env.VERCEL_URL
|
||||
? `https://${process.env.VERCEL_URL}`
|
||||
: "http://localhost:3000");
|
||||
// Get baseUrl - use NEXT_PUBLIC_APP_URL if set, otherwise construct from VERCEL_URL
|
||||
// Restrict to allowed hosts: localhost:3000, archgw-tau.vercel.app, or plano.katanemo.com
|
||||
let baseUrl = "http://localhost:3000";
|
||||
|
||||
if (process.env.NEXT_PUBLIC_APP_URL) {
|
||||
const url = process.env.NEXT_PUBLIC_APP_URL;
|
||||
if (
|
||||
url.includes("archgw-tau.vercel.app") ||
|
||||
url.includes("plano.katanemo.com") ||
|
||||
url.includes("localhost:3000")
|
||||
) {
|
||||
baseUrl = url;
|
||||
}
|
||||
} else if (process.env.VERCEL_URL) {
|
||||
const hostname = process.env.VERCEL_URL;
|
||||
// VERCEL_URL is just the hostname, not the full URL
|
||||
if (hostname === "archgw-tau.vercel.app") {
|
||||
baseUrl = `https://${hostname}`;
|
||||
} else if (hostname === "plano.katanemo.com") {
|
||||
baseUrl = `https://${hostname}`;
|
||||
}
|
||||
}
|
||||
|
||||
const ogImageUrl = `${baseUrl}/api/og/${resolvedParams.slug}`;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { Metadata } from "next";
|
||||
import "@katanemo/shared-styles/globals.css";
|
||||
import { Analytics } from "@vercel/analytics/next";
|
||||
import { Navbar, Footer } from "@katanemo/ui";
|
||||
import { ConditionalLayout } from "@/components/ConditionalLayout";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Plano - The AI-native network for agents",
|
||||
|
|
@ -17,11 +17,7 @@ export default function RootLayout({
|
|||
return (
|
||||
<html lang="en">
|
||||
<body className="antialiased">
|
||||
<div className="min-h-screen">
|
||||
<Navbar />
|
||||
<main className="pt-20">{children}</main>
|
||||
<Footer />
|
||||
</div>
|
||||
<ConditionalLayout>{children}</ConditionalLayout>
|
||||
<Analytics />
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
12
apps/www/src/app/studio/layout.tsx
Normal file
12
apps/www/src/app/studio/layout.tsx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
export default function StudioLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<div className="fixed inset-0 h-screen w-screen overflow-hidden">
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
26
apps/www/src/components/ConditionalLayout.tsx
Normal file
26
apps/www/src/components/ConditionalLayout.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"use client";
|
||||
|
||||
import { usePathname } from "next/navigation";
|
||||
import { Navbar, Footer } from "@katanemo/ui";
|
||||
|
||||
export function ConditionalLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const pathname = usePathname();
|
||||
const isStudio = pathname?.startsWith("/studio");
|
||||
|
||||
if (isStudio) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen">
|
||||
<Navbar />
|
||||
<main className="pt-20">{children}</main>
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -19,8 +19,8 @@ const customerLogos = [
|
|||
src: "/logos/sandisk.svg",
|
||||
},
|
||||
{
|
||||
name: "Oracle",
|
||||
src: "/logos/oracle.svg",
|
||||
name: "HP",
|
||||
src: "/logos/hp.svg",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue