plakasync-pulse / script.js
alitan37's picture
güzel, peki https://emlak.alitan.net.tr/odbc/plakaListe.json dosyasının oluşturulma tarihini de alıp bunu en son güncelleme zamanı olarak bağlantı durumunun altına ekleyebilir misin. "Veri güncelleme kontrol paneli" yerine "Plaka Listesi Güncelleme Paneli" yaz. "Plaka Pulse Pro" gerek yok. Görselliği biraz daha değiştir daha keskin renkler kullan
f116a1e verified
// Toast notification function
function showToast(message, type = 'info') {
const toast = document.createElement('div');
toast.className = `fixed bottom-5 right-5 px-6 py-3 rounded-lg shadow-lg text-white animate__animated animate__fadeInUp animate__faster ${
type === 'success' ? 'bg-green-500' :
type === 'error' ? 'bg-red-500' :
'bg-blue-500'
}`;
toast.innerHTML = `
<div class="flex items-center gap-2">
<i class="fas ${
type === 'success' ? 'fa-check-circle' :
type === 'error' ? 'fa-exclamation-circle' :
'fa-info-circle'
}"></i>
<span>${message}</span>
</div>
`;
document.body.appendChild(toast);
setTimeout(() => {
toast.classList.add('animate__fadeOutDown');
setTimeout(() => toast.remove(), 500);
}, 3000);
}
// Add ripple effect to buttons
document.addEventListener('DOMContentLoaded', () => {
const buttons = document.querySelectorAll('button');
buttons.forEach(button => {
button.addEventListener('click', function(e) {
const x = e.clientX - e.target.getBoundingClientRect().left;
const y = e.clientY - e.target.getBoundingClientRect().top;
const ripple = document.createElement('span');
ripple.className = 'ripple';
ripple.style.left = `${x}px`;
ripple.style.top = `${y}px`;
this.appendChild(ripple);
setTimeout(() => ripple.remove(), 1000);
});
});
});
// Add ripple effect styles
const style = document.createElement('style');
style.innerHTML = `
.ripple {
position: absolute;
background: rgba(255, 255, 255, 0.4);
border-radius: 50%;
transform: scale(0);
animation: ripple 600ms linear;
pointer-events: none;
}
@keyframes ripple {
to {
transform: scale(4);
opacity: 0;
}
}
`;
document.head.appendChild(style);