feat: add hidden /portal page for SinoCode iframe embedding

Full-screen landing page with glassmorphism cards linking to monitoring
(8018), docs (8017), and analytics (8019). Sidebar is conditionally
hidden on the portal route. Supports dark/light themes and i18n.
This commit is contained in:
2026-04-02 19:30:32 +08:00
parent 00e305241d
commit 1b5977a420
5 changed files with 605 additions and 2 deletions

View File

@@ -1,16 +1,26 @@
"use client";
import { type ReactNode } from "react";
import { usePathname } from "next/navigation";
import { I18nProvider } from "@/lib/i18n";
import { ThemeProvider } from "@/lib/theme";
import { Sidebar } from "@/components/Sidebar";
export function ClientProviders({ children }: { children: ReactNode }) {
const pathname = usePathname();
const isPortal = pathname === "/portal";
return (
<ThemeProvider>
<I18nProvider>
<Sidebar />
<main className="ml-[220px] min-h-screen p-6 lg:p-8">{children}</main>
{isPortal ? (
<>{children}</>
) : (
<>
<Sidebar />
<main className="ml-[220px] min-h-screen p-6 lg:p-8">{children}</main>
</>
)}
</I18nProvider>
</ThemeProvider>
);