Spaces:
Running
Running
Upload index.html
Browse files- index.html +62 -2
index.html
CHANGED
|
@@ -350,13 +350,42 @@ small.muted{opacity:.7; display:block; margin-top:6px;}
|
|
| 350 |
.popup-limit-row input{width:100%;padding:8px;border-radius:8px;border:1px solid rgba(255,255,255,.18);background:#29293b;color:#fff}
|
| 351 |
.radio-status{font-size:12px;opacity:.82;margin-top:8px}
|
| 352 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 353 |
</style>
|
| 354 |
</head>
|
| 355 |
<body>
|
| 356 |
|
| 357 |
<div class="container">
|
| 358 |
<header>
|
| 359 |
-
<h1>الخط الزمني الروحي</h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 360 |
<p id="date-display">جاري تحميل التاريخ...</p>
|
| 361 |
<div id="moon-container"></div>
|
| 362 |
<div class="location-row">
|
|
@@ -811,6 +840,7 @@ function updateQiblaUI(){
|
|
| 811 |
qiblaAngleFromNorth = getQiblaDirection(currentLocation.lat, currentLocation.lng);
|
| 812 |
document.getElementById('qiblaAngleText').innerText = `زاوية القبلة: ${qiblaAngleFromNorth.toFixed(0)}° من الشمال`;
|
| 813 |
}
|
|
|
|
| 814 |
let deviceHeadingDeg = null;
|
| 815 |
let compassListenerInstalled = false;
|
| 816 |
|
|
@@ -1469,7 +1499,7 @@ function initApp(){
|
|
| 1469 |
setInterval(refreshEverything, 5*60*1000); // تحديث المواقيت والتنبيهات كل 5 دقائق
|
| 1470 |
}
|
| 1471 |
|
| 1472 |
-
window.addEventListener('DOMContentLoaded', ()=>{initApp();setTimeout(()=>loadIslamicRadios(false),800)});
|
| 1473 |
</script>
|
| 1474 |
|
| 1475 |
<script>
|
|
@@ -2544,6 +2574,36 @@ if ('serviceWorker' in navigator) {
|
|
| 2544 |
.catch(err => console.warn('Service Worker registration failed:', err));
|
| 2545 |
});
|
| 2546 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2547 |
</script>
|
| 2548 |
|
| 2549 |
</body>
|
|
|
|
| 350 |
.popup-limit-row input{width:100%;padding:8px;border-radius:8px;border:1px solid rgba(255,255,255,.18);background:#29293b;color:#fff}
|
| 351 |
.radio-status{font-size:12px;opacity:.82;margin-top:8px}
|
| 352 |
|
| 353 |
+
|
| 354 |
+
/* ===== FINAL always-horizontal timeline viewport ===== */
|
| 355 |
+
.timeline-periods{
|
| 356 |
+
display:flex!important; flex-wrap:nowrap!important; overflow-x:auto!important;
|
| 357 |
+
overflow-y:hidden!important; gap:10px!important; scroll-snap-type:x proximity;
|
| 358 |
+
-webkit-overflow-scrolling:touch; padding:4px 2px 10px;
|
| 359 |
+
}
|
| 360 |
+
.timeline-period{
|
| 361 |
+
flex:0 0 min(82vw,460px)!important; width:min(82vw,460px)!important;
|
| 362 |
+
min-width:min(82vw,460px)!important; scroll-snap-align:center; margin:0!important;
|
| 363 |
+
}
|
| 364 |
+
@media (min-width:700px){
|
| 365 |
+
.timeline-period{flex-basis:min(46vw,520px)!important;width:min(46vw,520px)!important;min-width:min(46vw,520px)!important}
|
| 366 |
+
}
|
| 367 |
+
/* cancel prior landscape grid compression */
|
| 368 |
+
@media (orientation:landscape) and (min-width:640px){
|
| 369 |
+
.container{display:block!important;max-width:1100px!important;width:100%!important;padding:10px!important}
|
| 370 |
+
.container>header,#smartTicker,.container>.timeline-v2{position:static!important;display:block!important;margin-top:initial!important}
|
| 371 |
+
.timeline-periods{display:flex!important;grid-template-columns:none!important}
|
| 372 |
+
.timeline-period{min-width:min(46vw,520px)!important}
|
| 373 |
+
}
|
| 374 |
+
/* stable astronomical simulation */
|
| 375 |
+
.direction-object{transition:transform .28s linear,left .28s linear,top .28s linear}
|
| 376 |
+
.date-dual{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;font-size:13px;opacity:.9;margin:4px 0 8px}
|
| 377 |
+
|
| 378 |
</style>
|
| 379 |
</head>
|
| 380 |
<body>
|
| 381 |
|
| 382 |
<div class="container">
|
| 383 |
<header>
|
| 384 |
+
<h1>الخط الزمني الروحي</h1><div class="date-dual" aria-live="polite">
|
| 385 |
+
<span id="gregorianDate" aria-label="التاريخ الميلادي"></span>
|
| 386 |
+
<span aria-hidden="true">•</span>
|
| 387 |
+
<span id="hijriDate" aria-label="التاريخ الهجري"></span>
|
| 388 |
+
</div>
|
| 389 |
<p id="date-display">جاري تحميل التاريخ...</p>
|
| 390 |
<div id="moon-container"></div>
|
| 391 |
<div class="location-row">
|
|
|
|
| 840 |
qiblaAngleFromNorth = getQiblaDirection(currentLocation.lat, currentLocation.lng);
|
| 841 |
document.getElementById('qiblaAngleText').innerText = `زاوية القبلة: ${qiblaAngleFromNorth.toFixed(0)}° من الشمال`;
|
| 842 |
}
|
| 843 |
+
let smoothedHeadingDeg=null;
|
| 844 |
let deviceHeadingDeg = null;
|
| 845 |
let compassListenerInstalled = false;
|
| 846 |
|
|
|
|
| 1499 |
setInterval(refreshEverything, 5*60*1000); // تحديث المواقيت والتنبيهات كل 5 دقائق
|
| 1500 |
}
|
| 1501 |
|
| 1502 |
+
window.addEventListener('DOMContentLoaded', ()=>{initApp();updateDualDate();auditSettingsAccessibility();setTimeout(()=>{loadIslamicRadios(false);auditSettingsAccessibility()},800);setInterval(updateDualDate,60000)});
|
| 1503 |
</script>
|
| 1504 |
|
| 1505 |
<script>
|
|
|
|
| 2574 |
.catch(err => console.warn('Service Worker registration failed:', err));
|
| 2575 |
});
|
| 2576 |
}
|
| 2577 |
+
|
| 2578 |
+
function auditSettingsAccessibility(){
|
| 2579 |
+
const root=document.getElementById('settingsModal')||document;
|
| 2580 |
+
root.querySelectorAll('input,select,textarea,button').forEach((el,i)=>{
|
| 2581 |
+
if(el.getAttribute('aria-label')||el.getAttribute('aria-labelledby'))return;
|
| 2582 |
+
let txt='';
|
| 2583 |
+
if(el.id){
|
| 2584 |
+
const lab=root.querySelector(`label[for="${CSS.escape(el.id)}"]`);
|
| 2585 |
+
if(lab)txt=lab.textContent.trim();
|
| 2586 |
+
}
|
| 2587 |
+
if(!txt){
|
| 2588 |
+
const lab=el.closest('label'); if(lab)txt=lab.textContent.trim();
|
| 2589 |
+
}
|
| 2590 |
+
if(!txt){
|
| 2591 |
+
const row=el.closest('.setting-row,.settings-row,.registry-setting-row,.toggle-row,.popup-limit-row');
|
| 2592 |
+
if(row)txt=(row.querySelector('label,.setting-label,strong,span')?.textContent||'').trim();
|
| 2593 |
+
}
|
| 2594 |
+
if(!txt && el.title)txt=el.title;
|
| 2595 |
+
if(txt)el.setAttribute('aria-label',txt.replace(/\s+/g,' ').slice(0,140));
|
| 2596 |
+
});
|
| 2597 |
+
}
|
| 2598 |
+
function updateDualDate(){
|
| 2599 |
+
const now=new Date(),g=document.getElementById('gregorianDate'),h=document.getElementById('hijriDate');
|
| 2600 |
+
try{
|
| 2601 |
+
const gs=new Intl.DateTimeFormat('ar-JO',{weekday:'long',year:'numeric',month:'long',day:'numeric',calendar:'gregory'}).format(now);
|
| 2602 |
+
const hs=new Intl.DateTimeFormat('ar-SA-u-ca-islamic',{year:'numeric',month:'long',day:'numeric'}).format(now);
|
| 2603 |
+
if(g){g.textContent=gs;g.setAttribute('aria-label','التاريخ الميلادي: '+gs)}
|
| 2604 |
+
if(h){h.textContent=hs;h.setAttribute('aria-label','التاريخ الهجري: '+hs)}
|
| 2605 |
+
}catch(e){}
|
| 2606 |
+
}
|
| 2607 |
</script>
|
| 2608 |
|
| 2609 |
</body>
|