Files
gamelog/resources/views/layouts/app.blade.php
T

138 lines
8.0 KiB
PHP
Raw Normal View History

2026-05-29 00:33:00 +03:00
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="dark h-full">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title', 'GameLog — Track Every Game You Play')</title>
<meta name="description" content="@yield('description', 'GameLog lets you track every game you play, rate your favorites, and discover what to play next.')">
@hasSection('canonical')
<link rel="canonical" href="@yield('canonical')">
@endif
2026-05-29 00:33:00 +03:00
<!-- Open Graph -->
<meta property="og:title" content="@yield('og_title', 'GameLog')">
<meta property="og:description" content="@yield('og_description', 'Track every game you play.')">
<meta property="og:type" content="@yield('og_type', 'website')">
<meta property="og:url" content="@yield('og_url', url()->current())">
2026-05-29 00:33:00 +03:00
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600,700&display=swap" rel="stylesheet" />
2026-05-29 00:33:00 +03:00
@vite(['resources/css/app.css', 'resources/js/app.js'])
@stack('styles')
</head>
<body class="h-full bg-[#0f0f13] text-slate-200 antialiased font-sans">
2026-05-29 00:33:00 +03:00
<!-- Navigation -->
<nav class="bg-[#16161d] border-b border-white/5 sticky top-0 z-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<!-- Left: Logo + Nav Links -->
<div class="flex items-center gap-8">
<a href="{{ route('home') }}" class="text-xl font-bold text-purple-400 hover:text-purple-300 transition-colors">
GameLog
</a>
<div class="hidden md:flex items-center gap-6">
<a href="{{ route('games.index') }}" class="text-sm text-slate-400 hover:text-slate-200 transition-colors">Browse</a>
<a href="{{ route('games.top-rated') }}" class="text-sm text-slate-400 hover:text-slate-200 transition-colors">Top Rated</a>
<a href="{{ route('games.new-releases') }}" class="text-sm text-slate-400 hover:text-slate-200 transition-colors">New Releases</a>
2026-05-29 00:33:00 +03:00
</div>
</div>
2026-05-29 00:33:00 +03:00
<!-- Center: Search -->
<div class="flex-1 max-w-md mx-8 hidden md:block">
<form action="{{ route('games.search') }}" method="GET">
<div class="relative">
<svg class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0"/>
</svg>
<input type="text" name="q" value="{{ request('q') }}" placeholder="Search games…"
class="w-full bg-[#0f0f13] border border-white/10 rounded-lg pl-10 pr-4 py-2 text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-purple-500 focus:ring-1 focus:ring-purple-500 transition">
</div>
</form>
</div>
<!-- Right: Auth -->
<div class="flex items-center gap-3">
@auth
<div class="relative" x-data="{ open: false }">
<button @click="open = !open" class="flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors">
@if(auth()->user()->avatar)
<img src="{{ auth()->user()->avatar }}" class="w-8 h-8 rounded-full object-cover border border-white/10" alt="">
@else
<div class="w-8 h-8 rounded-full bg-purple-600 flex items-center justify-center text-xs font-bold text-white">
{{ strtoupper(substr(auth()->user()->name, 0, 1)) }}
</div>
@endif
<span class="hidden sm:block">{{ auth()->user()->username ?? auth()->user()->name }}</span>
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
</svg>
</button>
<div x-show="open" @click.outside="open = false" x-transition
class="absolute right-0 mt-2 w-48 bg-[#16161d] border border-white/10 rounded-lg shadow-xl overflow-hidden z-50">
@if(auth()->user()->username)
<a href="{{ route('users.show', auth()->user()->username) }}" class="block px-4 py-2.5 text-sm text-slate-300 hover:bg-white/5 hover:text-white transition-colors">Profile</a>
<a href="{{ route('users.library', auth()->user()->username) }}" class="block px-4 py-2.5 text-sm text-slate-300 hover:bg-white/5 hover:text-white transition-colors">My Library</a>
@endif
<a href="{{ route('profile.edit') }}" class="block px-4 py-2.5 text-sm text-slate-300 hover:bg-white/5 hover:text-white transition-colors">Settings</a>
<div class="border-t border-white/5"></div>
<form method="POST" action="{{ route('logout') }}">
@csrf
<button type="submit" class="w-full text-left px-4 py-2.5 text-sm text-slate-400 hover:bg-white/5 hover:text-white transition-colors">
Log Out
</button>
</form>
</div>
</div>
@else
<a href="{{ route('login') }}" class="text-sm text-slate-400 hover:text-slate-200 transition-colors">Log in</a>
<a href="{{ route('register') }}" class="text-sm px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-lg transition-colors font-medium">
Sign up
</a>
@endauth
</div>
</div>
2026-05-29 00:33:00 +03:00
</div>
</nav>
<!-- Flash Messages -->
@if(session('success'))
<div class="bg-green-900/50 border-b border-green-700/50 text-green-300 text-sm text-center py-2 px-4">
{{ session('success') }}
</div>
@endif
@if(session('error'))
<div class="bg-red-900/50 border-b border-red-700/50 text-red-300 text-sm text-center py-2 px-4">
{{ session('error') }}
</div>
@endif
<!-- Page Content -->
<main>
@yield('content')
</main>
<!-- Footer -->
<footer class="border-t border-white/5 mt-16 py-10">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex flex-col md:flex-row items-center justify-between gap-4">
<div class="text-slate-500 text-sm">
© {{ date('Y') }} GameLog. Track every game you play.
</div>
<div class="flex items-center gap-6 text-sm text-slate-500">
<a href="{{ route('games.index') }}" class="hover:text-slate-300 transition-colors">Browse</a>
<a href="{{ route('games.top-rated') }}" class="hover:text-slate-300 transition-colors">Top Rated</a>
<a href="{{ route('games.new-releases') }}" class="hover:text-slate-300 transition-colors">New Releases</a>
</div>
</div>
</div>
</footer>
@stack('scripts')
</body>
2026-05-29 00:33:00 +03:00
</html>