Dashboard @if ($errors->any() || session('error')) @endif @if (session('success')) {{ session('success') }} @endif
@include('revision.partials.page-intro', [ 'eyebrow' => 'Today', 'title' => 'Welcome back, ' . explode(' ', auth()->user()->name)[0] . '!', 'description' => auth()->user()->can('revision.progress.view_child') && $students->isNotEmpty() ? "Viewing {$targetUser->name}'s revision summary." : 'Ready for another revision session?', 'tone' => 'brand', ])
@if(auth()->user()->can('revision.progress.view_child') && $students->isNotEmpty())
@foreach($students as $student) @endforeach Switch
@endif @can('revision.view') @include('revision.partials.stat-card', ['label' => "Today's Study", 'value' => floor($todayStudyTime / 60) . 'm', 'icon' => 'fa-regular fa-clock']) @include('revision.partials.stat-card', ['label' => 'This Week', 'value' => floor($weekStudyTime / 3600) . 'h ' . floor(($weekStudyTime % 3600) / 60) . 'm', 'icon' => 'fa-regular fa-calendar-days']) @include('revision.partials.stat-card', ['label' => 'Questions Practised', 'value' => number_format($totalQuestions), 'icon' => 'fa-solid fa-list-check']) @include('revision.partials.stat-card', ['label' => 'Accuracy', 'value' => $accuracy . '%', 'icon' => 'fa-solid fa-bullseye', 'valueClass' => $accuracy >= 70 ? 'text-green-600' : ($accuracy >= 50 ? 'text-amber-600' : 'text-red-600')]) @include('revision.partials.section-heading', [ 'title' => 'Start Something', 'subtitle' => 'Quick ways back into revision', ]) @can('revision.practice') @include('revision.partials.action-tile', [ 'href' => route('revision.study.index'), 'title' => 'Start Study', 'description' => 'Questions, flashcards, and Spanish in one place', 'icon' => 'fa-solid fa-bolt', 'gradient' => 'from-brand-600 to-brand-700', 'textClass' => 'text-brand-100', ]) @endcan @can('revision.view') @include('revision.partials.action-tile', [ 'href' => route('revision.subjects.index'), 'title' => 'Browse Subjects', 'description' => 'Pick a topic and jump into a focused session', 'icon' => 'fa-solid fa-book-open', 'gradient' => 'from-indigo-500 to-indigo-600', 'textClass' => 'text-indigo-100', ]) @endcan @include('revision.partials.action-tile', [ 'href' => route('revision.papers.index'), 'title' => 'Papers', 'description' => 'Practice with exam-style papers', 'icon' => 'fa-regular fa-file-lines', 'gradient' => 'from-orange-500 to-orange-600', 'textClass' => 'text-orange-100', ]) @can('revision.progress.view_child') @include('revision.partials.action-tile', [ 'href' => route('revision.test-builder.index', $selectedChildId ? ['child_id' => $selectedChildId] : []), 'title' => 'Test Builder', 'description' => 'Create focused printable tests', 'icon' => 'fa-solid fa-pen-ruler', 'gradient' => 'from-teal-600 to-teal-700', 'textClass' => 'text-teal-100', ]) @endcan
@include('revision.partials.section-heading', [ 'title' => 'Your Subjects', 'subtitle' => 'Open a subject and jump into a focused session.', ])
View all
@foreach($subjects->take(10) as $subject)

{{ $subject->icon ?: '📘' }}

{{ $subject->name }}

{{ $subject->topics_count }} topics

@endforeach
@if($latestSession || $recentSessions->isNotEmpty()) @if($latestSession) @php $continueMode = match ($latestSession->activity_type) { 'questions' => 'practice', 'flashcards' => 'flashcards', 'spanish' => 'spanish', default => 'practice', }; $continueLabel = match ($latestSession->activity_type) { 'questions' => 'Practice Questions', 'flashcards' => 'Flashcards', 'spanish' => 'Spanish Vocab', default => 'Study', }; $continueDescription = match ($latestSession->activity_type) { 'questions' => 'Go straight into another question session.', 'flashcards' => 'Pick up another quick recall round.', 'spanish' => 'Jump back into Spanish vocab practice.', default => 'Start another focused study session.', }; $continueRoute = $latestSession->activity_type === 'spanish' ? route('revision.study.index', ['mode' => 'spanish']) : route('revision.study.index', array_filter([ 'mode' => $continueMode, 'subject_id' => $latestSession->subject_id, ])); @endphp
@include('revision.partials.section-heading', [ 'title' => 'Continue Study', 'subtitle' => 'Pick up from the last mode used.', ])

{{ $continueLabel }}

{{ $continueDescription }}

{{ $latestSession->subject?->name ?? 'Mixed session' }} • {{ $latestSession->items_correct }}/{{ $latestSession->items_completed }} completed • {{ $latestSession->started_at?->diffForHumans() }}
Continue
@endif @if($recentSessions->isNotEmpty())
@include('revision.partials.section-heading', [ 'title' => 'Recent Sessions', 'subtitle' => 'A quick look at the latest study activity.', ]) @foreach($recentSessions as $session) @php $modeLabel = match ($session->activity_type) { 'questions' => 'Practice Questions', 'flashcards' => 'Flashcards', 'spanish' => 'Spanish Vocab', default => ucfirst(str_replace('_', ' ', $session->activity_type)), }; $modeIcon = match ($session->activity_type) { 'questions' => 'fa-file-pen', 'flashcards' => 'fa-layer-group', 'spanish' => 'fa-language', default => 'fa-book-open', }; @endphp

{{ $modeLabel }}

{{ $session->subject?->name ?? 'Mixed' }}

{{ $session->items_correct }}/{{ $session->items_completed }}

{{ $session->started_at?->diffForHumans() }}

@endforeach
@endif
@else @include('revision.partials.empty-state', [ 'title' => 'No activity yet', 'message' => 'Start practicing to build your progress history.', 'icon' => 'fa-solid fa-bullseye', ]) @endif @else
Profile Update your profile information
Revision Start with subjects and build momentum.
@endcan