🆙 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,6 @@
@props(['route' => '', 'classes' => '', 'target' => '_self'])
<a href="{{ $route }}" target="{{ $target }}" @class(['dropdown-item
', $classes])>
{{ $slot }}
</a>
@@ -0,0 +1,75 @@
@props(['icon', 'routeGroup' => '', 'classes' => '', 'childClasses' => 'min-w-[150px]', 'uppercase' => false, 'showChevron' => false, 'flexCol' => true])
<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()
},
isTouchDevice: isTouchDevice()
}"
x-on:keydown.escape.prevent.stop="close($refs.button)"
x-on:focusin.window="! $refs.panel.contains($event.target) && close()"
x-id="['dropdown-button']"
x-on:mouseenter="isTouchDevice ? false : toggle()"
x-on:mouseleave="isTouchDevice ? false : toggle()"
x-on:click.stop="isTouchDevice ? toggle() : {}"
@class([
'relative h-auto font-semibold transition duration-300 ease-in-out z-5',
'active' => request()->is($routeGroup),
$classes,
])
>
<!-- Button -->
<button
x-ref="button"
:aria-expanded="open"
:aria-controls="$id('dropdown-button')"
type="button"
@class([
'flex gap-1 items-center transition ease-in-out hover:text-[#ac93da] dropdown-parent',
'flex-col' => $flexCol,
])
>
@if(isset($icon))
<img class="icon" src="{{ asset(sprintf('/assets/images/dusk/%s', $icon)) }}" alt="Missing icon">
@endif
{{ $slot }}
@if($showChevron)
<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>
@endif
</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 rounded bg-[#ac93da] shadow-sm whitespace-nowrap overflow-hidden z-[100] flex flex-col py-2 items-center gap-2 dropdown-children mt-1', $childClasses])
>
{{ $children }}
</div>
</div>
@@ -0,0 +1,11 @@
<x-navigation.dropdown classes="!border-none" childClasses="w-[50px] -ml-2 flex items-center" :show-chevron="true" :flex-col="false">
{{ $slot }}
<x-slot:children>
@foreach (DB::table('website_languages')->get() as $lang)
<x-navigation.dropdown-child :route="route('language.select', $lang->country_code)" classes="transition ease-in-out duration-300 hover:scale-110 flex justify-center">
<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,96 @@
<nav class="nav-header" x-data="{
open: false,
}">
<div class="w-full min-h-[60px] text-white px-5 relative">
<button @click="open = !open" class="absolute right-5 top-5">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
</svg>
</button>
<div x-show="open" class="flex flex-col text-white gap-x-14 p-4 space-y-3">
<x-navigation.dropdown route-group="help-center*" :show-chevron="true" :flex-col="false">
{{ __('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('staff-applications.index')">
{{ __('Staff applications') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('help-center.index')">
{{ __('Help center') }}
</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="" class="transition ease-in-out hover:text-[#ac93da]">
Leaderboards
</a>
<a href="" class="transition ease-in-out hover:text-[#ac93da]">
News
</a>
<a href="" class="transition ease-in-out hover:text-[#ac93da]">
Events
</a>
<a href="" class="transition ease-in-out hover:text-[#ac93da]">
Store
</a>
<x-navigation.dropdown route-group="help-center*" :show-chevron="true" :flex-col="false">
{{ __('Home') }}
<x-slot:children>
@auth
<x-navigation.dropdown-child :route="route('profile.show', Auth::user()->username)">
{{ __('My profile') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('settings.account.show')">
{{ __('Account settings') }}
</x-navigation.dropdown-child>
<button class="dropdown-item dark:text-gray-200 dark:hover:bg-gray-700 w-full text-left" @click.stop.prevent="document.getElementById('logout-form').submit();">
{{ __('Logout') }}
</button>
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="hidden">
@csrf
</form>
@endauth
@guest
<x-navigation.dropdown-child :route="route('login')">
{{ __('Login') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('register')">
{{ __('Register') }}
</x-navigation.dropdown-child>
@endguest
</x-slot:children>
</x-navigation.dropdown>
</div>
</div>
</nav>
@@ -0,0 +1,105 @@
<nav class="nav-header">
<div class="max-w-7xl w-full flex justify-between items-center h-[120px]">
<a href="/" class="transition duration-300 ease-in-out hover:scale-105">
<img src="{{ setting('cms_logo') }}" alt="">
</a>
<div class="flex text-white gap-x-14">
<x-navigation.dropdown icon="community_icon.png" route-group="help-center*" :uppercase="true">
{{ __('Community') }}
<x-slot:children>
<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('values.index')">
{{ __('Rare values') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('help-center.index')">
{{ __('Help center') }}
</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="flex flex-col gap-1 items-center transition ease-in-out hover:text-[#ac93da]">
<img class="icon" src="{{ asset('/assets/images/dusk/leaderboard_icon.png') }}" alt="community icon">
Leaderboards
</a>
<a href="{{ route('article.index') }}" class="flex flex-col gap-1 items-center transition ease-in-out hover:text-[#ac93da]">
<img class="icon" src="{{ asset('/assets/images/dusk/news_icon.png') }}" alt="community icon">
News
</a>
{{--
<a href="#" class="flex flex-col gap-1 items-center transition ease-in-out hover:text-[#ac93da]">
<img class="icon" src="{{ asset('/assets/images/dusk/events_icon.png') }}" alt="community icon">
Events
</a>
--}}
<a href="{{ route('shop.index') }}" class="flex flex-col gap-1 items-center transition ease-in-out hover:text-[#ac93da]">
<img class="icon" src="{{ asset('/assets/images/dusk/store_icon.png') }}" alt="community icon">
Store
</a>
<x-navigation.dropdown icon="home_icon.png" route-group="user*" :uppercase="true">
{{ __('Home') }}
<x-slot:children>
@auth
<x-navigation.dropdown-child :route="route('profile.show', Auth::user()->username)">
{{ __('My profile') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('draw-badge')">
{{ __('Badge Drawer') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('settings.account.show')">
{{ __('Account settings') }}
</x-navigation.dropdown-child>
<button class="dropdown-item" @click.stop.prevent="document.getElementById('logout-form').submit();">
{{ __('Logout') }}
</button>
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="hidden">
@csrf
</form>
@endauth
@guest
<x-navigation.dropdown-child :route="route('login')">
{{ __('Login') }}
</x-navigation.dropdown-child>
<x-navigation.dropdown-child :route="route('register')">
{{ __('Register') }}
</x-navigation.dropdown-child>
@endguest
</x-slot:children>
</x-navigation.dropdown>
</div>
</div>
</nav>