@php $colorMap = [ 'primary' => ['bg' => 'bg-primary-soft', 'ink' => 'text-primary-ink', 'bar' => 'bg-primary-ink', 'ring' => 'focus-visible:ring-primary', 'btn' => 'bg-primary-ink'], 'rose' => ['bg' => 'bg-rose-soft', 'ink' => 'text-rose-ink', 'bar' => 'bg-rose-ink', 'ring' => 'focus-visible:ring-rose-ink', 'btn' => 'bg-rose-ink'], 'violet' => ['bg' => 'bg-violet-soft', 'ink' => 'text-violet-ink', 'bar' => 'bg-violet-ink', 'ring' => 'focus-visible:ring-violet-ink','btn' => 'bg-violet-ink'], 'green' => ['bg' => 'bg-green-soft', 'ink' => 'text-green-ink', 'bar' => 'bg-green-ink', 'ring' => 'focus-visible:ring-green-ink', 'btn' => 'bg-green-ink'], 'amber' => ['bg' => 'bg-amber-soft', 'ink' => 'text-amber-ink', 'bar' => 'bg-amber-ink', 'ring' => 'focus-visible:ring-amber-ink', 'btn' => 'bg-amber-ink'], ]; $c = $colorMap[$task['color']] ?? $colorMap['primary']; $progressPercent = $totalSteps > 0 ? (int) round(($currentStep / $totalSteps) * 100) : 0; $q = $finished ? null : $this->currentQuestion(); @endphp
{{-- Breadcrumb / back nav --}}
Zurück zu Aufgaben
{{ $task['subject'] ?? '' }} {{ $task['topic'] ?? '' }}
{{-- Task header --}}
{{ $task['icon'] }}
{{ $task['meta'] }}

{{ $task['title'] }}

Belohnung
+{{ (int) $task['points'] }} Pkt.
@if(! $finished) {{-- Progress --}}
Frage {{ $currentStep }} / {{ $totalSteps }} {{ $correctAnswers }} richtig
{{-- Workbook: Question left (2 cols), Lerni AI helper right --}}
{{-- Question card (col-span 2) --}}
Aufgabe

{{ $q['question'] }}

@foreach($q['options'] as $i => $opt) @php $isLast = $lastAnswerIndex === $i; $cls = 'group px-5 py-5 rounded-lg border-2 text-ink-1 font-semibold text-base text-left transition-all cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 ' . $c['ring']; $cls .= $lastAnswerIndex === null ? ' bg-bg-soft border-line hover:border-primary hover:bg-primary-soft' : ($isLast ? ($lastAnswerCorrect ? ' bg-green-soft border-green-ink' : ' bg-rose-soft border-rose-ink') : ' bg-bg-soft border-line opacity-60'); @endphp @endforeach
@if($lastAnswerIndex !== null)
@if($currentStep < $totalSteps) Nächste Frage @else Aufgabe abschließen @endif
@endif
{{-- Lerni AI-Helper sidebar --}}
@else @php $passed = $correctAnswers >= (int) ceil($totalSteps / 2); $percent = $totalSteps > 0 ? (int) round(($correctAnswers / $totalSteps) * 100) : 0; $pointsEarned = $passed ? (int) $task['points'] : 0; @endphp
@if($passed) @else @endif

@if($passed) Super gemacht! @else Fast geschafft @endif

Du hast {{ $correctAnswers }} von {{ $totalSteps }} Aufgaben richtig.

{{ $percent }} % Erfolgsquote

@if($pointsEarned > 0)
+{{ $pointsEarned }} Pkt. verdient
@endif
Nochmal Fertig — zurück
@endif