From 195688da25eb83a587c69de891da1269eb9bd31a Mon Sep 17 00:00:00 2001 From: Doar Mihai Date: Sun, 28 Jun 2026 02:58:28 +0300 Subject: [PATCH] feat: sidebar + top bar game layout with dark crime theme --- .../views/game/partials/stats-bar.blade.php | 58 +++---- resources/views/layouts/game.blade.php | 110 ++++++------ resources/views/layouts/navigation.blade.php | 156 +++++++----------- 3 files changed, 143 insertions(+), 181 deletions(-) diff --git a/resources/views/game/partials/stats-bar.blade.php b/resources/views/game/partials/stats-bar.blade.php index 03c6826..35b7e7d 100644 --- a/resources/views/game/partials/stats-bar.blade.php +++ b/resources/views/game/partials/stats-bar.blade.php @@ -1,48 +1,32 @@ -@php - $character = auth()->user()->character; -@endphp +@php $character = auth()->user()->character; @endphp +
+ {{-- HP --}} +
+ ❤ + {{ $character->health }}/{{ $character->max_health }} +
-
- -
+ {{-- Energy --}} +
⚡ -
-
-
- {{ $character->energy }}/{{ $character->max_energy }} + {{ $character->energy }}/{{ $character->max_energy }}
- -
- ❤️ -
-
-
- {{ $character->health }}/{{ $character->max_health }} + {{-- Cash --}} +
+ $ + {{ number_format($character->money) }}
- -
- 💰 - ${{ number_format($character->money) }} + {{-- Level --}} +
+ Lv.{{ $character->level }}
- -
- 📈 - Lv. {{ $character->level }} -
- - - @if($character->status !== 'active') - - {{ ucfirst(str_replace('_', ' ', $character->status)) }} + {{-- Non-active status badge --}} + @if($character->status !== \App\Enums\CharacterStatus::ACTIVE) + + {{ $character->status->label() }} @endif
diff --git a/resources/views/layouts/game.blade.php b/resources/views/layouts/game.blade.php index 40a6df4..fa940fa 100644 --- a/resources/views/layouts/game.blade.php +++ b/resources/views/layouts/game.blade.php @@ -3,60 +3,76 @@ @section('title', config('game.name', 'The Crime Syndicate') . ' - ' . ($title ?? 'Game')) @section('content') - -
-
-
- -
- - {{ config('game.name', 'The Crime Syndicate') }} +
+ + {{-- TOP BAR --}} +
+ {{-- Logo --}} + + {{ config('game.name', 'The Crime Syndicate') }} + + + {{-- Stats bar --}} +
+ @if(auth()->check() && auth()->user()->character) + @include('game.partials.stats-bar') + @endif +
+ + {{-- User menu --}} +
+ {{ auth()->user()->name ?? '' }} +
+ + - - -
- @if(auth()->check() && auth()->user()->character) - @include('game.partials.stats-bar') - @endif -
- - -
- @include('layouts.navigation') +
+ @csrf + +
- -
- @if(session('success')) - - @endif - - @if(session('error')) - - @endif + {{-- BODY: sidebar + content --}} +
+ + {{-- SIDEBAR --}} + @include('layouts.navigation') + + {{-- CONTENT --}} +
+ + {{-- Flash messages --}} + @if(session('success')) +
+ {{ session('success') }} +
+ @endif + @if(session('error')) +
+ {{ session('error') }} +
+ @endif + + @yield('game-content') +
- -
- @yield('game-content') -
- - -
-
-
- © {{ date('Y') }} {{ config('game.name', 'The Crime Syndicate') }} - v{{ config('game.version', '1.0.0') }} -
-
+ {{-- FOOTER --}} +
+ © {{ date('Y') }} {{ config('game.name', 'The Crime Syndicate') }} — v{{ config('game.version', '1.0.0') }}
+ +
@endsection diff --git a/resources/views/layouts/navigation.blade.php b/resources/views/layouts/navigation.blade.php index c2d3a65..740af3c 100644 --- a/resources/views/layouts/navigation.blade.php +++ b/resources/views/layouts/navigation.blade.php @@ -1,100 +1,62 @@ - + @if($charStatus === \App\Enums\CharacterStatus::IN_JAIL) +
  • + + 🚔 + Jail + +
  • + @endif + @endif + + +