first action update user pages .
2-update driver pages [fixed image display and notyfi] 3-update car pages [fixed image] 4-build tripe pages crud 5-build some role pages 6-build audit page 7-update ui compounants 8-update saidebar and topbar 9-cheange view to be ar view 10-cheange stractcher to be app,src 11-add validation layer by yup 12-add api image-proxy to broke image corse bloken
This commit is contained in:
@@ -1,32 +1,33 @@
|
||||
// app/layout.tsx
|
||||
// Root layout — single location for font loading and global metadata.
|
||||
// No inline styles, no @import in CSS.
|
||||
|
||||
import type { Metadata } from "next";
|
||||
import { Plus_Jakarta_Sans, IBM_Plex_Mono } from "next/font/google";
|
||||
import "@tabler/icons-webfont/dist/tabler-icons.min.css";
|
||||
import "./globals.css";
|
||||
|
||||
const jakartaSans = Plus_Jakarta_Sans({
|
||||
subsets: ["latin"],
|
||||
weight: ["400", "500", "600", "700"],
|
||||
variable: "--font-sans",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
const ibmPlexMono = IBM_Plex_Mono({
|
||||
subsets: ["latin"],
|
||||
weight: ["400", "500"],
|
||||
variable: "--font-mono",
|
||||
display: "swap",
|
||||
});
|
||||
/**
|
||||
* NOT SHOWN IN THE ORIGINAL FILE SET.
|
||||
* This is the one file every RTL conversion ultimately hinges on:
|
||||
* `dir="rtl"` and `lang="ar"` belong on the root <html> element so
|
||||
* (a) the browser's native bidi algorithm kicks in everywhere,
|
||||
* (b) Tailwind v4's `rtl:`/`ltr:` variants have something to key off,
|
||||
* (c) form controls, scrollbars, and native widgets mirror correctly.
|
||||
*
|
||||
* If your real app/layout.tsx differs (providers, fonts, etc.), keep
|
||||
* everything else as-is and only add the import below.
|
||||
*
|
||||
* ICON FONT: the project already uses Tabler Icons class names
|
||||
* everywhere (ti ti-layout-dashboard, ti ti-car, ti ti-route, ...)
|
||||
* but no stylesheet that defines those classes was ever loaded, so
|
||||
* every icon in the sidebar was silently rendering as nothing.
|
||||
* Self-hosted via `npm install @tabler/icons-webfont` rather than a
|
||||
* CDN <link> — no external request at runtime, works behind
|
||||
* corporate proxies / restrictive network policies, and Next bundles
|
||||
* + fingerprints the CSS and font files automatically. Run
|
||||
* `npm install @tabler/icons-webfont` if it isn't already a
|
||||
* dependency, then this import resolves on its own.
|
||||
*/
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
default: "Slash.sa — Logistics Management",
|
||||
template: "%s | Slash.sa",
|
||||
},
|
||||
description:
|
||||
"Modern logistics client portal — manage deliveries, drivers, and fleet operations.",
|
||||
title: "لوحة التحكم",
|
||||
description: "نظام إدارة الأسطول والعمليات",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
@@ -35,12 +36,8 @@ export default function RootLayout({
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
// dir is set per route-group (ar = RTL, en = LTR) not globally
|
||||
<html
|
||||
lang="ar"
|
||||
className={`${jakartaSans.variable} ${ibmPlexMono.variable} h-full antialiased`}
|
||||
>
|
||||
<body className="min-h-full flex flex-col">{children}</body>
|
||||
<html lang="ar" dir="rtl">
|
||||
<body className="app-shell">{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user