panel : improve menu
All checks were successful
Deploy / Deploy to Production (push) Successful in 12s

This commit is contained in:
isUnknown 2026-02-27 17:36:45 +01:00
parent 8c8d25d0b2
commit afc3bab531
2 changed files with 6 additions and 14 deletions

View file

@ -66,7 +66,8 @@ return [
], ],
'panel' => [ 'panel' => [
'menu' => require_once __DIR__ . '/menu.php', 'menu' => require_once __DIR__ . '/menu.php',
'css' => '/assets/css/panel.css' 'css' => '/assets/css/panel.css',
'home' => 'pages/home',
], ],
'donorbox' => [ 'donorbox' => [
'api_key' => '', // À remplir avec la clé API Donorbox 'api_key' => '', // À remplir avec la clé API Donorbox

View file

@ -1,25 +1,16 @@
<?php <?php
return [ return [
'dashboard' => [
'label' => 'Dashboard',
'icon' => 'bolt',
'link' => '/',
'current' => function (string $current): bool {
$path = Kirby\Cms\App::instance()->path();
return Str::contains($path, '/site');
}
],
'-',
'home' => [ 'home' => [
'label' => 'Accueil', 'label' => 'Accueil',
'icon' => 'home', 'icon' => 'home',
'link' => 'pages/home', 'link' => 'pages/home',
'current' => function (string $current): bool { 'current' => function (string $current): bool {
$path = Kirby\Cms\App::instance()->path(); $path = Kirby\Cms\App::instance()->path();
return Str::contains($path, 'pages/home'); return $path === '' || Str::contains($path, 'pages/home');
} }
], ],
'-',
'enquetes' => [ 'enquetes' => [
'label' => 'Enquêtes', 'label' => 'Enquêtes',
'icon' => 'pen', 'icon' => 'pen',
@ -40,7 +31,7 @@ return [
], ],
'news' => [ 'news' => [
'label' => 'Brèves', 'label' => 'Brèves',
'icon' => 'newspaper', 'icon' => 'bell',
'link' => 'pages/news', 'link' => 'pages/news',
'current' => function (string $current): bool { 'current' => function (string $current): bool {
$path = Kirby\Cms\App::instance()->path(); $path = Kirby\Cms\App::instance()->path();
@ -86,7 +77,7 @@ return [
], ],
'legal-notices' => [ 'legal-notices' => [
'label' => 'Mentions légales', 'label' => 'Mentions légales',
'icon' => 'email', 'icon' => 'edit-line',
'link' => 'pages/mentions-legales', 'link' => 'pages/mentions-legales',
'current' => function (string $current): bool { 'current' => function (string $current): bool {
$path = Kirby\Cms\App::instance()->path(); $path = Kirby\Cms\App::instance()->path();