Story 3.2 - Router PHP et URLs propres:
- Router PHP léger (43 lignes) avec support {slug}
- Front controller index.php
- .htaccess pour Apache
- Pages: home, projects, project-single, skills, about, contact, 404
Story 3.3 - Page liste projets vedettes:
- Grille responsive (1→2→3 colonnes)
- Template project-card.php réutilisable
- Badges technologies (max 4 + compteur)
- Lazy loading images avec fallback SVG
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
478 B
PHP
20 lines
478 B
PHP
<?php
|
|
/**
|
|
* Front Controller - Point d'entrée unique
|
|
*/
|
|
|
|
require_once __DIR__ . '/includes/functions.php';
|
|
require_once __DIR__ . '/includes/router.php';
|
|
|
|
$router = new Router();
|
|
|
|
$router
|
|
->add('/', 'pages/home.php')
|
|
->add('/projets', 'pages/projects.php')
|
|
->add('/projet/{slug}', 'pages/project-single.php')
|
|
->add('/competences', 'pages/skills.php')
|
|
->add('/a-propos', 'pages/about.php')
|
|
->add('/contact', 'pages/contact.php');
|
|
|
|
$router->dispatch();
|