Some checks failed
Build frontend / build (push) Has been cancelled
- Changed @font-face from font-display: swap to block (hides text until font loads) - Added preload links for 3 most used font weights (Regular, Bold, Medium) - Eliminates FOUC (Flash of Unstyled Content) where default font shows first
60 lines
1.5 KiB
JavaScript
60 lines
1.5 KiB
JavaScript
import { Geist, Geist_Mono } from "next/font/google";
|
|
import "./globals.css";
|
|
import ClientLayout from "./ClientLayout";
|
|
|
|
const geistSans = Geist({
|
|
variable: "--font-geist-sans",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: "--font-geist-mono",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
export const metadata = {
|
|
title: "Sweet Home",
|
|
description: "Discover premium furniture and home decor",
|
|
icons: {
|
|
icon: [{ url: "/logo.png", type: "image/png" }],
|
|
shortcut: [{ url: "/logo.png", type: "image/png" }],
|
|
apple: [{ url: "/logo.png", type: "image/png" }],
|
|
},
|
|
};
|
|
|
|
export default function Layout({ children }) {
|
|
return (
|
|
<html lang="ar" dir="rtl">
|
|
<head>
|
|
<link
|
|
rel="preload"
|
|
as="font"
|
|
href="/fonts/Madani-Arabic-Regular.ttf"
|
|
type="font/ttf"
|
|
crossOrigin="anonymous"
|
|
/>
|
|
<link
|
|
rel="preload"
|
|
as="font"
|
|
href="/fonts/Madani-Arabic-Bold.ttf"
|
|
type="font/ttf"
|
|
crossOrigin="anonymous"
|
|
/>
|
|
<link
|
|
rel="preload"
|
|
as="font"
|
|
href="/fonts/Madani Arabic Medium.ttf"
|
|
type="font/ttf"
|
|
crossOrigin="anonymous"
|
|
/>
|
|
</head>
|
|
<body
|
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
style={{ fontFamily: "'Madani Arabic', 'Noto Sans Arabic', 'Cairo', Arial, sans-serif" }}
|
|
>
|
|
<ClientLayout>{children}</ClientLayout>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|