mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
feat: skin list
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
|||||||
use App\Http\Requests\StoreChampionSkinRequest;
|
use App\Http\Requests\StoreChampionSkinRequest;
|
||||||
use App\Http\Requests\UpdateChampionSkinRequest;
|
use App\Http\Requests\UpdateChampionSkinRequest;
|
||||||
use App\Models\ChampionSkin;
|
use App\Models\ChampionSkin;
|
||||||
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
|
||||||
class ChampionSkinController extends Controller
|
class ChampionSkinController extends Controller
|
||||||
{
|
{
|
||||||
@@ -13,7 +14,11 @@ class ChampionSkinController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
//
|
$skins = Cache::remember('championSkinsListAllCache' . request('page', 1), 60 * 60 * 8, function () {
|
||||||
|
return ChampionSkin::orderBy('id')->paginate(16);
|
||||||
|
});
|
||||||
|
|
||||||
|
return view('skins.index', compact('skins'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -49,6 +49,11 @@ class ChampionSkin extends Model
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRarityAttribute($value)
|
||||||
|
{
|
||||||
|
return $value === null || $value === 'NoRarity' ? 'Common' : $value;
|
||||||
|
}
|
||||||
|
|
||||||
public function champion(): BelongsTo
|
public function champion(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Champion::class, 'champion_id', 'champion_id');
|
return $this->belongsTo(Champion::class, 'champion_id', 'champion_id');
|
||||||
|
|||||||
20
app/View/Components/Skins/Paginatedlist.php
Normal file
20
app/View/Components/Skins/Paginatedlist.php
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\View\Components\Skins;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\View\View;
|
||||||
|
use Illuminate\View\Component;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
|
||||||
|
|
||||||
|
class Paginatedlist extends Component
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct(public Paginator $skins)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render(): View
|
||||||
|
{
|
||||||
|
return view('components.skins.paginatedlist');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
style="--splash-color: {{$champion->splash_color}}"></div>
|
style="--splash-color: {{$champion->splash_color}}"></div>
|
||||||
<div class="aspect-w-16 aspect-h-9 overflow-hidden rounded-2xl relative">
|
<div class="aspect-w-16 aspect-h-9 overflow-hidden rounded-2xl relative">
|
||||||
<img
|
<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"
|
alt="{{$champion->name}} Splash Art"
|
||||||
class="w-full h-full object-cover transform scale-100 transition-transform duration-700 hover:scale-105 z-10"
|
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 ">
|
<div class="group flex flex-col ">
|
||||||
<a href="/skin/{{$skin->slug}}">
|
<a href="/skin/{{$skin->slug}}">
|
||||||
<img
|
<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"
|
alt="{{$champion->name}} {{$skin->name}} Splash Art"
|
||||||
@if($key < 6) loading="eager" @else loading="lazy" @endif
|
@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
|
class=" inline-block h-36 object-cover rounded-2xl shadow-md border border-3 border-white/10
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div
|
<div
|
||||||
class="mx-4 mt-4 overflow-hidden h-52 rounded-2xl bg-clip-border border-2 border-orange-400/40">
|
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
|
<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"
|
class="object-cover w-full h-full"
|
||||||
alt="{{ $champion->name }} Splash Art"
|
alt="{{ $champion->name }} Splash Art"
|
||||||
/>
|
/>
|
||||||
|
|||||||
43
resources/views/components/skins/paginatedlist.blade.php
Normal file
43
resources/views/components/skins/paginatedlist.blade.php
Normal 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>
|
||||||
54
resources/views/skins/index.blade.php
Normal file
54
resources/views/skins/index.blade.php
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<!-- Favicon -->
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||||
|
<link rel="manifest" href="/icons/site.webmanifest">
|
||||||
|
<link rel="mask-icon" href="/icons/safari-pinned-tab.svg" color="#e6855e">
|
||||||
|
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||||
|
<meta name="msapplication-TileColor" content="#ff7c47">
|
||||||
|
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||||
|
<meta name="theme-color" content="#ff7c47">
|
||||||
|
|
||||||
|
<title>Heimerdinger.LoL • Skins</title>
|
||||||
|
<meta name="description"
|
||||||
|
content="Explore all champion skins on Heimerdinger.LoL. Find detailed information on popular skins such as Dark Cosmic Jhin, HEARTSTEEL Ezreal, PROJECT: Vayne and more!">
|
||||||
|
|
||||||
|
<!-- OpenGraph -->
|
||||||
|
<meta property="og:site_name" content="Heimerdinger.LoL">
|
||||||
|
<meta property="og:title" content="Heimerdinger.LoL • Skins">
|
||||||
|
<meta property="og:description"
|
||||||
|
content="Explore all champion skins on Heimerdinger.LoL. Find detailed information on popular skins such as Dark Cosmic Jhin, HEARTSTEEL Ezreal, PROJECT: Vayne and more!">
|
||||||
|
<meta property="og:locale" content="en">
|
||||||
|
<meta property="og:type" content="website">
|
||||||
|
<meta property="og:image" content="{{asset('img/og_image.png')}}">
|
||||||
|
|
||||||
|
<!-- Twitter -->
|
||||||
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
|
<meta property="twitter:domain" content="heimerdinger.lol">
|
||||||
|
<meta property="twitter:title" content="Heimerdinger.LoL • Skins">
|
||||||
|
<meta property="twitter:description"
|
||||||
|
content="Explore all champion skins on Heimerdinger.LoL. Find detailed information on popular skins such as Dark Cosmic Jhin, HEARTSTEEL Ezreal, PROJECT: Vayne and more!">
|
||||||
|
<meta property="twitter:image" content="{{asset('img/og_image.png')}}">
|
||||||
|
|
||||||
|
<link rel="preconnect" href="https://rsms.me/">
|
||||||
|
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
||||||
|
|
||||||
|
@vite('resources/css/app.css')
|
||||||
|
@vite('resources/js/app.js')
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="antialiased bg-stone-900 dark scroll-smooth">
|
||||||
|
<x-navbar/>
|
||||||
|
<x-skins.paginatedlist :skins="$skins"/>
|
||||||
|
<x-footer/>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
46
resources/views/vendor/pagination/bootstrap-4.blade.php
vendored
Normal file
46
resources/views/vendor/pagination/bootstrap-4.blade.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<nav>
|
||||||
|
<ul class="pagination">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||||
|
<span class="page-link" aria-hidden="true">‹</span>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">‹</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Pagination Elements --}}
|
||||||
|
@foreach ($elements as $element)
|
||||||
|
{{-- "Three Dots" Separator --}}
|
||||||
|
@if (is_string($element))
|
||||||
|
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Array Of Links --}}
|
||||||
|
@if (is_array($element))
|
||||||
|
@foreach ($element as $page => $url)
|
||||||
|
@if ($page == $paginator->currentPage())
|
||||||
|
<li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||||
|
@else
|
||||||
|
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">›</a>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||||
|
<span class="page-link" aria-hidden="true">›</span>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
@endif
|
||||||
88
resources/views/vendor/pagination/bootstrap-5.blade.php
vendored
Normal file
88
resources/views/vendor/pagination/bootstrap-5.blade.php
vendored
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<nav class="d-flex justify-items-center justify-content-between">
|
||||||
|
<div class="d-flex justify-content-between flex-fill d-sm-none">
|
||||||
|
<ul class="pagination">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="page-item disabled" aria-disabled="true">
|
||||||
|
<span class="page-link">@lang('pagination.previous')</span>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li class="page-item disabled" aria-disabled="true">
|
||||||
|
<span class="page-link">@lang('pagination.next')</span>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-none flex-sm-fill d-sm-flex align-items-sm-center justify-content-sm-between">
|
||||||
|
<div>
|
||||||
|
<p class="small text-muted">
|
||||||
|
{!! __('Showing') !!}
|
||||||
|
<span class="fw-semibold">{{ $paginator->firstItem() }}</span>
|
||||||
|
{!! __('to') !!}
|
||||||
|
<span class="fw-semibold">{{ $paginator->lastItem() }}</span>
|
||||||
|
{!! __('of') !!}
|
||||||
|
<span class="fw-semibold">{{ $paginator->total() }}</span>
|
||||||
|
{!! __('results') !!}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<ul class="pagination">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||||
|
<span class="page-link" aria-hidden="true">‹</span>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">‹</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Pagination Elements --}}
|
||||||
|
@foreach ($elements as $element)
|
||||||
|
{{-- "Three Dots" Separator --}}
|
||||||
|
@if (is_string($element))
|
||||||
|
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Array Of Links --}}
|
||||||
|
@if (is_array($element))
|
||||||
|
@foreach ($element as $page => $url)
|
||||||
|
@if ($page == $paginator->currentPage())
|
||||||
|
<li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||||
|
@else
|
||||||
|
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">›</a>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||||
|
<span class="page-link" aria-hidden="true">›</span>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
@endif
|
||||||
46
resources/views/vendor/pagination/default.blade.php
vendored
Normal file
46
resources/views/vendor/pagination/default.blade.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<nav>
|
||||||
|
<ul class="pagination">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||||
|
<span aria-hidden="true">‹</span>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li>
|
||||||
|
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">‹</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Pagination Elements --}}
|
||||||
|
@foreach ($elements as $element)
|
||||||
|
{{-- "Three Dots" Separator --}}
|
||||||
|
@if (is_string($element))
|
||||||
|
<li class="disabled" aria-disabled="true"><span>{{ $element }}</span></li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Array Of Links --}}
|
||||||
|
@if (is_array($element))
|
||||||
|
@foreach ($element as $page => $url)
|
||||||
|
@if ($page == $paginator->currentPage())
|
||||||
|
<li class="active" aria-current="page"><span>{{ $page }}</span></li>
|
||||||
|
@else
|
||||||
|
<li><a href="{{ $url }}">{{ $page }}</a></li>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li>
|
||||||
|
<a href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">›</a>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li class="disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||||
|
<span aria-hidden="true">›</span>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
@endif
|
||||||
36
resources/views/vendor/pagination/semantic-ui.blade.php
vendored
Normal file
36
resources/views/vendor/pagination/semantic-ui.blade.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<div class="ui pagination menu" role="navigation">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<a class="icon item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')"> <i class="left chevron icon"></i> </a>
|
||||||
|
@else
|
||||||
|
<a class="icon item" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')"> <i class="left chevron icon"></i> </a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Pagination Elements --}}
|
||||||
|
@foreach ($elements as $element)
|
||||||
|
{{-- "Three Dots" Separator --}}
|
||||||
|
@if (is_string($element))
|
||||||
|
<a class="icon item disabled" aria-disabled="true">{{ $element }}</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Array Of Links --}}
|
||||||
|
@if (is_array($element))
|
||||||
|
@foreach ($element as $page => $url)
|
||||||
|
@if ($page == $paginator->currentPage())
|
||||||
|
<a class="item active" href="{{ $url }}" aria-current="page">{{ $page }}</a>
|
||||||
|
@else
|
||||||
|
<a class="item" href="{{ $url }}">{{ $page }}</a>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<a class="icon item" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')"> <i class="right chevron icon"></i> </a>
|
||||||
|
@else
|
||||||
|
<a class="icon item disabled" aria-disabled="true" aria-label="@lang('pagination.next')"> <i class="right chevron icon"></i> </a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
27
resources/views/vendor/pagination/simple-bootstrap-4.blade.php
vendored
Normal file
27
resources/views/vendor/pagination/simple-bootstrap-4.blade.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<nav>
|
||||||
|
<ul class="pagination">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="page-item disabled" aria-disabled="true">
|
||||||
|
<span class="page-link">@lang('pagination.previous')</span>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li class="page-item disabled" aria-disabled="true">
|
||||||
|
<span class="page-link">@lang('pagination.next')</span>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
@endif
|
||||||
29
resources/views/vendor/pagination/simple-bootstrap-5.blade.php
vendored
Normal file
29
resources/views/vendor/pagination/simple-bootstrap-5.blade.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<nav role="navigation" aria-label="Pagination Navigation">
|
||||||
|
<ul class="pagination">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="page-item disabled" aria-disabled="true">
|
||||||
|
<span class="page-link">{!! __('pagination.previous') !!}</span>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">
|
||||||
|
{!! __('pagination.previous') !!}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li class="page-item">
|
||||||
|
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">{!! __('pagination.next') !!}</a>
|
||||||
|
</li>
|
||||||
|
@else
|
||||||
|
<li class="page-item disabled" aria-disabled="true">
|
||||||
|
<span class="page-link">{!! __('pagination.next') !!}</span>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
@endif
|
||||||
19
resources/views/vendor/pagination/simple-default.blade.php
vendored
Normal file
19
resources/views/vendor/pagination/simple-default.blade.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<nav>
|
||||||
|
<ul class="pagination">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<li class="disabled" aria-disabled="true"><span>@lang('pagination.previous')</span></li>
|
||||||
|
@else
|
||||||
|
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a></li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<li><a href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a></li>
|
||||||
|
@else
|
||||||
|
<li class="disabled" aria-disabled="true"><span>@lang('pagination.next')</span></li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
@endif
|
||||||
25
resources/views/vendor/pagination/simple-tailwind.blade.php
vendored
Normal file
25
resources/views/vendor/pagination/simple-tailwind.blade.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<nav role="navigation" aria-label="Pagination Navigation" class="flex justify-between">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md">
|
||||||
|
{!! __('pagination.previous') !!}
|
||||||
|
</span>
|
||||||
|
@else
|
||||||
|
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
|
||||||
|
{!! __('pagination.previous') !!}
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
|
||||||
|
{!! __('pagination.next') !!}
|
||||||
|
</a>
|
||||||
|
@else
|
||||||
|
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md">
|
||||||
|
{!! __('pagination.next') !!}
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</nav>
|
||||||
|
@endif
|
||||||
131
resources/views/vendor/pagination/tailwind.blade.php
vendored
Normal file
131
resources/views/vendor/pagination/tailwind.blade.php
vendored
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
@if ($paginator->hasPages())
|
||||||
|
<nav role="navigation" aria-label="{{ __('Pagination Navigation') }}"
|
||||||
|
class="flex items-center justify-between my-4 mx-5">
|
||||||
|
<div class="flex justify-between flex-1 sm:hidden">
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<span
|
||||||
|
class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-100 bg-stone-900 border border-stone-700 shadow-sm shadow-orange-600/20 cursor-default leading-5 rounded-md">
|
||||||
|
{!! __('pagination.previous') !!}
|
||||||
|
</span>
|
||||||
|
@else
|
||||||
|
<a href="{{ $paginator->previousPageUrl() }}"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-neutral-400 bg-stone-900 border border-stone-700 shadow-sm shadow-orange-600/20 leading-5 rounded-md hover:text-gray-100 focus:outline-none focus:ring ring-orange-400/60 focus:border-orange-400 active:bg-stone-800 active:text-neutral-400 transition ease-in-out duration-150">
|
||||||
|
{!! __('pagination.previous') !!}
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<a href="{{ $paginator->nextPageUrl() }}"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-neutral-400 bg-stone-900 border border-stone-700 shadow-sm shadow-orange-600/20 leading-5 rounded-md hover:text-gray-100 focus:outline-none focus:ring ring-orange-400/60 focus:border-orange-400 active:bg-stone-800 active:text-neutral-400 transition ease-in-out duration-150">
|
||||||
|
{!! __('pagination.next') !!}
|
||||||
|
</a>
|
||||||
|
@else
|
||||||
|
<span
|
||||||
|
class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-100 bg-stone-900 border border-stone-700 shadow-sm shadow-orange-600/20 cursor-default leading-5 rounded-md">
|
||||||
|
{!! __('pagination.next') !!}
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between flex-col py-2">
|
||||||
|
<div class="mb-2">
|
||||||
|
<p class="text-sm text-gray-100 leading-5">
|
||||||
|
{!! __('Showing') !!}
|
||||||
|
@if ($paginator->firstItem())
|
||||||
|
<span class="font-medium">{{ $paginator->firstItem() }}</span>
|
||||||
|
{!! __('to') !!}
|
||||||
|
<span class="font-medium">{{ $paginator->lastItem() }}</span>
|
||||||
|
@else
|
||||||
|
{{ $paginator->count() }}
|
||||||
|
@endif
|
||||||
|
{!! __('of') !!}
|
||||||
|
<span class="font-medium">{{ $paginator->total() }}</span>
|
||||||
|
{!! __('results') !!}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span class="relative z-0 inline-flex shadow-sm rounded-md">
|
||||||
|
{{-- Previous Page Link --}}
|
||||||
|
@if ($paginator->onFirstPage())
|
||||||
|
<span aria-disabled="true" aria-label="{{ __('pagination.previous') }}">
|
||||||
|
<span
|
||||||
|
class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-100 bg-stone-900 border border-stone-700 shadow-sm shadow-orange-600/20 cursor-default rounded-l-md leading-5"
|
||||||
|
aria-hidden="true">
|
||||||
|
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||||
|
<path fill-rule="evenodd"
|
||||||
|
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
|
||||||
|
clip-rule="evenodd"/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
@else
|
||||||
|
<a href="{{ $paginator->previousPageUrl() }}" rel="prev"
|
||||||
|
class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-100 bg-stone-900 border border-stone-700 shadow-sm shadow-orange-600/20 rounded-l-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:ring ring-orange-400/60 focus:border-orange-400 active:bg-stone-800 active:text-gray-100 transition ease-in-out duration-150"
|
||||||
|
aria-label="{{ __('pagination.previous') }}">
|
||||||
|
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||||
|
<path fill-rule="evenodd"
|
||||||
|
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
|
||||||
|
clip-rule="evenodd"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Pagination Elements --}}
|
||||||
|
@foreach ($elements as $element)
|
||||||
|
{{-- "Three Dots" Separator --}}
|
||||||
|
@if (is_string($element))
|
||||||
|
<span aria-disabled="true">
|
||||||
|
<span
|
||||||
|
class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-neutral-400 bg-stone-900 border border-stone-700 shadow-sm shadow-orange-600/20 cursor-default leading-5">{{ $element }}</span>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Array Of Links --}}
|
||||||
|
@if (is_array($element))
|
||||||
|
@foreach ($element as $page => $url)
|
||||||
|
@if ($page == $paginator->currentPage())
|
||||||
|
<span aria-current="page">
|
||||||
|
<span
|
||||||
|
class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-100 bg-stone-900 border border-stone-700 shadow-sm shadow-orange-600/20 cursor-default leading-5">{{ $page }}</span>
|
||||||
|
</span>
|
||||||
|
@else
|
||||||
|
<a href="{{ $url }}"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-neutral-400 bg-stone-900 border border-stone-700 shadow-sm shadow-orange-600/20 leading-5 hover:text-gray-100 focus:z-10 focus:outline-none focus:ring ring-orange-400/60 focus:border-orange-400 active:bg-stone-800 active:text-neutral-400 transition ease-in-out duration-150"
|
||||||
|
aria-label="{{ __('Go to page :page', ['page' => $page]) }}">
|
||||||
|
{{ $page }}
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Next Page Link --}}
|
||||||
|
@if ($paginator->hasMorePages())
|
||||||
|
<a href="{{ $paginator->nextPageUrl() }}" rel="next"
|
||||||
|
class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-100 bg-stone-900 border border-stone-700 shadow-sm shadow-orange-600/20 rounded-r-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:ring ring-orange-400/60 focus:border-orange-400 active:bg-stone-800 active:text-gray-100 transition ease-in-out duration-150"
|
||||||
|
aria-label="{{ __('pagination.next') }}">
|
||||||
|
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||||
|
<path fill-rule="evenodd"
|
||||||
|
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
||||||
|
clip-rule="evenodd"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
@else
|
||||||
|
<span aria-disabled="true" aria-label="{{ __('pagination.next') }}">
|
||||||
|
<span
|
||||||
|
class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-100 bg-stone-900 border border-stone-700 shadow-sm shadow-orange-600/20 cursor-default rounded-r-md leading-5"
|
||||||
|
aria-hidden="true">
|
||||||
|
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||||
|
<path fill-rule="evenodd"
|
||||||
|
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
||||||
|
clip-rule="evenodd"/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
@endif
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
use App\Http\Controllers\ChampionController;
|
use App\Http\Controllers\ChampionController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use App\Http\Controllers\HomeController;
|
use App\Http\Controllers\HomeController;
|
||||||
|
use App\Http\Controllers\ChampionSkinController;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -17,5 +18,8 @@ use App\Http\Controllers\HomeController;
|
|||||||
|
|
||||||
Route::get('/', [HomeController::class, 'index']);
|
Route::get('/', [HomeController::class, 'index']);
|
||||||
|
|
||||||
|
// Champions
|
||||||
Route::get('/champions', [ChampionController::class, 'index']);
|
Route::get('/champions', [ChampionController::class, 'index']);
|
||||||
Route::get('/champion/{champion}', [ChampionController::class, 'show']);
|
Route::get('/champion/{champion}', [ChampionController::class, 'show']);
|
||||||
|
// Skins
|
||||||
|
Route::get('/skins', [ChampionSkinController::class, 'index']);
|
||||||
|
|||||||
Reference in New Issue
Block a user