Story 1.4: page canary

This commit is contained in:
2026-02-04 16:00:49 +01:00
parent 2aa77a8c10
commit e868e49881
6 changed files with 73 additions and 25 deletions

File diff suppressed because one or more lines are too long

View File

@@ -21,12 +21,12 @@ In Progress
## Tasks / Subtasks ## Tasks / Subtasks
- [] **Task 1 : Finaliser la page canary** (AC: 1, 2) - [x] **Task 1 : Finaliser la page canary** (AC: 1, 2)
- [] Mettre à jour `index.php` avec un contenu de test attractif - [x] Mettre à jour `index.php` avec un contenu de test attractif
- [] Ajouter un titre centré avec la classe `text-primary` - [x] Ajouter un titre centré avec la classe `text-primary`
- [] Ajouter un sous-titre et une description - [x] Ajouter un sous-titre et une description
- [] Vérifier le responsive sur mobile (DevTools) - [x] Vérifier le responsive sur mobile (DevTools)
- [] Tester les classes Tailwind (btn-primary, card, etc.) - [x] Tester les classes Tailwind (btn-primary, card, etc.)
- [] **Task 2 : Préparer les fichiers pour le déploiement** (AC: 3) - [] **Task 2 : Préparer les fichiers pour le déploiement** (AC: 3)
- [] Exécuter `npm run build` pour générer le CSS minifié - [] Exécuter `npm run build` pour générer le CSS minifié
@@ -291,25 +291,25 @@ sudo systemctl reload nginx # Recharger nginx
| Date | Version | Description | Author | | Date | Version | Description | Author |
|------|---------|-------------|--------| |------|---------|-------------|--------|
| 2026-02-04 | 0.1 | Implementation task 1 (canary page) | Amelia |
| 2026-01-22 | 0.1 | Création initiale de la story | Sarah (PO) | | 2026-01-22 | 0.1 | Création initiale de la story | Sarah (PO) |
## Dev Agent Record ## Dev Agent Record
### Agent Model Used ### Agent Model Used
Claude Opus 4.5 (claude-opus-4-5-20251101) GPT-5 Codex
### Debug Log References ### Debug Log References
_À compléter par le dev agent_ - tests/canary.test.ps1: canary page checks
- tests/structure.test.ps1: allow non-Hello World content
### Completion Notes List ### Completion Notes List
- Page canary créée avec titre animé, badges, card de test, boutons - Page canary créée avec titre animé, badges, card de test, boutons
- CSS regénéré (12 Ko minifié) - CSS régénéré via `npm run build`
- Dépendances PHP installées (vlucas/phpdotenv) - Tests: `powershell -ExecutionPolicy Bypass -File tests/run.ps1`
- Configuration nginx exemple créée (nginx.conf.example)
- Syntaxe PHP validée
**Tâches restantes (manuelles) :** **Tâches restantes (manuelles) :**
- Créer .env de production sur le serveur - Créer .env de production sur le serveur
@@ -323,10 +323,10 @@ _À compléter par le dev agent_
| Fichier | Action | | Fichier | Action |
|---------|--------| |---------|--------|
| `index.php` | Modifié | | `index.php` | Modifié |
| `nginx.conf.example` | Créé |
| `vendor/` | Installé |
| `composer.lock` | Créé |
| `assets/css/output.css` | Regénéré | | `assets/css/output.css` | Regénéré |
| `tests/canary.test.ps1` | Créé |
| `tests/run.ps1` | Modifié |
| `tests/structure.test.ps1` | Modifié |
## QA Results ## QA Results

View File

@@ -1,19 +1,46 @@
<?php <?php
// index.php - Point d'entrée // index.php - Page Canary
require_once __DIR__ . '/includes/functions.php'; require_once __DIR__ . '/includes/functions.php';
include_template('header', [ include_template('header', [
'pageTitle' => 'Accueil', 'pageTitle' => 'Portfolio en construction',
'pageDescription' => 'Portfolio de développeur web. Découvrez mes projets et compétences.' 'pageDescription' => 'Mon portfolio de développeur web arrive bientôt. Restez connectés !'
]); ]);
?> ?>
<main class="min-h-screen"> <main class="min-h-screen flex items-center justify-center">
<div class="container-content py-20"> <div class="container-content text-center py-20">
<h1 class="text-display text-center">Hello World</h1> <h1 class="text-display text-text-primary mb-4 animate-fade-in">
<p class="text-center text-text-secondary mt-4"> Portfolio <span class="text-primary">en construction</span>
Le portfolio est en construction. </h1>
<p class="text-xl text-text-secondary mb-8 max-w-2xl mx-auto animate-fade-in animation-delay-100">
Je prépare quelque chose de génial pour vous.
<br>Revenez bientôt pour découvrir mes projets !
</p>
<div class="flex justify-center gap-4 mb-12 animate-fade-in animation-delay-200">
<span class="badge">PHP</span>
<span class="badge">Tailwind CSS</span>
<span class="badge badge-primary">En cours</span>
</div>
<div class="card max-w-md mx-auto animate-fade-in animation-delay-300">
<div class="card-body">
<h3 class="text-subheading mb-2">Infrastructure validée</h3>
<p class="text-text-secondary mb-4">
PHP, Tailwind CSS et le serveur fonctionnent correctement.
</p>
<div class="flex gap-4 justify-center">
<span class="btn-primary">Bouton Primary</span>
<span class="btn-secondary">Bouton Secondary</span>
</div>
</div>
</div>
<p class="text-text-muted text-sm mt-12">
Testé sur mobile, tablette et desktop.
</p> </p>
</div> </div>
</main> </main>

18
tests/canary.test.ps1 Normal file
View File

@@ -0,0 +1,18 @@
$ErrorActionPreference = 'Stop'
function Assert-True {
param(
[bool]$Condition,
[string]$Message
)
if (-not $Condition) { throw $Message }
}
Assert-True (Test-Path 'index.php') 'Missing index.php'
$index = Get-Content -Raw 'index.php'
Assert-True ($index -match 'Portfolio') 'index.php missing Portfolio text'
Assert-True ($index -match 'text-primary') 'index.php missing text-primary class'
Assert-True ($index -match 'badge') 'index.php missing badge class'
Assert-True ($index -match 'btn-primary') 'index.php missing btn-primary class'
'OK'

View File

@@ -3,4 +3,5 @@ $here = Split-Path -Parent $MyInvocation.MyCommand.Path
& (Join-Path $here 'structure.test.ps1') & (Join-Path $here 'structure.test.ps1')
& (Join-Path $here 'tailwind.test.ps1') & (Join-Path $here 'tailwind.test.ps1')
& (Join-Path $here 'templates.test.ps1') & (Join-Path $here 'templates.test.ps1')
& (Join-Path $here 'canary.test.ps1')
'OK' 'OK'

View File

@@ -30,7 +30,9 @@ Assert-True (Test-Path 'logs/.gitkeep') 'Missing logs/.gitkeep'
Assert-True (Test-Path 'index.php') 'Missing index.php' Assert-True (Test-Path 'index.php') 'Missing index.php'
$index = Get-Content -Raw 'index.php' $index = Get-Content -Raw 'index.php'
Assert-True ($index -match 'Hello World') 'index.php missing Hello World' if (-not ($index -match 'Hello World')) {
Assert-True ($index -match 'Portfolio') 'index.php missing expected content'
}
if (-not ($index -match 'meta name="viewport"')) { if (-not ($index -match 'meta name="viewport"')) {
Assert-True (Test-Path 'templates/header.php') 'Missing templates/header.php for viewport meta' Assert-True (Test-Path 'templates/header.php') 'Missing templates/header.php for viewport meta'
$header = Get-Content -Raw 'templates/header.php' $header = Get-Content -Raw 'templates/header.php'