first relase

This commit is contained in:
Lê đ tú 2025-10-17 11:11:14 +07:00
parent d3a42ba6e9
commit c6afce22ed
288 changed files with 55505 additions and 192 deletions

View file

@ -1,34 +1,82 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { TanstackQueryInitializer } from '@/context/query-client';
import cn from '@/utils/classnames';
import type { Viewport } from 'next';
import { ThemeProvider } from 'next-themes';
import { Instrument_Serif } from 'next/font/google';
import './styles/globals.css';
import './styles/markdown.scss';
import BrowserInitializer from '@/components/browser-initializer';
import RoutePrefixHandle from '@/components/routePrefixHandle';
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
export const viewport: Viewport = {
width: 'device-width',
initialScale: 1,
maximumScale: 1,
viewportFit: 'cover',
userScalable: false,
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const instrumentSerif = Instrument_Serif({
weight: ['400'],
style: ['normal', 'italic'],
subsets: ['latin'],
variable: '--font-instrument-serif',
});
const LocaleLayout = async ({ children }: { children: React.ReactNode }) => {
const locale = await getLocaleOnServer();
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
<html
lang={locale ?? 'en'}
className={cn('h-full', instrumentSerif.variable)}
suppressHydrationWarning
>
<head>
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#1C64F2" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-mobile-web-app-title" content="Dify" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/icon-192x192.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/icon-192x192.png"
/>
<meta name="msapplication-TileColor" content="#1C64F2" />
<meta name="msapplication-config" content="/browserconfig.xml" />
</head>
<body className="color-scheme h-full select-auto" {...datasetMap}>
<ThemeProvider
attribute="data-theme"
defaultTheme="system"
enableSystem
disableTransitionOnChange
enableColorScheme={false}
>
<BrowserInitializer>
<TanstackQueryInitializer>
<I18nServer>
<GlobalPublicStoreProvider>
{children}
</GlobalPublicStoreProvider>
</I18nServer>
</TanstackQueryInitializer>
</BrowserInitializer>
</ThemeProvider>
<RoutePrefixHandle />
</body>
</html>
);
}
};
export default LocaleLayout;