feat: Lernapp mit Mathe/Deutsch/Englisch, Münzsystem und Belohnungen
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de" class="h-full">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Lernapp Admin</title>
|
||||
@vite(['resources/css/app.css','resources/js/app.js'])
|
||||
</head>
|
||||
<body class="h-full bg-slate-100 font-sans" x-data="{open:false}">
|
||||
<div class="flex h-full">
|
||||
<!-- Sidebar -->
|
||||
<aside class="hidden md:flex flex-col w-60 bg-slate-900 text-slate-100 shrink-0">
|
||||
<div class="flex items-center gap-3 px-6 py-5 border-b border-slate-700">
|
||||
<span class="text-2xl">🎓</span>
|
||||
<div><div class="font-bold text-white text-sm">Lernapp</div><div class="text-xs text-slate-400">Admin-Bereich</div></div>
|
||||
</div>
|
||||
<nav class="flex-1 px-3 py-4 space-y-1 text-sm">
|
||||
<a href="{{ route('admin.dashboard') }}" class="flex items-center gap-3 px-3 py-2 rounded-lg {{ request()->routeIs('admin.dashboard') ? 'bg-violet-600 text-white' : 'text-slate-300 hover:bg-slate-800' }}">
|
||||
<span>📊</span> Dashboard
|
||||
</a>
|
||||
<a href="{{ route('admin.users.index') }}" class="flex items-center gap-3 px-3 py-2 rounded-lg {{ request()->routeIs('admin.users.*') ? 'bg-violet-600 text-white' : 'text-slate-300 hover:bg-slate-800' }}">
|
||||
<span>👦</span> Kinder
|
||||
</a>
|
||||
<a href="{{ route('admin.questions.index') }}" class="flex items-center gap-3 px-3 py-2 rounded-lg {{ request()->routeIs('admin.questions.*') ? 'bg-violet-600 text-white' : 'text-slate-300 hover:bg-slate-800' }}">
|
||||
<span>❓</span> Fragen
|
||||
</a>
|
||||
<a href="{{ route('admin.rewards.index') }}" class="flex items-center gap-3 px-3 py-2 rounded-lg {{ request()->routeIs('admin.rewards.*') ? 'bg-violet-600 text-white' : 'text-slate-300 hover:bg-slate-800' }}">
|
||||
<span>🎁</span> Belohnungen
|
||||
</a>
|
||||
<a href="{{ route('admin.redemptions.index') }}" class="flex items-center gap-3 px-3 py-2 rounded-lg {{ request()->routeIs('admin.redemptions.*') ? 'bg-violet-600 text-white' : 'text-slate-300 hover:bg-slate-800' }}">
|
||||
<span>✅</span> Einlösungen
|
||||
@php $p = \App\Models\RewardRedemption::where('status','pending')->count() @endphp
|
||||
@if($p > 0)<span class="ml-auto bg-red-500 text-white text-xs rounded-full px-1.5">{{ $p }}</span>@endif
|
||||
</a>
|
||||
</nav>
|
||||
<div class="px-3 py-4 border-t border-slate-700">
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
<button class="flex items-center gap-3 px-3 py-2 w-full text-sm text-slate-400 hover:text-white rounded-lg hover:bg-slate-800">
|
||||
<span>🚪</span> Abmelden
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</aside>
|
||||
<!-- Main -->
|
||||
<div class="flex-1 flex flex-col overflow-hidden">
|
||||
<header class="bg-white border-b border-slate-200 px-6 py-4 flex items-center justify-between">
|
||||
<h1 class="font-semibold text-slate-800">@yield('title','Dashboard')</h1>
|
||||
<span class="text-sm text-slate-500">{{ auth()->user()->name }}</span>
|
||||
</header>
|
||||
<main class="flex-1 overflow-y-auto p-6">
|
||||
@if(session('success'))<div class="mb-4 bg-green-100 border border-green-300 text-green-800 rounded-lg px-4 py-3 text-sm">{{ session('success') }}</div>@endif
|
||||
@if(session('error'))<div class="mb-4 bg-red-100 border border-red-300 text-red-800 rounded-lg px-4 py-3 text-sm">{{ session('error') }}</div>@endif
|
||||
@yield('content')
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Lernapp</title>
|
||||
@vite(['resources/css/app.css','resources/js/app.js'])
|
||||
</head>
|
||||
<body class="min-h-screen bg-gradient-to-br from-sky-100 to-indigo-100 font-sans">
|
||||
<nav class="bg-white shadow-sm sticky top-0 z-10">
|
||||
<div class="max-w-3xl mx-auto px-4 py-3 flex items-center justify-between">
|
||||
<a href="{{ route('dashboard') }}" class="flex items-center gap-2 font-bold text-indigo-600 text-lg">
|
||||
🎓 Lernapp
|
||||
</a>
|
||||
<div class="flex items-center gap-4">
|
||||
<a href="{{ route('learn.subjects') }}" class="text-sm font-medium text-slate-600 hover:text-indigo-600">Lernen</a>
|
||||
<a href="{{ route('rewards.index') }}" class="text-sm font-medium text-slate-600 hover:text-indigo-600">🪙 Belohnungen</a>
|
||||
<div class="flex items-center gap-1 bg-amber-100 text-amber-700 font-bold rounded-full px-3 py-1 text-sm">
|
||||
🪙 {{ auth()->user()->points }}
|
||||
</div>
|
||||
<form method="POST" action="{{ route('logout') }}">@csrf
|
||||
<button class="text-xs text-slate-400 hover:text-slate-600">Abmelden</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<main class="max-w-3xl mx-auto px-4 py-8">
|
||||
@if(session('success'))<div class="mb-4 bg-green-100 border border-green-300 text-green-800 rounded-xl px-4 py-3 text-sm font-medium">✅ {{ session('success') }}</div>@endif
|
||||
@if(session('error'))<div class="mb-4 bg-red-100 border border-red-300 text-red-800 rounded-xl px-4 py-3 text-sm font-medium">❌ {{ session('error') }}</div>@endif
|
||||
@if(session('info'))<div class="mb-4 bg-blue-100 border border-blue-300 text-blue-800 rounded-xl px-4 py-3 text-sm font-medium">ℹ️ {{ session('info') }}</div>@endif
|
||||
@yield('content')
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user