ajout bibliothèque méditation et changement de test
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Journal des Diagnostics')
|
||||
@section('header_title', 'Mon Historique de Stress')
|
||||
|
||||
@section('content')
|
||||
<div class="max-w-4xl mx-auto space-y-8">
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<h2 class="text-2xl font-black text-slate-900 uppercase">Journal de bord</h2>
|
||||
<p class="text-slate-500">Retrouvez l'évolution de vos bilans de stress.</p>
|
||||
</div>
|
||||
<a href="{{ route('diagnostics.index') }}" class="px-6 py-2 bg-[--fr-blue] text-white font-bold rounded-sm shadow-md hover:bg-blue-800 transition-all text-sm uppercase tracking-widest">
|
||||
Nouveau test
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="bg-white border border-slate-200 shadow-sm overflow-hidden">
|
||||
<table class="w-full text-left border-collapse">
|
||||
<thead>
|
||||
<tr class="bg-slate-50 border-b border-slate-200">
|
||||
<th class="px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-widest">Date du bilan</th>
|
||||
<th class="px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-widest text-center">Score</th>
|
||||
<th class="px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-widest">Niveau de Risque</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-slate-100">
|
||||
@forelse($history as $result)
|
||||
<tr class="hover:bg-slate-50 transition-colors">
|
||||
<td class="px-6 py-5">
|
||||
<p class="font-bold text-slate-900">{{ \Carbon\Carbon::parse($result->date_passage)->translatedFormat('d F Y') }}</p>
|
||||
<p class="text-xs text-slate-400">{{ \Carbon\Carbon::parse($result->date_passage)->format('H:i') }}</p>
|
||||
</td>
|
||||
<td class="px-6 py-5 text-center">
|
||||
<span class="text-xl font-black text-[--fr-blue]">{{ $result->score_total }}</span>
|
||||
</td>
|
||||
<td class="px-6 py-5">
|
||||
@if($result->niveau_stress === 'Élevé')
|
||||
<span class="px-3 py-1 bg-red-50 text-red-700 text-[10px] font-black uppercase rounded-full border border-red-100">Risque Élevé</span>
|
||||
@elseif($result->niveau_stress === 'Modéré')
|
||||
<span class="px-3 py-1 bg-orange-50 text-orange-700 text-[10px] font-black uppercase rounded-full border border-orange-100">Risque Modéré</span>
|
||||
@else
|
||||
<span class="px-3 py-1 bg-teal-50 text-teal-700 text-[10px] font-black uppercase rounded-full border border-teal-100">Risque Faible</span>
|
||||
@endif
|
||||
|
||||
<div class="mt-2 flex flex-wrap gap-1">
|
||||
@foreach($result->events as $event)
|
||||
<span class="text-[9px] bg-slate-100 text-slate-500 px-1.5 py-0.5 rounded-sm border border-slate-200" title="{{ $event->event_name }}">
|
||||
{{ Str::limit($event->event_name, 20) }}
|
||||
</span>
|
||||
@endforeach
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="4" class="px-6 py-10 text-center text-slate-400 italic">
|
||||
Vous n'avez pas encore effectué de bilan de stress.
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -25,9 +25,17 @@
|
||||
</div>
|
||||
@else
|
||||
<div class="bg-white p-8 border border-slate-200 shadow-sm">
|
||||
<div class="mb-8">
|
||||
<h2 class="text-xl font-bold mb-2">Quels événements avez-vous vécus ces 12 derniers mois ?</h2>
|
||||
<p class="text-sm text-slate-500 italic">Cochez toutes les cases qui correspondent à votre situation actuelle.</p>
|
||||
<div class="flex items-center justify-between mb-8">
|
||||
<div>
|
||||
<h2 class="text-xl font-bold mb-2">Quels événements avez-vous vécus ces 12 derniers mois ?</h2>
|
||||
<p class="text-sm text-slate-500 italic">Cochez toutes les cases qui correspondent à votre situation actuelle.</p>
|
||||
</div>
|
||||
@auth
|
||||
<a href="{{ route('diagnostics.history') }}" class="text-sm font-bold text-[--fr-blue] hover:underline flex items-center gap-1">
|
||||
<x-heroicon-o-clock class="w-4 h-4" />
|
||||
Mon Historique
|
||||
</a>
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
<form action="{{ route('diagnostics.store') }}" method="POST" class="space-y-4">
|
||||
@@ -49,6 +57,34 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@auth
|
||||
@if(count($history) > 0)
|
||||
<div class="bg-white p-8 border border-slate-200 shadow-sm">
|
||||
<h3 class="text-lg font-bold mb-6 flex items-center gap-2">
|
||||
<x-heroicon-o-clipboard-document-list class="w-5 h-5 text-[--fr-blue]" />
|
||||
Dernières entrées du journal
|
||||
</h3>
|
||||
<div class="space-y-4">
|
||||
@foreach($history as $item)
|
||||
<div class="flex items-center justify-between p-4 bg-slate-50 rounded-sm border border-slate-100">
|
||||
<div>
|
||||
<p class="text-sm font-bold text-slate-900">{{ \Carbon\Carbon::parse($item->date_passage)->translatedFormat('d M Y') }}</p>
|
||||
<p class="text-xs text-slate-500">{{ $item->niveau_stress }}</p>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<span class="text-lg font-black text-[--fr-blue]">{{ $item->score_total }}</span>
|
||||
<p class="text-[10px] uppercase font-bold text-slate-400">points</p>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="mt-6 text-center">
|
||||
<a href="{{ route('diagnostics.history') }}" class="text-xs font-bold text-slate-400 hover:text-[--fr-blue] uppercase tracking-widest transition-colors">Voir l'historique complet</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endauth
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<textarea name="note" rows="3" class="w-full border-slate-200 rounded-lg focus:ring-[--fr-blue] focus:border-[--fr-blue]" placeholder="Décrivez votre état..."></textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="w-full py-4 bg-[--fr-blue] text-white font-bold rounded-sm hover:bg-blue-800 shadow-md transition-all">
|
||||
<button type="submit" class="w-full py-4 bg-[#000091] text-white font-bold rounded-sm hover:bg-blue-800 shadow-md transition-all uppercase tracking-widest">
|
||||
Enregistrer dans mon journal
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>@yield('title', 'CESIZen') | Ministère de la Santé</title>
|
||||
<title>@yield('title', 'CESIZen') | Ministère de la Santé et de la Prévention</title>
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
<link rel="icon" href="./img/CesiZen_logo.png" type="image/x-icon">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||
<style>
|
||||
:root {
|
||||
@@ -35,4 +36,5 @@
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
@include('layouts.footer')
|
||||
</html>
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<div class="container mx-auto px-4 lg:px-8 py-3 flex items-center justify-between">
|
||||
<div class="flex items-start justify-start gap-8">
|
||||
<div class="flex flex-col border-r-2 border-slate-200 pr-8" aria-hidden="true">
|
||||
<img src="img/ministere.png" alt="Logo du Ministère de la Santé et de la Prévention" class="w-24 h-auto">
|
||||
<img src="{{ asset('img/ministere.png') }}" alt="Logo du Ministère de la Santé et de la Prévention" class="w-24 h-auto">
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<h1 class="text-2xl font-black text-[--fr-blue] tracking-tight">
|
||||
<a href="{{ route('home') }}"><img src="img/CesiZen.png" alt="Logo CesiZen" class="w-32 h-auto"></a>
|
||||
<a href="{{ route('home') }}"><img src="{{ asset('img/CesiZen.png') }}" alt="Logo CesiZen" class="w-32 h-auto"></a>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,4 +38,4 @@
|
||||
@endauth
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
</header>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</a>
|
||||
|
||||
<!-- Exercices de Respiration -->
|
||||
<a href="{{ route('relaxation.index') }}"
|
||||
<a href="{{ route('relaxation.index') }}#breathing-app"
|
||||
class="flex items-center gap-4 px-4 py-3 rounded-sm transition-all group {{ request()->routeIs('relaxation.*') ? '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('relaxation.*') ? 'aria-current="page"' : '' !!}>
|
||||
<div class="w-8 h-8 rounded-sm flex items-center justify-center transition-colors {{ request()->routeIs('relaxation.*') ? 'bg-white/20 text-white' : 'bg-indigo-50 text-indigo-700' }}" aria-hidden="true">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="max-w-6xl mx-auto space-y-12">
|
||||
|
||||
<!-- Module de Respiration Guidée -->
|
||||
<div x-data="breathingApp()" class="bg-white p-8 border border-slate-300 shadow-sm relative overflow-hidden">
|
||||
<div id="breathing-app" x-data="breathingApp()" class="bg-white p-8 border border-slate-300 shadow-sm relative overflow-hidden">
|
||||
<div class="flex flex-col lg:flex-row gap-12 items-center">
|
||||
|
||||
<!-- Contrôles et Choix du mode -->
|
||||
|
||||
@@ -1,69 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>CESIZen | Ministère de la Santé et de la Prévention</title>
|
||||
@extends('layouts.app')
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=instrument-sans:400,500,600,700" rel="stylesheet" />
|
||||
@section('title', 'CesiZen')
|
||||
|
||||
<!-- Scripts -->
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
:root {
|
||||
/* Official French Government Colors (DSFR) */
|
||||
--fr-blue: #000091;
|
||||
--fr-blue-hover: #1212ff;
|
||||
--fr-red: #E1000F;
|
||||
--fr-text: #161616;
|
||||
--fr-background: #F6F6F6;
|
||||
|
||||
/* CESIZen Adapted for RGAA (High Contrast) */
|
||||
--cz-navy: #000074; /* Darker than 000080 for better contrast */
|
||||
--cz-mustard: #715200; /* Darkened mustard for text on white (Contrast > 7:1) */
|
||||
--cz-mustard-bg: #F8B803; /* Original mustard for backgrounds only */
|
||||
--cz-jade: #00635B; /* Darkened jade for text (Contrast > 4.5:1) */
|
||||
--cz-jade-bg: #26A69A; /* Original jade for backgrounds */
|
||||
--cz-indigo: #303F9F;
|
||||
--cz-coral: #C62828;
|
||||
}
|
||||
|
||||
/* Focus state for RGAA */
|
||||
:focus-visible {
|
||||
outline: 3px solid var(--fr-blue);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.skip-link {
|
||||
position: absolute;
|
||||
top: -40px;
|
||||
left: 0;
|
||||
background: var(--fr-blue);
|
||||
color: white;
|
||||
padding: 8px;
|
||||
z-index: 100;
|
||||
transition: top 0.2s;
|
||||
}
|
||||
.skip-link:focus {
|
||||
top: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-[#F6F6F6] text-[#161616] min-h-screen font-sans antialiased overflow-x-hidden">
|
||||
|
||||
<a href="#main-content" class="skip-link">Aller au contenu principal</a>
|
||||
|
||||
<!-- Government Official Header -->
|
||||
@include('layouts.header')
|
||||
|
||||
<div class="flex min-h-[calc(100vh-80px)]">
|
||||
|
||||
<!-- Institutional Sidebar -->
|
||||
@include('layouts.sidebar')
|
||||
|
||||
<!-- Main Workspace -->
|
||||
<main id="main-content" class="flex-1 flex flex-col bg-[#F6F6F6] overflow-y-auto">
|
||||
|
||||
@@ -164,6 +108,6 @@
|
||||
|
||||
</main>
|
||||
</div>
|
||||
@include('layouts.footer')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user