Next.js (App Router) clone of negindentalclinic.ir, wired to the Meshkee Website API (blog, contact form, favicon), with on-page SEO and a scroll-reveal animation sequence on the homepage. See context.md for full project context. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
74 lines
2.5 KiB
JavaScript
74 lines
2.5 KiB
JavaScript
import { Cinzel, Vazirmatn } from "next/font/google";
|
|
import "./globals.css";
|
|
import Header from "@/components/Header";
|
|
import Footer from "@/components/Footer";
|
|
import { getFavicon } from "@/lib/meshkee";
|
|
|
|
const DEFAULT_ICON = "/assets/img/Header/header.png";
|
|
|
|
const vazirmatn = Vazirmatn({
|
|
subsets: ["arabic", "latin"],
|
|
weight: ["300", "400", "500", "700", "800"],
|
|
variable: "--font-vazirmatn",
|
|
display: "swap",
|
|
});
|
|
|
|
const cinzel = Cinzel({
|
|
subsets: ["latin"],
|
|
weight: ["400", "500", "600", "700"],
|
|
variable: "--font-cinzel",
|
|
display: "swap",
|
|
});
|
|
|
|
export async function generateMetadata() {
|
|
// "read favicon from backend, if not exist use default"
|
|
const favicon = await getFavicon();
|
|
const icon = favicon?.faviconUrl || DEFAULT_ICON;
|
|
|
|
return {
|
|
metadataBase: new URL("https://www.negindentalclinic.ir"),
|
|
title: {
|
|
default: "کلینیک دندانپزشکی نگین | Negin Dental Clinic",
|
|
template: "%s | کلینیک دندانپزشکی نگین",
|
|
},
|
|
description:
|
|
"کلینیک دندانپزشکی نگین در قم، ارائهدهنده کلیه خدمات دندانپزشکی از جمله ایمپلنت، ارتودنسی نامرئی (الاینر) و خدمات زیبایی توسط دندانپزشکان مجرب و متخصص.",
|
|
keywords: [
|
|
"کلینیک دندانپزشکی نگین",
|
|
"دندانپزشکی قم",
|
|
"ایمپلنت",
|
|
"ارتودنسی نامرئی",
|
|
"الاینر",
|
|
"دندانپزشک متخصص",
|
|
],
|
|
icons: {
|
|
icon,
|
|
},
|
|
openGraph: {
|
|
type: "website",
|
|
locale: "fa_IR",
|
|
siteName: "کلینیک دندانپزشکی نگین",
|
|
title: "کلینیک دندانپزشکی نگین | Negin Dental Clinic",
|
|
description:
|
|
"ارائه کلیه خدمات دندانپزشکی توسط دندانپزشکان مجرب و متخصصان عضو هیئت علمی دانشکده دندانپزشکی.",
|
|
},
|
|
};
|
|
}
|
|
|
|
export default function RootLayout({ children }) {
|
|
return (
|
|
<html lang="fa" dir="rtl" className={`${vazirmatn.variable} ${cinzel.variable}`}>
|
|
<body>
|
|
{/* If JS never runs (blocked/failed), the scroll-reveal sequence on
|
|
Home would otherwise leave content stuck at opacity:0 forever. */}
|
|
<noscript>
|
|
<style>{`.reveal { opacity: 1 !important; transform: none !important; }`}</style>
|
|
</noscript>
|
|
<Header />
|
|
<main>{children}</main>
|
|
<Footer />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|