From b0eb841047017180210a1bbe280b489978a33dce Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Wed, 2 Nov 2022 11:28:25 +0300 Subject: [PATCH 1/5] portal swiper slider control --- public/css/app.css | 8 ++-- resources/assets/js/views/portal/apps.js | 29 ++++++++++++- .../views/portal/invoices/preview.blade.php | 26 ++++-------- .../views/portal/invoices/show.blade.php | 42 +++++++------------ .../views/portal/invoices/signed.blade.php | 16 ++----- 5 files changed, 59 insertions(+), 62 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index 1424ee98b..40f642430 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -50876,6 +50876,10 @@ body{ width: 8.333333%; } + .lg\:w-auto{ + width: auto; + } + .lg\:w-3\/12{ width: 25%; } @@ -50940,10 +50944,6 @@ body{ width: 1rem; } - .lg\:w-auto{ - width: auto; - } - .lg\:w-2\/4{ width: 50%; } diff --git a/resources/assets/js/views/portal/apps.js b/resources/assets/js/views/portal/apps.js index 547c56aa4..f079b0929 100644 --- a/resources/assets/js/views/portal/apps.js +++ b/resources/assets/js/views/portal/apps.js @@ -66,10 +66,37 @@ const app = new Vue({ if (typeof this.form.password !== 'undefined') { this.form.password = ''; } + + + if (document.querySelector('[data-tabs-swiper]').childElementCount) { + + document.querySelectorAll('[data-tabs-slide]').forEach((item) => { + item.classList.add('swiper-slide'); + }); + + document.querySelector('[data-tabs-swiper]').classList.add('swiper', 'swiper-links'); + + let html = ` +
+ ${document.querySelector('[data-tabs-swiper]').innerHTML} +
+ +
+ chevron_right +
+ +
+ chevron_left +
+ `; + + document.querySelector('[data-tabs-swiper]').innerHTML = html; + } + new Swiper(".swiper-links", { loop: false, - slidesPerView: 3, + slidesPerView: 1, pagination: { el: ".swiper-pagination", clickable: true diff --git a/resources/views/portal/invoices/preview.blade.php b/resources/views/portal/invoices/preview.blade.php index adab432eb..86c14a20b 100644 --- a/resources/views/portal/invoices/preview.blade.php +++ b/resources/views/portal/invoices/preview.blade.php @@ -28,33 +28,23 @@ @php $is_active = true; @endphp -