12 Commits

Author SHA1 Message Date
14a6cae499 Fix page name parsing to support dots in filenames
- Change regex to only remove file extensions (.md, .php, .html) not all dots
- Fix en.test.md and nl.testpagina.md 404 errors caused by over-aggressive regex
- Update all references to use  instead of
- Language-specific pages with dots in names now load correctly
- Pages like 'en.test.md' work as expected without being truncated to 'en'
2025-11-22 16:33:16 +01:00
bf2ee9c212 Fix internal markdown links and auto-linking language persistence
- Add language parameter to autoLinkPageTitles() method
- Fix internal links to include current language (?page=x&lang=en)
- Remove broken header ID syntax from English guide
- Ensure all auto-generated internal links maintain language context
- Internal page links now work correctly across language switches
2025-11-22 16:28:19 +01:00
bea9cdfb0c Fix language-specific page loading and correct en/uk naming
- Fix getPage() to search for language-specific files (en.test.md, nl.test.md)
- Correct guide file naming: uk.codepress.md → en.codepress.md
- Update scanDirectory() filtering: uk → en for consistency
- Update formatDisplayName() cleaning: uk → en for consistency
- Language-specific pages now load correctly without 404 errors
- Pages display with clean names (without language prefixes)
2025-11-22 16:21:22 +01:00
79eb010fa5 Implement language-specific content system
- Rename guide files: nl.md → nl.codepress.md, en.md → uk.codepress.md
- Add language filtering in scanDirectory() for nl.* and uk.* files/folders
- Update formatDisplayName() to remove language prefixes from display names
- Update getGuidePage() to use new naming convention (en → uk mapping)
- Content with nl. prefix only shows when Dutch language is selected
- Content with uk. prefix only shows when English language is selected
2025-11-22 16:14:59 +01:00
9bb21579f7 Fix guide content language and language switcher context
- Change getGuidePage() to use currentLanguage instead of detectLanguage()
- Add lang_switch_url template variable for proper context-aware switching
- Language switcher now stays on guide page when switching languages
- Guide content now displays in correct language based on URL parameter
2025-11-22 16:05:33 +01:00
2d934702cd Fix language persistence across navigation and breadcrumbs
- Add lang parameter to all navigation links in scanDirectory method
- Update homepage link in navigation template to include current language
- Fix breadcrumb navigation to preserve language parameter
- Ensure language selection persists when clicking any navigation element
2025-11-22 15:54:40 +01:00
a2b7fcb1a8 ## Complete Multi-language System & Navigation Enhancement
### Features Added:
- **Multi-language Support**: Dutch/English with URL-based switching (?lang=nl|en)
- **Theme Customization**: Configurable header/navigation colors via config.json
- **Navigation Improvements**: Active states, dropdown chevron icons, visual distinction
- **Mobile Responsive**: Separate desktop/mobile search layouts
- **Template System**: Fixed rendering pipeline for all partials

### Technical Fixes:
- Fixed language file path (engine/lang/ vs engine/core/class/../lang/)
- Added template data rendering to layout template
- Implemented navigation active state for default/home page
- Added chevron icons to dropdown folders for visual distinction
- Removed hardcoded navigation opacity class for theme colors

### Files Modified:
- config.json: Added theme and language configuration
- engine/core/class/CodePressCMS.php: Multi-language and navigation logic
- engine/templates/: Enhanced header, footer, navigation, layout
- engine/lang/: Dutch and English translation files
- public/assets/css/mobile.css: Mobile responsive fixes

### Result:
Fully functional multi-language CMS with proper navigation states and theme customization.
2025-11-22 15:29:47 +01:00
863661612a ## Major CodePress CMS Enhancement
### 🚀 New Features
- **League CommonMark Integration**: Replaced basic Markdown parser with full CommonMark 2.7 support
- **Bootstrap Sass Architecture**: Modern SCSS build system with Bootstrap 5.3.8
- **Enhanced Navigation**: Uses filenames instead of H1 titles for consistency
- **Improved Styling**: Transparent navigation backgrounds, no rounded corners

### 🎨 UI/UX Improvements
- Navigation items now use formatted filenames (e.g., "kennis-boven-aantallen" → "Kennis Boven Aantallen")
- Transparent navigation backgrounds with subtle hover effects
- Removed rounded corners from first-level navigation
- 50% opacity navigation background using Bootstrap variables

### 🔧 Technical Improvements
- **Class Organization**: Extracted CodePressCMS and SimpleTemplate to separate files
- **Full PHPDoc Documentation**: Complete documentation for all methods
- **Modern Build Process**: npm scripts for SCSS compilation
- **Enhanced Markdown Support**: Tables, strikethrough, task lists, autolinks
- **Security**: Proper HTML sanitization with CommonMark

### 📦 Dependencies
- Added `league/commonmark` for professional Markdown parsing
- Added `bootstrap` for SCSS-based styling
- Updated `sass` build process

### 🐛 Bug Fixes
- Fixed content directory path configuration
- Resolved navigation title inconsistencies
- Improved Markdown bold/italic formatting
- Fixed homepage 404 issues

### 🔄 Migration Notes
- Content directory moved from `content/` to `public/content/`
- Navigation now displays filenames instead of content H1 titles
- CSS now compiled from SCSS source files

The CMS now provides a professional, modern experience with robust Markdown support and clean, maintainable code architecture.
2025-11-21 20:23:20 +01:00
dfe2df141b Complete CodePress CMS refactoring
- 🏠 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
2025-11-21 16:58:37 +01:00
a86809c243 Refactor: Replace sidebar with horizontal navigation bar
- Remove sidebar and toggle functionality
- Add Bootstrap navbar with dropdown menus
- Move navigation to top between header and content
- Update menu rendering for Bootstrap dropdowns
- Clean up unused files (header.mustache, sidebar.mustache, sidebar.js)
- Add guide link with book icon in footer
- Simplify layout structure
- Remove duplicate code and fix syntax errors
- Add .gitignore for node_modules and other temp files
2025-11-21 14:23:41 +01:00
0f1c7234b8 Implement modern sidebar navigation with hamburger menu
- Add responsive sidebar with hamburger toggle functionality
- Implement dual toggle buttons (inner/outer) for better UX
- Fix sidebar positioning to not overlap header and footer
- Add sticky footer with proper z-index layering
- Download and integrate Bootstrap source maps locally
- Optimize toggle icons: smaller, cleaner, no button styling
- Ensure sidebar respects footer boundaries
- Add smooth transitions and hover effects
- Fix active page highlighting and folder auto-expansion
- Create professional W3Schools-style navigation
- Maintain full offline capability with local assets
2025-11-19 18:02:48 +01:00
494ae7dc3b Restructure project for security and offline capability
- Move content outside public web root for security
- Consolidate all code and assets in engine/ directory
- Download Bootstrap locally for offline functionality
- Update public/ to contain only entry point files
- Add router.php for PHP development server security
- Update README.md with new structure and setup instructions
- Block direct access to content files via URL
- Maintain clean separation between content and code
2025-11-19 17:05:25 +01:00