feat(weather): add real-time animated cloud and precipitation radar layer, integrate early warning badges, refine showcase text, and remove floating CTA button

This commit is contained in:
Hamza-Ayed
2026-08-19 16:14:33 +03:00
parent 470d6d959d
commit 3d13d31101
5 changed files with 925 additions and 1023 deletions
+13 -13
View File
@@ -24,7 +24,7 @@ const NAV = [
]
function ViewNav({ hash }: { hash: string }) {
const currentHash = hash || '#tactical'
const currentHash = hash || '#executive'
return (
<div style={{
position: 'fixed',
@@ -35,10 +35,10 @@ function ViewNav({ hash }: { hash: string }) {
display: 'flex',
alignItems: 'center',
gap: 4,
background: 'rgba(15, 23, 42, 0.92)',
background: 'rgba(255, 255, 255, 0.88)',
backdropFilter: 'blur(20px)',
border: '1px solid rgba(255, 255, 255, 0.18)',
boxShadow: '0 8px 32px rgba(0, 0, 0, 0.55)',
border: '1px solid rgba(0, 0, 0, 0.1)',
boxShadow: '0 4px 20px rgba(0, 0, 0, 0.08)',
borderRadius: 999,
padding: '4px 6px',
fontFamily: "'IBM Plex Sans Arabic', Inter, system-ui, sans-serif",
@@ -54,9 +54,9 @@ function ViewNav({ hash }: { hash: string }) {
textDecoration: 'none',
fontSize: 12,
fontWeight: 700,
color: active ? '#fff' : '#94a3b8',
background: active ? 'linear-gradient(135deg, #6366f1, #4f46e5)' : 'transparent',
boxShadow: active ? '0 2px 8px rgba(99, 102, 241, 0.4)' : 'none',
color: active ? '#fff' : '#64748b',
background: active ? 'linear-gradient(135deg, #0071e3, #4f46e5)' : 'transparent',
boxShadow: active ? '0 2px 8px rgba(0, 113, 227, 0.35)' : 'none',
padding: '6px 14px',
borderRadius: 999,
display: 'flex',
@@ -96,8 +96,8 @@ class ErrorBoundary extends React.Component<{ children: React.ReactNode }, { has
alignItems: 'center',
justifyContent: 'center',
height: '100vh',
background: '#0f172a',
color: '#fff',
background: '#f8fafc',
color: '#1d1d1f',
fontFamily: 'system-ui, sans-serif',
direction: 'rtl',
padding: 24,
@@ -105,14 +105,14 @@ class ErrorBoundary extends React.Component<{ children: React.ReactNode }, { has
}}>
<div style={{ fontSize: '3rem', marginBottom: 16 }}>⚠️</div>
<h2 style={{ fontSize: '1.4rem', fontWeight: 700, marginBottom: 8 }}>حدث خطأ أثناء تحميل الواجهة</h2>
<p style={{ color: '#94a3b8', fontSize: '0.9rem', maxWidth: 450, marginBottom: 20 }}>
<p style={{ color: '#64748b', fontSize: '0.9rem', maxWidth: 450, marginBottom: 20 }}>
{this.state.error?.message || 'تعذر تحميل أحد مكونات الخريطة'}
</p>
<button
onClick={() => { window.location.hash = '#map'; window.location.reload(); }}
style={{
padding: '10px 24px',
background: '#6366f1',
background: '#0071e3',
color: '#fff',
border: 'none',
borderRadius: 8,
@@ -131,11 +131,11 @@ class ErrorBoundary extends React.Component<{ children: React.ReactNode }, { has
}
function Root() {
const [hash, setHash] = useState(window.location.hash || '#tactical');
const [hash, setHash] = useState(window.location.hash || '#executive');
useEffect(() => {
const on = () => {
const h = window.location.hash || '#tactical';
const h = window.location.hash || '#executive';
setHash(h);
setTimeout(() => {
window.dispatchEvent(new Event('resize'));