@extends('layouts.child') @section('content') @php $level = auth()->user()->level() @endphp
{{ $level['icon'] }}

Hallo, {{ auth()->user()->name }}! 👋

Du bist: {{ $level['label'] }}

@if($streak >= 3)
🔥 {{ $streak }}er-Serie! +5 Bonusmünzen pro Antwort
@elseif($streak > 0)
✨ {{ $streak }} richtige Antworten in Folge!
@endif
{{ auth()->user()->points }}
🪙 Münzen
@if($level['next'])
Nächstes Level in {{ $level['next'] - auth()->user()->points }} Münzen
@endif
@if($pendingRedemptions > 0)
{{ $pendingRedemptions }}
🎁 Einlösung wartet
@else
🎁
Belohnungen
@endif

📚 Fächer

@foreach($subjects as $s) @php $colors = ['green'=>'from-green-400 to-emerald-500','blue'=>'from-blue-400 to-indigo-500','orange'=>'from-orange-400 to-amber-500'] @endphp
{{ $s->icon }}
{{ $s->name }}
{{ $s->correct }} ✓
@endforeach
@if($recentAttempts->count())

⏱️ Zuletzt gespielt

@foreach($recentAttempts as $a)
{{ $a->is_correct ? '✅' : '❌' }}
{{ Str::limit($a->question->question_text, 40) }}
{{ $a->question->subject->name }}
@if($a->points_earned > 0)+{{ $a->points_earned }} 🪙@endif
@endforeach
@endif @endsection