Çerez Politikası
<!-- Çerez Banner Başlangıç -->
<style>
#cookieConsent {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #1a1a1a;
color: #fff;
padding: 15px 20px;
font-family: Arial, sans-serif;
font-size: 14px;
z-index: 9999;
display: none;
}
#cookieConsent button {
background-color: #ff6600;
color: white;
border: none;
padding: 8px 15px;
margin-left: 10px;
cursor: pointer;
border-radius: 5px;
}
#cookieConsent a {
color: #ffcc00;
text-decoration: underline;
}
</style>
<div id="cookieConsent">
Bu site çerezleri kullanır. Web sitemizi kullanarak <a href="/cerez-politikasi">Çerez Politikamızı</a> kabul etmiş olursunuz.
<button id="acceptCookies">Kabul Et</button>
<button id="declineCookies">Reddet</button>
</div>
<script>
// Çerez kontrol fonksiyonu
function setCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
// Banner gösterimi
window.onload = function() {
if (!getCookie('cookieConsent')) {
document.getElementById('cookieConsent').style.display = 'block';
}
}
document.getElementById('acceptCookies').onclick = function() {
setCookie('cookieConsent','accepted',365);
document.getElementById('cookieConsent').style.display = 'none';
// Buraya çerezli scriptler (Google Analytics vb.) eklenebilir
console.log("Çerezler kabul edildi.");
}
document.getElementById('declineCookies').onclick = function() {
setCookie('cookieConsent','declined',365);
document.getElementById('cookieConsent').style.display = 'none';
console.log("Çerezler reddedildi.");
}
</script>
<!-- Çerez Banner Bitiş -->