60 lines
3.5 KiB
PHP
60 lines
3.5 KiB
PHP
|
|
{{-- Barre latérale (desktop), barre d'onglets et feuille « Plus » (mobile) —
|
||
|
|
séparation vitrine/application, 2026-10-13. Même liste de 5 entrées,
|
||
|
|
rendue différemment selon le contexte. --}}
|
||
|
|
@php
|
||
|
|
$eleveNav = [
|
||
|
|
['ma-classe', 'Ma classe', '<circle cx="8" cy="8" r="3"/><circle cx="16" cy="9" r="2.5"/><path d="M3 20c0-3 2.2-5 5-5s5 2 5 5"/><path d="M13.5 15.5c2.4.3 4 1.8 4 4.5"/>', null],
|
||
|
|
['emploi-du-temps', 'Emploi du temps', '<rect x="3.5" y="5" width="17" height="16" rx="2"/><path d="M8 3v4M16 3v4M3.5 10h17"/>', null],
|
||
|
|
['mes-devoirs', 'Mes devoirs', '<path d="M8 3h8v3H8z"/><rect x="5" y="4.5" width="14" height="17" rx="2"/><path d="M9 12l2 2 4-4"/>', $badgeMesDevoirs],
|
||
|
|
['mes-cours', 'Mes cours', '<path d="M4 5c2-1 5-1 8 1 3-2 6-2 8-1v13c-2-1-5-1-8 1-3-2-6-2-8-1Z"/><path d="M12 6v13"/>', null],
|
||
|
|
['mes-notes', 'Mes notes', '<path d="M4 20V10M10 20V4M16 20v-7M22 20H2" />', null],
|
||
|
|
];
|
||
|
|
$profNav = [
|
||
|
|
['mes-classes.index', 'Mes classes', '<circle cx="8" cy="8" r="3"/><circle cx="16" cy="9" r="2.5"/><path d="M3 20c0-3 2.2-5 5-5s5 2 5 5"/><path d="M13.5 15.5c2.4.3 4 1.8 4 4.5"/>', null],
|
||
|
|
['emploi-du-temps', 'Emploi du temps', '<rect x="3.5" y="5" width="17" height="16" rx="2"/><path d="M8 3v4M16 3v4M3.5 10h17"/>', null],
|
||
|
|
['seances-en-direct', 'Séances en direct', '<circle cx="12" cy="12" r="3"/><path d="M7.5 7.5a7 7 0 0 0 0 9M16.5 7.5a7 7 0 0 1 0 9M4.5 4.5a11 11 0 0 0 0 15M19.5 4.5a11 11 0 0 1 0 15"/>', null],
|
||
|
|
['bibliotheque.app', 'Bibliothèque', '<path d="M4 5c2-1 5-1 8 1 3-2 6-2 8-1v13c-2-1-5-1-8 1-3-2-6-2-8-1Z"/><path d="M12 6v13"/>', null],
|
||
|
|
['resultats', 'Résultats', '<path d="M4 20V10M10 20V4M16 20v-7M22 20H2" />', null],
|
||
|
|
];
|
||
|
|
$entrees = $estProf ? $profNav : $eleveNav;
|
||
|
|
@endphp
|
||
|
|
|
||
|
|
@if (! ($mobile ?? false) && ! ($mobilePlus ?? false))
|
||
|
|
@foreach ($entrees as [$route, $label, $svg, $badge])
|
||
|
|
<li>
|
||
|
|
<a href="{{ route($route) }}" @if (request()->routeIs($route)) aria-current="page" @endif>
|
||
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">{!! $svg !!}</svg>
|
||
|
|
{{ $label }}
|
||
|
|
@if ($badge)
|
||
|
|
<span class="app-sidebar__badge">{{ $badge }}</span>
|
||
|
|
@endif
|
||
|
|
</a>
|
||
|
|
</li>
|
||
|
|
@endforeach
|
||
|
|
@elseif ($mobile ?? false)
|
||
|
|
@foreach (array_slice($entrees, 0, 4) as [$route, $label, $svg, $badge])
|
||
|
|
<li>
|
||
|
|
<a href="{{ route($route) }}" @if (request()->routeIs($route)) aria-current="page" @endif>
|
||
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">{!! $svg !!}</svg>
|
||
|
|
{{ $label }}
|
||
|
|
@if ($badge)
|
||
|
|
<span class="app-sidebar__badge" style="position:absolute;top:0;right:18%">{{ $badge }}</span>
|
||
|
|
@endif
|
||
|
|
</a>
|
||
|
|
</li>
|
||
|
|
@endforeach
|
||
|
|
@else
|
||
|
|
@foreach (array_slice($entrees, 4) as [$route, $label, $svg, $badge])
|
||
|
|
<a href="{{ route($route) }}">
|
||
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">{!! $svg !!}</svg>
|
||
|
|
{{ $label }}
|
||
|
|
</a>
|
||
|
|
@endforeach
|
||
|
|
@foreach ($raccourcis as $raccourci)
|
||
|
|
<a href="{{ $raccourci->url }}">
|
||
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M12 17v5"/><path d="M8 3h8l-1 6 2 2v2H7v-2l2-2-1-6Z"/></svg>
|
||
|
|
{{ $raccourci->label }}
|
||
|
|
</a>
|
||
|
|
@endforeach
|
||
|
|
@endif
|