{"id":116,"date":"2025-08-19T19:08:22","date_gmt":"2025-08-19T16:08:22","guid":{"rendered":"https:\/\/localhost\/holy\/?p=116"},"modified":"2025-08-19T19:24:32","modified_gmt":"2025-08-19T16:24:32","slug":"%d8%a7%d9%84%d9%85%d9%88%d8%a7%d9%82%d9%8a%d8%aa-%d8%a7%d9%84%d8%b4%d8%b1%d8%b9%d9%8a%d8%a9","status":"publish","type":"post","link":"https:\/\/holykarbala.net\/wp\/holy\/?p=116","title":{"rendered":"\u0627\u0644\u0645\u0648\u0627\u0642\u064a\u062a \u0627\u0644\u0634\u0631\u0639\u064a\u0629"},"content":{"rendered":"\n<p class=\"is-style-default wp-block-paragraph\"><code>    <div id=\"ipt-widget\" dir=\"rtl\" style=\"background:#1e2c39;color:#fff;border-radius:12px;padding:15px;font-family:Tajawal,Tahoma;max-width:760px;margin:10px auto;\">\n        <div style=\"text-align:center;margin-bottom:10px;\">\n            <label for=\"ipt-city\" style=\"font-size:14px;margin-left:5px;\">\u0627\u062e\u062a\u0631 \u0627\u0644\u0645\u062f\u064a\u0646\u0629:<\/label>\n            <select id=\"ipt-city\" style=\"padding:5px;border-radius:6px;\">\n                                    <option value=\"karbala\"  selected='selected'>\u0643\u0631\u0628\u0644\u0627\u0621<\/option>\n                                    <option value=\"baghdad\" >\u0628\u063a\u062f\u0627\u062f<\/option>\n                                    <option value=\"najaf\" >\u0627\u0644\u0646\u062c\u0641<\/option>\n                                    <option value=\"basra\" >\u0627\u0644\u0628\u0635\u0631\u0629<\/option>\n                                    <option value=\"mosul\" >\u0627\u0644\u0645\u0648\u0635\u0644<\/option>\n                                    <option value=\"samarra\" >\u0633\u0627\u0645\u0631\u0627\u0621<\/option>\n                            <\/select>\n        <\/div>\n        <div id=\"ipt-results\">\u062c\u0627\u0631\u064a \u062a\u062d\u0645\u064a\u0644 \u0645\u0648\u0627\u0642\u064a\u062a \u0627\u0644\u0635\u0644\u0627\u0629...<\/div>\n    <\/div>\n\n    <script>\n    async function loadPrayerTimes(city) {\n        const url = `https:\/\/api.aladhan.com\/v1\/timingsByCity?city=${city}&country=Iraq&method=5`;\n        const res = await fetch(url);\n        const json = await res.json();\n        if(!json.data) { \n            document.getElementById(\"ipt-results\").innerHTML = \"\u062e\u0637\u0623 \u0641\u064a \u062c\u0644\u0628 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a\"; \n            return;\n        }\n        const t = json.data.timings;\n        const date = json.data.date.readable; \n        const hijriDay = json.data.date.hijri.day; \n        const hijriMonthNumber = json.data.date.hijri.month.number; \n        const hijriYear = json.data.date.hijri.year; \n        const weekday = json.data.date.hijri.weekday.ar; \n\n        const hijriMonths = [\n            \"\u0645\u062d\u0631\u0645 \u0627\u0644\u062d\u0631\u0627\u0645\",\n            \"\u0635\u0641\u0631 \u0627\u0644\u062e\u064a\u0631\",\n            \"\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644\",\n            \"\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631\",\n            \"\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649\",\n            \"\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629\",\n            \"\u0631\u062c\u0628 \u0627\u0644\u0623\u0635\u0628\",\n            \"\u0634\u0639\u0628\u0627\u0646 \u0627\u0644\u0645\u0639\u0638\u0645\",\n            \"\u0631\u0645\u0636\u0627\u0646 \u0627\u0644\u0645\u0628\u0627\u0631\u0643\",\n            \"\u0634\u0648\u0627\u0644 \u0627\u0644\u0645\u0643\u0631\u0645\",\n            \"\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629 \u0627\u0644\u062d\u0631\u0627\u0645\",\n            \"\u0630\u0648 \u0627\u0644\u062d\u062c\u0629 \u0627\u0644\u062d\u0631\u0627\u0645\"\n        ];\n\n        const hijriDateWritten = `${weekday} ${hijriDay} ${hijriMonths[hijriMonthNumber - 1]} ${hijriYear} \u0647\u062c\u0631\u064a\u0629`;\n\n        document.getElementById(\"ipt-results\").innerHTML = `\n            <div style=\"background:#f04b23;padding:10px;border-radius:8px;text-align:center;margin-bottom:10px;\">\n                <strong>${city.toUpperCase()} - \u0627\u0644\u0639\u0631\u0627\u0642<\/strong><br>\n                <span>${hijriDateWritten}<\/span><br>\n                <small>${date}<\/small>\n            <\/div>\n            <div style=\"display:flex;justify-content:space-around;flex-wrap:wrap;text-align:center;\">\n                ${[\"Fajr\",\"Sunrise\",\"Dhuhr\",\"Asr\",\"Maghrib\",\"Midnight\"].map(key => {\n                    const labels = {\n                        Fajr:\"\u0627\u0644\u0641\u062c\u0631\",\n                        Sunrise:\"\u0637\u0644\u0648\u0639 \u0627\u0644\u0634\u0645\u0633\",\n                        Dhuhr:\"\u0627\u0644\u0638\u0647\u0631\",\n                        Asr:\"\u0627\u0644\u0639\u0635\u0631\",\n                        Maghrib:\"\u0627\u0644\u0645\u063a\u0631\u0628\",\n                        Midnight:\"\u0645\u0646\u062a\u0635\u0641 \u0627\u0644\u0644\u064a\u0644\"\n                    };\n                    return `<div style=\"flex:1;min-width:100px;margin:5px;padding:12px;background:#2d3e50;border-radius:8px;\">\n                        <div style=\"font-size:14px;\">${labels[key]}<\/div>\n                        <div style=\"font-size:18px;font-weight:bold;\">${t[key]}<\/div>\n                    <\/div>`;\n                }).join(\"\")}\n            <\/div>\n        `;\n    }\n    document.getElementById(\"ipt-city\").addEventListener(\"change\", e => loadPrayerTimes(e.target.value));\n    loadPrayerTimes(\"karbala\");\n    <\/script>\n    <\/code><\/p>\n\n\n\n<p class=\"is-style-text-display is-style-text-display--1 wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"is-style-default wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-116","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/holykarbala.net\/wp\/holy\/index.php?rest_route=\/wp\/v2\/posts\/116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/holykarbala.net\/wp\/holy\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/holykarbala.net\/wp\/holy\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/holykarbala.net\/wp\/holy\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/holykarbala.net\/wp\/holy\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=116"}],"version-history":[{"count":4,"href":"https:\/\/holykarbala.net\/wp\/holy\/index.php?rest_route=\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":162,"href":"https:\/\/holykarbala.net\/wp\/holy\/index.php?rest_route=\/wp\/v2\/posts\/116\/revisions\/162"}],"wp:attachment":[{"href":"https:\/\/holykarbala.net\/wp\/holy\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/holykarbala.net\/wp\/holy\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/holykarbala.net\/wp\/holy\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}