/* Buton Animasyonu - Yeşil ve Turuncu Tonlar */ .; afiaolsun-button { text-align: center; font-family: "Inter", sans-serif; font-weight: bold; padding: 15px 20px; border-radius: 12px; cursor: pointer; display: inline-block; font-size: 16px; margin-top: 20px; } /* Pop-Up Arkaplan ve İçerik */ .; popup { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); justify-content: center; align-items: center; z-index: 9999; } .; popup-content { background: #f5f5f5; padding: 25px; border-radius: 16px; width: 60%; max-width: 900px; max-height: 70vh; overflow-y: auto; position: relative; z-index: 10000; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); animation: fadeInScale 0.4s ease-out; } /* Kapama Butonu */ .; popup-content .; close { position: absolute; top: 15px; right: 15px; color: black; border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 20px; display: flex; justify-content: center; align-items: center; cursor: pointer; } /* Sayfa Kaydırmayı Engelle */ body.; no-scroll { overflow: hidden; } /* Pop-Up Animasyonu */ @keyframes fadeInScale { 0% { opacity: 0; transform: scale(0.8); } 100% { opacity: 1; transform: scale(1); } } Ürün İçerik Bilgileri × Ürün Detayları İçerik yükleniyor.; document.; addEventListener("DOMContentLoaded", () => { const buttons = document.; querySelectorAll(".; show-popup"); const body = document.; body; buttons.; forEach(button => { button.; addEventListener("click", async () => { const link = button.; getAttribute("data-link"); const targetSelector = button.; getAttribute("data-target"); const popup = button.; parentElement.; querySelector(".; popup"); const popupContent = popup.; querySelector(".; popup-inner-content"); popup.; style.; display = "flex"; body.; classList.; add("no-scroll"); popupContent.; innerHTML = "İçerik yükleniyor.; "; try { const response = await fetch(link); const htmlText = await response.; text(); const parser = new DOMParser(); const doc = parser.; parseFromString(htmlText, "text/html"); const targetElement = doc.; querySelector(targetSelector); if (targetElement) { popupContent.; innerHTML = targetElement.; innerHTML; } else { popupContent.; innerHTML = "İstenilen içerik bulunamadı.; "; } } catch (error) { popupContent.; innerHTML = "İçerik yüklenemedi.; Lütfen daha sonra tekrar deneyiniz.; "; } }); }); // Pop-Up Kapatma document.; addEventListener("click", (e) => { if (e.; target.; classList.; contains("close") || e.; target.; classList.; contains("popup")) { const popups = document.; querySelectorAll(".; popup"); popups.; forEach(popup => { popup.; style.; display = "none"; }); body.; classList.; remove("no-scroll"); } }); });
Ayen Software tarafından yayınlanmıştır!