Files
HeimerdingerLoL/resources/views/vendor/pagination/tailwind.blade.php
2023-11-09 13:41:13 +01:00

132 lines
9.0 KiB
PHP

@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') }}" role="button">
<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" role="button">
<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') }}" role="button">
<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