Invertiertes Logo für Admin-Navbar, neue PWA-Icons, Manifest-Updates, Tailwind-Config-Extraktion, Farb-/Namenseinstellungen im Admin-Bereich und diverse Layout-Optimierungen. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
169 lines
13 KiB
PHP
Executable File
169 lines
13 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>{{ __('ui.admin') }} - {{ $title ?? \App\Models\Setting::get('app_name', config('app.name')) }}</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
@include('components.tailwind-config')
|
|
<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="{{ \App\Models\Setting::get('app_name', 'VereinsOS') }}">
|
|
<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">
|
|
{{-- Admin Navigation --}}
|
|
<nav class="bg-gray-800 text-white" x-data="{ open: false, mgmt: false }">
|
|
<div class="max-w-6xl mx-auto px-4">
|
|
<div class="flex justify-between h-14">
|
|
<div class="flex items-center space-x-6 rtl:space-x-reverse">
|
|
<a href="{{ route('admin.dashboard') }}" class="flex items-center gap-2 font-bold">
|
|
@php $logoApp = \App\Models\Setting::get('app_logo_app'); @endphp
|
|
<img src="{{ $logoApp ? asset('storage/' . $logoApp) : asset('images/vereinos_logo_white.png') }}" alt="Logo" class="h-8 w-8 object-contain">
|
|
{{ __('ui.admin') }}
|
|
</a>
|
|
{{-- Desktop nav links (ab lg sichtbar) --}}
|
|
<div class="hidden lg:flex items-center space-x-5 rtl:space-x-reverse">
|
|
<a href="{{ route('admin.events.index') }}" class="text-sm text-gray-300 hover:text-white {{ request()->routeIs('admin.events.*') ? 'text-white font-semibold' : '' }}">{{ __('admin.nav_events') }}</a>
|
|
@if (\App\Models\Setting::isFeatureVisibleFor('statistics', auth()->user()))
|
|
<a href="{{ route('admin.statistics.index') }}" class="text-sm text-gray-300 hover:text-white {{ request()->routeIs('admin.statistics.*') ? 'text-white font-semibold' : '' }}">{{ __('admin.nav_statistics') }}</a>
|
|
@endif
|
|
@if (\App\Models\Setting::isFeatureVisibleFor('finances', auth()->user()))
|
|
<a href="{{ route('admin.finances.index') }}" class="text-sm text-gray-300 hover:text-white {{ request()->routeIs('admin.finances.*') ? 'text-white font-semibold' : '' }}">{{ __('admin.nav_finances') }}</a>
|
|
@endif
|
|
@if (auth()->user()->isStaff())
|
|
<a href="{{ route('admin.teams.index') }}" class="text-sm text-gray-300 hover:text-white {{ request()->routeIs('admin.teams.*') ? 'text-white font-semibold' : '' }}">{{ __('admin.nav_teams') }}</a>
|
|
<a href="{{ route('admin.players.index') }}" class="text-sm text-gray-300 hover:text-white {{ request()->routeIs('admin.players.*') ? 'text-white font-semibold' : '' }}">{{ __('admin.nav_players') }}</a>
|
|
<a href="{{ route('admin.users.index') }}" class="text-sm text-gray-300 hover:text-white {{ request()->routeIs('admin.users.*') ? 'text-white font-semibold' : '' }}">{{ __('admin.nav_users') }}</a>
|
|
@endif
|
|
<a href="{{ route('admin.files.index') }}" class="text-sm text-gray-300 hover:text-white {{ request()->routeIs('admin.files.*') ? 'text-white font-semibold' : '' }}">{{ __('admin.nav_files') }}</a>
|
|
@if (auth()->user()->isStaff())
|
|
<a href="{{ route('admin.locations.index') }}" class="text-sm text-gray-300 hover:text-white {{ request()->routeIs('admin.locations.*') ? 'text-white font-semibold' : '' }}">{{ __('admin.nav_locations') }}</a>
|
|
{{-- Verwaltung-Dropdown --}}
|
|
<div class="relative" @click.away="mgmt = false">
|
|
<button @click="mgmt = !mgmt" class="text-sm text-gray-300 hover:text-white flex items-center gap-1 {{ request()->routeIs('admin.settings.*') || request()->routeIs('admin.invitations.*') || request()->routeIs('admin.activity-logs.*') || request()->routeIs('admin.support.*') ? 'text-white font-semibold' : '' }}">
|
|
{{ __('admin.nav_verwaltung') }}
|
|
@if (\Illuminate\Support\Facades\Cache::has('support.update_check'))
|
|
<span class="w-2 h-2 bg-blue-400 rounded-full"></span>
|
|
@endif
|
|
<svg class="w-3 h-3 transition-transform" :class="mgmt ? 'rotate-180' : ''" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
|
|
</button>
|
|
<div x-show="mgmt" x-cloak x-transition class="absolute left-0 rtl:left-auto rtl:right-0 mt-2 w-48 bg-gray-700 rounded-md shadow-lg py-1 z-50">
|
|
<a href="{{ route('admin.settings.edit') }}" class="block px-4 py-2 text-sm text-gray-200 hover:bg-gray-600 {{ request()->routeIs('admin.settings.*') ? 'bg-gray-600 font-semibold' : '' }}">{{ __('admin.nav_settings') }}</a>
|
|
<a href="{{ route('admin.invitations.index') }}" class="block px-4 py-2 text-sm text-gray-200 hover:bg-gray-600 {{ request()->routeIs('admin.invitations.*') ? 'bg-gray-600 font-semibold' : '' }}">{{ __('admin.nav_invitations') }}</a>
|
|
<a href="{{ route('admin.list-generator.create') }}" class="block px-4 py-2 text-sm text-gray-200 hover:bg-gray-600 {{ request()->routeIs('admin.list-generator.*') ? 'bg-gray-600 font-semibold' : '' }}">{{ __('admin.nav_list_generator') }}</a>
|
|
<a href="{{ route('admin.support.index') }}" class="block px-4 py-2 text-sm text-gray-200 hover:bg-gray-600 {{ request()->routeIs('admin.support.*') ? 'bg-gray-600 font-semibold' : '' }}">{{ __('admin.nav_support') }}</a>
|
|
@if (auth()->user()->canViewActivityLog())
|
|
<a href="{{ route('admin.activity-logs.index') }}" class="block px-4 py-2 text-sm text-gray-200 hover:bg-gray-600 {{ request()->routeIs('admin.activity-logs.*') ? 'bg-gray-600 font-semibold' : '' }}">{{ __('admin.nav_activity_log') }}</a>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
{{-- Mobile/Tablet menu button --}}
|
|
<div class="flex items-center lg:hidden">
|
|
<button @click="open = !open" class="text-gray-300 hover:text-white">
|
|
<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>
|
|
|
|
<div class="hidden lg:flex items-center space-x-4 rtl:space-x-reverse">
|
|
<a href="{{ route('dashboard') }}" class="flex items-center gap-2 text-sm text-gray-300 hover:text-white">
|
|
@if (auth()->user()->getAvatarUrl())
|
|
<img src="{{ auth()->user()->getAvatarUrl() }}" alt="{{ auth()->user()->name }}" class="w-7 h-7 rounded-full object-cover border border-gray-600">
|
|
@else
|
|
<div class="w-7 h-7 rounded-full bg-gray-600 flex items-center justify-center text-gray-200 text-xs font-semibold">
|
|
{{ auth()->user()->getInitials() }}
|
|
</div>
|
|
@endif
|
|
{{ __('ui.back_to_app') }}
|
|
</a>
|
|
<form method="POST" action="{{ route('logout') }}">
|
|
@csrf
|
|
<button type="submit" class="text-sm text-gray-400 hover:text-white">{{ __('ui.logout') }}</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- Mobile/Tablet menu --}}
|
|
<div x-show="open" x-cloak class="lg:hidden border-t border-gray-700 px-4 py-2 space-y-1">
|
|
<a href="{{ route('admin.events.index') }}" class="block py-2 text-sm text-gray-300">{{ __('admin.nav_events') }}</a>
|
|
@if (\App\Models\Setting::isFeatureVisibleFor('statistics', auth()->user()))
|
|
<a href="{{ route('admin.statistics.index') }}" class="block py-2 text-sm text-gray-300">{{ __('admin.nav_statistics') }}</a>
|
|
@endif
|
|
@if (\App\Models\Setting::isFeatureVisibleFor('finances', auth()->user()))
|
|
<a href="{{ route('admin.finances.index') }}" class="block py-2 text-sm text-gray-300">{{ __('admin.nav_finances') }}</a>
|
|
@endif
|
|
@if (auth()->user()->isStaff())
|
|
<a href="{{ route('admin.teams.index') }}" class="block py-2 text-sm text-gray-300">{{ __('admin.nav_teams') }}</a>
|
|
<a href="{{ route('admin.players.index') }}" class="block py-2 text-sm text-gray-300">{{ __('admin.nav_players') }}</a>
|
|
<a href="{{ route('admin.users.index') }}" class="block py-2 text-sm text-gray-300">{{ __('admin.nav_users') }}</a>
|
|
@endif
|
|
<a href="{{ route('admin.files.index') }}" class="block py-2 text-sm text-gray-300">{{ __('admin.nav_files') }}</a>
|
|
@if (auth()->user()->isStaff())
|
|
<a href="{{ route('admin.locations.index') }}" class="block py-2 text-sm text-gray-300">{{ __('admin.nav_locations') }}</a>
|
|
<div class="border-t border-gray-700 mt-1 pt-1">
|
|
<span class="block py-1 text-xs text-gray-500 uppercase tracking-wider">{{ __('admin.nav_verwaltung') }}</span>
|
|
<a href="{{ route('admin.settings.edit') }}" class="block py-2 text-sm text-gray-300 pl-3 rtl:pr-3 rtl:pl-0">{{ __('admin.nav_settings') }}</a>
|
|
<a href="{{ route('admin.invitations.index') }}" class="block py-2 text-sm text-gray-300 pl-3 rtl:pr-3 rtl:pl-0">{{ __('admin.nav_invitations') }}</a>
|
|
<a href="{{ route('admin.list-generator.create') }}" class="block py-2 text-sm text-gray-300 pl-3 rtl:pr-3 rtl:pl-0">{{ __('admin.nav_list_generator') }}</a>
|
|
<a href="{{ route('admin.support.index') }}" class="block py-2 text-sm text-gray-300 pl-3 rtl:pr-3 rtl:pl-0">{{ __('admin.nav_support') }}</a>
|
|
@if (auth()->user()->canViewActivityLog())
|
|
<a href="{{ route('admin.activity-logs.index') }}" class="block py-2 text-sm text-gray-300 pl-3 rtl:pr-3 rtl:pl-0">{{ __('admin.nav_activity_log') }}</a>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
<a href="{{ route('dashboard') }}" class="block py-2 text-sm text-gray-300">{{ __('ui.back_to_app') }}</a>
|
|
<form method="POST" action="{{ route('logout') }}">
|
|
@csrf
|
|
<button type="submit" class="block py-2 text-sm text-gray-400">{{ __('ui.logout') }}</button>
|
|
</form>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="flex-1 max-w-6xl 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-2 text-xs text-gray-400">v{{ config('app.version') }}</footer>
|
|
|
|
@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>
|