🆙 Add fixed cms 🆙

This commit is contained in:
Remco
2026-02-02 19:30:21 +01:00
parent b1a2cab62d
commit b67e0ec2b9
3982 changed files with 193682 additions and 0 deletions
@@ -0,0 +1,5 @@
@props(['route' => '', 'classes' => '', 'turbolink' => true, 'target' => '_self'])
<a @if(!$turbolink) data-turbolinks="false" @endif href="{{ $route }}" target="{{ $target }}" @class(['dropdown-item dark:text-gray-200 dark:hover:bg-gray-700', $classes])>
{{ $slot }}
</a>
@@ -0,0 +1,70 @@
@props(['icon', 'routeGroup' => '', 'classes' => '', 'childClasses' => 'min-w-[150px]', 'uppercase' => false])
<div
x-data="{
open: false,
toggle() {
if (this.open) {
return this.close()
}
this.$refs.button.focus()
this.open = true
},
close(focusAfter) {
if (! this.open) return
this.open = false
focusAfter && focusAfter.focus()
}
}"
x-on:keydown.escape.prevent.stop="close($refs.button)"
x-on:focusin.window="! $refs.panel.contains($event.target) && close()"
x-id="['dropdown-button']"
@class([
'relative md:h-[60px] text-[14px] font-semibold text-black md:border-b-4! md:border-transparent! md:hover:border-b-[#eeb425]! transition duration-200 ease-in-out dark:text-gray-200 z-5',
$classes,
'md:border-b-4! md:border-b-[#eeb425]!' => request()->is($routeGroup),
])"
>
<!-- Button -->
<button
x-ref="button"
x-on:click="toggle()"
:aria-expanded="open"
:aria-controls="$id('dropdown-button')"
type="button"
@class([
'flex items-center md:gap-2 h-full',
'uppercase' => $uppercase,
])"
>
@if(isset($icon))
<i class="hidden navigation-icon {{ $icon }} lg:inline-flex"></i>
@endif
{{ $slot }}
<!-- Heroicon: chevron-down -->
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-400" viewBox="0 0 20 20"
fill="currentColor">
<path fill-rule="evenodd"
d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
clip-rule="evenodd"/>
</svg>
</button>
<!-- Panel -->
<div
x-ref="panel"
x-show="open"
x-transition.origin.top.left
x-on:click.outside="close($refs.button)"
:id="$id('dropdown-button')"
style="display: none;"
@class(['absolute left-0 mt-2 rounded bg-white dark:bg-gray-800 shadow-sm whitespace-nowrap overflow-hidden z-10', $childClasses])
>
{{ $children }}
</div>
</div>
@@ -0,0 +1,11 @@
<x-navigation.dropdown classes="!border-none" childClasses="min-w-[50px] -ml-4">
{{ $slot }}
<x-slot:children>
@foreach (DB::table('website_languages')->get() as $lang)
<x-navigation.dropdown-child :route="route('language.select', $lang->country_code)" :turbolink="false">
<img src="/assets/images/icons/flags/{{ $lang->country_code }}.png" alt="{{ $lang->country_code }}">
</x-navigation.dropdown-child>
@endforeach
</x-slot:children>
</x-navigation.dropdown>
@@ -0,0 +1,11 @@
<button data-collapse-toggle="mobile-menu" type="button"
class="absolute right-4 top-4 z-10 hover:text-gray-900 dark:hover:text-white dark:text-white md:hidden"
aria-controls="mobile-menu-2" aria-expanded="false">
<span class="sr-only">{{ __('Open main menu') }}</span>
<svg class="h-6 w-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
clip-rule="evenodd"></path>
</svg>
</button>
@@ -0,0 +1,111 @@
<div class="relative hidden h-full w-full flex-col items-center gap-y-2 py-3! md:flex! md:flex-row! md:gap-x-8 md:gap-y-0 md:py-0!" id="mobile-menu">
@auth
<x-navigation.dropdown icon="home" route-group="user*">
{{ auth()->user()->username }}
<x-slot:children>
<x-navigation.dropdown-child :route="route('me.show')">
{{ __('Home') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('draw-badge')">
{{ __('Badge Drawer') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('profile.show', auth()->user()->username)">
{{ __('My Profile') }}
</x-navigation.dropdown-child>
</x-slot:children>
</x-navigation.dropdown>
@else
<a href="{{ route('welcome') }}"
class="nav-item dark:text-gray-200 {{ request()->routeIs('welcome') ? 'md:border-b-4! md:border-b-[#eeb425]!' : '' }}">
<i class="mr-1 hidden navigation-icon home lg:inline-flex"></i>
{{ __('Home') }}
</a>
@endauth
@auth
<x-navigation.dropdown icon="community" route-group="community*" :uppercase="true">
{{ __('Community') }}
<x-slot:children>
<x-navigation.dropdown-child :route="route('article.index')">
{{ __('Articles') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('staff.index') ">
{{ __('Staff') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('teams.index')">
{{ __('Teams') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('team-applications.index')">
{{ __('Team applications') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('staff-applications.index')">
{{ __('Staff applications') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('photos.index')">
{{ __('Photos') }}
</x-navigation.dropdown-child>
</x-slot:children>
</x-navigation.dropdown>
<a href="{{ route('leaderboard.index') }}"
class="nav-item dark:text-gray-200 {{ request()->routeIs('leaderboard.*') ? 'md:border-b-4! md:border-b-[#eeb425]!' : '' }}">
<i class="navigation-icon leaderboards mr-1 hidden lg:inline-flex"></i>
{{ __('Leaderboards') }}
</a>
<a href="{{ route('values.index') }}"
class="nav-item dark:text-gray-200 {{ request()->routeIs('values.*') ? 'md:border-b-4! md:border-b-[#eeb425]!' : '' }}">
<i class="navigation-icon leaderboards mr-1 hidden lg:inline-flex"></i>
{{ __('Rare values') }}
</a>
<a data-turbolinks="false" href="{{ route('shop.index') }}"
class="nav-item dark:text-gray-200 {{ request()->routeIs('shop.*') ? 'md:border-b-4! md:border-b-[#eeb425]!' : '' }}">
<i class="navigation-icon mr-1 hidden lg:inline-flex shop"></i>
{{ __('Shop') }}
</a>
@endauth
<x-navigation.dropdown icon="rules" route-group="help-center*" :uppercase="true">
{{ __('Assistance') }}
<x-slot:children>
@auth
<x-navigation.dropdown-child :route="route('help-center.index')">
{{ __('Help center') }}
</x-navigation.dropdown-child>
@if(hasPermission('manage_website_tickets'))
<x-navigation.dropdown-child :route="route('help-center.ticket.index')">
{{ __('Open tickets') }}
</x-navigation.dropdown-child>
@endif
@else
<x-navigation.dropdown-child :route="route('help-center.rules.index')">
{{ __('Rules') }}
</x-navigation.dropdown-child>
@endauth
</x-slot:children>
</x-navigation.dropdown>
<a href="{{ setting('discord_invitation_link') }}" target="_blank" class="nav-item dark:text-gray-200">
{{ __('Discord') }}
</a>
<div class="w-full flex md:hidden gap-x-1 justify-center">
<x-navigation.language-selector>
<img src="/assets/images/icons/flags/{{ session()->has('locale') ? session()->get('locale') : config('habbo.site.default_language') }}.png"
alt="">
</x-navigation.language-selector>
</div>
</div>
@@ -0,0 +1,5 @@
<button id="theme-switcher"
type="button"
class="mr-3 cursor-pointer items-center justify-center rounded-lg bg-gray-200 p-1 shadow-inner dark:bg-gray-800 hidden md:flex">
<x-icons.moon class="h-5 w-5 text-gray-600 dark:text-white" />
</button>
@@ -0,0 +1,36 @@
<button id="dropdownNavbarLink" data-dropdown-toggle="dropdownNavbarUser"
class="ml-4 flex items-center dark:text-gray-200">
<div class="h-10">
<img class="w-10"
src="{{ setting('avatar_imager') }}{{ auth()->user()->look }}&direction=2&headonly=1&head_direction=2&gesture=sml"
alt="">
</div>
<span>{{ auth()->user()->username }}</span>
<svg xmlns="http://www.w3.org/2000/svg" class="ml-2 h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"
stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7" />
</svg>
</button>
<!-- Dropdown menu -->
<div id="dropdownNavbarUser" class="z-10 hidden w-44 bg-white py-2 shadow-sm dark:bg-gray-800">
<a href="{{ route('settings.account.show') }}"
class="block px-4 py-2 font-semibold hover:bg-gray-100 dark:hover:bg-gray-700 dark:text-gray-200">
{{ __('User settings') }}
</a>
@auth
<a href="{{ route('logout') }}"
class="block px-4! py-2! font-semibold hover:bg-gray-100 dark:hover:bg-gray-700 dark:text-gray-200"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
{{ __('Logout') }}
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="hidden">
@csrf
</form>
@endauth
</div>