feat: skin list

This commit is contained in:
Rico van Zelst
2023-11-09 12:20:46 +01:00
parent 70306245e6
commit 2b8e6d9327
17 changed files with 582 additions and 4 deletions

View File

@@ -21,7 +21,7 @@
style="--splash-color: {{$champion->splash_color}}"></div>
<div class="aspect-w-16 aspect-h-9 overflow-hidden rounded-2xl relative">
<img
src="//wsrv.nl/?url={{ $champion->getChampionImageAttribute(false) }}&w=880&output=webp&q=85"
src="//wsrv.nl/?url={{ $champion->getChampionImageAttribute(false) }}&w=880&output=webp&q=85&il"
alt="{{$champion->name}} Splash Art"
class="w-full h-full object-cover transform scale-100 transition-transform duration-700 hover:scale-105 z-10"
>
@@ -118,7 +118,7 @@
<div class="group flex flex-col ">
<a href="/skin/{{$skin->slug}}">
<img
src="//wsrv.nl/?url={{ $skin->getSkinImageAttribute() }}&w=450&output=webp&q=70"
src="//wsrv.nl/?url={{ $skin->getSkinImageAttribute() }}&w=450&output=webp&q=70&il"
alt="{{$champion->name}} {{$skin->name}} Splash Art"
@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

View File

@@ -22,7 +22,7 @@
<div
class="mx-4 mt-4 overflow-hidden h-52 rounded-2xl bg-clip-border border-2 border-orange-400/40">
<img @if($key < 8) loading="eager" @else loading="lazy" @endif
src="//wsrv.nl/?url={{ $champion->getChampionImageAttribute() }}&w=380&output=webp&q=65"
src="//wsrv.nl/?url={{ $champion->getChampionImageAttribute() }}&w=380&output=webp&q=65&il"
class="object-cover w-full h-full"
alt="{{ $champion->name }} Splash Art"
/>

View File

@@ -0,0 +1,43 @@
<?php
/** @var App\Models\ChampionSkin $skin */
?>
<section class="max-w-screen-xl mx-auto mt-12">
<h2
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">
Skins</h2>
<div class="flex justify-center items-center mx-auto max-w-screen-xl mt-2.5">
</div>
<div class="container mx-auto p-4 flex items-center justify-center mt-3">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 ">
@foreach($skins as $key => $skin)
<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">
<div
class="mx-4 mt-4 overflow-hidden h-52 rounded-2xl bg-clip-border border-2 border-orange-400/40">
<img @if($key < 8) loading="eager" @else loading="lazy" @endif
src="//wsrv.nl/?url={{ $skin->getSkinImageAttribute() }}&w=540&output=webp&q=70&il"
class="object-cover w-full h-full"
alt="{{ $skin->skin_name }} Splash Art"
/>
</div>
<div class="px-4 py-2">
<div class="flex items-center justify-between">
<p class="block text-base antialiased font-medium text-gray-100">
{{ $skin->skin_name }}
</p>
<span class="text-xs text-stone-300">{{$skin->rarity}}</span>
</div>
</div>
</div>
@endforeach
</div>
</div>
{{ $skins->links() }}
</section>