update laye out and update home page also create footer page

This commit is contained in:
m7amedez5511
2026-07-08 17:49:08 +03:00
parent c814c5b97c
commit 5707521b92
15 changed files with 182 additions and 84 deletions

View File

@@ -1,29 +1,9 @@
import type { Metadata } from "next";
import "@tabler/icons-webfont/dist/tabler-icons.min.css";
import "./globals.css";
import ConditionalNavbar from "./components/layout/ConditionalNavbar";
/**
* 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.
*/
import { Footer } from "./components/layout";
export const metadata: Metadata = {
title: "لوحة التحكم",
@@ -36,8 +16,14 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
// ⚠️ اتصلح: الـ Navbar والـ footer كانوا برة <html>/<body> وده HTML غير صالح
<html lang="ar" dir="rtl">
<body className="app-shell">{children}</body>
<body className="app-shell">
{/* الناف بار بيظهر بس لو مفيش يوزر مسجل دخول */}
<ConditionalNavbar />
{children}
<Footer />
</body>
</html>
);
}