- 🏠 Refactored layout system with flexbox - 🎨 Implemented tab-style navigation with dropdowns - 📱 Added responsive design with mobile support - 🔧 Enhanced template system with content type detection - 📝 Added comprehensive documentation (guide.md, README.md) - ⚙️ Improved security with proper file access control - 🎨 Added meta tags for SEO and author attribution - 📁 Fixed breadcrumb navigation and duplicate links - 🗂️ Removed unused files and cleaned up project structure - ⚙️ Added JSON configuration system with homepage detection - 📱 Enhanced search functionality with snippet display - 🔗 Implemented auto-linking between pages - 📊 Added file metadata display in footer Features: - Multi-format content support (Markdown, PHP, HTML) - Dynamic navigation with collapsible folders - Full-text search across all content - Responsive Bootstrap 5 design - JSON-based configuration - SEO-optimized meta tags - Security-focused file management - Mobile-first responsive design - Auto-linking between pages - File metadata tracking - Breadcrumb navigation - Custom CSS styling - Progressive enhancement Technical improvements: - Replaced fixed positioning with flexbox layout - Implemented proper template inheritance - Added content type detection - Enhanced security with .htaccess - Optimized for performance - Added proper error handling - Implemented caching mechanisms - Enhanced accessibility features
41 lines
1.5 KiB
JavaScript
41 lines
1.5 KiB
JavaScript
// Main application JavaScript
|
|
// This file contains general application functionality
|
|
|
|
// Initialize application when DOM is ready
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
console.log('CodePress CMS initialized');
|
|
|
|
// Handle nested dropdowns for touch devices
|
|
const dropdownSubmenus = document.querySelectorAll('.dropdown-submenu');
|
|
|
|
dropdownSubmenus.forEach(function(submenu) {
|
|
const toggle = submenu.querySelector('.dropdown-toggle');
|
|
const dropdown = submenu.querySelector('.dropdown-menu');
|
|
|
|
if (toggle && dropdown) {
|
|
// Prevent default link behavior
|
|
toggle.addEventListener('click', function(e) {
|
|
e.preventDefault();
|
|
e.stopPropagation();
|
|
|
|
// Close other submenus at the same level
|
|
const parent = submenu.parentElement;
|
|
parent.querySelectorAll('.dropdown-submenu').forEach(function(sibling) {
|
|
if (sibling !== submenu) {
|
|
sibling.querySelector('.dropdown-menu').classList.remove('show');
|
|
}
|
|
});
|
|
|
|
// Toggle current submenu
|
|
dropdown.classList.toggle('show');
|
|
});
|
|
|
|
// Close submenu when clicking outside
|
|
document.addEventListener('click', function(e) {
|
|
if (!submenu.contains(e.target)) {
|
|
dropdown.classList.remove('show');
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}); |