!138 Fix pagination button h5 responsive

* Fix pagination button h5 responsive ++
* Fix pagination button h5 responsive
* Optimize table UI, etc
This commit is contained in:
pushuo 2023-06-19 02:27:08 +00:00 committed by Edward Yang
parent 20131129fe
commit 530e5f22fe
16 changed files with 122 additions and 66 deletions

View File

@ -34,7 +34,7 @@ $form-floating-padding-y: .9rem;
$form-floating-height: 50px; $form-floating-height: 50px;
$btn-focus-width: 0; $btn-focus-width: 0;
$table-border-color: #e9ecef; $table-border-color: #e9ecef;
$table-bg: #fff; $table-bg: transparent;
$border-color: #e8e8e8; $border-color: #e8e8e8;
$input-border-color: #e2e2e2; $input-border-color: #e2e2e2;
$badge-border-radius: 2px; $badge-border-radius: 2px;

View File

@ -86,7 +86,7 @@ $pagination-padding-x: 4px;
$pagination-padding-y: .3rem; $pagination-padding-y: .3rem;
$pagination-focus-color: #606266; $pagination-focus-color: #606266;
$table-bg: #fff; $table-bg: transparent;
// $dropdown-divider-bg: rgba(0, 0, 0, 0.1); // $dropdown-divider-bg: rgba(0, 0, 0, 0.1);
@import './bootstrap-icons'; @import './bootstrap-icons';

View File

@ -344,3 +344,30 @@ img {
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
} }
} }
.mobile-paginator {
display: flex;
justify-content: center;
align-items: center;
.input-group {
max-width: 60px;
margin: 0 10px;
.input-group-text {
padding: 0.46rem 0.56rem;
}
#mb-page-input {
padding: 0.46rem 0.26rem;
text-align: center;
}
}
.btn {
border: 1px solid var(--bs-border-color);
&:active {
background-color: #eee;
}
}
}

View File

@ -1,6 +1,6 @@
<?php <?php
return [ return [
'next' => 'Weiter &raquo;', 'next' => 'Weiter',
'previous' => '&laquo; Zurück', 'previous' => 'Zurück',
]; ];

View File

@ -13,7 +13,7 @@ return [
| |
*/ */
'previous' => '&laquo; Previous', 'previous' => 'Previous',
'next' => 'Next &raquo;', 'next' => 'Next',
]; ];

View File

@ -1,6 +1,6 @@
<?php <?php
return [ return [
'next' => 'Siguiente &raquo;', 'next' => 'Siguiente',
'previous' => '&laquo; Anterior', 'previous' => 'Anterior',
]; ];

View File

@ -1,6 +1,6 @@
<?php <?php
return [ return [
'next' => 'Suivant &raquo;', 'next' => 'Suivant',
'previous' => '&laquo; Précédent', 'previous' => 'Précédent',
]; ];

View File

@ -13,7 +13,7 @@ return [
| |
*/ */
'previous' => '&laquo; Mantan', 'previous' => 'Mantan',
'next' => 'Depan &raquo;', 'next' => 'Depan',
]; ];

View File

@ -1,6 +1,6 @@
<?php <?php
return [ return [
'next' => 'Successivo &raquo;', 'next' => 'Successivo',
'previous' => '&laquo; Precedente', 'previous' => 'Precedente',
]; ];

View File

@ -1,6 +1,6 @@
<?php <?php
return [ return [
'next' => '次へ &raquo;', 'next' => '次へ',
'previous' => '&laquo; 前へ', 'previous' => '前へ',
]; ];

View File

@ -13,7 +13,7 @@ return [
| |
*/ */
'previous' => '&laquo; 이전 페이지', 'previous' => '이전 페이지',
'next' => '다음 페이지 &raquo;', 'next' => '다음 페이지',
]; ];

View File

@ -1,6 +1,6 @@
<?php <?php
return [ return [
'next' => 'Вперёд &raquo;', 'next' => 'Вперёд',
'previous' => '&laquo; Назад', 'previous' => 'Назад',
]; ];

View File

@ -23,7 +23,7 @@ return [
'notify' => '是否提醒', 'notify' => '是否提醒',
'orders_update_status' => '更新状态', 'orders_update_status' => '更新状态',
'error_status' => '请选择状态', 'error_status' => '请选择状态',
'payments_history' => '支付记录', 'payments_history' => '支付信息',
'text_response' => '返回数据', 'text_response' => '返回数据',
'text_request' => '请求参数', 'text_request' => '请求参数',
'text_callback' => '回调', 'text_callback' => '回调',

View File

@ -13,7 +13,7 @@ return [
| |
*/ */
'previous' => '&laquo; 上一页', 'previous' => '上一页',
'next' => '下一页 &raquo;', 'next' => '下一页',
]; ];

View File

@ -1,6 +1,6 @@
<?php <?php
return [ return [
'next' => '下一頁 &raquo;', 'next' => '下一頁',
'previous' => '&laquo; 上一頁', 'previous' => '上一頁',
]; ];

View File

@ -1,43 +1,72 @@
@if ($paginator->hasPages()) @if ($paginator->hasPages())
<nav class="d-flex justify-content-center"> @if(is_mobile())
<ul class="pagination"> <div class="mobile-paginator">
{{-- Previous Page Link --}} <a class="btn {{ !$paginator->previousPageUrl() ? 'disabled' : '' }}" href="{{ $paginator->previousPageUrl() ?? 'javascript:void(0)' }}"><i class="bi bi-chevron-left"></i> @lang('pagination.previous')</a>
@if ($paginator->onFirstPage()) <div class="input-group">
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')"> <input type="text" class="form-control" id="mb-page-input" onkeyup="this.value=this.value.replace(/\D/g,'')" value="{{ $paginator->currentPage() }}">
<span class="page-link" aria-hidden="true"><i class="bi bi-chevron-left"></i></span> <span class="input-group-text">{{ $paginator->lastPage() }}</span>
</li> </div>
@else <a class="btn {{ !$paginator->nextPageUrl() ? 'disabled' : '' }}" href="{{ $paginator->nextPageUrl() ?? 'javascript:void(0)' }}">@lang('pagination.next') <i class="bi bi-chevron-right"></i></a>
<li class="page-item"> </div>
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')"><i class="bi bi-chevron-left"></i></a>
</li> <script>
@endif $('#mb-page-input').on('change', function() {
{{-- Pagination Elements --}} let page = $(this).val();
@foreach ($elements as $element) let lastPage = @json($paginator->lastPage());
{{-- "Three Dots" Separator --}} let url = @json($paginator->url(0));
@if (is_string($element)) url = url.replace(/&amp;/g, '&');
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li> if (page > lastPage) {
@endif $(this).val(lastPage);
{{-- Array Of Links --}} page = lastPage;
@if (is_array($element)) }
@foreach ($element as $page => $url)
@if ($page == $paginator->currentPage()) if (page) {
<li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li> url = bk.updateQueryStringParameter(url, 'page', page)
@else window.location.href = url;
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li> }
@endif })
@endforeach </script>
@endif @else
@endforeach <nav class="d-flex justify-content-center">
{{-- Next Page Link --}} <ul class="pagination">
@if ($paginator->hasMorePages()) {{-- Previous Page Link --}}
<li class="page-item"> @if ($paginator->onFirstPage())
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')"><i class="bi bi-chevron-right"></i></a> <li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
</li> <span class="page-link" aria-hidden="true"><i class="bi bi-chevron-left"></i></span>
@else </li>
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')"> @else
<span class="page-link" aria-hidden="true"><i class="bi bi-chevron-right"></i></span> <li class="page-item">
</li> <a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')"><i class="bi bi-chevron-left"></i></a>
@endif </li>
</ul> @endif
</nav> {{-- 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')"><i class="bi bi-chevron-right"></i></a>
</li>
@else
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
<span class="page-link" aria-hidden="true"><i class="bi bi-chevron-right"></i></span>
</li>
@endif
</ul>
</nav>
@endif
@endif @endif