diff --git a/README.md b/README.md index ae85ccb..1e69b4c 100644 --- a/README.md +++ b/README.md @@ -1,80 +1,157 @@ # CodePress CMS -Een lichtgewicht PHP Content Management System gebouwd met Bootstrap en Mustache-style templating. +A lightweight, file-based Content Management System built with PHP and Bootstrap. -## Project Achtergrond +## Overview -Dit project is ontwikkeld in opdracht van **Edwin Noorlander** als een demonstratie van een modern, file-based CMS. De opdracht was om een eenvoudig maar krachtig systeem te creΓ«ren dat content beheert via bestanden in plaats van een database. +CodePress is a modern, secure CMS that manages content through files instead of a database. It's designed for simplicity, flexibility, and ease of use while maintaining powerful features for content management. -## Ontwikkelingsproces +## Features -### Technische Keuzes -- **PHP 8.4+** voor server-side logica -- **Bootstrap 5** voor responsive design -- **File-based content storage** voor eenvoudig beheer -- **Markdown en PHP support** voor flexibele content -- **SVG iconen** voor scherpe graphics +### 🎯 Core Features +- **File-based content** - No database required +- **Multi-format support** - Markdown, PHP, HTML files +- **Dynamic navigation** - Auto-generated from directory structure +- **Search functionality** - Full-text search with snippets +- **Breadcrumb navigation** - Clear page hierarchy +- **Responsive design** - Works on all devices -### Iteratieve Ontwikkeling -Het project is stapsgewijs opgebouwd met continue feedback: +### πŸ”§ Advanced Features +- **Collapsible folders** - Accordion-style navigation +- **WCAG compliant** - Accessible design with proper contrast +- **File metadata** - Creation and modification dates in footer +- **Progressive styling** - Visual hierarchy with nested levels +- **Security** - Protected PHP files and sensitive directories -1. **Basis structuur** - Configuratie en templating systeem -2. **Content parsing** - Markdown, PHP en HTML ondersteuning -3. **Navigatie** - Dynamische menu generatie met hiΓ«rarchie -4. **Zoekfunctionaliteit** - Volledige tekst doorzoeking van content -5. **UI/UX verbeteringen** - Progressieve achtergrondkleuren, collapsible mappen -6. **Toegankelijkheid** - WCAG compliant contrast en navigatie -7. **Footer met metadata** - Bestandsinformatie en aanmaak/bewerkingsdatums +## Quick Start -### Kernfeatures -- βœ… **Multi-format content**: Markdown, PHP, HTML bestanden -- βœ… **Dynamische navigatie**: Automatische menu generatie uit directory structuur -- βœ… **Zoekfunctie**: Volledige tekst doorzoeking met snippets -- βœ… **Kruimelpad**: Navigatie pad indicatie -- βœ… **Collapsible mappen**: Accordion-style navigatie -- βœ… **WCAG compliant**: Goede contrast ratio's en toegankelijkheid -- βœ… **Responsive design**: Werkt op alle schermformaten -- βœ… **File metadata**: Aanmaak- en bewerkingsdatums in footer - -## Installatie - -1. Zorg dat PHP 8.4+ geΓ―nstalleerd is -2. Clone dit repository -3. Start de development server: +1. **Requirements**: PHP 8.4+ +2. **Installation**: ```bash - php -S localhost:8000 + git clone https://git.noorlander.info/E.Noorlander/CodePress.git + cd CodePress ``` -4. Bezoek `http://localhost:8000` in je browser +3. **Start server**: + ```bash + php -S localhost:8000 -t public + ``` +4. **Visit**: `http://localhost:8000` -## Content Beheer - -- Plaats content bestanden in de `content/` map -- Gebruik `.md`, `.php` of `.html` extensies -- De menu structuur volgt automatisch de directory hiΓ«rarchie -- Submappen worden genest in de navigatie weergegeven - -## Project Structuur +## Project Structure ``` codepress/ -β”œβ”€β”€ assets/ # Iconen en static files -β”œβ”€β”€ content/ # Content bestanden (MD/PHP/HTML) -β”œβ”€β”€ templates/ # HTML templates -β”œβ”€β”€ config.php # Site configuratie -β”œβ”€β”€ index.php # Hoofd applicatie logica -└── README.md # Deze documentatie +β”œβ”€β”€ public/ # Web-accessible directory +β”‚ β”œβ”€β”€ content/ # Content files (MD/PHP/HTML) +β”‚ β”œβ”€β”€ assets/ # Static assets (images, icons) +β”‚ └── .htaccess # Security and routing +β”œβ”€β”€ templates/ # HTML templates +β”œβ”€β”€ config.php # Site configuration +β”œβ”€β”€ index.php # Main application logic +β”œβ”€β”€ .htaccess # Root security +└── README.md # This documentation ``` -## Opdrachtgever +## Security -**Edwin Noorlander** -- Persoonlijke blog: [https://noorlander.info](https://noorlander.info) -- Git repository: [https://git.noorlander.info/E.Noorlander/CodePress.git](https://git.noorlander.info/E.Noorlander/CodePress.git) +CodePress includes built-in security features: +- **.htaccess protection** for sensitive files +- **PHP file blocking** in content directory +- **Security headers** for XSS protection +- **Directory access control** +- **Public directory isolation** -## Licentie +## Content Management -Dit project is ontwikkeld als onderdeel van een opdracht en valt onder de voorwaarden zoals overeengekomen met de opdrachtgever. +### Supported File Types + +#### Markdown (.md) +```markdown +# Page Title + +Content with **bold** and *italic* text. + +[Link to page](?page=other/page) +``` + +#### PHP (.php) +```php + + +

+

Date:

+``` + +#### HTML (.html) +```html +

Static HTML Page

+
+ Custom HTML content +
+``` + +### Directory Structure +``` +public/content/ +β”œβ”€β”€ home.md # Homepage +β”œβ”€β”€ about/ +β”‚ └── company.md # About page +β”œβ”€β”€ blog/ +β”‚ β”œβ”€β”€ tech/ +β”‚ β”‚ └── post.md # Blog post +β”‚ └── index.md # Blog overview +└── projects/ + └── web-design.md # Project page +``` + +## Configuration + +Edit `config.php` to customize: + +```php +return [ + 'site_title' => 'Your Site Name', + 'site_description' => 'Your site description', + 'content_dir' => __DIR__ . '/public/content', + 'default_page' => 'home', + 'markdown_enabled' => true, + 'php_enabled' => true, +]; +``` + +## Branches + +- **main**: Clean CodePress CMS with documentation +- **e.noorlander**: Personal blog content and customizations +- **development**: Active development branch + +## Development + +### Adding Features +1. Create feature branch from `development` +2. Implement changes +3. Test thoroughly +4. Submit merge request + +### Contributing +- Follow PSR-12 coding standards +- Test security implications +- Update documentation +- Maintain backward compatibility + +## License + +This project is developed for specific use cases. Contact the maintainer for licensing information. + +## Support + +- **Documentation**: See `public/content/home.md` +- **Issues**: Report on GitLab +- **Community**: Join discussions --- -*Gebouwd met ❀️ en PHP* \ No newline at end of file +*Built with ❀️ and PHP* \ No newline at end of file diff --git a/public/templates/layout.html b/public/templates/layout.html index cc23028..d5e89bb 100644 --- a/public/templates/layout.html +++ b/public/templates/layout.html @@ -155,13 +155,6 @@ font-size: 0.9rem; color: #6c757d; } - .site-info a { - color: #0d6efd; - text-decoration: none; - } - .site-info a:hover { - text-decoration: underline; - } .search-form { max-width: 300px; } @@ -249,7 +242,7 @@ {{file_info}}
- Powered by CodePress CMS + Powered by CodePress CMS