From d3e699d00e13aa02deb5db2327768494b9acda60 Mon Sep 17 00:00:00 2001
From: skycel
Date: Wed, 4 Feb 2026 17:14:37 +0100
Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Story=203.5:=20projets=20secondaire?=
=?UTF-8?q?s?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/stories/3.5.projets-secondaires.md | 34 ++++++++--------
pages/projects.php | 14 +++++++
templates/project-card-compact.php | 54 +++++++++++++++++++++++++
tests/projects-secondary.test.php | 24 +++++++++++
tests/run.ps1 | 1 +
5 files changed, 111 insertions(+), 16 deletions(-)
create mode 100644 templates/project-card-compact.php
create mode 100644 tests/projects-secondary.test.php
diff --git a/docs/stories/3.5.projets-secondaires.md b/docs/stories/3.5.projets-secondaires.md
index 414d730..d83ef0b 100644
--- a/docs/stories/3.5.projets-secondaires.md
+++ b/docs/stories/3.5.projets-secondaires.md
@@ -2,7 +2,7 @@
## Status
-Ready for Dev
+review
## Story
@@ -20,20 +20,20 @@ Ready for Dev
## Tasks / Subtasks
-- [] **Task 1 : Ajouter la section dans projects.php** (AC: 1, 5)
- - [] Récupérer les projets secondaires
- - [] Ajouter un titre de section "Autres projets"
- - [] Ajouter un séparateur visuel
+- [x] **Task 1 : Ajouter la section dans projects.php** (AC: 1, 5)
+ - [x] Récupérer les projets secondaires
+ - [x] Ajouter un titre de section "Autres projets"
+ - [x] Ajouter un séparateur visuel
-- [] **Task 2 : Créer le template project-card-compact.php** (AC: 2, 3)
- - [] Format liste horizontale
- - [] Titre cliquable (si URL)
- - [] Description courte (truncate si nécessaire)
- - [] Badges technologies (3 max)
+- [x] **Task 2 : Créer le template project-card-compact.php** (AC: 2, 3)
+ - [x] Format liste horizontale
+ - [x] Titre cliquable (si URL)
+ - [x] Description courte (truncate si nécessaire)
+ - [x] Badges technologies (3 max)
-- [] **Task 3 : Gérer les liens** (AC: 4)
- - [] Si URL → lien externe (nouvel onglet)
- - [] Si pas d'URL → texte simple
+- [x] **Task 3 : Gérer les liens** (AC: 4)
+ - [x] Si URL → lien externe (nouvel onglet)
+ - [x] Si pas d'URL → texte simple
## Dev Notes
@@ -143,20 +143,22 @@ $shortContext = strlen($context) > 100
## Dev Agent Record
### Agent Model Used
-Claude Opus 4.5 (claude-opus-4-5-20251101)
+GPT-5 Codex
### File List
| File | Action | Description |
|------|--------|-------------|
| `pages/projects.php` | Modified | Ajout section projets secondaires |
| `templates/project-card-compact.php` | Created | Template carte compacte |
+| `tests/projects-secondary.test.php` | Created | Tests projets secondaires |
+| `tests/run.ps1` | Modified | Ajout tests secondaires |
### Completion Notes
- Section "Autres projets" avec séparateur visuel (hr)
- Template compact: titre + description tronquée (100 chars) + badges (3 max)
- Lien externe avec icône SVG si URL disponible
- rel="noopener" pour sécurité
-- 1 projet secondaire affiché: "Site Vitrine Restaurant"
+- Tests: `powershell -ExecutionPolicy Bypass -File tests/run.ps1`
### Debug Log References
Aucun problème rencontré.
@@ -166,4 +168,4 @@ Aucun problème rencontré.
| Date | Version | Description | Author |
|------|---------|-------------|--------|
| 2026-01-22 | 0.1 | Création initiale | Sarah (PO) |
-| 2026-01-23 | 1.0 | Implémentation complète | James (Dev) |
+| 2026-02-04 | 1.0 | Implémentation complète | Amelia |
diff --git a/pages/projects.php b/pages/projects.php
index ff02ca4..3ad5637 100644
--- a/pages/projects.php
+++ b/pages/projects.php
@@ -4,6 +4,7 @@ $pageDescription = 'Découvrez mes réalisations web : sites vitrines, e-commerc
$currentPage = 'projects';
$featuredProjects = getProjectsByCategory('vedette');
+$secondaryProjects = getProjectsByCategory('secondaire');
include_template('header', compact('pageTitle', 'pageDescription'));
include_template('navbar', compact('currentPage'));
@@ -30,6 +31,19 @@ include_template('navbar', compact('currentPage'));
Projets à venir...
+
+
+
+
+
+ Autres projets
+
+
+ $project]); ?>
+
+
+
+
diff --git a/templates/project-card-compact.php b/templates/project-card-compact.php
new file mode 100644
index 0000000..90d3655
--- /dev/null
+++ b/templates/project-card-compact.php
@@ -0,0 +1,54 @@
+ 100
+ ? substr($context, 0, 100) . '...'
+ : $context;
+?>
+
+
+
+
+
+
+
+ = htmlspecialchars($tech, ENT_QUOTES, 'UTF-8') ?>
+
+
+ $maxTechs): ?>
+ += count($technologies) - $maxTechs ?>
+
+
+
+
\ No newline at end of file
diff --git a/tests/projects-secondary.test.php b/tests/projects-secondary.test.php
new file mode 100644
index 0000000..e152099
--- /dev/null
+++ b/tests/projects-secondary.test.php
@@ -0,0 +1,24 @@
+= 1, 'expected secondary projects');
+
+ob_start();
+foreach ($secondary as $project) {
+ include __DIR__ . '/../templates/project-card-compact.php';
+}
+$html = ob_get_clean();
+
+assertTrue(strpos($html, 'Autres projets') === false, 'template should not include section title');
+assertTrue(strpos($html, 'badge') !== false, 'missing tech badges');
+assertTrue(strpos($html, 'target="_blank"') !== false, 'missing external link');
+
+fwrite(STDOUT, "OK\n");
\ No newline at end of file
diff --git a/tests/run.ps1 b/tests/run.ps1
index 0bf50b4..f4304b9 100644
--- a/tests/run.ps1
+++ b/tests/run.ps1
@@ -13,4 +13,5 @@ php (Join-Path $here 'projects.test.php')
php (Join-Path $here 'router.test.php')
php (Join-Path $here 'projects-list.test.php')
php (Join-Path $here 'project-single.test.php')
+php (Join-Path $here 'projects-secondary.test.php')
'OK'
\ No newline at end of file