/* Add custom Js code below */
document.addEventListener("DOMContentLoaded", function() {
const elements = document.querySelectorAll("section.s-block");
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
entry.target.classList.toggle("show", entry.isIntersecting);
});
}, { threshold: 0.1 });
elements.forEach(el => observer.observe(el));
});
const font = new FontFace("Ubuntu Arabic", "url('https://files.catbox.moe/ey2tx0.ttf')");
font.load().then(function(loadedFont) {
document.fonts.add(loadedFont);
document.body.style.fontFamily = "'Ubuntu Arabic', sans-serif";
});
// إضافة مكتبة Font Awesome
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css';
document.head.appendChild(link);
// JavaScript لإضافة الأيقونات
const contactIcon = document.createElement('div');
contactIcon.className = 'contact-icon';
contactIcon.innerHTML = ''; // أيقونة التواصل
document.body.appendChild(contactIcon);
const contactOptions = document.createElement('div');
contactOptions.className = 'contact-options';
contactOptions.innerHTML = `
`;
document.body.appendChild(contactOptions);
contactIcon.onclick = function() {
contactOptions.style.display = contactOptions.style.display === 'none' || contactOptions.style.display === '' ? 'block' : 'none';
};