<!-- wp:html --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Islamic Date Pakistan & World</title> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap" rel="stylesheet"> <style> :root{ --green:#0b8d4b; --gold:#b8860b; --text:#2d3436; --bg:#f8faf9; } *{ margin:0; padding:0; box-sizing:border-box; } body{ font-family:'Poppins',sans-serif; background:var(--bg); color:var(--text); padding:15px; font-size:13px; } .wrapper{ max-width:560px; margin:auto; } header{ text-align:center; margin-bottom:25px; } h1{ color:var(--green); font-size:24px; font-weight:600; } .subtitle{ font-size:11px; color:#7f8c8d; text-transform:uppercase; letter-spacing:1px; } .block-container{ display:flex; flex-direction:column; gap:15px; margin-bottom:25px; } .date-block{ background:#fff; padding:20px; border-radius:16px; box-shadow:0 4px 15px rgba(0,0,0,.04); border-left:5px solid var(--green); text-align:center; } .date-block.world{ border-left-color:var(--gold); } .date-block span{ display:block; font-size:10px; color:#95a5a6; font-weight:600; margin-bottom:6px; text-transform:uppercase; } .value{ font-size:16px; font-weight:600; line-height:1.5; } .table-section{ background:#fff; border-radius:16px; overflow:hidden; box-shadow:0 4px 15px rgba(0,0,0,.04); margin-bottom:25px; } table{ width:100%; border-collapse:collapse; } th{ background:#f1f3f2; padding:12px; font-size:11px; color:#636e72; text-align:center; } td{ padding:14px; text-align:center; border-top:1px solid #edf2f0; font-size:12px; } .row-pak{ background:#f0fff4; color:var(--green); font-weight:600; } .month-list{ background:#fff; border-radius:16px; padding:15px; box-shadow:0 4px 15px rgba(0,0,0,.04); } .month-title{ color:var(--green); font-size:14px; font-weight:600; margin-bottom:12px; } .month-item{ display:flex; justify-content:space-between; align-items:center; padding:10px 12px; border-radius:10px; margin-bottom:5px; background:#f8faf9; font-size:12px; } .month-item.active{ background:var(--green); color:#fff; font-weight:500; } .footer{ text-align:center; margin-top:18px; font-size:10px; color:#95a5a6; } @media(max-width:400px){ h1{ font-size:20px; } .value{ font-size:14px; } } </style> </head> <body> <div class="wrapper"> <header> <div class="subtitle"></div> <h1>Islamic Date Today</h1> </header> <div class="block-container"> <div class="date-block"> <span>Gregorian Calendar</span> <div class="value" id="greg-val">--</div> </div> <div class="date-block world"> <span>World Islamic Date</span> <div class="value" id="world-val">--</div> </div> <div class="date-block"> <span>Pakistan Islamic Date</span> <div class="value" id="pak-val">--</div> </div> </div> <div class="table-section"> <table> <thead> <tr> <th>Region</th> <th>Current Hijri Date</th> </tr> </thead> <tbody> <tr> <td>Global / Saudi</td> <td id="t-world">--</td> </tr> <tr class="row-pak"> <td>Pakistan</td> <td id="t-pak">--</td> </tr> </tbody> </table> </div> <div class="month-list"> <div class="month-title"> List of Islamic Months </div> <div id="month-box"></div> </div> <div class="footer"> </div> </div> <script> // Current Date const today = new Date(); // Islamic Months const islamicMonths = [ "Muharram", "Safar", "Rabi al-Awwal", "Rabi al-Thani", "Jumada al-Awwal", "Jumada al-Thani", "Rajab", "Sha'ban", "Ramadan", "Shawwal", "Dhu al-Qi'dah", "Dhu al-Hijjah" ]; // Updated Reference Points // Setting May 18, 2026 as the baseline anchor point // Both regions now track 1 Dhu al-Hijjah 1447 AH identically const refDate = new Date(2026, 4, 18); // Day Difference Engine (Math.round avoids timezone clipping hours) const diffDays = Math.round((today - refDate) / (1000 * 60 * 60 * 24)); // Hijri Date Calculator Engine function calculateHijri(baseDay, diff){ // standard cyclic month structure const monthDays = [30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29]; let day = baseDay + diff; let monthIndex = 11; // Index 11 is Dhu al-Hijjah let year = 1447; // Fast-Forward structural loops while(day > monthDays[monthIndex]){ day -= monthDays[monthIndex]; monthIndex++; if(monthIndex > 11){ monthIndex = 0; year++; } } // Rewind structural loops while(day <= 0){ monthIndex--; if(monthIndex < 0){ monthIndex = 11; year--; } day += monthDays[monthIndex]; } return { day, month: islamicMonths[monthIndex], year, monthIndex }; } // Global and Pakistan are perfectly synchronized const worldHijri = calculateHijri(1, diffDays); const pakistanHijri = calculateHijri(1, diffDays); // Format Results const worldDate = `${worldHijri.day} ${worldHijri.month} ${worldHijri.year} AH`; const pakistanDate = `${pakistanHijri.day} ${pakistanHijri.month} ${pakistanHijri.year} AH`; // Gregorian Date Construction const gregorianDate = today.toLocaleDateString('en-PK', { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' }); // Injection UI Handling if(document.getElementById('greg-val')) document.getElementById('greg-val').innerHTML = gregorianDate; if(document.getElementById('world-val')) document.getElementById('world-val').innerHTML = worldDate; if(document.getElementById('pak-val')) document.getElementById('pak-val').innerHTML = pakistanDate; if(document.getElementById('t-world')) document.getElementById('t-world').innerHTML = worldDate; if(document.getElementById('t-pak')) document.getElementById('t-pak').innerHTML = pakistanDate; // Build Interactive Months Registry List const monthBox = document.getElementById('month-box'); if(monthBox) { monthBox.innerHTML = ""; // Clean house before iteration logic kicks in islamicMonths.forEach((month, index) => { const item = document.createElement('div'); item.className = index === pakistanHijri.monthIndex ? 'month-item active' : 'month-item'; item.innerHTML = ` <span>${index + 1}. ${month}</span> <span>${index === pakistanHijri.monthIndex ? 'Current' : ''}</span> `; monthBox.appendChild(item); }); } </script> </body> </html> <!-- /wp:html --> <!-- wp:html --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Daily Quran Ayat & Hadith</title> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&family=Noto+Naskh+Arabic:wght@400;600&display=swap" rel="stylesheet"> <style> *{ margin:0; padding:0; box-sizing:border-box; } body{ background:#ecfdf5; font-family:'Poppins',sans-serif; padding:12px; color:#064e3b; } .container{ max-width:680px; margin:auto; } .main-title{ text-align:center; font-size:18px; font-weight:600; margin-bottom:16px; color:#065f46; } /* Block Card Custom Styles */ .card{ background:#ffffff; border:1px solid #bbf7d0; border-radius:14px; overflow:hidden; margin-bottom:18px; box-shadow:0 3px 10px rgba(0,0,0,0.05); display: flex; flex-direction: column; } .card-header{ background:#16a34a; color:#ffffff; padding:12px 14px; font-size:13px; font-weight:600; text-align:center; } .reference{ background:#dcfce7; font-size:11px; font-weight:600; text-align:center; padding:6px; color:#166534; border-bottom:1px solid #bbf7d0; } /* Semantic Layout Elements */ .content-row { display: flex; flex-direction: column; padding: 14px 18px; border-bottom: 1px solid #edfcf2; } .content-row:last-of-type { border-bottom: none; } .arabic{ direction:rtl; text-align:center; font-family:'Noto Naskh Arabic',serif; font-size:18px; line-height:2.2; color:#14532d; } .urdu{ direction:rtl; text-align:right; font-size:13px; line-height:2; color:#166534; font-family: 'Noto Naskh Arabic', serif, sans-serif; } .english{ font-size:12px; line-height:1.7; color:#065f46; text-align: left; } .footer{ text-align:center; font-size:10px; color:#166534; margin-top:10px; } .verse-block { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed #bbf7d0; width: 100%; } .verse-block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; } .verse-num { display: inline-block; background: #16a34a; color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 4px; margin-bottom: 6px; font-family: 'Poppins', sans-serif; direction: ltr; } /* Desktop Alignment Adjustment */ @media(min-width:576px){ .main-title { font-size: 20px; } .arabic { font-size: 20px; } } </style> </head> <body> <div class="container"> <h1 class="main-title"> 📖 Daily Quran Ayat & Hadith </h1> <!-- Quran Ayat Card --> <div class="card"> <div class="card-header" id="quran-header">Surah Al-Baqarah — Ayats 6-9</div> <div class="reference" id="quran-ref">Surah Al-Baqarah (2:6-9)</div> <!-- 1st: Arabic Text --> <div class="content-row"> <div class="arabic" id="quran-arabic">--</div> </div> <!-- 2nd: English Translation --> <div class="content-row"> <div class="english" id="quran-english">--</div> </div> <!-- 3rd: Urdu Translation --> <div class="content-row"> <div class="urdu" id="quran-urdu">--</div> </div> </div> <!-- Hadith Card --> <div class="card"> <div class="card-header" id="hadith-header">🕌 Hadith (Sahih al-Bukhari)</div> <div class="reference" id="hadith-ref">Sahih al-Bukhari — Hadith No. 4</div> <!-- 1st: Arabic Text --> <div class="content-row"> <div class="arabic" id="hadith-arabic">--</div> </div> <!-- 2nd: English Translation --> <div class="content-row"> <div class="english" id="hadith-english">--</div> </div> <!-- 3rd: Urdu Translation --> <div class="content-row"> <div class="urdu" id="hadith-urdu">--</div> </div> </div> <div class="footer"></div> </div> <script> const quranDatabase = [ { surah: "Al-Baqarah", range: "6-9", verses: [ { num: 6, ar: "إِنَّ الَّذِينَ كَفَرُوا سَوَاءٌ عَلَيْهِمْ أَأَنذَرْتَهُمْ أَمْ لَمْ تُنذِرْهُمْ لَا يُؤْمِنُونَ", en: "Indeed, those who disbelieve - it is all the same for them whether you warn them or have not warned them - they will not believe.", ur: "یقیناً جن لوگوں نے کفر اختیار کر لیا ہے، ان کے لیے برابر ہے خواہ آپ انہیں ڈرائیں یا نہ ڈرائیں، وہ ایمان نہیں لائیں گے۔" }, { num: 7, ar: "خَتَمَ اللَّهُ عَلَىٰ قُلُوبِهِمْ وَعَلَىٰ سَمْعِهِمْ ۖ وَعَلَىٰ أَبْصَارِهِمْ غِشَاوَةٌ ۖ وَلَهُمْ عَذَابٌ عَظِيمٌ", en: "Allah has set a seal upon their hearts and upon their hearing, and over their vision is a veil. And for them is a great punishment.", ur: "اللہ نے ان کے دلوں پر اور ان کے کانوں پر مہر لگا دی ہے، اور ان کی آنکھوں پر پردہ پڑ گیا ہے، اور ان کے لیے بڑا عذاب ہے۔" }, { num: 8, ar: "وَمِنَ النَّاسِ مَن يَقُولُ آمَنَّا بِاللَّهِ وَبِالْيَوْمِ الْآخِرِ وَمَا هُم بِمُؤْمِنِينَ", en: "And of the people are some who say, \"We believe in Allah and the Last Day,\" but they are not believers.", ur: "اور لوگوں میں سے کچھ ایسے بھی ہیں جو کہتے ہیں کہ ہم اللہ پر اور قیامت کے دن پر ایمان لائے ہیں، حالانکہ وہ حقیقت میں مومن نہیں ہیں۔" }, { num: 9, ar: "يُخَادِعُونَ اللَّهَ وَالَّذِينَ آمَنُوا وَمَا يَخْدَعُونَ إِلَّا أَنفُسَهُمْ وَمَا يَشْعُرُونَ", en: "They [think to] deceive Allah and those who believe, but they deceive not except themselves and perceive [it] not.", ur: "وہ اللہ کو اور ان لوگوں کو جو ایمان لا چکے ہیں دھوکہ دینا چاہتے ہیں، مگر حقیقت میں وہ اپنے سوا کسی کو دھوکہ نہیں دے رہے اور وہ اس کا شعور نہیں رکھتے۔" } ] } ]; const hadithDatabase = [ { book: "Sahih al-Bukhari", number: "4", ar: "عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ الأَنْصَارِيِّ، قَالَ وَهُوَ يُحَدِّثُ عَنْ فَتْرَةِ الْوَحْيِ فَقَالَ فِي حَدِيثِهِ: «بَيْنَا أَنَا أَمْشِي إِذْ سَمِعْتُ صَوْتًا مِنَ السَّمَاءِ، فَرَفَعْتُ بَصَرِي، فَإِذَا الْمَلَكُ الَّذِي جَاءَنِي بِحِرَاءٍ جَالِسٌ عَلَى كُرْسِيٍّ بَيْنَ السَّمَاءِ وَالأَرْضِ...»", en: "Narrated Jabir bin 'Abdullah Al-Ansari while talking about the period of pause in revelation: The Prophet (ﷺ) said, \"While I was walking, all of a sudden I heard a voice from the sky. I looked up and saw the same angel who had visited me at the Cave of Hira' sitting on a chair between the sky and the earth...\"", ur: "حضرت جابر بن عبداللہ انصاری رضی اللہ عنہ سے روایت ہے، انہوں نے وحی کے رک جانے کے زمانے کے حالات بیان کرتے ہوئے فرمایا کہ رسول اللہ صلی اللہ علیہ وسلم نے فرمایا: «اس دوران کہ میں چل رہا تھا، اچانک میں نے آسمان سے ایک آواز سنی۔ میں نے اپنا سر اٹھایا تو کیا دیکھتا ہوں کہ وہی فرشتہ جو میرے پاس غارِ حرا میں آیا تھا، آسمان اور زمین کے درمیان ایک کرسی پر بیٹھا ہوا ہے...»" } ]; function loadSequentialContent() { try { const startDate = new Date("2026-05-17").setHours(0,0,0,0); const todayDate = new Date().setHours(0,0,0,0); const dayIndex = Math.floor((todayDate - startDate) / (1000 * 60 * 60 * 24)); if (dayIndex < 0 || isNaN(dayIndex)) return; const quranData = quranDatabase[dayIndex % quranDatabase.length]; const hadithData = hadithDatabase[dayIndex % hadithDatabase.length]; // Inject headers document.getElementById('quran-header').innerText = `Surah ${quranData.surah} — Ayats ${quranData.range}`; document.getElementById('quran-ref').innerText = `Surah ${quranData.surah} (2:${quranData.range})`; let arHTML = "", enHTML = "", urHTML = ""; quranData.verses.forEach((v) => { arHTML += `<div class="verse-block"><span class="verse-num">Ayat ${v.num}</span><br>${v.ar}</div>`; enHTML += `<div class="verse-block"><span class="verse-num">Verse ${v.num}</span><br>${v.en}</div>`; urHTML += `<div class="verse-block"><span class="verse-num">آیت ${v.num}</span><br>${v.ur}</div>`; }); document.getElementById('quran-arabic').innerHTML = arHTML; document.getElementById('quran-english').innerHTML = enHTML; document.getElementById('quran-urdu').innerHTML = urHTML; // Inject Hadith information safely document.getElementById('hadith-header').innerText = `🕌 Hadith (${hadithData.book})`; document.getElementById('hadith-ref').innerText = `${hadithData.book} — Hadith No. ${hadithData.number}`; document.getElementById('hadith-arabic').innerText = hadithData.ar; document.getElementById('hadith-english').innerText = hadithData.en; document.getElementById('hadith-urdu').innerText = hadithData.ur; } catch(e) { console.log("Error loading dynamic layout content script."); } } window.onload = loadSequentialContent; </script> </body> </html> <!-- /wp:html -->