2026-03-10 08:21:06 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Helper : génère un item de menu avec détection automatique du lien actif.
|
|
|
|
|
*/
|
|
|
|
|
function menuItem(string $id, string $label, string $icon, string $link): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'label' => $label,
|
|
|
|
|
'icon' => $icon,
|
|
|
|
|
'link' => $link,
|
|
|
|
|
'current' => function () use ($link): bool {
|
|
|
|
|
return Str::contains(Kirby\Cms\App::instance()->path(), $link);
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
'site' => [
|
|
|
|
|
'label' => 'Données partagées',
|
|
|
|
|
'icon' => 'cog',
|
|
|
|
|
'current' => function (): bool {
|
|
|
|
|
return Str::contains(Kirby\Cms\App::instance()->path(), '/site');
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
'-',
|
|
|
|
|
'home' => menuItem('home', 'Accueil', 'home', 'pages/home'),
|
|
|
|
|
'expertise' => menuItem('expertise', 'Expertise','wand', 'pages/expertise'),
|
|
|
|
|
'portfolio' => menuItem('portfolio', 'Portfolio','images', 'pages/portfolio'),
|
|
|
|
|
'jouer' => menuItem('jouer', 'Jouer', 'play', 'pages/jouer'),
|
|
|
|
|
'a-propos' => menuItem('a-propos', 'À propos', 'users', 'pages/a-propos'),
|
2026-03-18 17:37:22 +01:00
|
|
|
'blog' => menuItem('blog', 'Blog', 'text', 'pages/blog'),
|
|
|
|
|
'white-papers' => menuItem('livres-blancs', 'Livres blancs', 'book', 'pages/livres-blancs'),
|
2026-03-10 08:21:06 +01:00
|
|
|
'-',
|
|
|
|
|
'users',
|
|
|
|
|
'system',
|
|
|
|
|
];
|