/* Add custom Js styles below */ // // // زر الواتس // const waAngel = document.getElementById('wa-angel'); // if (waAngel) { // const oldLink = document.querySelector('a[href*="wa.me/+966554554112"]'); // if (oldLink) { // oldLink.remove(); // } // // 2. إضافة التنسيقات للعنصر الرئيسي (Container) // waAngel.style.backgroundColor = '#22c55e'; // waAngel.className = 'wa-angel flex-center right rounded-full has-text'; // // 3. إنشاء رابط WhatsApp (Anchor) // const link = document.createElement('a'); // link.className = 'flex-center gap-2'; // link.setAttribute('aria-label', 'Angel Whatsapp'); // link.setAttribute('rel', 'noopener'); // link.setAttribute('target', '_blank'); // link.href = 'https://wa.me/+966554554112?text=تواصل%20معنا%20الان'; // link.style.textDecoration = 'none'; // // 4. إنشاء الأيقونة // const icon = document.createElement('i'); // icon.className = 'sicon-whatsapp2'; // icon.style.color = '#ffffff'; // icon.style.fontSize = '24px'; // // 5. إنشاء النص (Span) // const textSpan = document.createElement('span'); // textSpan.innerText = 'تواصل معنا'; // textSpan.style.color = '#ffffff'; // textSpan.style.fontWeight = 'bold'; // textSpan.style.fontFamily = 'sans-serif'; // // 6. تركيب العناصر داخل بعضها // link.appendChild(icon); // link.appendChild(textSpan); // waAngel.appendChild(link); // } // (function() { // // 1. استهداف العنصر الأصلي (Container) وتفريغه إذا وجد لتجنب التكرار // const oldWaAngel = document.getElementById('wa-angel'); // if (oldWaAngel) { // oldWaAngel.innerHTML = ''; // تفريغ المحتوى القديم // oldWaAngel.style.display = 'none'; // إخفاء الحاوية القديمة لأننا سننشئ عناصر جديدة منفصلة // } // // --- إنشاء زر الاتصال المنفصل (الزر العلوي الدائري) --- // const callBtnId = 'angel-call-btn'; // if (!document.getElementById(callBtnId)) { // const callBtn = document.createElement('div'); // callBtn.id = callBtnId; // // التنسيقات الخاصة بزر الاتصال الدائري // callBtn.style.cssText = ` // position: fixed; // bottom: 90px; /* مرتفع للأعلى ليكون فوق زر الواتساب */ // right: 30px; /* المسافة من اليمين */ // width: 50px; // height: 50px; // background-color: #22c55e; /* نفس اللون الأخضر */ // border-radius: 50%; /* دائري تماماً */ // display: flex; // align-items: center; // justify-content: center; // z-index: 10000; /* قيمة عالية لضمان الظهور */ // box-shadow: 0 4px 10px rgba(0,0,0,0.2); // transition: all 0.3s ease; // cursor: pointer; // `; // // إنشاء الرابط والأيقونة لزر الاتصال // const callLink = document.createElement('a'); // callLink.href = 'tel:966554554112'; // callLink.setAttribute('target', '_blank'); // callLink.setAttribute('rel', 'noopener'); // callLink.style.textDecoration = 'none'; // const callIcon = document.createElement('i'); // callIcon.className = 'sicon-phone'; // تأكد أن الكلاس صحيح من سلة // callIcon.style.cssText = ` // color: #ffffff; // font-size: 26px; // `; // // إضافة تأثير Hover البسيط لزر الاتصال // callBtn.addEventListener('mouseover', () => { // callBtn.style.transform = 'scale(1.1)'; // callBtn.style.backgroundColor = '#16a34a'; // }); // callBtn.addEventListener('mouseout', () => { // callBtn.style.transform = 'scale(1)'; // callBtn.style.backgroundColor = '#22c55e'; // }); // // تركيب العناصر // callLink.appendChild(callIcon); // callBtn.appendChild(callLink); // document.body.appendChild(callBtn); // } // // --- إنشاء زر الواتساب المنفصل (الزر السفلي المستطيل) --- // const waBtnId = 'angel-wa-btn'; // if (!document.getElementById(waBtnId)) { // const waBtn = document.createElement('div'); // waBtn.id = waBtnId; // // التنسيقات الخاصة بزر الواتساب المستطيل // waBtn.style.cssText = ` // position: fixed; // bottom: 30px; /* المسافة القياسية من أسفل الصفحة */ // right: 30px; /* المسافة القياسية من اليمين */ // background-color: #22c55e; // padding: 8px 20px; // height: 48px; // border-radius: 50px; /* مستطيل بحواف دائرية */ // display: flex; // align-items: center; // justify-content: center; // gap: 10px; // z-index: 10000; // box-shadow: 0 4px 10px rgba(0,0,0,0.2); // transition: all 0.3s ease; // cursor: pointer; // `; // // إنشاء الرابط والأيقونة والنص لزر الواتساب // const waLink = document.createElement('a'); // waLink.href = 'https://wa.me/+966554554112?text=تواصل%20معنا%20الان'; // waLink.setAttribute('target', '_blank'); // waLink.setAttribute('rel', 'noopener'); // waLink.style.cssText = 'text-decoration: none; display: flex; align-items: center; gap: 10px;'; // const waIcon = document.createElement('i'); // waIcon.className = 'sicon-whatsapp2'; // تأكد أن الكلاس صحيح من سلة // waIcon.style.cssText = ` // color: #ffffff; // font-size: 24px; // `; // const waText = document.createElement('span'); // waText.innerText = 'تواصل معنا'; // waText.style.cssText = ` // color: #ffffff; // font-weight: bold; // font-family: sans-serif; // `; // // إضافة تأثير Hover البسيط لزر الواتساب // waBtn.addEventListener('mouseover', () => { // waBtn.style.transform = 'scale(1.05)'; // waBtn.style.backgroundColor = '#16a34a'; // }); // waBtn.addEventListener('mouseout', () => { // waBtn.style.transform = 'scale(1)'; // waBtn.style.backgroundColor = '#22c55e'; // }); // // تركيب العناصر // waLink.appendChild(waIcon); // waLink.appendChild(waText); // waBtn.appendChild(waLink); // document.body.appendChild(waBtn); // } // })(); (function() { const container = document.getElementById('wa-angel'); if (container) { // تفريغ أي شيء قديم داخل الحاوية container.innerHTML = ''; // 1. إنشاء زر الواتساب (المستطيل السفلي) const waBtn = document.createElement('a'); waBtn.href = 'https://wa.me/966554554112?text=تواصل%20معنا%20الان'; waBtn.target = '_blank'; waBtn.className = 'custom-float-btn'; waBtn.style.cssText = 'padding: 10px 20px; border-radius: 50px; gap: 8px; font-weight: bold; font-family: sans-serif;'; waBtn.innerHTML = ' تواصل معنا'; // 2. إنشاء زر الاتصال (الدائري العلوي) const callBtn = document.createElement('a'); callBtn.href = 'tel:966554554112'; callBtn.className = 'custom-float-btn'; callBtn.style.cssText = 'width: 50px; height: 50px; border-radius: 50%;'; callBtn.innerHTML = ''; // إضافة الأزرار داخل الحاوية (بالترتيب: الواتساب أولاً لأنه أسفل في column-reverse) container.appendChild(waBtn); container.appendChild(callBtn); } })();