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> + +
diff --git a/plugins/tps/birzha/models/Payment.php b/plugins/tps/birzha/models/Payment.php index 237302bb1..75709afad 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 $morphOne = [ @@ -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'; + } + + } } 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 @@
-
+
@@ -525,4 +633,4 @@ - \ No newline at end of file + diff --git a/shablon/css/main.css b/shablon/css/main.css index 6170b6830..3c1c26749 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); @@ -1075,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; @@ -1430,7 +1609,7 @@ li { font-size: var(--text-16); font-weight: 400; line-height: 1.4; - color: var(--rgba-black); + color: #a8a8a8; } .item_num { @@ -1479,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 { @@ -1488,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 { @@ -1637,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); @@ -2385,6 +2578,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 +2662,8 @@ li { } .bank_form .post_upload_box { - width: calc(67% - 45px); + /* width: calc(67% - 45px); */ + width: 550px; margin: 25px 20px 0; } @@ -3757,7 +3965,8 @@ li { } .profile_drop { - bottom: -515px; + /* bottom: -441px; */ + top: calc(100% + 52px); } } @@ -3837,7 +4046,7 @@ li { } .tab_link { - width: calc(50% - 40px); + width: calc(50% - 60px); margin-bottom: 30px; } @@ -3847,7 +4056,8 @@ li { } */ .profile_drop { - bottom: -505px; + /* bottom: -431px; */ + top: calc(100% + 41px); } /* Basket =============== */ @@ -4088,6 +4298,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 +4480,6 @@ li { -moz-flex-direction: column; -webkit-flex-direction: column; justify-content: center; - } .profile_head { @@ -4161,9 +4488,10 @@ li { } .profile_drop { - right: -35px; + right: 0; left: unset; - bottom: -517px; + /* bottom: -416px; */ + top: calc(100% + 25px); width: 320px; } @@ -4458,7 +4786,7 @@ li { } .tab_link { - width: calc(50% - 20px); + width: calc(50% - 40px); margin-bottom: 20px; margin-right: 20px; } @@ -4526,6 +4854,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 +4941,7 @@ li { width: 100%; margin-right: 0; margin-bottom: 20px; + flex-direction: row; } .intro_slider, @@ -4655,7 +5000,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 +5072,8 @@ li { .profile_drop { width: 270px; - bottom: -445px; + /* bottom: -445px; */ + top: calc(100% + 52px); font-size: 14px; right: unset; left: 50%; @@ -4806,6 +5182,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 +5296,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 +5510,8 @@ li { .profile_drop { width: 300px; - bottom: -360px; + /* bottom: -360px; */ + top: calc(100% + 52px); font-size: 14px; right: -72px; margin-bottom: 0; @@ -5130,6 +5524,7 @@ li { .logo_text { font-size: 13px; + width: 200px; } .footer_img { @@ -5274,7 +5669,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..3169cd3d6 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; @@ -885,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%; @@ -1588,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 { @@ -1597,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 { @@ -4799,6 +4854,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; } 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: ''