tailwind.blade.php 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. @if ($paginator->hasPages())
  2. <nav role="navigation" aria-label="{{ __('Pagination Navigation') }}" class="flex items-center justify-between">
  3. <div class="flex justify-between flex-1 sm:hidden">
  4. @if ($paginator->onFirstPage())
  5. <span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-field bg-coal border border-field cursor-default leading-5 rounded-md">
  6. {!! __('pagination.previous') !!}
  7. </span>
  8. @else
  9. <a href="{{ $paginator->previousPageUrl() }}" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-crayola bg-fogra border border-field leading-5 rounded-md hover:text-yelmax hover:border-burnt hover:bg-coal focus:outline-none focus:ring ring-burnt focus:border-burnt active:bg-field active:text-yelmax transition ease-in-out duration-150">
  10. {!! __('pagination.previous') !!}
  11. </a>
  12. @endif
  13. @if ($paginator->hasMorePages())
  14. <a href="{{ $paginator->nextPageUrl() }}" class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-crayola bg-fogra border border-field leading-5 rounded-md hover:text-yelmax hover:border-burnt hover:bg-coal focus:outline-none focus:ring ring-burnt focus:border-burnt active:bg-field active:text-yelmax transition ease-in-out duration-150">
  15. {!! __('pagination.next') !!}
  16. </a>
  17. @else
  18. <span class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-field bg-coal border border-field cursor-default leading-5 rounded-md">
  19. {!! __('pagination.next') !!}
  20. </span>
  21. @endif
  22. </div>
  23. <div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
  24. <div>
  25. <p class="text-sm text-field leading-5">
  26. {!! __('Zeige') !!}
  27. @if ($paginator->firstItem())
  28. <span class="font-medium">{{ $paginator->firstItem() }}</span>
  29. {!! __('bis') !!}
  30. <span class="font-medium">{{ $paginator->lastItem() }}</span>
  31. @else
  32. {{ $paginator->count() }}
  33. @endif
  34. {!! __('von') !!}
  35. <span class="font-medium">{{ $paginator->total() }}</span>
  36. {!! __('Ergebnissen') !!}
  37. </p>
  38. </div>
  39. <div>
  40. <span class="relative z-0 inline-flex shadow-sm rounded-md">
  41. {{-- Previous Page Link --}}
  42. @if ($paginator->onFirstPage())
  43. <span aria-disabled="true" aria-label="{{ __('pagination.previous') }}">
  44. <span class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-field bg-coal border border-field cursor-default rounded-l-md leading-5" aria-hidden="true">
  45. <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
  46. <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" />
  47. </svg>
  48. </span>
  49. </span>
  50. @else
  51. <a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-crayola bg-fogra border border-field rounded-l-md leading-5 hover:text-yelmax hover:border-burnt hover:bg-coal focus:z-10 focus:outline-none focus:ring ring-burnt focus:border-burnt active:bg-field active:text-yelmax transition ease-in-out duration-150" aria-label="{{ __('pagination.previous') }}">
  52. <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
  53. <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" />
  54. </svg>
  55. </a>
  56. @endif
  57. {{-- Pagination Elements --}}
  58. @foreach ($elements as $element)
  59. {{-- "Three Dots" Separator --}}
  60. @if (is_string($element))
  61. <span aria-disabled="true">
  62. <span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-crayola bg-fogra border border-field cursor-default leading-5">{{ $element }}</span>
  63. </span>
  64. @endif
  65. {{-- Array Of Links --}}
  66. @if (is_array($element))
  67. @foreach ($element as $page => $url)
  68. @if ($page == $paginator->currentPage())
  69. <span aria-current="page">
  70. <span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-yelmax bg-coal border border-field cursor-default leading-5">{{ $page }}</span>
  71. </span>
  72. @else
  73. <a href="{{ $url }}" class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-crayola bg-fogra border border-field leading-5 hover:text-yelmax hover:border-burnt hover:bg-coal focus:z-10 focus:outline-none focus:ring ring-burnt focus:border-burnt active:bg-field active:text-yelmax transition ease-in-out duration-150" aria-label="{{ __('Go to page :page', ['page' => $page]) }}">
  74. {{ $page }}
  75. </a>
  76. @endif
  77. @endforeach
  78. @endif
  79. @endforeach
  80. {{-- Next Page Link --}}
  81. @if ($paginator->hasMorePages())
  82. <a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-crayola bg-fogra border border-field rounded-r-md leading-5 hover:text-yelmax hover:border-burnt hover:bg-coal focus:z-10 focus:outline-none focus:ring ring-burnt focus:border-burnt active:bg-field active:text-yelmax transition ease-in-out duration-150" aria-label="{{ __('pagination.next') }}">
  83. <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
  84. <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" />
  85. </svg>
  86. </a>
  87. @else
  88. <span aria-disabled="true" aria-label="{{ __('pagination.next') }}">
  89. <span class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-field bg-coal border border-field cursor-default rounded-r-md leading-5" aria-hidden="true">
  90. <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
  91. <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" />
  92. </svg>
  93. </span>
  94. </span>
  95. @endif
  96. </span>
  97. </div>
  98. </div>
  99. </nav>
  100. @endif