Files
WebAPP/resources/views/components/layouts/app.blade.php
Rhino ad60e7a9f9 Spielerpositionen, Statistiken, Fahrgemeinschaften, Spielfeld-Visualisierung
- PlayerPosition Enum (7 Handball-Positionen) mit Label/ShortLabel
- Spielerstatistik pro Spiel (Tore, Würfe, TW-Paraden, Bemerkung)
- Position-Dropdown in Spieler-Editor und Event-Stats-Formular
- Statistik-Seite: TW zuerst, Trennlinie, Feldspieler, Position-Badges
- Spielfeld-SVG mit Ampel-Performance (grün/gelb/rot)
- Anklickbare Spieler im Spielfeld öffnen Detail-Modal
- Fahrgemeinschaften (Anbieten, Zuordnen, Zurückziehen)
- Übersetzungen in allen 6 Sprachen (de, en, pl, ru, ar, tr)
- .gitignore für Laravel hinzugefügt
- Demo-Daten mit Positionen und Statistiken

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 11:47:34 +01:00

192 lines
11 KiB
PHP
Executable File

<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}" dir="{{ app()->getLocale() === 'ar' ? 'rtl' : 'ltr' }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ $title ?? \App\Models\Setting::get('app_name', config('app.name')) }}</title>
<script src="https://cdn.tailwindcss.com"></script>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.9/dist/cdn.min.js" integrity="sha384-9Ax3MmS9AClxJyd5/zafcXXjxmwFhZCdsT6HJoJjarvCaAkJlk5QDzjLJm+Wdx5F" crossorigin="anonymous"></script>
@php $favicon = \App\Models\Setting::get('app_favicon'); @endphp
@if ($favicon)
<link rel="icon" href="{{ asset('storage/' . $favicon) }}">
@else
<link rel="icon" href="{{ asset('favicon.ico') }}">
@endif
{{-- PWA --}}
<link rel="manifest" href="/manifest.json">
<meta name="theme-color" content="#1f2937">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="SG Wölfe">
<link rel="apple-touch-icon" href="/images/apple-touch-icon.png">
@stack('styles')
</head>
<body class="min-h-screen bg-gray-100 flex flex-col">
{{-- Navigation --}}
<nav class="bg-white shadow" x-data="{ open: false }">
<div class="max-w-5xl mx-auto px-4">
<div class="flex justify-between h-14">
<div class="flex items-center space-x-6 rtl:space-x-reverse">
@php $logoApp = \App\Models\Setting::get('app_logo_app'); @endphp
<a href="{{ route('dashboard') }}" class="flex items-center gap-2 font-bold text-gray-900">
<img src="{{ $logoApp ? asset('storage/' . $logoApp) : asset('images/logo_woelfe.png') }}" alt="Logo" class="h-8 w-8 object-contain">
{{ \App\Models\Setting::get('app_name', config('app.name')) }}
</a>
<div class="hidden sm:flex items-center space-x-6 rtl:space-x-reverse">
<a href="{{ route('dashboard') }}" class="text-sm text-gray-600 hover:text-gray-900 {{ request()->routeIs('dashboard') ? 'font-semibold text-gray-900' : '' }}">{{ __('ui.dashboard') }}</a>
<a href="{{ route('events.index') }}" class="text-sm text-gray-600 hover:text-gray-900 {{ request()->routeIs('events.*') ? 'font-semibold text-gray-900' : '' }}">{{ __('ui.events') }}</a>
<a href="{{ route('files.index') }}" class="text-sm text-gray-600 hover:text-gray-900 {{ request()->routeIs('files.*') ? 'font-semibold text-gray-900' : '' }}">{{ __('ui.files') }}</a>
@if (auth()->user()->canAccessAdminPanel())
@php $pendingDsgvoCount = \App\Models\User::where('role', 'user')->whereNotNull('dsgvo_consent_file')->whereNull('dsgvo_accepted_at')->count(); @endphp
<a href="{{ route('admin.dashboard') }}" class="text-sm text-red-600 hover:text-red-800 {{ request()->routeIs('admin.*') ? 'font-semibold' : '' }}">
{{ __('ui.admin') }}
@if ($pendingDsgvoCount > 0)
<span class="bg-red-500 text-white text-xs rounded-full px-1.5 py-0.5 ml-1">{{ $pendingDsgvoCount }}</span>
@endif
</a>
@endif
</div>
</div>
{{-- Mobile menu button --}}
<div class="flex items-center sm:hidden">
<button @click="open = !open" class="text-gray-600 hover:text-gray-900">
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path x-show="!open" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
<path x-show="open" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
{{-- Desktop right side --}}
<div class="hidden sm:flex items-center space-x-4 rtl:space-x-reverse">
<a href="{{ route('profile.edit') }}" class="flex items-center gap-2 text-sm text-gray-600 hover:text-gray-900">
@if (auth()->user()->getAvatarUrl())
<img src="{{ auth()->user()->getAvatarUrl() }}" alt="{{ auth()->user()->name }}" class="w-7 h-7 rounded-full object-cover">
@else
<div class="w-7 h-7 rounded-full bg-blue-100 flex items-center justify-center text-blue-600 text-xs font-semibold">
{{ auth()->user()->getInitials() }}
</div>
@endif
{{ auth()->user()->name }}
</a>
<form method="POST" action="{{ route('logout') }}">
@csrf
<button type="submit" class="text-sm text-gray-500 hover:text-gray-700">{{ __('ui.logout') }}</button>
</form>
</div>
</div>
</div>
{{-- Mobile menu --}}
<div x-show="open" x-cloak class="sm:hidden border-t border-gray-200 px-4 py-2 space-y-1">
<a href="{{ route('dashboard') }}" class="block py-2 text-sm text-gray-700">{{ __('ui.dashboard') }}</a>
<a href="{{ route('events.index') }}" class="block py-2 text-sm text-gray-700">{{ __('ui.events') }}</a>
<a href="{{ route('files.index') }}" class="block py-2 text-sm text-gray-700">{{ __('ui.files') }}</a>
@if (auth()->user()->canAccessAdminPanel())
<a href="{{ route('admin.dashboard') }}" class="block py-2 text-sm text-red-600">
{{ __('ui.admin') }}
@if ($pendingDsgvoCount > 0)
<span class="bg-red-500 text-white text-xs rounded-full px-1.5 py-0.5 ml-1">{{ $pendingDsgvoCount }}</span>
@endif
</a>
@endif
<a href="{{ route('profile.edit') }}" class="flex items-center gap-2 py-2 text-sm text-gray-700">
@if (auth()->user()->getAvatarUrl())
<img src="{{ auth()->user()->getAvatarUrl() }}" alt="{{ auth()->user()->name }}" class="w-6 h-6 rounded-full object-cover">
@else
<div class="w-6 h-6 rounded-full bg-blue-100 flex items-center justify-center text-blue-600 text-xs font-semibold">
{{ auth()->user()->getInitials() }}
</div>
@endif
{{ __('ui.profile') }}
</a>
<form method="POST" action="{{ route('logout') }}">
@csrf
<button type="submit" class="block py-2 text-sm text-gray-500">{{ __('ui.logout') }}</button>
</form>
</div>
</nav>
{{-- DSGVO-Hinweis-Banner (2 Zustände) --}}
@php $dsgvoBannerState = auth()->user()->dsgvoBannerState(); @endphp
@if ($dsgvoBannerState === 'upload_required')
<div class="bg-yellow-50 border-b-2 border-yellow-400">
<div class="max-w-5xl mx-auto px-4 py-4">
<div class="flex items-start gap-3">
<div class="flex-shrink-0 mt-0.5">
<svg class="w-6 h-6 text-yellow-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.072 16.5c-.77.833.192 2.5 1.732 2.5z"/>
</svg>
</div>
<div class="flex-1">
<h3 class="text-sm font-semibold text-yellow-800">{{ __('ui.dsgvo_banner_title') }}</h3>
<p class="text-sm text-yellow-700 mt-1">{{ __('ui.dsgvo_banner_text') }}</p>
<a href="{{ route('profile.edit') }}#dsgvo-consent"
class="inline-flex items-center gap-1.5 mt-3 bg-yellow-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-yellow-700 transition-colors">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"/>
</svg>
{{ __('ui.dsgvo_banner_action') }}
</a>
</div>
</div>
</div>
</div>
@elseif ($dsgvoBannerState === 'pending_confirmation')
<div class="bg-blue-50 border-b-2 border-blue-400">
<div class="max-w-5xl mx-auto px-4 py-4">
<div class="flex items-start gap-3">
<div class="flex-shrink-0 mt-0.5">
<svg class="w-6 h-6 text-blue-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</div>
<div class="flex-1">
<h3 class="text-sm font-semibold text-blue-800">{{ __('ui.dsgvo_banner_pending_title') }}</h3>
<p class="text-sm text-blue-700 mt-1">{{ __('ui.dsgvo_banner_pending_text') }}</p>
</div>
</div>
</div>
</div>
@endif
<main class="flex-1 max-w-5xl mx-auto w-full px-4 py-6">
@if (session('success'))
<x-flash-message type="success" :message="session('success')" />
@endif
@if (session('error'))
<x-flash-message type="error" :message="session('error')" />
@endif
{{ $slot }}
</main>
<footer class="text-center py-4 text-sm text-gray-500 border-t border-gray-200">
@php $slogan = \App\Models\Setting::get('app_slogan'); @endphp
@if ($slogan)
<div class="mb-2 text-xs text-gray-400">{!! app(\App\Services\HtmlSanitizerService::class)->sanitize($slogan) !!}</div>
@endif
<a href="/impressum" class="hover:underline">{{ __('ui.footer_impressum') }}</a>
<span class="mx-2">|</span>
<a href="/datenschutz" class="hover:underline">{{ __('ui.footer_privacy') }}</a>
</footer>
@include('components.pwa-install-banner')
@stack('scripts')
{{-- Service Worker --}}
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js', { scope: '/' })
.catch((err) => { console.error('SW:', err); });
});
}
</script>
</body>
</html>