Initial commit: Luftglanz drone website with integrated AI chat assistant

Features:
- Complete Luftglanz drone cleaning website
- AI chat assistant integrated with OpenAI API
- Expert product advice for AGO Quart and Mellerud cleaning products
- Formal German language support (Sie form)
- Secure PHP backend for API calls
- Responsive design with mobile support
- Product-specific knowledge base
- Safety statements from manufacturers
- Multi-page integration (index, products, services, contact)

Technical components:
- AI chat widget (js/ai-chat.js)
- Chat styling (css/components/ai-chat.css)
- Backend API (ai-chat-api.php)
- Product knowledge base with detailed specifications
- Demo and documentation files
This commit is contained in:
Luftglanz
2025-07-08 11:54:37 +02:00
commit ac7088c5ca
72 changed files with 7936 additions and 0 deletions

28
js/navigation.js Normal file
View File

@@ -0,0 +1,28 @@
document.addEventListener('DOMContentLoaded', function() {
// Get current page path
const currentPath = window.location.pathname;
const isInPagesDirectory = currentPath.includes('/pages/');
// Handle paths based on directory
const navLinks = document.querySelectorAll('#mainNav a');
navLinks.forEach(link => {
// Get href attribute
let href = link.getAttribute('href');
// Fix paths if in pages directory
if (isInPagesDirectory && href.startsWith('index.html')) {
link.setAttribute('href', '../' + href);
} else if (isInPagesDirectory && href.startsWith('#')) {
link.setAttribute('href', '../index.html' + href);
} else if (!isInPagesDirectory && href.startsWith('pages/')) {
// No change needed for root directory links to pages
}
// Set active class based on current page
if ((currentPath.endsWith('/index.html') || currentPath.endsWith('/')) && href === 'index.html') {
link.classList.add('active');
} else if (currentPath.includes(href) && href !== 'index.html') {
link.classList.add('active');
}
});
});