phone
This commit is contained in:
@@ -74,7 +74,7 @@
|
|||||||
<a href="#systeme" class="nav-link">Systeme</a>
|
<a href="#systeme" class="nav-link">Systeme</a>
|
||||||
<a href="#qualification" class="nav-link">Für wen?</a>
|
<a href="#qualification" class="nav-link">Für wen?</a>
|
||||||
<a href="#process" class="nav-link">Prozess</a>
|
<a href="#process" class="nav-link">Prozess</a>
|
||||||
<a href="#interaction" class="nav-link">Kontakt</a>
|
<a href="#demo-section" class="nav-link">Kontakt</a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<h3>KI-Telefonassistent</h3>
|
<h3>KI-Telefonassistent</h3>
|
||||||
<p>Rufen Sie jetzt an und erleben Sie, wie unsere KI Ihr Anliegen aufnimmt und verarbeitet.</p>
|
<p>Rufen Sie jetzt an und erleben Sie, wie unsere KI Ihr Anliegen aufnimmt und verarbeitet.</p>
|
||||||
<button class="demo-btn" id="demoPhoneBtn">Jetzt anrufen</button>
|
<a href="tel:+49123456789" class="demo-btn" id="demoPhoneBtn">Jetzt anrufen</a>
|
||||||
<span class="demo-note">Kostenlos · Keine Wartezeit · 24/7</span>
|
<span class="demo-note">Kostenlos · Keine Wartezeit · 24/7</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,87 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
|
|
||||||
initButtonNavigation();
|
initButtonNavigation();
|
||||||
|
|
||||||
|
// ==========================================
|
||||||
|
// 1.6. PHONE CALL FUNCTIONALITY
|
||||||
|
// ==========================================
|
||||||
|
|
||||||
|
function initPhoneCallFunctionality() {
|
||||||
|
const demoPhoneBtn = document.getElementById('demoPhoneBtn');
|
||||||
|
|
||||||
|
if (demoPhoneBtn) {
|
||||||
|
demoPhoneBtn.addEventListener('click', function(e) {
|
||||||
|
// Check if mobile device
|
||||||
|
const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||||
|
|
||||||
|
if (!isMobile) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
// Show desktop fallback message
|
||||||
|
const phoneNumber = '+49 123 456789';
|
||||||
|
const message = `Bitte rufen Sie uns direkt an: ${phoneNumber}\n\nOder nutzen Sie das Kontaktformular für eine schriftliche Anfrage.`;
|
||||||
|
|
||||||
|
// Create a custom modal instead of alert
|
||||||
|
const modal = document.createElement('div');
|
||||||
|
modal.style.cssText = `
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(0,0,0,0.5);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 10000;
|
||||||
|
font-family: system-ui, -apple-system, sans-serif;
|
||||||
|
`;
|
||||||
|
|
||||||
|
modal.innerHTML = `
|
||||||
|
<div style="
|
||||||
|
background: white;
|
||||||
|
padding: 2rem;
|
||||||
|
border-radius: 12px;
|
||||||
|
max-width: 400px;
|
||||||
|
margin: 1rem;
|
||||||
|
text-align: center;
|
||||||
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
|
||||||
|
">
|
||||||
|
<h3 style="margin: 0 0 1rem 0; color: #333;">Telefonnummer</h3>
|
||||||
|
<p style="margin: 0 0 1.5rem 0; color: #666; line-height: 1.6;">${message}</p>
|
||||||
|
<button style="
|
||||||
|
background: #10b981;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
padding: 0.75rem 1.5rem;
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 1rem;
|
||||||
|
">OK</button>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
|
||||||
|
document.body.appendChild(modal);
|
||||||
|
|
||||||
|
// Close modal on click
|
||||||
|
modal.addEventListener('click', function(e) {
|
||||||
|
if (e.target === modal || e.target.tagName === 'BUTTON') {
|
||||||
|
document.body.removeChild(modal);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Auto-close after 5 seconds
|
||||||
|
setTimeout(() => {
|
||||||
|
if (document.body.contains(modal)) {
|
||||||
|
document.body.removeChild(modal);
|
||||||
|
}
|
||||||
|
}, 5000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
initPhoneCallFunctionality();
|
||||||
|
|
||||||
// ==========================================
|
// ==========================================
|
||||||
// 2. MENU TOGGLE
|
// 2. MENU TOGGLE
|
||||||
// ==========================================
|
// ==========================================
|
||||||
|
|||||||
Reference in New Issue
Block a user