!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:
parent
20131129fe
commit
530e5f22fe
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'next' => 'Weiter »',
|
||||
'previous' => '« Zurück',
|
||||
'next' => 'Weiter',
|
||||
'previous' => 'Zurück',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'previous' => '« Previous',
|
||||
'next' => 'Next »',
|
||||
'previous' => 'Previous',
|
||||
'next' => 'Next',
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'next' => 'Siguiente »',
|
||||
'previous' => '« Anterior',
|
||||
'next' => 'Siguiente',
|
||||
'previous' => 'Anterior',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'next' => 'Suivant »',
|
||||
'previous' => '« Précédent',
|
||||
'next' => 'Suivant',
|
||||
'previous' => 'Précédent',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'previous' => '« Mantan',
|
||||
'next' => 'Depan »',
|
||||
'previous' => 'Mantan',
|
||||
'next' => 'Depan',
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'next' => 'Successivo »',
|
||||
'previous' => '« Precedente',
|
||||
'next' => 'Successivo',
|
||||
'previous' => 'Precedente',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'next' => '次へ »',
|
||||
'previous' => '« 前へ',
|
||||
'next' => '次へ',
|
||||
'previous' => '前へ',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'previous' => '« 이전 페이지',
|
||||
'next' => '다음 페이지 »',
|
||||
'previous' => '이전 페이지',
|
||||
'next' => '다음 페이지',
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'next' => 'Вперёд »',
|
||||
'previous' => '« Назад',
|
||||
'next' => 'Вперёд',
|
||||
'previous' => 'Назад',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ return [
|
|||
'notify' => '是否提醒',
|
||||
'orders_update_status' => '更新状态',
|
||||
'error_status' => '请选择状态',
|
||||
'payments_history' => '支付记录',
|
||||
'payments_history' => '支付信息',
|
||||
'text_response' => '返回数据',
|
||||
'text_request' => '请求参数',
|
||||
'text_callback' => '回调',
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'previous' => '« 上一页',
|
||||
'next' => '下一页 »',
|
||||
'previous' => '上一页',
|
||||
'next' => '下一页',
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'next' => '下一頁 »',
|
||||
'previous' => '« 上一頁',
|
||||
'next' => '下一頁',
|
||||
'previous' => '上一頁',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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(/&/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
|
||||
|
|
|
|||
Loading…
Reference in New Issue