Complete TP7 TP8 authentication authorization and classic CSS

This commit is contained in:
2026-10-21 00:48:38 +02:00
parent 4a84a17cbf
commit ffe85d5f0d
101 changed files with 7643 additions and 110 deletions
+24 -14
View File
@@ -3,30 +3,40 @@
<head>
<meta charset="UTF-8">
<title>Mini-CRM</title>
{{-- TP6 : taille lisible des flèches SVG utilisées par la pagination Laravel. --}}
<style>
main nav[role="navigation"] svg { width: 1rem; height: 1rem; }
main nav[role="navigation"] a, main nav[role="navigation"] span { margin-right: .35rem; }
</style>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
</head>
<body>
<header>
<h1>Mini-CRM</h1>
<nav>
<a href="/">Accueil</a>
<header class="site-header">
<div class="container header-inner">
<h1 class="brand"><a href="{{ route('home') }}">Mini-CRM</a></h1>
<nav class="main-nav" aria-label="Navigation principale">
@auth
<a href="{{ route('home') }}">Accueil</a>
<a href="{{ route('dashboard') }}">Tableau de bord</a>
<a href="{{ route('clients.index') }}">Clients</a>
<a href="{{ route('clients.create') }}">Ajouter un client</a>
<a href="{{ route('products.index') }}">Produits</a>
<a href="/contacts">Contacts</a>
@can('viewAdmin')
<a href="{{ route('admin') }}">Administration</a>
@endcan
<span>Bonjour {{ Auth::user()->name }}</span>
<form method="POST" action="{{ route('logout') }}" style="display: inline">
@csrf
<button type="submit">Se déconnecter</button>
</form>
@else
<a href="{{ route('login') }}">Se connecter</a>
@endauth
</nav>
</div>
</header>
<main>
<main class="container page-content">
@yield('content')
</main>
<footer>
Mini-CRM
<footer class="site-footer">
<div class="container">Mini-CRM - Gestion simple des clients et produits</div>
</footer>
</body>
</html>