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>
41 lines
997 B
PHP
41 lines
997 B
PHP
<?php
|
|
/**
|
|
* Page projet individuel
|
|
*/
|
|
|
|
$slug = $GLOBALS['routeParams'][0] ?? null;
|
|
$project = getProjectBySlug($slug);
|
|
|
|
if (!$project) {
|
|
http_response_code(404);
|
|
include __DIR__ . '/404.php';
|
|
exit;
|
|
}
|
|
|
|
$pageTitle = $project['title'];
|
|
$pageDescription = $project['context'];
|
|
$currentPage = 'projets';
|
|
|
|
include_template('header', compact('pageTitle', 'pageDescription'));
|
|
include_template('navbar', compact('currentPage'));
|
|
?>
|
|
|
|
<main>
|
|
<section class="section">
|
|
<div class="container-content">
|
|
<div class="section-header">
|
|
<h1 class="section-title"><?= htmlspecialchars($project['title']) ?></h1>
|
|
<p class="section-subtitle">
|
|
<?= htmlspecialchars($project['duration']) ?>
|
|
</p>
|
|
</div>
|
|
|
|
<p class="text-text-secondary text-center">
|
|
Page en construction - Story 3.4
|
|
</p>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<?php include_template('footer'); ?>
|