refactor: rename 'recit' to 'narrative' for English code naming

- Rename store: recit.js → narrative.js (useRecitStore → useNarrativeStore)
- Rename templates: recit.php/json.php → narrative.php/json.php
- Rename blueprint: recit.yml → narrative.yml
- Update all imports and references in Vue/JS files
- Update PHP template references and data attributes
- Update CLAUDE.md documentation
- Create comprehensive README.md with English-French dictionary

The dictionary section maps English code terms to French content terms
for easier navigation between codebase and CMS content.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-01-09 10:34:10 +01:00
parent ea0994ed45
commit af788ad1e0
12 changed files with 267 additions and 66 deletions

View file

@ -2,8 +2,8 @@
/**
* Virtual Print Page Plugin
*
* Crée une page virtuelle /print pour chaque récit
* Permet d'accéder à l'éditeur d'impression via /projet/recit/print
* Creates a virtual /print page for each narrative
* Allows access to print editor via /projet/narrative/print
*/
use Kirby\Cms\Page;
@ -14,20 +14,20 @@ Kirby::plugin('geoproject/virtual-print-page', [
[
'pattern' => '(:all)/print',
'action' => function ($parentPath) {
// Trouver la page parente (le récit)
// Find parent page (the narrative)
$parent = page($parentPath);
if (!$parent || $parent->intendedTemplate()->name() !== 'recit') {
if (!$parent || $parent->intendedTemplate()->name() !== 'narrative') {
return $this->next();
}
// Créer la page virtuelle avec Page::factory()
// Create virtual page with Page::factory()
return Page::factory([
'slug' => 'print',
'template' => 'print',
'parent' => $parent,
'content' => [
'title' => 'Impression - ' . $parent->title()->value(),
'title' => 'Print - ' . $parent->title()->value(),
'uuid' => Uuid::generate()
]
]);