feat: bind Landing Page explicitly to #landing route and dedicated Landing Page nav button

This commit is contained in:
Hamza-Ayed
2026-09-19 12:56:50 +03:00
parent e819186201
commit 82b1045f9c
3 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -58,7 +58,7 @@
<!-- Quick Navigation Links -->
<nav class="hidden md:flex items-center gap-2 bg-white/5 p-1 rounded-xl border border-white/10 text-xs">
<a href="/#portal" class="px-3 py-1.5 rounded-lg bg-blue-600 text-white font-bold transition">البوابة التعريفية ✨</a>
<a href="/#landing" class="px-3 py-1.5 rounded-lg bg-blue-600 text-white font-bold transition">Landing Page 🚀</a>
<a href="/#terrain3d" class="px-3 py-1.5 rounded-lg hover:bg-white/10 text-slate-300 font-medium transition">التضاريس 3D 🏔️</a>
<a href="/#map" class="px-3 py-1.5 rounded-lg hover:bg-white/10 text-slate-300 font-medium transition">الملاحة الشاملة 🗺️</a>
<a href="/#tactical" class="px-3 py-1.5 rounded-lg hover:bg-white/10 text-slate-300 font-medium transition">المنظومة التكتيكية 🎖️</a>
+9 -6
View File
@@ -25,7 +25,7 @@ try {
// Lightweight hash router with Sovereign Executive Styling
const NAV = [
{ hash: '#portal', label: 'البوابة التعريفية', icon: '✨' },
{ hash: '#landing', label: 'Landing Page (صفحة الهبوط)', icon: '🚀' },
{ hash: '#map', label: 'الخريطة والملاحة الشاملة', icon: '🗺️' },
{ hash: '#terrain3d', label: 'الخريطة ثلاثية الأبعاد والتضاريس', icon: '🏔️' },
{ hash: '#tourism', label: 'الخريطة السياحية والتراثية', icon: '🏛️' },
@@ -35,7 +35,7 @@ const NAV = [
]
function MasterHeader({ hash }: { hash: string }) {
const currentHash = hash || '#portal'
const currentHash = hash || '#map'
const [isFullscreen, setIsFullscreen] = useState(false);
const toggleFullscreen = () => {
@@ -258,13 +258,16 @@ class ErrorBoundary extends React.Component<{ children: React.ReactNode }, { has
function Root() {
const getInitialHash = () => {
const p = window.location.pathname.toLowerCase();
if (p.includes('landing')) {
return '#landing';
}
if (p.includes('tourism') || p.includes('heritage') || p.includes('tourist') || window.location.href.includes('سياح')) {
return '#tourism';
}
if (p.includes('tactical') || p.includes('military')) {
return '#tactical';
}
return window.location.hash || '#portal';
return window.location.hash || '#map';
};
const [hash, setHash] = useState(getInitialHash);
@@ -281,14 +284,14 @@ function Root() {
return () => window.removeEventListener('hashchange', on);
}, []);
const isPortal = hash === '#portal' || hash === '#landing' || hash === '#home' || !hash;
const isLanding = hash === '#landing' || hash === '#portal' || window.location.pathname.toLowerCase().includes('landing');
const isTourism = hash === '#tourism' || hash === '#heritage' || hash === '#tourist';
const isTactical = hash === '#tactical' || hash === '#military' || hash === '#siro';
const isTerrain3D = hash === '#terrain3d' || hash === '#3d' || hash === '#terrain';
const isExecutive = hash === '#showcase' || hash === '#pitch';
const isCompare = hash === '#compare';
const isReview = hash === '#review';
const isMap = hash === '#map';
const isMap = hash === '#map' || (!isLanding && !isTourism && !isTactical && !isTerrain3D && !isExecutive && !isCompare && !isReview);
return (
<ErrorBoundary>
@@ -304,7 +307,7 @@ function Root() {
height: 'calc(100vh - 52px)',
overflow: 'hidden'
}}>
{isPortal && (
{isLanding && (
<div style={{ width: '100%', height: '100%', overflowY: 'auto' }}>
<LandingPage />
</div>
+1 -1
View File
@@ -58,7 +58,7 @@
<!-- Quick Navigation Links -->
<nav class="hidden md:flex items-center gap-2 bg-white/5 p-1 rounded-xl border border-white/10 text-xs">
<a href="/#portal" class="px-3 py-1.5 rounded-lg bg-blue-600 text-white font-bold transition">البوابة التعريفية ✨</a>
<a href="/#landing" class="px-3 py-1.5 rounded-lg bg-blue-600 text-white font-bold transition">Landing Page 🚀</a>
<a href="/#terrain3d" class="px-3 py-1.5 rounded-lg hover:bg-white/10 text-slate-300 font-medium transition">التضاريس 3D 🏔️</a>
<a href="/#map" class="px-3 py-1.5 rounded-lg hover:bg-white/10 text-slate-300 font-medium transition">الملاحة الشاملة 🗺️</a>
<a href="/#tactical" class="px-3 py-1.5 rounded-lg hover:bg-white/10 text-slate-300 font-medium transition">المنظومة التكتيكية 🎖️</a>