-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28db99c
commit 46f1d66
Showing
2 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
resources/views/vendor/pagination/simple-tailwind.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
@if ($paginator->hasPages()) | ||
<nav role="navigation" aria-label="Pagination Navigation" class="flex items-center justify-between space-x-2"> | ||
{{-- Previous Page Link --}} | ||
@if ($paginator->onFirstPage()) | ||
<span class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-gray-200 border border-gray-300 cursor-default rounded-md dark:text-gray-400 dark:bg-gray-700 dark:border-gray-600"> | ||
« {!! __('pagination.previous') !!} | ||
</span> | ||
@else | ||
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 border border-gray-300 rounded-md hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:border-blue-300 transition ease-in-out duration-150 dark:text-gray-300 dark:bg-gray-800 dark:border-gray-600 dark:hover:bg-gray-700 dark:focus:ring-blue-700 dark:focus:border-blue-700"> | ||
« {!! __('pagination.previous') !!} | ||
</a> | ||
@endif | ||
|
||
<div class="flex space-x-1"> | ||
{{-- Pagination Elements --}} | ||
@foreach ($elements as $element) | ||
{{-- "Three Dots" Separator --}} | ||
@if (is_string($element)) | ||
<span class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 border border-gray-300 rounded-md cursor-default dark:text-gray-300 dark:bg-gray-800 dark:border-gray-600"> | ||
{{ $element }} | ||
</span> | ||
@endif | ||
|
||
{{-- Array Of Links --}} | ||
@if (is_array($element)) | ||
@foreach ($element as $page => $url) | ||
@if ($page == $paginator->currentPage()) | ||
<span class="inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-gray-700 border border-gray-300 cursor-default rounded-md dark:bg-gray-500 dark:border-gray-600"> | ||
{{ $page }} | ||
</span> | ||
@else | ||
<a href="{{ $url }}" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 border border-gray-300 rounded-md hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:border-blue-300 transition ease-in-out duration-150 dark:text-gray-300 dark:bg-gray-800 dark:border-gray-600 dark:hover:bg-gray-700 dark:focus:ring-blue-700 dark:focus:border-blue-700"> | ||
{{ $page }} | ||
</a> | ||
@endif | ||
@endforeach | ||
@endif | ||
@endforeach | ||
</div> | ||
|
||
{{-- Next Page Link --}} | ||
@if ($paginator->hasMorePages()) | ||
<a href="{{ $paginator->nextPageUrl() }}" rel="next" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 border border-gray-300 rounded-md hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:border-blue-300 transition ease-in-out duration-150 dark:text-gray-300 dark:bg-gray-800 dark:border-gray-600 dark:hover:bg-gray-700 dark:focus:ring-blue-700 dark:focus:border-blue-700"> | ||
{!! __('pagination.next') !!} » | ||
</a> | ||
@else | ||
<span class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-gray-200 border border-gray-300 cursor-default rounded-md dark:text-gray-400 dark:bg-gray-700 dark:border-gray-600"> | ||
{!! __('pagination.next') !!} » | ||
</span> | ||
@endif | ||
</nav> | ||
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
@if ($paginator->hasPages()) | ||
<nav role="navigation" aria-label="{{ __('Pagination Navigation') }}" class="flex items-center justify-between"> | ||
<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-500 bg-gray-200 border border-gray-300 cursor-default leading-5 rounded-md dark:text-gray-600 dark:bg-gray-800 dark:border-gray-600"> | ||
{!! __('pagination.previous') !!} | ||
</span> | ||
@else | ||
<a href="{{ $paginator->previousPageUrl() }}" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 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 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300"> | ||
{!! __('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-gray-700 bg-gray-100 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 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300"> | ||
{!! __('pagination.next') !!} | ||
</a> | ||
@else | ||
<span class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-500 bg-gray-200 border border-gray-300 cursor-default leading-5 rounded-md dark:text-gray-600 dark:bg-gray-800 dark:border-gray-600"> | ||
{!! __('pagination.next') !!} | ||
</span> | ||
@endif | ||
</div> | ||
|
||
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"> | ||
<div> | ||
<p class="text-sm text-gray-700 leading-5 dark:text-gray-400"> | ||
{!! __('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 rtl:flex-row-reverse 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-500 bg-gray-200 border border-gray-300 cursor-default rounded-l-md leading-5 dark:bg-gray-800 dark:border-gray-600" 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-700 bg-gray-100 border border-gray-300 rounded-l-md leading-5 hover:text-gray-500 focus:z-10 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 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300" 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-gray-700 bg-gray-100 border border-gray-300 cursor-default leading-5 dark:bg-gray-800 dark:border-gray-600">{{ $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-white bg-gray-700 border border-gray-300 cursor-default leading-5 dark:bg-gray-500 dark:border-gray-600">{{ $page }}</span> | ||
</span> | ||
@else | ||
<a href="{{ $url }}" class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-gray-100 border border-gray-300 leading-5 hover:text-gray-500 focus:z-10 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 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300" 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-700 bg-gray-100 border border-gray-300 rounded-r-md leading-5 hover:text-gray-500 focus:z-10 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 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300" 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-500 bg-gray-200 border border-gray-300 cursor-default rounded-r-md leading-5 dark:bg-gray-800 dark:border-gray-600" 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 |