f57ae068b9
SiteSettingsService : persistance JSON dans storage/app/site_settings.json
(pas de migration DB — survit aux mises à jour sans table supplémentaire)
Logo :
- Upload admin (PNG/JPG/SVG/WebP, max 2 Mo) → storage/app/public/site/logo.{ext}
- Favicon <link rel="icon"> injecté dans app.blade.php et guest.blade.php
- Logo affiché dans la barre de navigation (h-8, object-contain)
- Logo affiché sur la page de connexion (guest layout)
- Page d'accueil welcome.blade.php entièrement refaite : logo + bouton connexion
(remplacement du template Laravel par défaut)
- Suppression du logo possible depuis Admin > Paramètres du site
Inscriptions :
- Désactivées par défaut (registration_enabled=false dans site_settings.json)
- RegisteredUserController : redirige vers /login si inscription désactivée
(GET /register → redirect + message ; POST /register → abort 403)
- Page d'accueil : bouton "Créer un compte" masqué si inscriptions désactivées
- Admin > Paramètres du site : toggle checkbox pour activer/désactiver
AppServiceProvider : partage $siteLogoUrl et $registrationEnabled avec toutes les vues
Navigation : lien "Paramètres du site" en bas du menu Administration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
60 lines
2.3 KiB
PHP
60 lines
2.3 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{{ config('app.name') }}</title>
|
|
@if($siteLogoUrl)
|
|
<link rel="icon" href="{{ $siteLogoUrl }}">
|
|
@endif
|
|
@if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot')))
|
|
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
|
@else
|
|
<link rel="preconnect" href="https://fonts.bunny.net">
|
|
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet"/>
|
|
@endif
|
|
</head>
|
|
<body class="font-sans antialiased bg-gray-50 min-h-screen flex flex-col items-center justify-center px-4">
|
|
|
|
<div class="text-center max-w-md w-full">
|
|
|
|
{{-- Logo ou nom de l'application --}}
|
|
@if($siteLogoUrl)
|
|
<img src="{{ $siteLogoUrl }}" alt="{{ config('app.name') }}"
|
|
class="h-28 w-auto object-contain mx-auto mb-8">
|
|
@else
|
|
<h1 class="text-3xl font-bold text-gray-900 mb-4">{{ config('app.name') }}</h1>
|
|
@endif
|
|
|
|
<p class="text-gray-500 text-sm mb-10">
|
|
Application de relevés généalogiques
|
|
</p>
|
|
|
|
@auth
|
|
<a href="{{ route('dashboard') }}"
|
|
class="inline-block px-8 py-3 bg-indigo-600 text-white font-medium rounded-lg hover:bg-indigo-700 transition-colors">
|
|
Accéder à l'application →
|
|
</a>
|
|
@else
|
|
<div class="flex flex-col sm:flex-row gap-3 justify-center">
|
|
<a href="{{ route('login') }}"
|
|
class="px-8 py-3 bg-indigo-600 text-white font-medium rounded-lg hover:bg-indigo-700 transition-colors">
|
|
Se connecter
|
|
</a>
|
|
@if($registrationEnabled && Route::has('register'))
|
|
<a href="{{ route('register') }}"
|
|
class="px-8 py-3 border border-gray-300 text-gray-700 font-medium rounded-lg hover:bg-gray-100 transition-colors">
|
|
Créer un compte
|
|
</a>
|
|
@endif
|
|
</div>
|
|
@endauth
|
|
</div>
|
|
|
|
<footer class="absolute bottom-6 text-xs text-gray-300">
|
|
{{ config('app.name') }}
|
|
</footer>
|
|
|
|
</body>
|
|
</html>
|