This commit is contained in:
2026-05-14 16:54:32 +00:00
parent 5b2a2e7ddb
commit 15fcbcc9eb
212 changed files with 18586 additions and 10360 deletions
@@ -0,0 +1,46 @@
@extends('layouts.app')
@section('content')
<div class="container mx-auto px-4 py-8">
<div class="mb-8">
<h1 class="text-3xl font-bold text-indigo-900">Informations & Santé Mentale</h1>
<p class="text-gray-600">Découvrez nos conseils et articles pour mieux gérer votre quotidien.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
@foreach($informations as $info)
<div class="bg-white rounded-2xl shadow-sm border border-gray-100 overflow-hidden hover:shadow-md transition-shadow">
@if($info->image_url)
<img src="{{ asset('storage/' . $info->image_url) }}" alt="{{ $info->title }}" class="w-full h-48 object-cover">
@else
<div class="w-full h-48 bg-indigo-50 flex items-center justify-center">
<svg class="w-12 h-12 text-indigo-200" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</div>
@endif
<div class="p-6">
<span class="inline-block px-3 py-1 bg-indigo-100 text-indigo-700 text-xs font-semibold rounded-full mb-3">
{{ $info->category }}
</span>
<h2 class="text-xl font-bold text-gray-900 mb-2">{{ $info->title }}</h2>
<p class="text-gray-600 text-sm mb-4 line-clamp-3">
{!! strip_tags($info->content) !!}
</p>
<a href="{{ route('informations.show', $info->id) }}" class="text-indigo-600 font-semibold hover:text-indigo-800 flex items-center">
Lire la suite
<svg class="w-4 h-4 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
</svg>
</a>
</div>
</div>
@endforeach
</div>
<div class="mt-12">
{{ $informations->links() }}
</div>
</div>
@endsection
@@ -0,0 +1,56 @@
@extends('layouts.app')
@section('content')
<div class="container mx-auto px-4 py-8">
<div class="max-w-4xl mx-auto">
<a href="{{ route('informations.index') }}" class="inline-flex items-center text-indigo-600 hover:text-indigo-800 mb-6">
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path>
</svg>
Retour aux articles
</a>
<div class="bg-white rounded-3xl shadow-sm border border-gray-100 overflow-hidden">
@if($information->image_url)
<img src="{{ asset('storage/' . $information->image_url) }}" alt="{{ $information->title }}" class="w-full h-96 object-cover">
@endif
<div class="p-8 md:p-12">
<span class="inline-block px-4 py-1 bg-indigo-100 text-indigo-700 text-sm font-semibold rounded-full mb-6">
{{ $information->category }}
</span>
<h1 class="text-4xl font-bold text-gray-900 mb-6 leading-tight">
{{ $information->title }}
</h1>
<div class="flex items-center text-gray-500 mb-8 text-sm">
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
</svg>
Publié le {{ $information->created_at->format('d/m/Y') }}
</div>
<div class="prose prose-indigo max-w-none text-gray-700 leading-relaxed text-lg">
{!! $information->content !!}
</div>
<div class="mt-12 p-6 bg-gray-50 rounded-2xl border border-gray-100">
<div class="flex items-start">
<div class="flex-shrink-0">
<svg class="h-6 w-6 text-indigo-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
</div>
<div class="ml-3">
<p class="text-sm text-gray-600 italic">
Information de santé publique - CESIZen. Ces contenus sont rédigés à but informatif et ne sauraient remplacer une consultation professionnelle.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
+40 -13
View File
@@ -14,20 +14,47 @@
<nav class="flex items-center gap-6" role="navigation" aria-label="Menu utilisateur">
@auth
<a href="{{ route('profile.index') }}" class="flex items-center gap-3 px-4 py-1.5 bg-slate-50 rounded-lg border border-slate-200 shadow-sm hover:border-[#000091] transition-all group">
<div class="text-right">
<p class="text-sm font-bold leading-none text-slate-900 group-hover:text-[#000091]">{{ Auth::user()->name }}</p>
<p class="text-[10px] text-slate-500 font-bold uppercase tracking-tighter">Mon Profil</p>
</div>
<img src="https://ui-avatars.com/api/?name={{ urlencode(Auth::user()->name) }}&background=000091&color=fff" class="w-9 h-9 rounded-lg border border-slate-200" alt="Avatar de {{ Auth::user()->name }}">
</a>
<form action="{{ route('logout') }}" method="POST" class="inline">
@csrf
<button type="submit" class="text-xs font-bold text-slate-500 hover:text-[#E1000F] uppercase tracking-tighter flex items-center gap-1">
<x-heroicon-o-arrow-left-on-rectangle class="h-4 w-4" />
Quitter
<div class="relative" x-data="{ open: false }">
<button @click="open = !open" @click.away="open = false" class="flex items-center gap-3 px-4 py-1.5 bg-slate-50 rounded-lg border border-slate-200 shadow-sm hover:border-[#000091] transition-all group">
<div class="text-right">
<p class="text-sm font-bold leading-none text-slate-900 group-hover:text-[#000091]">{{ Auth::user()->name }}</p>
<p class="text-[10px] text-slate-500 font-bold uppercase tracking-tighter">Mon Profil</p>
</div>
<img src="https://ui-avatars.com/api/?name={{ urlencode(Auth::user()->name) }}&background=000091&color=fff" class="w-9 h-9 rounded-lg border border-slate-200" alt="Avatar de {{ Auth::user()->name }}">
<x-heroicon-o-chevron-down class="h-4 w-4 text-slate-400 group-hover:text-[#000091] transition-transform" ::class="open ? 'rotate-180' : ''" />
</button>
</form>
<!-- Dropdown Menu -->
<div x-show="open"
x-transition:enter="transition ease-out duration-100"
x-transition:enter-start="opacity-0 scale-95"
x-transition:enter-end="opacity-100 scale-100"
class="absolute right-0 mt-2 w-56 bg-white border border-slate-200 rounded-lg shadow-xl z-50 py-2 overflow-hidden">
<a href="{{ route('profile.index') }}" class="flex items-center gap-3 px-4 py-2.5 text-sm font-medium text-slate-700 hover:bg-slate-50 transition-colors">
<x-heroicon-o-user class="h-4 w-4 text-slate-400" />
Mon compte
</a>
@if(Auth::user()->role && Auth::user()->role->libelle === 'Admin')
<div class="border-t border-slate-100 my-1"></div>
<a href="/admin" class="flex items-center gap-3 px-4 py-2.5 text-sm font-bold text-[--fr-blue] hover:bg-blue-50 transition-colors">
<x-heroicon-o-shield-check class="h-4 w-4" />
Administration
</a>
@endif
<div class="border-t border-slate-100 my-1"></div>
<form action="{{ route('logout') }}" method="POST" class="block w-full">
@csrf
<button type="submit" class="flex items-center gap-3 w-full px-4 py-2.5 text-sm font-medium text-red-600 hover:bg-red-50 transition-colors">
<x-heroicon-o-arrow-left-on-rectangle class="h-4 w-4" />
Déconnexion
</button>
</form>
</div>
</div>
@else
<div class="flex items-center gap-4">
<a href="/login" class="text-sm font-bold text-[#000091] hover:underline px-2 py-2">Se connecter</a>
@@ -40,6 +40,16 @@
Exercices de Respiration
</a>
<!-- Informations / Guides -->
<a href="{{ route('informations.index') }}"
class="flex items-center gap-4 px-4 py-3 rounded-sm transition-all group {{ request()->routeIs('informations.*') ? 'text-white bg-[#000091] font-bold shadow-md' : 'text-slate-700 hover:bg-slate-50 font-medium border-b border-slate-100/50' }}"
{!! request()->routeIs('informations.*') ? 'aria-current="page"' : '' !!}>
<div class="w-8 h-8 rounded-sm flex items-center justify-center transition-colors {{ request()->routeIs('informations.*') ? 'bg-white/20 text-white' : 'bg-blue-50 text-[--fr-blue]' }}" aria-hidden="true">
<x-heroicon-o-document-text class="h-4 w-4" />
</div>
Guides & Informations
</a>
<div class="pt-10 space-y-1">
<p class="text-[10px] font-bold text-slate-500 uppercase tracking-[0.2em] mb-4 px-4">Services de l'État</p>
<a href="#" class="flex items-center justify-between px-4 py-2 text-sm text-slate-600 hover:text-[--fr-blue] font-medium transition-colors">
+2 -2
View File
@@ -77,7 +77,7 @@
</div>
<h4 class="text-xl font-bold text-slate-900 mb-2">Guides Pratiques</h4>
<p class="text-slate-600 text-sm leading-relaxed mb-6">Consultez les fiches de prévention sur le sommeil et la nutrition.</p>
<a href="#" class="inline-flex items-center gap-2 text-sm font-bold text-[--fr-blue] hover:underline underline-offset-4 decoration-2">
<a href="{{ route('informations.index') }}" class="inline-flex items-center gap-2 text-sm font-bold text-[--fr-blue] hover:underline underline-offset-4 decoration-2">
Lire les guides
<x-heroicon-o-arrow-right class="h-4 w-4" aria-hidden="true" />
</a>
@@ -105,7 +105,7 @@
</div>
<!-- Global Footer Gov -->
</main>
</div>
</body>