diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 038bcf9..a48b55d 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -3,9 +3,7 @@ "allow": [ "Bash(git add:*)", "Bash(git commit:*)", - "Bash(cat:*)", - "Bash(curl:*)", - "Bash(php -l:*)" + "Bash(cat:*)" ], "deny": [], "ask": [] diff --git a/.gitignore b/.gitignore index ff728b3..42cbd09 100644 --- a/.gitignore +++ b/.gitignore @@ -60,11 +60,5 @@ Icon /vendor/* # Local -# --------------- local/ -/local/* - -# Claude config -# --------------- -.claude/ -/.claude/* \ No newline at end of file +/local/* \ No newline at end of file diff --git a/site/cache/index.html b/site/cache/index.html new file mode 100644 index 0000000..e69de29 diff --git a/site/config/config.php b/site/config/config.php index bc17179..8e65d31 100644 --- a/site/config/config.php +++ b/site/config/config.php @@ -30,53 +30,5 @@ return [ 'campaign_slug' => 'soutenir-index-en-2024', 'campaign_url' => 'https://donorbox.org/soutenir-index-en-2024', 'api_base_url' => 'https://donorbox.org/api/v1' - ], - - 'routes' => [ - // Route pour /enquetes/:slug/resume - Page virtuelle résumé - [ - 'pattern' => 'enquetes/(:any)/resume', - 'action' => function($slug) { - $parent = page('enquetes/' . $slug); - if (!$parent) { - return false; - } - - if ($parent->intendedTemplate()->name() !== 'investigation') { - return false; - } - - // Créer une page virtuelle avec le template investigation-summary - return Page::factory([ - 'slug' => 'resume', - 'template' => 'investigation-summary', - 'parent' => $parent, - 'content' => $parent->content()->toArray() - ]); - } - ], - - // Route pour /enquetes/:slug/detail - Page virtuelle détail - [ - 'pattern' => 'enquetes/(:any)/detail', - 'action' => function($slug) { - $parent = page('enquetes/' . $slug); - if (!$parent) { - return false; - } - - if ($parent->intendedTemplate()->name() !== 'investigation') { - return false; - } - - // Créer une page virtuelle avec le template investigation - return Page::factory([ - 'slug' => 'detail', - 'template' => 'investigation', - 'parent' => $parent, - 'content' => $parent->content()->toArray() - ]); - } - ] ] ]; \ No newline at end of file diff --git a/site/config/routes/investigations.php b/site/config/routes/investigations.php deleted file mode 100644 index 29dfff4..0000000 --- a/site/config/routes/investigations.php +++ /dev/null @@ -1,62 +0,0 @@ - 'enquetes/(:any)/resume', - 'action' => function($slug) { - $parent = page('enquetes/' . $slug); - if (!$parent) { - return false; - } - - if ($parent->intendedTemplate()->name() !== 'investigation') { - return false; - } - - // Créer une page virtuelle avec le template investigation-summary - return Page::factory([ - 'slug' => 'resume', - 'template' => 'investigation-summary', - 'parent' => $parent, - 'content' => $parent->content()->toArray() - ]); - } - ], - - // Route pour /enquetes/:slug/detail - Page virtuelle détail - [ - 'pattern' => 'enquetes/(:any)/detail', - 'action' => function($slug) { - $parent = page('enquetes/' . $slug); - if (!$parent) { - return false; - } - - if ($parent->intendedTemplate()->name() !== 'investigation') { - return false; - } - - // Créer une page virtuelle avec le template investigation - return Page::factory([ - 'slug' => 'detail', - 'template' => 'investigation', - 'parent' => $parent, - 'content' => $parent->content()->toArray() - ]); - } - ] -]; diff --git a/site/controllers/investigation.php b/site/controllers/investigation.php deleted file mode 100644 index 9f0788d..0000000 --- a/site/controllers/investigation.php +++ /dev/null @@ -1,19 +0,0 @@ -slug() !== 'resume' && $page->slug() !== 'detail') { - // Redirection 301 vers la page résumé - go($page->url() . '/resume', 301); - } - - // Si c'est une page virtuelle, laisser le template s'afficher normalement - return compact('page'); -}; diff --git a/site/templates/investigation-summary.php b/site/templates/investigation-summary.php index f98c7dc..f8b5e09 100644 --- a/site/templates/investigation-summary.php +++ b/site/templates/investigation-summary.php @@ -31,7 +31,7 @@