🧹 Duster

This commit is contained in:
Rico van Zelst
2024-06-18 12:55:10 +02:00
parent f3ded81a62
commit a0b37a4ab4
39 changed files with 191 additions and 232 deletions

View File

@@ -72,7 +72,6 @@ function getRoleIconSvg($roleName): string
*
* @param string $full_id
* @param enum $type splash, uncentered_splash, loading, tile, icon, ability, video
* @return string
*/
function getChampionImage($full_id, $type): string
{
@@ -85,6 +84,9 @@ function getChampionImage($full_id, $type): string
return $championImage->url;
}
/**
* Get the commit hash.
*/
function getCommitHash(): string
{
/** @var string $commit */

View File

@@ -29,13 +29,6 @@ class Champion extends Model
'release_patch',
];
protected function casts(): array
{
return [
'roles' => 'array',
];
}
public function getResourceTypeAttribute($value): string
{
$resourceTypes = [
@@ -139,4 +132,11 @@ class Champion extends Model
{
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/ability-icon/p';
}
protected function casts(): array
{
return [
'roles' => 'array',
];
}
}

View File

@@ -16,13 +16,6 @@ class ChampionRoles extends Model
'roles',
];
protected function casts(): array
{
return [
'roles' => 'array',
];
}
public function champion(): BelongsTo
{
return $this->belongsTo(Champion::class, 'champion_id', 'champion_id');
@@ -50,4 +43,11 @@ class ChampionRoles extends Model
return $transformedRoles;
}
protected function casts(): array
{
return [
'roles' => 'array',
];
}
}

View File

@@ -34,15 +34,6 @@ class ChampionSkin extends Model
'splash_artist',
];
protected function casts(): array
{
return [
'associated_skinline' => 'array',
'voice_actor' => 'array',
'splash_artist' => 'array',
];
}
public function sluggable(): array
{
return [
@@ -86,4 +77,13 @@ class ChampionSkin extends Model
{
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/tile/skin/'.$this->skin_id;
}
protected function casts(): array
{
return [
'associated_skinline' => 'array',
'voice_actor' => 'array',
'splash_artist' => 'array',
];
}
}

View File

@@ -20,13 +20,6 @@ class SkinChroma extends Model
'chroma_image',
];
protected function casts(): array
{
return [
'chroma_colors' => 'array',
];
}
public function sluggable(): array
{
return [
@@ -45,4 +38,11 @@ class SkinChroma extends Model
{
return 'https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-chroma-images/'.$this->skin->champion_id.'/'.$this->chroma_id.'.png';
}
protected function casts(): array
{
return [
'chroma_colors' => 'array',
];
}
}

View File

@@ -22,13 +22,6 @@ class SummonerIcon extends Model
'esports_event',
];
protected function casts(): array
{
return [
'legacy' => 'boolean',
];
}
public function sluggable(): array
{
return [
@@ -49,4 +42,11 @@ class SummonerIcon extends Model
{
return 'slug';
}
protected function casts(): array
{
return [
'legacy' => 'boolean',
];
}
}

View File

@@ -8,9 +8,9 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
use Spatie\Sheets\Sheets;
use URL;
class AppServiceProvider extends ServiceProvider
{

View File

@@ -42,7 +42,8 @@
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "^11.0",
"rector/rector": "^1.0",
"spatie/laravel-ignition": "^2.4"
"spatie/laravel-ignition": "^2.4",
"tightenco/duster": "^3.0"
},
"autoload": {
"psr-4": {

72
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "01991fbc1fe35d4ff8b7fec2328024e4",
"content-hash": "41231265ce8bfa416b472fc62aa36de4",
"packages": [
{
"name": "andcarpi/laravel-popper",
@@ -11688,6 +11688,76 @@
}
],
"time": "2024-03-03T12:36:25+00:00"
},
{
"name": "tightenco/duster",
"version": "v3.0.0",
"source": {
"type": "git",
"url": "https://github.com/tighten/duster.git",
"reference": "e7c38d576ec555a2765b4a01fb762f09fe7179bd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tighten/duster/zipball/e7c38d576ec555a2765b4a01fb762f09fe7179bd",
"reference": "e7c38d576ec555a2765b4a01fb762f09fe7179bd",
"shasum": ""
},
"require": {
"php": "^8.2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.54",
"laravel-zero/framework": "^11.0",
"laravel/pint": "^1.15",
"nunomaduro/termwind": "^2.0",
"spatie/invade": "^1.1",
"squizlabs/php_codesniffer": "^3.9",
"tightenco/tlint": "^9.3"
},
"bin": [
"builds/duster"
],
"type": "project",
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Seeders\\": "database/seeders/",
"Database\\Factories\\": "database/factories/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Matt Stauffer",
"email": "matt@tighten.com",
"homepage": "https://tighten.com",
"role": "Developer"
},
{
"name": "Anthony Clark",
"email": "anthony@tighten.com",
"homepage": "https://tighten.com",
"role": "Developer"
}
],
"description": "Automatic configuration for Laravel apps to apply Tighten's standard linting & code standards.",
"homepage": "https://github.com/tighten/duster",
"keywords": [
"Code style",
"duster",
"laravel",
"php",
"tightenco"
],
"support": {
"issues": "https://github.com/tighten/duster/issues",
"source": "https://github.com/tighten/duster"
},
"time": "2024-06-03T18:29:50+00:00"
}
],
"aliases": [],

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
@@ -22,9 +19,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('password_reset_tokens', function (Blueprint $table) {
@@ -18,9 +15,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('password_reset_tokens');

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('failed_jobs', function (Blueprint $table) {
@@ -22,9 +19,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('failed_jobs');

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('personal_access_tokens', function (Blueprint $table) {
@@ -23,9 +20,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('personal_access_tokens');

View File

@@ -6,9 +6,6 @@ use Laravel\Pulse\Support\PulseMigration;
return new class() extends PulseMigration
{
/**
* Run the migrations.
*/
public function up(): void
{
if (! $this->shouldRun()) {
@@ -72,9 +69,6 @@ return new class() extends PulseMigration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('pulse_values');

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('champions', function (Blueprint $table) {
@@ -32,9 +29,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('champions');

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('champion_skins', function (Blueprint $table) {
@@ -39,9 +36,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('champion_skins');

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('skin_chromas', function (Blueprint $table) {
@@ -25,9 +22,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('skin_chromas');

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('champion_skins', function (Blueprint $table) {
@@ -16,9 +13,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('champion_skins', function (Blueprint $table) {

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('champion_skins', function (Blueprint $table) {
@@ -16,9 +13,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('champion_skins', function (Blueprint $table) {

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('champion_skins', function (Blueprint $table) {
@@ -16,9 +13,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('champion_skins', function (Blueprint $table) {

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('skin_chromas', function (Blueprint $table) {
@@ -16,9 +13,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('skin_chromas', function (Blueprint $table) {

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('champion_roles', function (Blueprint $table) {
@@ -22,9 +19,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('champion_roles');

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('champions', function (Blueprint $table) {
@@ -16,9 +13,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('champions', function (Blueprint $table) {

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('champion_skins', function (Blueprint $table) {
@@ -16,9 +13,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('champion_skins', function (Blueprint $table) {

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('skin_chromas', function (Blueprint $table) {
@@ -16,9 +13,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('skin_chromas', function (Blueprint $table) {

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('sessions', function (Blueprint $table) {
@@ -21,9 +18,6 @@ return new class() extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sessions');

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('streamers', function (Blueprint $table) {
@@ -24,9 +21,6 @@ return new class extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('streamers');

View File

@@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('champion_images', function (Blueprint $table) {
@@ -23,9 +20,6 @@ return new class extends Migration
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('champion_images');

View File

@@ -14,7 +14,7 @@
<div class="container flex items-center justify-center flex-grow p-4 mx-auto mt-3">
<div class="items-center justify-center text-center align-middle">
<img class="items-center mx-auto" src="{{asset('img/heimerdinger-emote.webp')}}"
<img class="items-center mx-auto" src="{{ asset('img/heimerdinger-emote.webp') }}"
alt="Heimerdinger Emote">
<p class="text-gray-100">Tired of endless browsing to find that one icon or emote you love?</p>
<p class="text-gray-100">We got you covered! Search through <span
@@ -24,9 +24,9 @@
<p class="mb-6 text-gray-100">Automatically updated and sorted by release date.</p>
<p class="mb-3 text-gray-200">Click on the asset category you'd like to view below to get started!</p>
<div class="flex justify-center space-x-4">
<a href="{{route('assets.icons.index')}}"
<a href="{{ route('assets.icons.index') }}"
class="px-4 py-2 font-bold text-white bg-orange-500 rounded hover:bg-orange-600">Icons</a>
<a href="{{route('assets.emotes.index')}}"
<a href="{{ route('assets.emotes.index') }}"
class="px-4 py-2 font-bold text-white bg-orange-500 rounded hover:bg-orange-600">Emotes</a>
</div>
</div>

View File

@@ -1,7 +1,7 @@
<div class="py-5" itemscope itemtype="https://schema.org/Question">
<details class="group">
<summary class="flex justify-between items-center font-medium cursor-pointer list-none">
<span class="text-orange-400" itemprop="name">{{$question}}</span>
<span class="text-orange-400" itemprop="name">{{ $question }}</span>
<span class="transition text-orange-400 group-open:rotate-180">
<svg fill="none" height="24" shape-rendering="geometricPrecision" stroke="currentColor"
stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" viewBox="0 0 24 24" width="24"><path

View File

@@ -11,12 +11,12 @@
<div class="container mx-auto p-4 flex items-center justify-center mt-3">
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-6">
@foreach($emotes as $key => $emote)
@foreach ($emotes as $key => $emote)
<div
class="champ-card flex flex-col text-gray-700 bg-stone-800/40 shadow-md rounded-2xl bg-clip-border border border-stone-800 hover:border-orange-500/10 hover:shadow-orange-500/10 items-center">
<div
class="mx-4 overflow-hidden h-36 w-36 rounded-2xl bg-clip-border border-2 border-orange-400/40 mt-3">
<img @if($key < 8) loading="eager" @else loading="lazy" @endif
<img @if ($key < 8) loading="eager" @else loading="lazy" @endif
src="//wsrv.nl/?url={{ $emote->image }}&w=200&output=webp&q=50&il&default=ssl:wsrv.nl%2F%3Furl%3Dhttps://i.ibb.co/5s6YyvN/aaaa.png"
class="object-cover w-full h-full"
alt="{{ $emote->title }} Emote"

View File

@@ -4,7 +4,7 @@
<input type="text" name="filter[title]" placeholder="Search by emote name"
value="{{ request('filter.title') }}"
class="border border-transparent focus:border-transparent focus:ring-0 border-stone-700 rounded-l px-4 py-2 bg-stone-800 text-white ring-orange-500 pr-10">
@if(request('filter.title'))
@if (request('filter.title'))
<button type="button" onclick="clearSearchAndSubmit()"
class="absolute inset-y-0 right-0 flex items-center px-3 bg-stone-800 text-white cursor-pointer">
<x-iconsax-lin-clipboard-close class="w-6 text-white"/>

View File

@@ -47,9 +47,9 @@
</div> --}}
<span
class="flex flex-row items-center justify-center mb-2 text-sm text-gray-300 whitespace-pre sm:text-center dark:text-gray-300"> <a
href="{{route('sitemap.index')}}" class="hover:underline">Sitemap</a></span>
href="{{ route('sitemap.index') }}" class="hover:underline">Sitemap</a></span>
<span
class="flex flex-row items-center justify-center text-sm text-gray-400 whitespace-pre sm:text-center dark:text-gray-400">© {{date('Y')}} <a
class="flex flex-row items-center justify-center text-sm text-gray-400 whitespace-pre sm:text-center dark:text-gray-400">© {{ date('Y') }} <a
href="/" class="hover:underline">Heimerdinger.LoL</a> Made with <a
aria-label="Find out more about the creator of Heimerdinger.lol" href="https://rico.sh"><x-iconsax-bul-heart-circle
class="relative self-center inline-block w-5 text-red-400"/></a></span>

View File

@@ -4,7 +4,7 @@
<input type="text" name="filter[title]" placeholder="Search by icon title"
value="{{ request('filter.title') }}"
class="border border-transparent focus:border-transparent focus:ring-0 border-stone-700 rounded-l px-4 py-2 bg-stone-800 text-white ring-orange-500 pr-10">
@if(request('filter.title'))
@if (request('filter.title'))
<button type="button" onclick="clearSearchAndSubmit()"
class="absolute inset-y-0 right-0 flex items-center px-3 bg-stone-800 text-white cursor-pointer">
<x-iconsax-lin-clipboard-close class="w-6 text-white"/>

View File

@@ -5,10 +5,10 @@
SKIN DETAILS</h3>
<h1
class="text-3xl font-bold text-center text-transparent uppercase sm:text-4xl bg-gradient-to-bl from-orange-300 to-orange-500 bg-clip-text">
{{$skin->skin_name}}</h1>
{{ $skin->skin_name }}</h1>
<p class="text-sm font-medium text-center text-orange-400 uppercase transition-all duration-700 hover:underline decoration-1 decoration-transparent hover:decoration-orange-400">
<a
href="/champion/{{$skin->champion->slug}}">
href="/champion/{{ $skin->champion->slug }}">
<span class="flex items-center justify-center">
View
champion
@@ -24,9 +24,9 @@
<div
class="relative border shadow-sm rounded-2xl bg-stone-800/40 border-neutral-300/5 shadow-stone-800/80 lg:col-span-2">
<div class="absolute inset-0 aspect-video glow-shadow rounded-2xl"
style="--splash-color: {{$skin->splash_color}}"></div>
style="--splash-color: {{ $skin->splash_color }}"></div>
<img src="//wsrv.nl/?url={{ $skin->getSkinImageAttribute(true) }}&w=840&output=webp&q=90"
alt="{{$skin->skin_name}} Splash Art"
alt="{{ $skin->skin_name }} Splash Art"
class="z-10 object-cover w-full h-full transition-transform duration-700 transform scale-100 rounded-2xl">
<div class="absolute bottom-0 left-0 p-4">
@@ -39,10 +39,10 @@
<div
class="transition-all duration-700 border shadow-md rounded-2xl border-3 border-white/10 lg:col-start-3"
style="--tw-shadow-color:{{$skin->splash_color}}; --tw-shadow: var(--tw-shadow-colored); background-color: {{$skin->splash_color}};">
style="--tw-shadow-color:{{ $skin->splash_color }}; --tw-shadow: var(--tw-shadow-colored); background-color: {{ $skin->splash_color }};">
<h4 class="text-center text-lg font-semibold text-neutral-100 uppercase mt-3.5 shadow-sm mx-2">
{{$skin->skin_name}} Details</h4>
{{ $skin->skin_name }} Details</h4>
<ul class="mx-5">
<li class="items-center mt-4 text-base font-medium leading-loose text-neutral-100 hyphens-auto"
@@ -57,55 +57,55 @@
</li>
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">Release Date:</span> {{$skin->release_date}}
<span class="font-bold">Release Date:</span> {{ $skin->release_date }}
</li>
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">Rarity:</span> {{$skin->rarity}}
<span class="font-bold">Rarity:</span> {{ $skin->rarity }}
</li>
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">Availability:</span> {{$skin->availability}}
<span class="font-bold">Availability:</span> {{ $skin->availability }}
</li>
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">Chromas:</span> @if ($skin->chromas->count() > 0)
{{$skin->chromas->count()}}
{{ $skin->chromas->count() }}
@else
None
@endif
</li>
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">Lootable:</span> {{$skin->loot_eligible ? 'Yes' : 'No'}}
<span class="font-bold">Lootable:</span> {{ $skin->loot_eligible ? 'Yes' : 'No' }}
</li>
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">New Effects:</span> {{$skin->new_effects ? 'Yes' : 'No'}}
<span class="font-bold">New Effects:</span> {{ $skin->new_effects ? 'Yes' : 'No' }}
</li>
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">New Animations:</span> {{$skin->new_animations ? 'Yes' : 'No'}}
<span class="font-bold">New Animations:</span> {{ $skin->new_animations ? 'Yes' : 'No' }}
</li>
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">New Recall:</span> {{$skin->new_recall ? 'Yes' : 'No'}}
<span class="font-bold">New Recall:</span> {{ $skin->new_recall ? 'Yes' : 'No' }}
</li>
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">New Voice:</span> {{$skin->new_voice ? 'Yes' : 'No'}}
<span class="font-bold">New Voice:</span> {{ $skin->new_voice ? 'Yes' : 'No' }}
</li>
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">New Quotes:</span> {{$skin->new_quotes ? 'Yes' : 'No'}}
<span class="font-bold">New Quotes:</span> {{ $skin->new_quotes ? 'Yes' : 'No' }}
</li>
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">Voice Actor:</span>
@if(count($skin->voice_actor) < 1)
@if (count($skin->voice_actor) < 1)
Unknown
@else
@foreach($skin->voice_actor as $voice_actor)
@foreach ($skin->voice_actor as $voice_actor)
{{ $voice_actor }}
@endforeach
@endif
@@ -113,14 +113,14 @@
<li class="items-center mb-4 text-base font-medium leading-loose text-neutral-100 hyphens-auto"
lang="en">
<span class="font-bold">Splash Artist:</span>
@if(count($skin->splash_artist) < 1)
@if (count($skin->splash_artist) < 1)
Unknown
@else
@foreach($skin->splash_artist as $key => $splash_artist)
@foreach ($skin->splash_artist as $key => $splash_artist)
{{ $splash_artist }}
@if($key < count($skin->splash_artist) - 2)
@if ($key < count($skin->splash_artist) - 2)
,
@elseif($key == count($skin->splash_artist) - 2)
@elseif ($key == count($skin->splash_artist) - 2)
&amp;
@endif
@endforeach
@@ -133,17 +133,17 @@
<div class="transition-all duration-700 border shadow-md rounded-2xl border-3 border-white/10 shadow-stone-800/80 hover:shadow-orange-500/20"
style="--tw-shadow-color:{{$skin->splash_color}}; --tw-shadow: var(--tw-shadow-colored); background-color: {{$skin->splash_color}};">
style="--tw-shadow-color:{{ $skin->splash_color }}; --tw-shadow: var(--tw-shadow-colored); background-color: {{ $skin->splash_color }};">
<div class="p-4">
<h4 class="text-center text-xl font-semibold text-neutral-100 uppercase mt-2.5 shadow-sm">
{{$skin->name}} Lore</h4>
{{ $skin->name }} Lore</h4>
<p class="text-neutral-100 hyphens-auto text-base mt-2.5 leading-loose" lang="en">
@if($skin->lore)
@if ($skin->lore)
{!! $skin->lore !!}
@else
Heimerdinger has looked far and wide but could not find any lore for {{$skin->skin_name}}.
Heimerdinger has looked far and wide but could not find any lore for {{ $skin->skin_name }}.
But we're sure it's a great skin! The things we do know is that it was released on
{{$skin->release_date}} and costs {{$skin->rp_price}} RP.
{{ $skin->release_date }} and costs {{ $skin->rp_price }} RP.
@endif
</p>
</div>
@@ -151,24 +151,24 @@
</div>
<div
class="transition-all duration-700 border shadow-md rounded-2xl border-3 border-white/10 shadow-stone-800/80 lg:col-span-2 hover:shadow-orange-500/20"
style="--tw-shadow-color:{{$skin->splash_color}}; --tw-shadow: var(--tw-shadow-colored); background-color: {{$skin->splash_color}};">
style="--tw-shadow-color:{{ $skin->splash_color }}; --tw-shadow: var(--tw-shadow-colored); background-color: {{ $skin->splash_color }};">
<div class="p-4">
<h4 class="text-center text-xl font-semibold text-neutral-100 uppercase mt-2.5 shadow-sm">
{{$skin->name}} Chromas ({{count($skin->chromas)}}) </h4>
{{ $skin->name }} Chromas ({{ count($skin->chromas) }}) </h4>
<div id="skinsElement" class="overflow-x-scroll mt-2.5">
<div class="grid grid-flow-col grid-rows-2 w-max gap-4 mb-2.5">
@if(count($skin->chromas) < 1)
@if (count($skin->chromas) < 1)
<p class="text-neutral-100 hyphens-auto text-base mt-2.5 leading-loose" lang="en">
Sadly there are no chromas for {{$skin->skin_name}} yet.
Sadly there are no chromas for {{ $skin->skin_name }} yet.
</p>
@endif
@foreach($skin->chromas as $key => $chroma)
@foreach ($skin->chromas as $key => $chroma)
<div class="flex flex-col group">
<a href="/skin/{{$skin->slug}}">
<a href="/skin/{{ $skin->slug }}">
<img
src="//wsrv.nl/?url={{ $chroma->getChromaImageAttribute() }}&w=220&output=webp&q=70&il"
alt="{{$chroma->chroma_name}} {{$chroma->skin_name}} ScreenShot"
@if($key < 6) loading="eager" @else loading="lazy" @endif
alt="{{ $chroma->chroma_name }} {{ $chroma->skin_name }} ScreenShot"
@if ($key < 6) loading="eager" @else loading="lazy" @endif
class="inline-block h-36 object-cover rounded-2xl shadow-md border border-3 border-white/10 hover:shadow-orange-500/20 transition-all duration-700 mr-2.5">
</a>
<div>
@@ -176,7 +176,7 @@
<p class="align-bottom text-center text-neutral-100 text-sm mt-1.5 items-center">
<span
class="hover:text-orange-400 group-hover:text-orange-400">
{{$chroma->chroma_name}}
{{ $chroma->chroma_name }}
</span>
</p>
</div>

View File

@@ -4,7 +4,7 @@
<input type="text" name="filter[name]" placeholder="Search by skin name"
value="{{ request('filter.name') }}"
class="border border-transparent focus:border-transparent focus:ring-0 border-stone-700 rounded-l px-4 py-2 bg-stone-800 text-white ring-orange-500 pr-10">
@if(request('filter.name'))
@if (request('filter.name'))
<button type="button" onclick="clearSearchAndSubmit()"
class="absolute inset-y-0 right-0 flex items-center px-3 bg-stone-800 text-white cursor-pointer">
<x-iconsax-lin-clipboard-close class="w-6 text-white"/>

View File

@@ -2,4 +2,4 @@
use App\Http\Controllers\StreamerController;
Route::get('/streamers', [StreamerController::class, 'all']);
Route::get('streamers', [StreamerController::class, 'all']);

View File

@@ -10,10 +10,13 @@ use App\Http\Controllers\HomeController;
use App\Http\Controllers\HTMLSitemapController;
use App\Http\Controllers\PostsController;
use App\Http\Controllers\SaleController;
use App\Http\Controllers\StreamerPanelController;
use App\Http\Controllers\SummonerEmoteController;
use App\Http\Controllers\SummonerIconController;
use App\Http\Requests\ContactSubmissionRequest;
use App\Models\Champion;
use App\Models\ChampionSkin;
use App\Models\Streamer;
use App\Models\SummonerIcon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
@@ -33,62 +36,59 @@ use Spatie\Sheets\Sheet;
Route::get('/', static fn () => (new HomeController())->index())->name('home');
Route::get('/donate', static fn () => (new HomeController())->donate())->name('donate');
Route::get('donate', static fn () => (new HomeController())->donate())->name('donate');
Route::get('/roadmap', static fn () => (new HomeController())->roadmap())->name('roadmap');
Route::get('roadmap', static fn () => (new HomeController())->roadmap())->name('roadmap');
// Champions
Route::get('/champions', static fn () => (new ChampionController())->index())->name('champions.index');
Route::get('/champion/{champion}', static fn (Champion $champion) => (new ChampionController())->show($champion))->name('champions.show');
Route::get('champions', static fn () => (new ChampionController())->index())->name('champions.index');
Route::get('champion/{champion}', static fn (Champion $champion) => (new ChampionController())->show($champion))->name('champions.show');
// Skins
Route::get('/skins', static fn () => (new ChampionSkinController())->index())->name('skins.index');
Route::get(
'/skin/{championSkin}',
static fn (\App\Models\ChampionSkin $championSkin) => (new ChampionSkinController())->show($championSkin)
)->name('skins.show');
Route::get('skins', static fn () => (new ChampionSkinController())->index())->name('skins.index');
Route::get('skin/{championSkin}', static fn (ChampionSkin $championSkin) => (new ChampionSkinController())->show($championSkin))->name('skins.show');
// Icons
Route::get('/icons', static fn () => (new SummonerIconController())->index())->name('assets.icons.index');
Route::get('/icon/{summonerIcon}', static fn (SummonerIcon $summonerIcon) => (new SummonerIconController())->show($summonerIcon))->name('assets.icons.show');
Route::get('icons', static fn () => (new SummonerIconController())->index())->name('assets.icons.index');
Route::get('icon/{summonerIcon}', static fn (SummonerIcon $summonerIcon) => (new SummonerIconController())->show($summonerIcon))->name('assets.icons.show');
// Emotes
Route::get('/emotes', static fn () => (new SummonerEmoteController())->index())->name('assets.emotes.index');
Route::get('emotes', static fn () => (new SummonerEmoteController())->index())->name('assets.emotes.index');
// Assets
Route::get('/assets', static fn () => (new AssetsController())->index())->name('assets.index');
Route::get('assets', static fn () => (new AssetsController())->index())->name('assets.index');
// Sales
Route::get('/sale-rotation', static fn () => (new SaleController())->index())->name('sales.index');
Route::get('sale-rotation', static fn () => (new SaleController())->index())->name('sales.index');
// About
Route::get('/about', static fn () => (new AboutController())->index())->name('about.index');
Route::get('about', static fn () => (new AboutController())->index())->name('about.index');
// About.FAQController
Route::get('/about/faq/league-of-legends', static fn () => (new FAQController())->leagueoflegends())->name('about.faq.leagueoflegends');
Route::get('about/faq/league-of-legends', static fn () => (new FAQController())->leagueoflegends())->name('about.faq.leagueoflegends');
Route::get('/about/faq/heimerdinger', static fn () => (new FAQController())->heimerdinger())->name('about.faq.heimerdinger');
Route::get('about/faq/heimerdinger', static fn () => (new FAQController())->heimerdinger())->name('about.faq.heimerdinger');
// Posts
Route::get('/posts', static fn () => (new PostsController())->index())->name('posts.index');
Route::get('posts', static fn () => (new PostsController())->index())->name('posts.index');
Route::get('/post/{post}', static fn (Sheet $post) => (new PostsController())->show($post))->name('posts.show');
Route::get('post/{post}', static fn (Sheet $post) => (new PostsController())->show($post))->name('posts.show');
// Contact
Route::get('/contact', static fn () => (new ContactSubmissionController())->index())->name('contact.index');
Route::post('/contact', function (ContactSubmissionRequest $request) {
Route::get('contact', static fn () => (new ContactSubmissionController())->index())->name('contact.index');
Route::post('contact', function (ContactSubmissionRequest $request) {
return (new ContactSubmissionController())->store($request);
})->name('contact.store')->middleware(ProtectAgainstSpam::class);
// Site Map
Route::get('/resource/sitemap', static fn () => (new HTMLSitemapController())->index())->name('sitemap.index');
Route::get('resource/sitemap', static fn () => (new HTMLSitemapController())->index())->name('sitemap.index');
// Pulse
Route::get(config('app.login_route'), static fn () => redirect('/pulse'))->name('login')->middleware('auth.basic');
// Streamer Panel
Route::get('/streamerpanel', static fn () => (new \App\Http\Controllers\StreamerPanelController())->index())->name('streamerpanel.index')->middleware('auth.basic');
Route::get('/streamerpanel/add', static fn () => (new \App\Http\Controllers\StreamerPanelController())->create())->name('streamerpanel.streamers.create')->middleware('auth.basic');
Route::post('/streamerpanel/add', static fn (Request $request) => (new \App\Http\Controllers\StreamerPanelController())->store($request))->name('streamerpanel.store')->middleware('auth.basic');
Route::get('/streamerpanel/edit/{streamer}', static fn (\App\Models\Streamer $streamer) => (new \App\Http\Controllers\StreamerPanelController())->edit($streamer))->name('streamerpanel.edit')->middleware('auth.basic');
Route::post('/streamerpanel/edit/{streamer}', static fn (Request $request, \App\Models\Streamer $streamer) => (new \App\Http\Controllers\StreamerPanelController())->update($request, $streamer))->name('streamerpanel.update')->middleware('auth.basic');
Route::delete('/streamerpanel/delete/{streamer}', static fn (\App\Models\Streamer $streamer) => (new \App\Http\Controllers\StreamerPanelController())->destroy($streamer))->name('streamerpanel.destroy')->middleware('auth.basic');
Route::get('streamerpanel', static fn () => (new StreamerPanelController())->index())->name('streamerpanel.index')->middleware('auth.basic');
Route::get('streamerpanel/add', static fn () => (new StreamerPanelController())->create())->name('streamerpanel.streamers.create')->middleware('auth.basic');
Route::post('streamerpanel/add', static fn (Request $request) => (new StreamerPanelController())->store($request))->name('streamerpanel.store')->middleware('auth.basic');
Route::get('streamerpanel/edit/{streamer}', static fn (Streamer $streamer) => (new StreamerPanelController())->edit($streamer))->name('streamerpanel.edit')->middleware('auth.basic');
Route::post('streamerpanel/edit/{streamer}', static fn (Request $request, Streamer $streamer) => (new StreamerPanelController())->update($request, $streamer))->name('streamerpanel.update')->middleware('auth.basic');
Route::delete('streamerpanel/delete/{streamer}', static fn (Streamer $streamer) => (new StreamerPanelController())->destroy($streamer))->name('streamerpanel.destroy')->middleware('auth.basic');