From 68a38f1a35ef5172b644a227e676f91fd6f7049b Mon Sep 17 00:00:00 2001 From: saparatayev Date: Wed, 10 Nov 2021 13:35:22 +0500 Subject: [PATCH 1/6] fix: bank data --- .../tps/birzha/components/balance/default.htm | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/plugins/tps/birzha/components/balance/default.htm b/plugins/tps/birzha/components/balance/default.htm index 805ddf53c..c09925e7f 100644 --- a/plugins/tps/birzha/components/balance/default.htm +++ b/plugins/tps/birzha/components/balance/default.htm @@ -56,13 +56,18 @@
- {{'account.bank_details'|_}}: + Salgyt kody:
- - 1234-1234-1234-1234 + 101161000041 +
+
+
+
+ Manat hasaby:
- - 1234-1234-1234-1234 + 23201934160147100066000
@@ -75,12 +80,21 @@
- {{'account.our_bank_details'|_}}: + BAB:
- - 1234-1234-1234-1234 + 390101601
+
+
+ Korrespondent hasaby: +
+
+ 21101934110100700005000 +
+
+
From 2ae97d2f15eb8ad451236657bc12f79f814e3d1e Mon Sep 17 00:00:00 2001 From: saparatayev Date: Wed, 10 Nov 2021 13:45:08 +0500 Subject: [PATCH 2/6] three dots, OK buttom --- themes/birzha/assets/css/main.css | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) 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 b9fbd696896a39d203fbdcac1d3935d81cf6cbe6 Mon Sep 17 00:00:00 2001 From: saparatayev Date: Wed, 10 Nov 2021 17:09:03 +0500 Subject: [PATCH 3/6] translations for bank data in lang.yaml --- plugins/tps/birzha/components/balance/default.htm | 8 ++++---- themes/birzha/config/lang.yaml | 12 ++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/plugins/tps/birzha/components/balance/default.htm b/plugins/tps/birzha/components/balance/default.htm index c09925e7f..ac3495932 100644 --- a/plugins/tps/birzha/components/balance/default.htm +++ b/plugins/tps/birzha/components/balance/default.htm @@ -56,7 +56,7 @@
- Salgyt kody: + {{ 'account.bank_tax_code'|_ }}:
101161000041 @@ -64,7 +64,7 @@
- Manat hasaby: + {{ 'account.bank_manat_account'|_}}:
23201934160147100066000 @@ -80,7 +80,7 @@
- BAB: + {{ 'account.bank_bab'|_ }}:
390101601 @@ -88,7 +88,7 @@
- Korrespondent hasaby: + {{ 'account.bank_correspondent_account'|_ }}:
21101934110100700005000 diff --git a/themes/birzha/config/lang.yaml b/themes/birzha/config/lang.yaml index b224a866b..7da9c6acc 100644 --- a/themes/birzha/config/lang.yaml +++ b/themes/birzha/config/lang.yaml @@ -28,6 +28,10 @@ en: account.bank_details: Банковские реквизиты account.bank_address: Bank address account.bank_1: 744000, Туркменистан г.Ашгабат, Арчабиль шаелы 52 + account.bank_tax_code: Salgyt kody + account.bank_manat_account: Manat hasaby + account.bank_correspondent_account: Korrespondent hasaby + account.bank_bab: BAB account.our_bank_details: Our реквизиты account.amount: Сумма account.upload_file: Загрузить файл @@ -157,6 +161,10 @@ ru: account.bank_details: Банковские реквизиты account.bank_address: Bank address account.bank_1: 744000, Туркменистан г.Ашгабат, Арчабиль шаелы 52 + account.bank_tax_code: Налоговый код + account.bank_manat_account: Манатный счёт + account.bank_correspondent_account: Корреспондент счет + account.bank_bab: МФО account.our_bank_details: Our реквизиты account.amount: Сумма account.upload_file: Загрузить файл @@ -286,6 +294,10 @@ tm: account.bank_details: Банковские реквизиты account.bank_address: Bank address account.bank_1: 744000, Туркменистан г.Ашгабат, Арчабиль шаелы 52 + account.bank_tax_code: Salgyt kody + account.bank_manat_account: Manat hasaby + account.bank_correspondent_account: Korrespondent hasaby + account.bank_bab: BAB account.our_bank_details: Our реквизиты account.amount: Сумма account.upload_file: Загрузить файл From aa18c74e4e8047b677c6e5da04b76a5acdf80f37 Mon Sep 17 00:00:00 2001 From: saparatayev Date: Wed, 10 Nov 2021 18:07:58 +0500 Subject: [PATCH 4/6] settings: added bank info --- .../tps/birzha/components/balance/default.htm | 8 +++---- plugins/tps/birzha/models/Settings.php | 2 +- .../tps/birzha/models/settings/fields.yaml | 21 +++++++++++++++++++ themes/birzha/layouts/default.htm | 4 ++++ 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/plugins/tps/birzha/components/balance/default.htm b/plugins/tps/birzha/components/balance/default.htm index ac3495932..107519b13 100644 --- a/plugins/tps/birzha/components/balance/default.htm +++ b/plugins/tps/birzha/components/balance/default.htm @@ -59,7 +59,7 @@ {{ 'account.bank_tax_code'|_ }}:
- 101161000041 + {{ tax_code }}
@@ -67,7 +67,7 @@ {{ 'account.bank_manat_account'|_}}:
- 23201934160147100066000 + {{ manat_account }}
@@ -83,7 +83,7 @@ {{ 'account.bank_bab'|_ }}:
- 390101601 + {{ bab }}
@@ -91,7 +91,7 @@ {{ 'account.bank_correspondent_account'|_ }}:
- 21101934110100700005000 + {{ correspondent_account }}
diff --git a/plugins/tps/birzha/models/Settings.php b/plugins/tps/birzha/models/Settings.php index f4be88def..fcd1ac740 100644 --- a/plugins/tps/birzha/models/Settings.php +++ b/plugins/tps/birzha/models/Settings.php @@ -15,7 +15,7 @@ class Settings extends Model public $settingsCode = 'birzha_settings'; - public $translatable = ['address','site_name', 'short_name']; + public $translatable = ['address','site_name', 'short_name', 'bank_address']; /** * Get setting value diff --git a/plugins/tps/birzha/models/settings/fields.yaml b/plugins/tps/birzha/models/settings/fields.yaml index 481bf87fe..2404678a6 100644 --- a/plugins/tps/birzha/models/settings/fields.yaml +++ b/plugins/tps/birzha/models/settings/fields.yaml @@ -54,3 +54,24 @@ tabs: label: Product display duration comment: In days span: right + tax_code: + tab: Bank Info + label: Salgyt kody (Налоговый код) + span: left + bab: + tab: Bank Info + label: BAB (МФО) + span: right + manat_account: + tab: Bank Info + label: Manat hasaby (Манатный счёт) + span: left + correspondent_account: + tab: Bank Info + label: Korrespondent hasaby (Корреспондент счет) + span: right + bank_address: + tab: Bank Info + label: Bank address + span: left + diff --git a/themes/birzha/layouts/default.htm b/themes/birzha/layouts/default.htm index 9c4b03f15..c07a7e568 100644 --- a/themes/birzha/layouts/default.htm +++ b/themes/birzha/layouts/default.htm @@ -25,6 +25,10 @@ function onStart(){ $this['email'] = TPS\Birzha\Models\Settings::getValue('email'); $this['address'] = TPS\Birzha\Models\Settings::getValue('address'); $this['short_name'] = TPS\Birzha\Models\Settings::getValue('short_name'); + $this['tax_code'] = TPS\Birzha\Models\Settings::getValue('tax_code'); + $this['bab'] = TPS\Birzha\Models\Settings::getValue('bab'); + $this['manat_account'] = TPS\Birzha\Models\Settings::getValue('manat_account'); + $this['correspondent_account'] = TPS\Birzha\Models\Settings::getValue('correspondent_account'); } ?> == From 794c3c22f59b0b9ba5b1ef5ce9280e16050f7c5c Mon Sep 17 00:00:00 2001 From: saparatayev Date: Fri, 12 Nov 2021 16:13:20 +0500 Subject: [PATCH 5/6] fix: frontend mobile --- themes/birzha/assets/css/main.css | 328 +++++++++++++----- .../birzha/assets/images/svg/user-profile.svg | 4 + themes/birzha/assets/js/main.js | 42 ++- themes/birzha/partials/header.htm | 174 +++++----- 4 files changed, 369 insertions(+), 179 deletions(-) create mode 100644 themes/birzha/assets/images/svg/user-profile.svg diff --git a/themes/birzha/assets/css/main.css b/themes/birzha/assets/css/main.css index 3169cd3d6..3c1c26749 100644 --- a/themes/birzha/assets/css/main.css +++ b/themes/birzha/assets/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; } @@ -461,8 +484,8 @@ li { justify-content: center; position: absolute; - /* top: calc(100% + 52px); */ - bottom: -440px; + top: calc(100% + 52px); + /* bottom: -440px; */ right: 0; /* left: -30px; */ @@ -596,6 +619,28 @@ li { .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 { @@ -623,22 +668,6 @@ 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; @@ -901,31 +930,6 @@ 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%; @@ -1225,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; @@ -1580,7 +1609,7 @@ li { font-size: var(--text-16); font-weight: 400; line-height: 1.4; - color: var(--rgba-black); + color: #a8a8a8; } .item_num { @@ -1801,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); @@ -3936,7 +3965,8 @@ li { } .profile_drop { - bottom: -441px; + /* bottom: -441px; */ + top: calc(100% + 52px); } } @@ -4016,7 +4046,7 @@ li { } .tab_link { - width: calc(50% - 40px); + width: calc(50% - 60px); margin-bottom: 30px; } @@ -4026,7 +4056,8 @@ li { } */ .profile_drop { - bottom: -431px; + /* bottom: -431px; */ + top: calc(100% + 41px); } /* Basket =============== */ @@ -4267,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; } @@ -4331,7 +4480,6 @@ li { -moz-flex-direction: column; -webkit-flex-direction: column; justify-content: center; - } .profile_head { @@ -4342,7 +4490,8 @@ li { .profile_drop { right: 0; left: unset; - bottom: -416px; + /* bottom: -416px; */ + top: calc(100% + 25px); width: 320px; } @@ -4637,7 +4786,7 @@ li { } .tab_link { - width: calc(50% - 20px); + width: calc(50% - 40px); margin-bottom: 20px; margin-right: 20px; } @@ -4713,7 +4862,7 @@ li { -webkit-flex-direction: column-reverse; } - .profile_head .profile_item{ + .profile_head .profile_item { margin-top: 10px; } @@ -4851,17 +5000,23 @@ 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; - width: 100%; padding: 15px; + width: 100%; font-size: 16px; } @@ -4870,18 +5025,12 @@ li { 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; + .balance_link:last-child { + margin: 0 !important; } .post_input label { @@ -4923,7 +5072,8 @@ li { .profile_drop { width: 270px; - bottom: -445px; + /* bottom: -445px; */ + top: calc(100% + 52px); font-size: 14px; right: unset; left: 50%; @@ -5032,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%; } @@ -5118,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 { @@ -5343,7 +5510,8 @@ li { .profile_drop { width: 300px; - bottom: -360px; + /* bottom: -360px; */ + top: calc(100% + 52px); font-size: 14px; right: -72px; margin-bottom: 0; @@ -5356,6 +5524,7 @@ li { .logo_text { font-size: 13px; + width: 200px; } .footer_img { @@ -5500,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/themes/birzha/assets/images/svg/user-profile.svg b/themes/birzha/assets/images/svg/user-profile.svg new file mode 100644 index 000000000..856c52fba --- /dev/null +++ b/themes/birzha/assets/images/svg/user-profile.svg @@ -0,0 +1,4 @@ + + + + diff --git a/themes/birzha/assets/js/main.js b/themes/birzha/assets/js/main.js index 004484a85..59ea0ae99 100644 --- a/themes/birzha/assets/js/main.js +++ b/themes/birzha/assets/js/main.js @@ -9,7 +9,7 @@ const selectElement = function (element) { // selector end============= let drop = document.querySelectorAll('.profile_drop'); -let profile_head = document.querySelectorAll('.profile_bio'); +let profile_head = document.querySelectorAll('.profile_head'); let register = document.querySelector('.register'); let register_btn = document.querySelectorAll('.register_btn'); let log_in = document.querySelectorAll('.log_in'); @@ -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/partials/header.htm b/themes/birzha/partials/header.htm index 092ca93db..a5e4c4849 100644 --- a/themes/birzha/partials/header.htm +++ b/themes/birzha/partials/header.htm @@ -102,9 +102,10 @@ code = "main-top"
{% else %} -
-
- + + + -
+
@@ -121,9 +122,6 @@ code = "main-top" {{user.balance}} TMT
-
- -
@@ -187,6 +185,86 @@ code = "main-top"
+ + + + {% if user %} + + {% endif %}
{% endif %}
@@ -227,87 +305,7 @@ code = "main-top"
- {% else %} -
- - - -
- -
-
- {{ 'auth.add_announce'|_ }} -
-
-
+ {% endif %} From f71a82b5e50ecce63c95fd497fc9e24f7cfb731f Mon Sep 17 00:00:00 2001 From: Meylis Gazakow Date: Fri, 12 Nov 2021 20:42:38 +0300 Subject: [PATCH 6/6] js correction --- shablon/js/main.js | 22 +++++++++++----------- themes/birzha/assets/js/main.js | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/shablon/js/main.js b/shablon/js/main.js index 59ea0ae99..45a882b86 100644 --- a/shablon/js/main.js +++ b/shablon/js/main.js @@ -88,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 (drop.classList.contains('active') && !e.target.closest('.profile_head')) { + // 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')) { diff --git a/themes/birzha/assets/js/main.js b/themes/birzha/assets/js/main.js index 59ea0ae99..45a882b86 100644 --- a/themes/birzha/assets/js/main.js +++ b/themes/birzha/assets/js/main.js @@ -88,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 (drop.classList.contains('active') && !e.target.closest('.profile_head')) { + // 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')) {