!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;
$btn-focus-width: 0;
$table-border-color: #e9ecef;
$table-bg: #fff;
$table-bg: transparent;
$border-color: #e8e8e8;
$input-border-color: #e2e2e2;
$badge-border-radius: 2px;

View File

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

View File

@ -344,3 +344,30 @@ img {
-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
return [
'next' => 'Weiter &raquo;',
'previous' => '&laquo; Zurück',
'next' => 'Weiter',
'previous' => 'Zurück',
];

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,43 +1,72 @@
@if ($paginator->hasPages())
<nav class="d-flex justify-content-center">
<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"><i class="bi bi-chevron-left"></i></span>
</li>
@else
<li class="page-item">
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')"><i class="bi bi-chevron-left"></i></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')"><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>
@if(is_mobile())
<div class="mobile-paginator">
<a class="btn {{ !$paginator->previousPageUrl() ? 'disabled' : '' }}" href="{{ $paginator->previousPageUrl() ?? 'javascript:void(0)' }}"><i class="bi bi-chevron-left"></i> @lang('pagination.previous')</a>
<div class="input-group">
<input type="text" class="form-control" id="mb-page-input" onkeyup="this.value=this.value.replace(/\D/g,'')" value="{{ $paginator->currentPage() }}">
<span class="input-group-text">{{ $paginator->lastPage() }}</span>
</div>
<a class="btn {{ !$paginator->nextPageUrl() ? 'disabled' : '' }}" href="{{ $paginator->nextPageUrl() ?? 'javascript:void(0)' }}">@lang('pagination.next') <i class="bi bi-chevron-right"></i></a>
</div>
<script>
$('#mb-page-input').on('change', function() {
let page = $(this).val();
let lastPage = @json($paginator->lastPage());
let url = @json($paginator->url(0));
url = url.replace(/&amp;/g, '&');
if (page > lastPage) {
$(this).val(lastPage);
page = lastPage;
}
if (page) {
url = bk.updateQueryStringParameter(url, 'page', page)
window.location.href = url;
}
})
</script>
@else
<nav class="d-flex justify-content-center">
<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"><i class="bi bi-chevron-left"></i></span>
</li>
@else
<li class="page-item">
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')"><i class="bi bi-chevron-left"></i></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')"><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