body {
font-family: 'Amiri', serif;
direction: rtl;
background-color: #f4f4f4;
padding: 20px;
text-align: center;
transition: background-color 0.3s, color 0.3s;
}
body.dark {
background-color: #121212;
color: #ffffff;
}
h1 {
color: #2c3e50;
}
body.dark h1 {
color: #f9f9f9;
}
.search-box {
margin: 20px auto;
}
.search-box input {
padding: 10px;
width: 60%;
border-radius: 5px;
border: 1px solid #ccc;
text-align: right;
}
.surah-list {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
}
.surah-button {
background-color: #fff;
border: 1px solid #ccc;
padding: 10px 15px;
border-radius: 5px;
cursor: pointer;
}
.surah-button:hover {
background-color: #e0e0e0;
}
.surah-content {
margin-top: 20px;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
body.dark .surah-content {
background: #1e1e1e;
}
.ayah {
margin: 10px 0;
cursor: pointer;
}
.ayah:hover {
background: #eee;
}
body.dark .ayah:hover {
background: #333;
}
.fav-list {
margin-top: 20px;
padding: 10px;
background: #ddf;
border-radius: 10px;
}
body.dark .fav-list {
background: #333366;
}
audio {
width: 100%;
margin-top: 10px;
}
.tafsir {
margin-top: 15px;
background: #eef;
padding: 10px;
border-radius: 5px;
text-align: right;
}
body.dark .tafsir {
background: #2a2a6a;
}
.toggle-dark {
position: absolute;
left: 20px;
top: 20px;
padding: 5px 10px;
cursor: pointer;
background: #ddd;
border: none;
border-radius: 5px;
}
التفسير:
الجلالين
السعدي
الترجمة:
بدون ترجمة
Sahih International
Yusuf Ali
${tafsirData.data.text || 'غير متوفر'}`; } catch { tafsirBox.innerHTML = 'التفسير:
حدث خطأ.'; } if (translationChoice) { try { const transRes = await fetch(`https://api.alquran.cloud/v1/ayah/${ayah.number}/${translationChoice}`); const transData = await transRes.json(); tafsirBox.innerHTML += `
الترجمة:
${transData.data.text || 'غير متوفرة'}`; } catch { tafsirBox.innerHTML += `
الترجمة:
فشل في جلب الترجمة.`; } } } function searchAyat() { const query = document.getElementById('searchInput').value.trim(); const surahContent = document.getElementById('surahContent'); if (query.length < 2) return; surahContent.innerHTML = ``; let found = false; surahsData.forEach(surah => { surah.ayahs.forEach(ayah => { if ( ayah.text.includes(query) || surah.name.includes(query) || ayah.numberInSurah.toString() === query ) { const p = document.createElement('p'); p.className = 'ayah'; p.textContent = `${ayah.text} ﴿${ayah.numberInSurah}﴾ - ${surah.name}`; p.onclick = () => showTafsir(ayah, p); surahContent.appendChild(p); found = true; } }); }); if (!found) { surahContent.innerHTML += '
لا توجد نتائج مطابقة.
'; } } function toggleDarkMode() { document.body.classList.toggle('dark'); } function toggleFavorite(ayahNumber, event) { event.stopPropagation(); let favs = JSON.parse(localStorage.getItem('favorites')) || []; if (favs.includes(ayahNumber)) { favs = favs.filter(id => id !== ayahNumber); } else { favs.push(ayahNumber); } localStorage.setItem('favorites', JSON.stringify(favs)); loadFavorites(); } function loadFavorites() { const favs = JSON.parse(localStorage.getItem('favorites')) || []; const favList = document.getElementById('favList'); favList.innerHTML = ''; if (favs.length === 0) { favList.innerHTML += 'لا توجد آيات مفضلة حتى الآن.
'; return; } surahsData.forEach(surah => { surah.ayahs.forEach(ayah => { if (favs.includes(ayah.number)) { const p = document.createElement('p'); p.textContent = `${ayah.text} ﴿${ayah.numberInSurah}﴾ - ${surah.name}`; favList.appendChild(p); } }); }); } function loadLastRead() { const last = localStorage.getItem('lastRead'); if (last) { const surah = surahsData.find(s => s.number == last); if (surah) displaySurah(surah); } } window.onload = loadQuranData; </script> """#📖 موقع القرآن الكريم
موقع ويب بسيط لعرض سور وآيات القرآن الكريم مع ميزات الاستماع، التفسير، الترجمة، البحث، المفضلة، والوضع الليلي.
- عرض سور وآيات القرآن الكريم.
- الاستماع للتلاوة بصوت العفاسي.
- البحث داخل الآيات أو أسماء السور أو الأرقام.
- عرض التفسير (الجلالين أو السعدي).
- عرض الترجمة (Sahih International أو Yusuf Ali).
- حفظ آخر سورة تم قراءتها.
- إضافة الآيات إلى قائمة المفضلات.
- دعم الوضع الليلي.
- HTML / CSS / JavaScript
- API من alquran.cloud
- افتح
index.html
في متصفحك مباشرة. - تأكد من الاتصال بالإنترنت لأن الموقع يعتمد على API alquran.cloud.
- لا حاجة لأي إعدادات خادم — يعمل محليًا.