Files
thecrimesynticate/resources/views/game/character/create.blade.php
T

160 lines
7.8 KiB
PHP
Raw Normal View History

2026-06-27 14:38:18 +03:00
@extends('layouts.game')
@section('title', 'Create Character')
@section('game-content')
<div class="max-w-2xl mx-auto">
<div class="bg-syndicate-800 border border-syndicate-700 rounded-lg p-8">
<h1 class="font-display text-2xl font-bold text-gray-100 mb-6">
2026-06-27 14:38:18 +03:00
Create Your Character
</h1>
<p class="text-gray-400 mb-8">
Welcome to {{ config('game.name', 'The Crime Syndicate') }}!
2026-06-27 14:38:18 +03:00
Create your character to start your criminal career.
</p>
2026-06-27 14:38:18 +03:00
<form method="POST" action="{{ route('game.character.store') }}">
@csrf
2026-06-27 14:38:18 +03:00
<!-- Name -->
<div class="mb-6">
<label for="name" class="block font-medium text-sm text-gray-300 mb-2">
2026-06-27 14:38:18 +03:00
Character Name
</label>
<input
id="name"
type="text"
name="name"
2026-06-27 14:38:18 +03:00
value="{{ old('name') }}"
required
autofocus
autocomplete="name"
class="w-full bg-syndicate-700 border-syndicate-600 text-gray-100 placeholder-gray-500 focus:border-crime-500 focus:ring-crime-500 rounded-md shadow-sm @error('name') border-red-500 @enderror"
2026-06-27 14:38:18 +03:00
placeholder="Enter your character name"
maxlength="50"
>
@error('name')
<p class="mt-2 text-sm text-red-400">{{ $message }}</p>
2026-06-27 14:38:18 +03:00
@enderror
<p class="mt-1 text-xs text-gray-500">
2026-06-27 14:38:18 +03:00
Choose a unique name for your character (max 50 characters).
</p>
</div>
2026-06-27 14:38:18 +03:00
<!-- Gender -->
<div class="mb-6">
<label class="block font-medium text-sm text-gray-300 mb-2">
2026-06-27 14:38:18 +03:00
Gender
</label>
<div class="space-y-2">
@foreach($genders as $gender)
<div class="flex items-center">
<input
id="gender-{{ $gender }}"
type="radio"
name="gender"
2026-06-27 14:38:18 +03:00
value="{{ $gender }}"
{{ old('gender') === $gender ? 'checked' : ($loop->first ? 'checked' : '') }}
class="h-4 w-4 text-crime-600 focus:ring-crime-500 border-syndicate-600 bg-syndicate-700"
2026-06-27 14:38:18 +03:00
>
<label
for="gender-{{ $gender }}"
class="ml-2 block text-sm text-gray-300"
2026-06-27 14:38:18 +03:00
>
{{ ucfirst($gender) }}
</label>
</div>
@endforeach
</div>
@error('gender')
<p class="mt-2 text-sm text-red-400">{{ $message }}</p>
2026-06-27 14:38:18 +03:00
@enderror
</div>
2026-06-27 14:38:18 +03:00
<!-- Location -->
<div class="mb-6">
<label for="location_id" class="block font-medium text-sm text-gray-300 mb-2">
2026-06-27 14:38:18 +03:00
Starting Location
</label>
<select
id="location_id"
name="location_id"
2026-06-27 14:38:18 +03:00
required
class="w-full bg-syndicate-700 border-syndicate-600 text-gray-100 focus:border-crime-500 focus:ring-crime-500 rounded-md shadow-sm @error('location_id') border-red-500 @enderror"
2026-06-27 14:38:18 +03:00
>
@foreach($locations as $location)
<option
2026-06-27 14:38:18 +03:00
value="{{ $location->id }}"
{{ old('location_id') == $location->id ? 'selected' : ($loop->first ? 'selected' : '') }}
>
{{ $location->name }}
</option>
@endforeach
</select>
@error('location_id')
<p class="mt-2 text-sm text-red-400">{{ $message }}</p>
2026-06-27 14:38:18 +03:00
@enderror
<p class="mt-1 text-xs text-gray-500">
2026-06-27 14:38:18 +03:00
Choose where your character will start their journey.
</p>
</div>
2026-06-27 14:38:18 +03:00
<!-- Starting Stats Preview -->
<div class="mb-6 bg-syndicate-700 border border-syndicate-600 p-4 rounded-lg">
<h3 class="font-display font-semibold text-sm text-gray-300 mb-3">
2026-06-27 14:38:18 +03:00
Starting Stats
</h3>
<div class="grid grid-cols-2 gap-3 text-sm">
<div class="flex justify-between">
<span class="text-gray-400">Health</span>
<span class="text-gray-200">{{ config('game.health.start_amount', 100) }}/{{ config('game.health.max', 100) }}</span>
2026-06-27 14:38:18 +03:00
</div>
<div class="flex justify-between">
<span class="text-gray-400">Energy</span>
<span class="text-gray-200">{{ config('game.energy.start_amount', 100) }}/{{ config('game.energy.max', 100) }}</span>
2026-06-27 14:38:18 +03:00
</div>
<div class="flex justify-between">
<span class="text-gray-400">Money</span>
<span class="text-gold-400">${{ number_format(config('game.economy.start_money', 5000)) }}</span>
2026-06-27 14:38:18 +03:00
</div>
<div class="flex justify-between">
<span class="text-gray-400">Bank</span>
<span class="text-gray-200">${{ number_format(config('game.economy.start_bank', 0)) }}</span>
2026-06-27 14:38:18 +03:00
</div>
<div class="flex justify-between">
<span class="text-gray-400">Strength</span>
<span class="text-gray-200">5</span>
2026-06-27 14:38:18 +03:00
</div>
<div class="flex justify-between">
<span class="text-gray-400">Defense</span>
<span class="text-gray-200">5</span>
2026-06-27 14:38:18 +03:00
</div>
<div class="flex justify-between">
<span class="text-gray-400">Speed</span>
<span class="text-gray-200">5</span>
2026-06-27 14:38:18 +03:00
</div>
<div class="flex justify-between">
<span class="text-gray-400">Dexterity</span>
<span class="text-gray-200">5</span>
2026-06-27 14:38:18 +03:00
</div>
</div>
</div>
2026-06-27 14:38:18 +03:00
<!-- Submit Button -->
<div class="flex justify-end">
<button
type="submit"
class="inline-flex items-center px-6 py-3 bg-crime-600 hover:bg-crime-500 text-white font-medium rounded-lg transition"
2026-06-27 14:38:18 +03:00
>
Create Character
<svg class="ml-2 w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 5l7 7-7 7M5 12h14" />
</svg>
</button>
</div>
</form>
</div>
</div>
@endsection