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> """ # 📖 موقع القرآن الكريمموقع ويب بسيط وتفاعلي يعرض سور وآيات القرآن الكريم مع إمكانية البحث، الاستماع للتلاوة، عرض التفسير، الترجمة، وتحديد المفضلات.
- عرض جميع سور وآيات القرآن الكريم.
- البحث داخل الآيات.
- التفسير من تفسير الجلالين.
- الترجمة (يمكنك تفعيلها باستخدام API مخصص).
- حفظ الآيات المفضلة.
- حفظ آخر قراءة.
- الوضع الداكن / الفاتح.
- الاستماع لتلاوة الشيخ مشاري العفاسي.
- HTML + CSS
- JavaScript (Vanilla)
- API من alquran.cloud
- خط Amiri من Google Fonts
- حمّل الملفات أو انسخها إلى مجلد في جهازك.
- افتح الملف
index.html
في متصفح حديث (مثل Chrome أو Firefox). - تأكد من اتصالك بالإنترنت لاستخدام التلاوة والتفسير.
- إذا رغبت في دعم الترجمات، استخدم Endpoint آخر من
alquran.cloud
(مثل/en.yusufali
). - لضمان تجربة مثالية، ينصح باستخدام الموقع على متصفحات حديثة فقط.
مشروع مفتوح المصدر لأغراض تعليمية ودعوية، يمكن التعديل والاستخدام بحرية مع ذكر المصدر.
هذا المشروع تم إنشاؤه يدويًا لتسهيل الوصول إلى القرآن الكريم عبر الويب. """
file_path = "/mnt/data/README.md" with open(file_path, "w", encoding="utf-8") as f: f.write(readme_content)
file_path