From 85d192b69a88c3fd7dba20ea361b01fab331e557 Mon Sep 17 00:00:00 2001 From: Meylis Gazakow Date: Tue, 9 Nov 2021 17:18:58 +0300 Subject: [PATCH 1/6] hope last changes --- shablon/basket.html | 128 +++++++- shablon/css/main.css | 423 ++++++++++++++++++++++++--- shablon/images/svg/add-blue.svg | 10 + shablon/images/svg/usser-profile.svg | 4 + shablon/js/main.js | 40 ++- themes/birzha/assets/css/main.css | 46 +++ 6 files changed, 597 insertions(+), 54 deletions(-) create mode 100644 shablon/images/svg/add-blue.svg create mode 100644 shablon/images/svg/usser-profile.svg diff --git a/shablon/basket.html b/shablon/basket.html index 381ea1942..b2f11d2fb 100644 --- a/shablon/basket.html +++ b/shablon/basket.html @@ -10,7 +10,7 @@ - Add post 1 + Basket @@ -95,7 +95,27 @@
+ +
+
+ +
+
+ Сообщения +
+
+ +
+
+ +
+
+ 592.57 TMT +
+
+ - -
- + + +
@@ -193,7 +301,7 @@
-
+
@@ -525,4 +633,4 @@ - \ No newline at end of file + diff --git a/shablon/css/main.css b/shablon/css/main.css index 6170b6830..b8e73c9d1 100644 --- a/shablon/css/main.css +++ b/shablon/css/main.css @@ -424,6 +424,29 @@ li { line-height: 1.4; } +.profile_info-group { + display: flex; + align-items: center; + margin-right: 10px; +} + +.mobile_user-profile, +.mobile_profile-navs { + display: none; +} + +.profile_icon { + width: 20px; + height: 20px; +} + +.profile_icon img { + width: 100%; + height: 100%; + object-fit: contain; + -o-object-fit: contain; +} + .profile_bio { position: relative; } @@ -441,7 +464,6 @@ li { .profile_head { display: flex; align-items: center; - margin-right: 40px; cursor: pointer; } @@ -462,9 +484,10 @@ li { justify-content: center; position: absolute; - /* top: calc(100% + 52px); */ - bottom: -515px; - left: -30px; + top: calc(100% + 52px); + /* bottom: -440px; */ + right: 0; + /* left: -30px; */ width: 350px; @@ -497,16 +520,30 @@ li { .profile_item { display: flex; align-items: center; - - padding: 25px 30px; - border-bottom: 1px solid rgba(0, 0, 0, .3); + margin-right: 20px; + cursor: default; } -.profile_item:hover { +.p-0 { + padding: 0 !important; +} + +.p-0 .profile_text { + white-space: nowrap; +} + +.profile_drop .profile_item { + padding: 25px 30px; + margin-right: 0; + border-bottom: 1px solid rgba(0, 0, 0, .3); + cursor: pointer; +} + +.profile_drop .profile_item:hover { background: #f5f5f5; } -.profile_item:last-child { +.profile_drop .profile_item:last-child { border: none; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; @@ -542,6 +579,118 @@ li { line-height: 1.3; } +/* Balance ====================== */ + +.balance_tabs { + display: flex; +} + +.balance_link { + padding: 25px 15px; + border-radius: 5px; + cursor: pointer; + width: 300px; + text-align: center; + background: #F2F6FF; + + margin-right: 30px; + + font-size: 18px; + font-weight: 400; + line-height: 1.3; +} + +.balance_link.active { + background: var(--blue); + color: #fff; +} + +.balance_link:last-child { + margin-right: 0; +} + +.balance_box { + margin-top: 50px; +} + +.balance_source { + display: none; +} + +.balance_source.active { + display: block; + position: relative; + animation: open_balance .2s linear; +} + +@keyframes open_balance { + 0% { + /* margin-top: 0; */ + top: 50px; + } + 100% { + top: 0; + } +} + +@-webkit-keyframes open_balance { + 0% { + /* margin-top: 0; */ + top: 50px; + } + 100% { + top: 0; + } +} + +.post_form-3 { + display: flex; + align-items: end; + flex-wrap: wrap; + -ms-flex-wrap: wrap; + -o-flex-wrap: wrap; + -webkit-flex-wrap: wrap; + -moz-flex-wrap: wrap; + position: relative; + margin: -25px -20px 0; +} + +.send_btn { + background: var(--blue); + color: #fff; + border: none; + border-radius: 5px; + padding: 20px 50px; + cursor: pointer; + font-size: var(--text-18); + font-weight: 400; + line-height: 1; + display: block; +} + +.post_footer-text { + color: #E2E2E2; + font-size: 20px; + line-height: 1.3; + font-weight: 400; + display: block; + width: 100%; + margin-top: 30px; + margin: 30px 20px 0; +} + +.post_footer-text span { + color: red; +} + +.post_form-3 .post_upload_item { + margin-bottom: 0 !important; +} + +.post_form-3 .upload_group label { + padding: 20px; +} + /* Change Password ============================================= */ .password { @@ -747,6 +896,11 @@ li { line-height: 1.4; } +.head_group { + display: flex; + align-items: center; +} + /* Header ============================================= */ .header { -webkit-box-shadow: 0px 6px 4px -1px var(--rgba-black); @@ -1430,7 +1584,7 @@ li { font-size: var(--text-16); font-weight: 400; line-height: 1.4; - color: var(--rgba-black); + color: #a8a8a8; } .item_num { @@ -2385,6 +2539,20 @@ li { color: red; } +.post_in label { + font-size: var(--text-18); + font-weight: 400; + line-height: 1; + margin-left: 20px; + margin-bottom: 20px; + display: block; +} + +.post_in label span { + color: red; +} + + .post_comment { width: calc(100% - 40px); margin: 25px 20px; @@ -2455,7 +2623,8 @@ li { } .bank_form .post_upload_box { - width: calc(67% - 45px); + /* width: calc(67% - 45px); */ + width: 550px; margin: 25px 20px 0; } @@ -3757,7 +3926,8 @@ li { } .profile_drop { - bottom: -515px; + /* bottom: -441px; */ + top: calc(100% + 52px); } } @@ -3847,7 +4017,8 @@ li { } */ .profile_drop { - bottom: -505px; + /* bottom: -431px; */ + top: calc(100% + 41px); } /* Basket =============== */ @@ -4088,6 +4259,124 @@ li { display: none; } + /* Mobile User links ==================== */ + + .profile { + display: none !important; + } + + .mobile_user-profile { + display: block; + cursor: pointer; + width: 40px; + height: 40px; + } + + .mobile_user-profile img { + width: 100%; + height: 100%; + object-fit: contain; + -o-object-fit: contain; + } + + .mobile_profile-navs { + position: fixed; + top: 0; + right: -100%; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, .5); + z-index: 10; + display: block; + transition: all .2s linear; + -ms-transition: all .2s linear; + -moz-transition: all .2s linear; + -o-transition: all .2s linear; + -webkit-transition: all .2s linear; + } + + .mobile_profile-navs.active { + right: 0; + } + + .mobile_profile-inner { + position: fixed; + top: 0; + right: -100%; + width: calc(70% - 60px); + height: 100%; + background: #fff; + padding: 30px; + overflow-y: auto; + -ms-overflow-style: none; /* IE 11 */ + scrollbar-width: none; /* Firefox 64 */ + + transition: all .3s linear; + -ms-transition: all .3s linear; + -moz-transition: all .3s linear; + -o-transition: all .3s linear; + -webkit-transition: all .3s linear; + } + + .mobile_profile-navs.active .mobile_profile-inner { + right: 0; + } + + .mobile_profile-inner::-webkit-scrollbar { + display: none; + } + + .mobile_user-name { + text-align: center; + width: 100%; + font-size: 20px; + font-weight: 700; + line-height: 1.4; + margin-bottom: 50px; + } + + .mobile_user-item { + padding: 20px 10px; + display: flex; + align-items: center; + position: relative; + } + + .mobile_user-item:nth-child(2)::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 1px; + background: #003197; + } + + .mobile_user-item::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 1px; + background: #003197; + } + + .mobile_user-item-icon { + width: 20px; + height: 20px; + margin-right: 15px; + } + + .mobile_user-item-icon img { + width: 100%; + height: 100%; + object-fit: contain; + -o-object-fit: contain; + } + + /* Mobile User links end ================= */ + .info_block:last-child .header_contact:last-child { display: none; } @@ -4152,7 +4441,6 @@ li { -moz-flex-direction: column; -webkit-flex-direction: column; justify-content: center; - } .profile_head { @@ -4161,9 +4449,10 @@ li { } .profile_drop { - right: -35px; + right: 0; left: unset; - bottom: -517px; + /* bottom: -416px; */ + top: calc(100% + 25px); width: 320px; } @@ -4526,6 +4815,22 @@ li { --text-18: 16px } + .profile_head { + flex-direction: column-reverse; + -ms-flex-direction: column-reverse; + -moz-flex-direction: column-reverse; + -o-flex-direction: column-reverse; + -webkit-flex-direction: column-reverse; + } + + .profile_head .profile_item { + margin-top: 10px; + } + + .profile_head .profile_item:last-child { + margin-top: 0; + } + .new_group { flex-direction: column; -ms-flex-direction: column; @@ -4597,6 +4902,7 @@ li { width: 100%; margin-right: 0; margin-bottom: 20px; + flex-direction: row; } .intro_slider, @@ -4655,7 +4961,37 @@ li { } .post_form { - margin: 0px 0; + margin: 0; + } + + .post_form-3 { + margin: 0; + } + + .balance_tabs { + flex-direction: column; + -ms-flex-direction: column; + -moz-flex-direction: column; + } + + .balance_link { + margin: 0 0 15px 0; + padding: 15px; + width: 100%; + font-size: 16px; + } + + .send_btn { + font-size: 14px; + padding: 15px 50px; + } + + .post_form-3 .bank { + margin-bottom: 25px; + } + + .balance_link:last-child { + margin: 0 !important; } .post_input label { @@ -4697,7 +5033,8 @@ li { .profile_drop { width: 270px; - bottom: -445px; + /* bottom: -445px; */ + top: calc(100% + 52px); font-size: 14px; right: unset; left: 50%; @@ -4806,6 +5143,34 @@ li { padding: 0 15px; } + .mobile_user-profile { + width: 30px; + height: 30px; + } + + .mobile_profile-inner { + width: calc(95% - 40px); + padding: 20px; + } + + .mobile_user-name { + font-size: 18px; + margin-bottom: 25px; + } + + .mobile_user-item { + padding: 15px 10px; + } + + .mobile_user-item-icon { + width: 15px; + height: 15px; + } + + .mobile_user-item-text { + font-size: 14px; + } + .links { width: 70%; } @@ -4892,20 +5257,9 @@ li { font-size: 16px; } - .profile_icon { - width: 15px; - height: 20px; - } - - .profile_icon img { - width: 100%; - height: 100%; - object-fit: contain; - -o-object-fit: contain; - } - .profile_drop { - bottom: -420px; + /* bottom: -420px; */ + top: calc(100% + 52px); } .category_search { @@ -5117,7 +5471,8 @@ li { .profile_drop { width: 300px; - bottom: -360px; + /* bottom: -360px; */ + top: calc(100% + 52px); font-size: 14px; right: -72px; margin-bottom: 0; @@ -5130,6 +5485,7 @@ li { .logo_text { font-size: 13px; + width: 200px; } .footer_img { @@ -5274,7 +5630,8 @@ li { .profile_drop { width: 240px; - bottom: -385px; + /* bottom: -385px; */ + top: calc(100% + 52px); font-size: 14px; right: -42px; padding-bottom: 30px; diff --git a/shablon/images/svg/add-blue.svg b/shablon/images/svg/add-blue.svg new file mode 100644 index 000000000..fdea8d93f --- /dev/null +++ b/shablon/images/svg/add-blue.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/shablon/images/svg/usser-profile.svg b/shablon/images/svg/usser-profile.svg new file mode 100644 index 000000000..856c52fba --- /dev/null +++ b/shablon/images/svg/usser-profile.svg @@ -0,0 +1,4 @@ + + + + diff --git a/shablon/js/main.js b/shablon/js/main.js index 5d369507f..59ea0ae99 100644 --- a/shablon/js/main.js +++ b/shablon/js/main.js @@ -38,6 +38,9 @@ let register_content_2 = document.querySelector('.register_content_2'); let seller_btn = document.querySelector('.seller_btn'); let seller_info = document.querySelector('.seller_info'); +let mobile_user_profile = document.querySelector('.mobile_user-profile'); +let mobile_profile_navs = document.querySelector('.mobile_profile-navs'); + @@ -85,19 +88,19 @@ function sleep(time) { window.onclick = function (e) { - // if (drop != undefined) { - // if (document.querySelector('.profile_drop').classList.contains('active') && !e.target.closest('.profile_head')) { - // document.querySelector('.profile_drop').classList.remove('active'); - // } - // } - - drop.forEach(drop => { - if (drop != undefined) { - drop.classList.contains('active') && !e.target.closest('.profile_head'); - drop.classList.remove('active') + if (drop != undefined) { + if (document.querySelector('.profile_drop').classList.contains('active') && !e.target.closest('.profile_head')) { + document.querySelector('.profile_drop').classList.remove('active'); } } - ); + + // drop.forEach(drop => { + // if (drop != undefined) { + // drop.classList.contains('active') && !e.target.closest('.profile_head'); + // drop.classList.remove('active') + // } + // } + // ); if (register != undefined) { if (register.classList.contains('active') && !e.target.closest('.register_body')) { @@ -119,6 +122,12 @@ window.onclick = function (e) { } } + if (mobile_profile_navs != undefined) { + if (mobile_profile_navs.classList.contains('active') && !e.target.closest('.mobile_profile-inner')) { + mobile_profile_navs.classList.remove('active'); + } + } + if (seller_info != undefined) { if (seller_info.classList.contains('active') && !e.target.closest('.seller_inner')) { seller_info.classList.remove('active'); @@ -162,6 +171,15 @@ if (profile_head != undefined) { }); } + +if (mobile_user_profile != undefined) { + mobile_user_profile.addEventListener('click', function () { + sleep(2).then(() => { + mobile_profile_navs.classList.add('active'); + }); + }); +} + if (register_btn != undefined) { register_btn.forEach(x => { x.addEventListener('click', function () { diff --git a/themes/birzha/assets/css/main.css b/themes/birzha/assets/css/main.css index 189398f6b..8447a677f 100644 --- a/themes/birzha/assets/css/main.css +++ b/themes/birzha/assets/css/main.css @@ -623,6 +623,22 @@ li { display: block; } +.balance_source.active { + display: block; + position: relative; + animation: open_balance .2s linear; +} + +@keyframes open_balance { + 0% { + /* margin-top: 0; */ + top: 50px; + } + 100% { + top: 0; + } +} + .post_footer-text { color: #E2E2E2; font-size: 20px; @@ -4799,6 +4815,36 @@ li { margin: 0px 0; } + .post_form-3 { + margin: 0; + } + + .balance_link { + margin: 0 0 15px 0; + width: 100%; + padding: 15px; + font-size: 16px; + } + + .send_btn { + font-size: 14px; + padding: 15px 50px; + } + + .balance_link:last-child { + margin: 0 !important; + } + .post_form-3 .bank { + margin-bottom: 25px; + } + + + .balance_tabs { + flex-direction: column; + -ms-flex-direction: column; + -moz-flex-direction: column; + } + .post_input label { margin: 0 0 12px 10px; } From 0ef37c2369781ac30708b02981b96e1a962a1774 Mon Sep 17 00:00:00 2001 From: saparatayev Date: Tue, 9 Nov 2021 17:24:24 +0500 Subject: [PATCH 2/6] fix: balance validation --- plugins/tps/birzha/models/Payment.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/tps/birzha/models/Payment.php b/plugins/tps/birzha/models/Payment.php index 7fe4ca6a6..1163cf80b 100644 --- a/plugins/tps/birzha/models/Payment.php +++ b/plugins/tps/birzha/models/Payment.php @@ -23,7 +23,7 @@ class Payment extends Model * @var array Validation rules */ public $rules = [ - 'amount' => 'required|gt:0' + 'amount' => 'required' ]; public $hasMany = [ @@ -45,4 +45,14 @@ class Payment extends Model $user->save(); } } + + public function beforeValidate() + { + if(\App::runningInBackend()) { + $this->rules['amount'] = 'required|gt:0'; + } else { + $this->rules['amount'] = 'required'; + } + + } } From 4f3559b076fa1b87b6bb1a206598ace692fcf2d7 Mon Sep 17 00:00:00 2001 From: saparatayev Date: Tue, 9 Nov 2021 17:41:30 +0500 Subject: [PATCH 3/6] fix: payment_type is required field --- plugins/tps/birzha/components/balance/default.htm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/tps/birzha/components/balance/default.htm b/plugins/tps/birzha/components/balance/default.htm index fc85ded68..805ddf53c 100644 --- a/plugins/tps/birzha/components/balance/default.htm +++ b/plugins/tps/birzha/components/balance/default.htm @@ -27,6 +27,8 @@ data-request-flash class="post_form-3 first-step-form"> + +
@@ -49,6 +51,8 @@ data-request-flash data-request-files> + +
From 184c1cc8815b2e0282ad518a62adb7f379eb1554 Mon Sep 17 00:00:00 2001 From: saparatayev Date: Tue, 9 Nov 2021 17:58:52 +0500 Subject: [PATCH 4/6] changed categories name --- themes/birzha/meta/menus/main-top.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/birzha/meta/menus/main-top.yaml b/themes/birzha/meta/menus/main-top.yaml index 637744cf8..1624479c1 100644 --- a/themes/birzha/meta/menus/main-top.yaml +++ b/themes/birzha/meta/menus/main-top.yaml @@ -1,6 +1,6 @@ items: - - title: Kategoriýalar + title: Pudaklar type: cms-page code: '' reference: kategorii @@ -10,7 +10,7 @@ items: title: Categories url: '' ru: - title: Категории + title: Секции url: '' isHidden: '0' cssClass: '' From bf8fbd88c9de1eaef8c403abd40027b1676309a4 Mon Sep 17 00:00:00 2001 From: Meylis Gazakow Date: Tue, 9 Nov 2021 18:51:33 +0300 Subject: [PATCH 5/6] last sapar changes asked --- shablon/css/main.css | 47 ++++++++++++++++++++++++++++--- themes/birzha/assets/css/main.css | 39 +++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 4 deletions(-) diff --git a/shablon/css/main.css b/shablon/css/main.css index b8e73c9d1..3c1c26749 100644 --- a/shablon/css/main.css +++ b/shablon/css/main.css @@ -1229,6 +1229,31 @@ li { z-index: -1; } +.link { + margin: 30px 0 0 0; + display: flex; + align-items: center; + justify-content: center; +} + +.home_link { + display: block; +} + +.home_link span { + display: block; + margin: 0 auto; + padding: 12px 40px; + background: var(--blue); + color: #fff; + font-size: 16px; + font-weight: 500; + line-height: 1.3; + border-radius: 5px; + cursor: pointer; +} + + .slider_item { width: 100%; height: 480px; @@ -1633,6 +1658,13 @@ li { color: var(--blue); margin-top: 20px; + + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; } .item_sub_title { @@ -1642,6 +1674,13 @@ li { color: #000; text-align: var(--item--align); margin: 10px 0; + + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; } .item_name { @@ -1791,13 +1830,13 @@ li { } .tab_link { - width: calc(25% - 40px); + width: calc(25% - 60px); margin-right: 40px; text-align: center; border-radius: 10px; background: var(--rgba-blue); color: var(--blue); - padding: 35px 0; + padding: 35px 10px; cursor: pointer; font-size: var(--text-20); @@ -4007,7 +4046,7 @@ li { } .tab_link { - width: calc(50% - 40px); + width: calc(50% - 60px); margin-bottom: 30px; } @@ -4747,7 +4786,7 @@ li { } .tab_link { - width: calc(50% - 20px); + width: calc(50% - 40px); margin-bottom: 20px; margin-right: 20px; } diff --git a/themes/birzha/assets/css/main.css b/themes/birzha/assets/css/main.css index 8447a677f..3169cd3d6 100644 --- a/themes/birzha/assets/css/main.css +++ b/themes/birzha/assets/css/main.css @@ -901,6 +901,31 @@ li { margin-right: 10px; } +.link { + margin: 30px 0 0 0; + display: flex; + align-items: center; + justify-content: center; +} + +.home_link { + display: block; +} + +.home_link span { + display: block; + margin: 0 auto; + padding: 12px 40px; + background: var(--blue); + color: #fff; + font-size: 16px; + font-weight: 500; + line-height: 1.3; + border-radius: 5px; + cursor: pointer; +} + + .header_img img { width: 100%; height: 100%; @@ -1604,6 +1629,13 @@ li { color: var(--blue); margin-top: 20px; + + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; } .item_sub_title { @@ -1613,6 +1645,13 @@ li { color: #000; text-align: var(--item--align); margin: 10px 0; + + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; } .item_name { From 195897d48f662e2caa82dd510dbc3185e1c2dd1c Mon Sep 17 00:00:00 2001 From: saparatayev Date: Wed, 10 Nov 2021 16:09:00 +0500 Subject: [PATCH 6/6] merge with meylis changes --- shablon/css/main.css | 47 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/shablon/css/main.css b/shablon/css/main.css index b8e73c9d1..3c1c26749 100644 --- a/shablon/css/main.css +++ b/shablon/css/main.css @@ -1229,6 +1229,31 @@ li { z-index: -1; } +.link { + margin: 30px 0 0 0; + display: flex; + align-items: center; + justify-content: center; +} + +.home_link { + display: block; +} + +.home_link span { + display: block; + margin: 0 auto; + padding: 12px 40px; + background: var(--blue); + color: #fff; + font-size: 16px; + font-weight: 500; + line-height: 1.3; + border-radius: 5px; + cursor: pointer; +} + + .slider_item { width: 100%; height: 480px; @@ -1633,6 +1658,13 @@ li { color: var(--blue); margin-top: 20px; + + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; } .item_sub_title { @@ -1642,6 +1674,13 @@ li { color: #000; text-align: var(--item--align); margin: 10px 0; + + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; } .item_name { @@ -1791,13 +1830,13 @@ li { } .tab_link { - width: calc(25% - 40px); + width: calc(25% - 60px); margin-right: 40px; text-align: center; border-radius: 10px; background: var(--rgba-blue); color: var(--blue); - padding: 35px 0; + padding: 35px 10px; cursor: pointer; font-size: var(--text-20); @@ -4007,7 +4046,7 @@ li { } .tab_link { - width: calc(50% - 40px); + width: calc(50% - 60px); margin-bottom: 30px; } @@ -4747,7 +4786,7 @@ li { } .tab_link { - width: calc(50% - 20px); + width: calc(50% - 40px); margin-bottom: 20px; margin-right: 20px; }