ذکر شمار

.zekr-wrap{ max-width:520px; margin:24px0px auto; background:linear-gradient(180deg,#0f3d2e,#145c43); color:#fff; border-radius:88px; box-shadow:0 10px 30px rgba(0,0,0,.18); overflow:hidden; font-family:Tahoma, Arial, sans-serif; } .zekr-header{ padding:22px 20px 10px; text-align:center; } .zekr-title{ margin:0; font-size:28px; color:#e7c66a; font-weight:700; } .zekr-subtitle{ margin:10px 0 0; color:#eef3ef; font-size:14px; line-height:1.8; } .zekr-content{padding:18px;} .zekr-card{ background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); border-radius:22px; padding:16px; margin-bottom:14px; } .zekr-label{ display:block; margin-bottom:8px; font-size:14px; color:#f5f3eb; font-weight:700; } .zekr-input{ width:100%; border:none; outline:none; border-radius:16px; padding:14px 16px; font-size:16px; background:#fff; color:#1f2d27; box-sizing:border-box; } .zekr-preview{ min-height:70px; display:flex; align-items:center; justify-content:center; text-align:center; padding:16px; font-size:24px; line-height:1.9; color:#e7c66a; font-weight:700; background:rgba(0,0,0,.12); border-radius:18px; border:1px dashed rgba(231,198,106,.45); } .quick-zekr{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; } .zekr-tag{ border:none; cursor:pointer; border-radius:999px; padding:10px 14px; background:rgba(255,255,255,.12); color:#fff; font-size:14px; border:1px solid rgba(255,255,255,.14); } .counter-box{ text-align:center; padding:10px 10px 6px; } .counter-label{ font-size:14px; color:#eef3ef; margin-bottom:8px; } .counter{ font-size:60px; font-weight:800; color:#fff; line-height:1; margin:8px 0 14px; } .main-btn{ width:100%; border:none; cursor:pointer; border-radius:24px; padding:18px 16px; font-size:22px; font-weight:800; background:linear-gradient(180deg,#e7c66a,#c9a84b); color:#183428; box-shadow:0 10px 25px rgba(231,198,106,.25); } .btn-row{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; } .zekr-btn{ border:none; cursor:pointer; border-radius:16px; padding:14px 12px; font-size:15px; font-weight:700; } .btn-save{ background:#fff; color:#174031; } .btn-reset{ background:#b64040; color:#fff; } .saved-box{ font-size:13px; color:#fff; margin-top:10px; opacity:.92; line-height:1.8; } .footer-note{ text-align:center; font-size:12px; color:#eef3ef; opacity:.85; line-height:1.9; padding:0 18px 20px; } .qr-box{ max-width:520px; margin:20px auto 0; background:#fff; border-radius:20px; padding:20px; text-align:center; font-family:Tahoma, Arial, sans-serif; } .qr-title{ margin:0 0 14px; color:#174031; font-size:20px; } #qrcode{ display:flex; justify-content:center; } .qr-note{ margin:14px 0 0; color:#333; font-size:13px; line-height:1.9; } @media (max-width:420px){ .zekr-title{font-size:24px} .counter{font-size:50px} .zekr-preview{font-size:20px} .main-btn{font-size:20px} }

ذکرشمار

ذکر دلخواهت را وارد کن، شمارش را انجام بده و در صورت نیاز همان ذکر را ذخیره کن.

```
اللهم صل علی محمد و آل محمد
تعداد ذکر
0
```

QR این صفحه

این QR به همین صفحه وصل است و با اسکن آن، ذکرشمار برای کاربر باز می‌شود.

(function () { const zekrInput = document.getElementById('zekrInput'); const zekrPreview = document.getElementById('zekrPreview'); const counterEl = document.getElementById('counter'); const countBtn = document.getElementById('countBtn'); const resetBtn = document.getElementById('resetBtn'); const saveBtn = document.getElementById('saveBtn'); const savedInfo = document.getElementById('savedInfo'); const quickButtons = document.querySelectorAll('.zekr-tag'); const STORAGE_KEY = 'zekrshomar_data_v1'; function getZekrFromURL() { const params = new URLSearchParams(window.location.search); return params.get('zekr'); } function loadData() { try { const raw = localStorage.getItem(STORAGE_KEY); return raw ? JSON.parse(raw) : null; } catch (e) { return null; } } function saveData(data) { localStorage.setItem(STORAGE_KEY, JSON.stringify(data)); } function renderSavedInfo(data) { if (!data || !data.zekr) { savedInfo.innerHTML = 'هنوز ذکری ذخیره نشده است.'; return; } savedInfo.innerHTML = 'آخرین ذکر ذخیره‌شده: ' + data.zekr + '
' + 'تعداد ذخیره‌شده: ' + data.count + ''; } function setZekrText(text) { const clean = (text || '').trim(); const finalText = clean || 'اللهم صل علی محمد و آل محمد'; zekrInput.value = finalText; zekrPreview.textContent = finalText; } function setCount(value) { counterEl.textContent = value; } (function init() { const urlZekr = getZekrFromURL(); const saved = loadData(); if (urlZekr && urlZekr.trim()) { setZekrText(urlZekr); setCount(۰); } else if (saved && saved.zekr) { setZekrText(saved.zekr); setCount(saved.count || ۰); } else { setZekrText('اللهم صل علی محمد و آل محمد'); setCount(۰); } renderSavedInfo(saved); if (window.QRCode && document.getElementById('qrcode')) { new QRCode(document.getElementById('qrcode'), { text: window.location.href, width: ۲۲۰, height: ۲۲۰ }); } })(); zekrInput.addEventListener('input', function () { zekrPreview.textContent = zekrInput.value.trim() || 'اللهم صل علی محمد و آل محمد'; }); quickButtons.forEach(function (btn) { btn.addEventListener('click', function () { const text = btn.getAttribute('data-zekr'); setZekrText(text); }); }); countBtn.addEventListener('click', function () { let current = parseInt(counterEl.textContent || '۰', ۱۰); current += ۱; setCount(current); }); resetBtn.addEventListener('click', function () { setCount(۰); }); saveBtn.addEventListener('click', function () { const data = { zekr: zekrInput.value.trim() || 'اللهم صل علی محمد و آل محمد', count: parseInt(counterEl.textContent || '۰', ۱۰) }; saveData(data); renderSavedInfo(data); alert('ذکر و تعداد با موفقیت ذخیره شد.'); }); })();

ارسال نظرات

پیمایش به بالا