seo fixes
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
// Accordion script
|
|
||||||
const accTitles = document.querySelectorAll('.accordion-title');
|
const accTitles = document.querySelectorAll('.accordion-title');
|
||||||
|
|
||||||
accTitles.forEach(title => {
|
accTitles.forEach(title => {
|
||||||
title.addEventListener('click', () => {
|
title.addEventListener('click', () => {
|
||||||
// Close all other accordions
|
|
||||||
accTitles.forEach(otherTitle => {
|
accTitles.forEach(otherTitle => {
|
||||||
if (otherTitle !== title) {
|
if (otherTitle !== title) {
|
||||||
otherTitle.classList.remove('active');
|
otherTitle.classList.remove('active');
|
||||||
@@ -11,7 +9,6 @@ accTitles.forEach(title => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Toggle the clicked one
|
|
||||||
const content = title.nextElementSibling;
|
const content = title.nextElementSibling;
|
||||||
const isOpen = content.style.display === 'block';
|
const isOpen = content.style.display === 'block';
|
||||||
title.classList.toggle('active');
|
title.classList.toggle('active');
|
||||||
@@ -19,7 +16,6 @@ accTitles.forEach(title => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Slider script
|
|
||||||
const slides = document.querySelectorAll('.slide');
|
const slides = document.querySelectorAll('.slide');
|
||||||
let currentIndex = 0;
|
let currentIndex = 0;
|
||||||
|
|
||||||
@@ -31,14 +27,11 @@ function nextSlide() {
|
|||||||
slides[currentIndex].classList.add('active');
|
slides[currentIndex].classList.add('active');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initial display
|
|
||||||
if (slides.length > 0) {
|
if (slides.length > 0) {
|
||||||
slides[currentIndex].classList.add('active');
|
slides[currentIndex].classList.add('active');
|
||||||
// Change slide every 10 seconds
|
|
||||||
setInterval(nextSlide, 10000);
|
setInterval(nextSlide, 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Chat widget script
|
|
||||||
(function () {
|
(function () {
|
||||||
const preamble = `
|
const preamble = `
|
||||||
We use what we preach — this chatbot is powered by our own n8n automation 🤖 to help you quickly find what you need.
|
We use what we preach — this chatbot is powered by our own n8n automation 🤖 to help you quickly find what you need.
|
||||||
@@ -111,7 +104,6 @@ If it’s not the right fit, no worries — we’ll refund you 💸.
|
|||||||
btn.addEventListener('click', (e) => {
|
btn.addEventListener('click', (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
// Open chat if not already visible
|
|
||||||
if (!chatWidget.classList.contains('active')) {
|
if (!chatWidget.classList.contains('active')) {
|
||||||
chatWidget.classList.add('active');
|
chatWidget.classList.add('active');
|
||||||
if (!chatOpened) {
|
if (!chatOpened) {
|
||||||
@@ -120,7 +112,6 @@ If it’s not the right fit, no worries — we’ll refund you 💸.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send predefined message
|
|
||||||
appendMessage(message, 'user');
|
appendMessage(message, 'user');
|
||||||
|
|
||||||
fetch(api, {
|
fetch(api, {
|
||||||
@@ -139,9 +130,8 @@ If it’s not the right fit, no worries — we’ll refund you 💸.
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attach all three buttons
|
|
||||||
handleBuyClick('buy-3h', 'I want to buy the 3 Hours pack for $450.');
|
handleBuyClick('buy-3h', 'I want to buy the 3 Hours pack for $450.');
|
||||||
handleBuyClick('buy-5h', 'I want to buy the 5 Hours pack for $675.');
|
handleBuyClick('buy-5h', 'I want to buy the 5 Hours pack for $675.');
|
||||||
handleBuyClick('buy-10h', 'I want to buy the 10 Hours pack for $1200.');
|
handleBuyClick('buy-10h', 'I want to buy the 10 Hours pack for $1200.');
|
||||||
handleBuyClick('buy-bundle', 'I want to buy the ODOO and N8N bundle for $395 per year.');
|
handleBuyClick('buy-bundle', 'I want to buy the ODOO and N8N bundle for $395 per year.');
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<script defer src="./app.js"></script>
|
<script defer src="./app.js"></script>
|
||||||
|
|
||||||
<button id="cw-chatToggle" aria-label="Toggle chat widget" type="button">
|
<button id="cw-chatToggle" aria-label="Toggle chat widget" type="button">
|
||||||
<img src="logo.svg"><span class="text-xs">Agent</span>
|
<img src="logo.svg" alt="Logo"><span class="text-xs">Agent</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div id="cw-chatWidget" role="region" aria-live="polite" aria-label="Customer support chat widget">
|
<div id="cw-chatWidget" role="region" aria-live="polite" aria-label="Customer support chat widget">
|
||||||
@@ -345,4 +345,4 @@
|
|||||||
<script defer src="./app.js"></script>
|
<script defer src="./app.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user