Files
Atomcms-edit/resources/themes/atom/views/rare-values.blade.php
T
root c53a5a8a2c Complete Hubbly theme conversion: all pages rewritten with CSS variable theming
- Converted all views from Dusk components (x-content.content-card, x-form.*) to inline Hubbly style
- All pages use consistent card pattern: rounded-lg, gradient headers, color-mix borders
- Added Hubbly-style homepage with 2-column layout, login card, swiper news carousel
- Rewrote navigation with Alpine.js dropdowns, CSS variable colors, Hubbly assets
- Updated profile page with Hubbly cards, fixed data bugs (friend/guild relationships)
- Rewrote register page to match Hubbly layout: banner header, avatar preview with Frank GIF, 2-column form, avatar carousel selector, border-4 inputs
- Rewrote login, settings, help center, radio, applications, utility pages
- All colors use CSS variables controlled by Filament theme editor
- Added Hubbly assets: banner, Frank GIF, navigation icons, online badge
- Removed all dependencies on x-content.* and x-form.* components
2026-06-27 17:01:02 +02:00

244 lines
13 KiB
PHP
Executable File

<x-app-layout>
@push('title', __('Rare values'))
<div class="col-span-12 lg:col-span-9 lg:w-[96%]">
<div class="flex flex-col gap-y-4">
@if(isset($statistics))
<div class="rounded-lg overflow-hidden" style="background-color: var(--color-surface); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
<div class="relative w-full" style="background: linear-gradient(140deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 80%, black) 100%);">
<div class="flex items-center h-full px-4 py-3 gap-3">
<div class="w-8 h-8 rounded-full flex items-center justify-center text-lg shadow-lg" style="background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);">
💰
</div>
<div>
<p class="text-white font-bold text-sm">{{ __('Rare Statistics') }}</p>
<p class="text-xs" style="color: rgba(255,255,255,0.8)">{{ __('Overview of rare values on :hotel', ['hotel' => setting('hotel_name')]) }}</p>
</div>
</div>
</div>
<div class="p-4">
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 text-center">
<div class="p-3 rounded" style="background-color: var(--color-surface);">
<div class="text-2xl font-bold" style="color: var(--color-primary)">{{ $statistics['total_categories'] }}</div>
<div class="text-sm" style="color: var(--color-text-muted)">{{ __('Categories') }}</div>
</div>
<div class="p-3 rounded" style="background-color: var(--color-surface);">
<div class="text-2xl font-bold" style="color: var(--color-primary)">{{ $statistics['total_rares'] }}</div>
<div class="text-sm" style="color: var(--color-text-muted)">{{ __('Total Rares') }}</div>
</div>
<div class="p-3 rounded" style="background-color: var(--color-surface);">
<div class="text-2xl font-bold" style="color: var(--color-primary)">{{ round($statistics['average_rares_per_category']) }}</div>
<div class="text-sm" style="color: var(--color-text-muted)">{{ __('Avg per Category') }}</div>
</div>
<div class="p-3 rounded" style="background-color: var(--color-surface);">
<div class="text-lg font-bold truncate" style="color: var(--color-primary)">{{ $statistics['most_valuable_category'] }}</div>
<div class="text-sm" style="color: var(--color-text-muted)">{{ __('Top Category') }}</div>
</div>
</div>
</div>
</div>
@endif
@if(isset($searchTerm))
<div class="rounded-lg overflow-hidden" style="background-color: var(--color-surface); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
<div class="relative w-full" style="background: linear-gradient(140deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 80%, black) 100%);">
<div class="flex items-center h-full px-4 py-3 gap-3">
<div class="w-8 h-8 rounded-full flex items-center justify-center text-lg shadow-lg" style="background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);">
🔍
</div>
<div>
<p class="text-white font-bold text-sm">{{ __('Search Results') }}</p>
<p class="text-xs" style="color: rgba(255,255,255,0.8)">{{ __('Showing results for: :term', ['term' => $searchTerm]) }}</p>
</div>
</div>
</div>
<div class="p-4">
<p class="text-sm" style="color: var(--color-text-muted)">
{{ __('Found :count categories', ['count' => $categories->count()]) }}
</p>
</div>
</div>
@endif
@if(isset($category))
<div class="rounded-lg overflow-hidden" style="background-color: var(--color-surface); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
<div class="relative w-full" style="background: linear-gradient(140deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 80%, black) 100%);">
<div class="flex items-center h-full px-4 py-3 gap-3">
<div class="w-8 h-8 rounded-full flex items-center justify-center text-lg shadow-lg" style="background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);">
<img src="{{ sprintf('%s/%s.gif', setting('badges_path'), $category->badge) }}" alt="" class="w-5 h-5">
</div>
<div>
<p class="text-white font-bold text-sm">{{ $category->name }}</p>
<p class="text-xs" style="color: rgba(255,255,255,0.8)">{{ __('All :count rares in :category', ['count' => $category->furniture->count(), 'category' => $category->name]) }}</p>
</div>
</div>
</div>
<div class="p-4">
<div class="mb-4 flex flex-wrap gap-2">
<span class="text-sm self-center" style="color: var(--color-text-muted)">{{ __('Sort by:') }}</span>
<a href="{{ route('values.category', ['id' => $category->id, 'sort' => 'name', 'order' => $sortBy === 'name' && $sortOrder === 'asc' ? 'desc' : 'asc']) }}"
class="px-3 py-1 rounded text-sm" style="{{ $sortBy === 'name' ? 'background-color: var(--color-primary); color: var(--button-text-color)' : 'background-color: var(--color-surface); color: var(--color-text)' }}">
{{ __('Name') }} {{ $sortBy === 'name' ? ($sortOrder === 'asc' ? '↑' : '↓') : '' }}
</a>
<a href="{{ route('values.category', ['id' => $category->id, 'sort' => 'credit_value', 'order' => $sortBy === 'credit_value' && $sortOrder === 'asc' ? 'desc' : 'asc']) }}"
class="px-3 py-1 rounded text-sm" style="{{ $sortBy === 'credit_value' ? 'background-color: var(--color-primary); color: var(--button-text-color)' : 'background-color: var(--color-surface); color: var(--color-text)' }}">
{{ __('Credits') }} {{ $sortBy === 'credit_value' ? ($sortOrder === 'asc' ? '↑' : '↓') : '' }}
</a>
<a href="{{ route('values.category', ['id' => $category->id, 'sort' => 'currency_value', 'order' => $sortBy === 'currency_value' && $sortOrder === 'asc' ? 'desc' : 'asc']) }}"
class="px-3 py-1 rounded text-sm" style="{{ $sortBy === 'currency_value' ? 'background-color: var(--color-primary); color: var(--button-text-color)' : 'background-color: var(--color-surface); color: var(--color-text)' }}">
{{ __('Currency') }} {{ $sortBy === 'currency_value' ? ($sortOrder === 'asc' ? '↑' : '↓') : '' }}
</a>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
@foreach($category->furniture->sortBy($sortBy, SORT_REGULAR, $sortOrder === 'desc') as $rare)
<x-rares.rare-card :rare="$rare" />
@endforeach
</div>
</div>
</div>
@elseif(isset($categories) && $categories instanceof \Illuminate\Database\Eloquent\Collection)
@forelse($categories as $cat)
<div class="rounded-lg overflow-hidden" style="background-color: var(--color-surface); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
<div class="relative w-full" style="background: linear-gradient(140deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 80%, black) 100%);">
<div class="flex items-center h-full px-4 py-3 gap-3">
<div class="w-8 h-8 rounded-full flex items-center justify-center text-lg shadow-lg" style="background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);">
<img src="{{ sprintf('%s/%s.gif', setting('badges_path'), $cat->badge) }}" alt="" class="w-5 h-5">
</div>
<div>
<p class="text-white font-bold text-sm">{{ $cat->name }}</p>
<p class="text-xs" style="color: rgba(255,255,255,0.8)">{{ __(':count rares', ['count' => $cat->furniture->count()]) }}</p>
</div>
</div>
</div>
<div class="p-4">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
@foreach($cat->furniture->take(6) as $rare)
<x-rares.rare-card :rare="$rare" />
@endforeach
</div>
@if($cat->furniture->count() > 6)
<div class="mt-4 text-center">
<a href="{{ route('values.category', ['id' => $cat->id]) }}" style="color: var(--color-primary); text-decoration: underline;">
{{ __('View all :count rares', ['count' => $cat->furniture->count()]) }}
</a>
</div>
@endif
</div>
</div>
@empty
<div class="rounded-lg overflow-hidden" style="background-color: var(--color-surface); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
<div class="relative w-full" style="background: linear-gradient(140deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 80%, black) 100%);">
<div class="flex items-center h-full px-4 py-3 gap-3">
<div class="w-8 h-8 rounded-full flex items-center justify-center text-lg shadow-lg" style="background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);">
💰
</div>
<div>
<p class="text-white font-bold text-sm">{{ __('Rare values') }}</p>
<p class="text-xs" style="color: rgba(255,255,255,0.8)">{{ __('Get an overview of all of the rares on :hotel', ['hotel' => setting('hotel_name')]) }}</p>
</div>
</div>
</div>
<div class="p-4">
<p class="text-center py-8" style="color: var(--color-text-muted)">
{{ __('We currently have no rares listed here') }}
</p>
</div>
</div>
@endforelse
@endif
</div>
</div>
<div class="col-span-12 lg:col-span-3 lg:w-[110%] space-y-4 lg:-ml-[32px]">
<div class="rounded-lg overflow-hidden" style="background-color: var(--color-surface); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
<div class="relative w-full" style="background: linear-gradient(140deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 80%, black) 100%);">
<div class="flex items-center h-full px-4 py-3 gap-3">
<div class="w-8 h-8 rounded-full flex items-center justify-center text-lg shadow-lg" style="background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);">
🔍
</div>
<div>
<p class="text-white font-bold text-sm">{{ __('Search Rares') }}</p>
<p class="text-xs" style="color: rgba(255,255,255,0.8)">{{ __('Find rares quickly') }}</p>
</div>
</div>
</div>
<div class="p-4" style="color: var(--color-text)">
<form action="{{ route('values.search') }}" method="POST" class="space-y-3">
@csrf
<div class="relative">
<input
type="text"
name="search"
placeholder="Search for a rare..."
value="{{ $searchTerm ?? '' }}"
class="w-full rounded-lg border px-3 py-2 text-sm focus:outline-none mb-3"
style="background-color: var(--color-background); border-color: color-mix(in srgb, var(--color-text-muted) 20%, transparent); color: var(--color-text);"
onfocus="this.style.borderColor='var(--color-primary)'"
onblur="this.style.borderColor='color-mix(in srgb, var(--color-text-muted) 20%, transparent)'">
@if(isset($searchTerm))
<a href="{{ route('values.index') }}" class="absolute right-3 top-3" style="color: var(--color-text-muted);">
</a>
@endif
</div>
@if (setting('google_recaptcha_enabled'))
<div class="g-recaptcha" data-sitekey="{{ config('habbo.site.recaptcha_site_key') }}"></div>
@endif
@if (setting('cloudflare_turnstile_enabled'))
<x-turnstile />
@endif
<button type="button" class="rounded-lg px-4 py-2 text-sm font-semibold transition-all duration-200 hover:opacity-90 w-full" style="background-color: var(--color-background); color: var(--color-text); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
{{ __('Search') }}
</button>
</form>
@if(isset($statistics))
<div class="mt-4 pt-4" style="border-top: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
<p class="text-xs" style="color: var(--color-text-muted)">
{{ __('Searching through :total rares', ['total' => $statistics['total_rares']]) }}
</p>
</div>
@endif
</div>
</div>
<div class="rounded-lg overflow-hidden" style="background-color: var(--color-surface); border: 1px solid color-mix(in srgb, var(--color-text-muted) 15%, transparent);">
<div class="relative w-full" style="background: linear-gradient(140deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 80%, black) 100%);">
<div class="flex items-center h-full px-4 py-3 gap-3">
<div class="w-8 h-8 rounded-full flex items-center justify-center text-lg shadow-lg" style="background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);">
📦
</div>
<div>
<p class="text-white font-bold text-sm">{{ __('Categories') }}</p>
<p class="text-xs" style="color: rgba(255,255,255,0.8)">{{ __(':count categories', ['count' => $categoriesNav->count() ?? 0]) }}</p>
</div>
</div>
</div>
<div class="p-4 text-sm space-y-2 max-h-96 overflow-y-auto" style="color: var(--color-text)">
<a href="{{ route('values.index') }}"
class="block rounded py-2 px-4 text-center transition duration-200 ease-in-out"
style="{{ !isset($category) && !isset($searchTerm) ? 'background-color: var(--color-primary); color: var(--button-text-color);' : 'background-color: var(--color-background); color: var(--color-text);' }}">
{{ __('All Rares') }}
</a>
@foreach($categoriesNav ?? [] as $cat)
<a href="{{ route('values.category', ['id' => $cat->id]) }}"
class="block text-center rounded py-2 px-4 text-sm transition"
style="{{ isset($category) && $category->id === $cat->id ? 'background-color: var(--color-primary); color: var(--button-text-color);' : 'background-color: var(--color-surface); color: var(--color-text);' }}">
{{ $cat->name }}
<span class="float-right text-xs opacity-75">({{ $cat->furniture_count ?? $cat->furniture->count() }})</span>
</a>
@endforeach
</div>
</div>
</div>
</x-app-layout>