🚀 Feature: Router PHP + Pages projets (Stories 3.2 & 3.3)
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>
This commit is contained in:
45
pages/projects.php
Normal file
45
pages/projects.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Page liste des projets
|
||||
*/
|
||||
|
||||
$pageTitle = 'Mes Projets';
|
||||
$pageDescription = 'Découvrez mes réalisations web : sites vitrines, e-commerce, applications et plus encore.';
|
||||
$currentPage = 'projets';
|
||||
|
||||
$featuredProjects = getProjectsByCategory('vedette');
|
||||
|
||||
include_template('header', compact('pageTitle', 'pageDescription'));
|
||||
include_template('navbar', compact('currentPage'));
|
||||
?>
|
||||
|
||||
<main>
|
||||
<!-- Header de page -->
|
||||
<section class="section">
|
||||
<div class="container-content">
|
||||
<div class="section-header">
|
||||
<h1 class="section-title">Mes Projets</h1>
|
||||
<p class="section-subtitle">
|
||||
Découvrez les réalisations qui illustrent mon travail et mes compétences.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Grille des projets vedettes -->
|
||||
<?php if (!empty($featuredProjects)): ?>
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 lg:gap-8">
|
||||
<?php foreach ($featuredProjects as $project): ?>
|
||||
<?php include_template('project-card', ['project' => $project]); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p class="text-center text-text-secondary py-12">
|
||||
Projets à venir...
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Section projets secondaires (Story 3.5) -->
|
||||
</main>
|
||||
|
||||
<?php include_template('footer'); ?>
|
||||
Reference in New Issue
Block a user