Öncelikle Hepimize bol bereketli ,sağlıklı , huzur dolu bir Ramazan ayı diliyorum
\
\
\
';
document.body.insertAdjacentHTML('beforeend', modalHtml);
bindYazarBiyografiEvents();
function bindYazarBiyografiEvents() {
var modal = document.getElementById('yazarBiyografiModal');
var baslik = document.getElementById('yazarBiyografiBaslik');
var icerik = document.getElementById('yazarBiyografiIcerik');
var closeBtn = modal.querySelector('.yazar-biyografi-close');
function decodeHtml(html) {
var txt = document.createElement('textarea');
txt.innerHTML = html;
return txt.value;
}
document.querySelectorAll('.yazar-biyografi-link').forEach(function(link) {
if (link.dataset.biyografiEventBound) return;
link.dataset.biyografiEventBound = 'true';
link.addEventListener('click', function() {
var yazar = this.getAttribute('data-yazar');
var biyografi = this.getAttribute('data-biyografi');
baslik.textContent = yazar;
icerik.innerHTML = decodeHtml(decodeHtml(biyografi));
modal.style.display = 'flex';
document.body.style.overflow = 'hidden';
});
});
if (closeBtn && !closeBtn.dataset.biyografiEventBound) {
closeBtn.dataset.biyografiEventBound = 'true';
closeBtn.addEventListener('click', function() {
modal.style.display = 'none';
document.body.style.overflow = '';
});
}
if (!window.yazarBiyografiWindowEventBound) {
window.yazarBiyografiWindowEventBound = true;
window.addEventListener('click', function(e) {
if (e.target === modal) {
modal.style.display = 'none';
document.body.style.overflow = '';
}
});
}
}
})();