4a673ebb28
Adds basePath config, withBase/appUrl helpers, base-path-aware cookies, OAuth redirects, manifest, service worker and cron runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
43 lines
1.6 KiB
TypeScript
43 lines
1.6 KiB
TypeScript
import { withBase } from "@/lib/base-path";
|
|
import type { Metadata, Viewport } from "next";
|
|
import localFont from "next/font/local";
|
|
import { ServiceWorker } from "@/components/ServiceWorker";
|
|
import "./globals.css";
|
|
|
|
// Self-hosted (not next/font/google): the Coolify build server has no egress
|
|
// to fonts.googleapis.com, which crashed `npm run build` there.
|
|
const anuphan = localFont({
|
|
src: "./fonts/Anuphan-Variable.ttf",
|
|
weight: "100 700",
|
|
variable: "--font-anuphan",
|
|
display: "swap",
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: { default: "ระบบจัดการเพจ", template: "%s · จัดการเพจ" },
|
|
description: "วางแผน อนุมัติ และเผยแพร่โพสต์ของเพจ Facebook และ Instagram ในพื้นที่ทำงานเดียว",
|
|
applicationName: "จัดการเพจ",
|
|
appleWebApp: { capable: true, title: "จัดการเพจ", statusBarStyle: "default" },
|
|
icons: { icon: withBase("/icons/192"), apple: withBase("/icons/apple") },
|
|
formatDetection: { telephone: false },
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
viewportFit: "cover",
|
|
themeColor: "#e0f2fe",
|
|
};
|
|
|
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<html lang="th" className={anuphan.variable}>
|
|
{/* Browser extensions (e.g. Grammarly) inject attributes on <body> before hydration. */}
|
|
<body suppressHydrationWarning>
|
|
{children}
|
|
<ServiceWorker />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|