function showError(error) {
switch(error.code) {
case error.PERMISSION_DENIED:
alert('تم رفض طلب تحديد الموقع الجغرافي.');
break;
case error.POSITION_UNAVAILABLE:
alert('معلومات الموقع غير متوفرة.');
break;
case error.TIMEOUT:
alert('انتهت مهلة تحديد الموقع.');
break;
case error.UNKNOWN_ERROR:
alert('حدث خطأ غير معروف.');
break;
}
}
``<!DOCTYPE html>
تطبيق إسلامي
أوقات الصلاة
أذكار الصباح والمساء
أذكار الصباح
اللّهـمَّ أَنْتَ رَبِّـي، لا إلهَ إلاّ أَنْتَ، خَلَقْتَنـي وَأَنا عَبْـدُك...
أذكار المساء
اللّهـمَّ أَنْتَ رَبِّـي، لا إلهَ إلاّ أَنْتَ، خَلَقْتَنـي وَأَنا عَبْـدُك...
القرآن والأدعية
body { font-family: Arial, sans-serif; direction: rtl; text-align: center; background-color: #f4f4f4; color: #333; margin: 0; padding-top: 60px; / Space for fixed header / }
header { background-color: #4caf50; color: white; padding: 1em 0; position: fixed; width: 100%; top: 0; left: 0; z-index: 1000; }
section { margin: 2em 0; padding: 0 1em; }
h1, h2, h3 { margin: 0.5em 0; }
ul { list-style: none; padding: 0; }
li { background-color: white; margin: 0.5em 0; padding: 0.5em; border-radius: 5px; box-shadow: 0 0 5px rgba(0,0,0,0.1); transition: background-color 0.3s; }
li:hover { background-color: #e0f7fa; }
li a { text-decoration: none; color: #333; }
footer { background-color: #333; color: white; padding: 1em 0; position: fixed; width: 100%; bottom: 0; } document.addEventListener('DOMContentLoaded', function() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPrayerTimes, showError); } else { alert('تحديد الموقع الجغرافي غير مدعوم في هذا المتصفح.'); } });
function showPrayerTimes(position) { const latitude = position.coords.latitude; const longitude = position.coords.longitude;
}
function showError(error) { switch(error.code) { case error.PERMISSION_DENIED: alert('تم رفض طلب تحديد الموقع الجغرافي.'); break; case error.POSITION_UNAVAILABLE: alert('معلومات الموقع غير متوفرة.'); break; case error.TIMEOUT: alert('انتهت مهلة تحديد الموقع.'); break; case error.UNKNOWN_ERROR: alert('حدث خطأ غير معروف.'); break; } }