From 87e90d71522ebc85310cba08b4285bb9dae0d7a5 Mon Sep 17 00:00:00 2001 From: ArtemB Date: Tue, 5 Dec 2023 16:58:32 +0300 Subject: [PATCH] 0.0.316 add new language flags --- static/css/mobile_styles.css | 9 +++++++++ static/css/styles.css | 21 +++++++++++++-------- static/img/svg/gb.svg | 7 +++++++ static/img/svg/ru.svg | 7 +++++++ static/js/global_js.js | 10 ++++++---- 5 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 static/img/svg/gb.svg create mode 100644 static/img/svg/ru.svg diff --git a/static/css/mobile_styles.css b/static/css/mobile_styles.css index 02247c7..295b63d 100644 --- a/static/css/mobile_styles.css +++ b/static/css/mobile_styles.css @@ -23,6 +23,14 @@ .header_logo, .header_btn_mover{ margin-right: 20px; } + .dropbtn_lang{ + padding: 2px 0.5px; + border-radius: 12px; + + } + #ru_lang,#en_lang{ + padding: unset; + } #customer_service{ margin-right: 10px; @@ -283,6 +291,7 @@ } .button_profile_header_mobile{ display: inline-block ; + margin-left: 5px; } .header_logo_mobile { margin-right: 37px; diff --git a/static/css/styles.css b/static/css/styles.css index 8a00799..2383d13 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -688,8 +688,9 @@ span.btn_profile_name { /*Language select*/ .dropbtn_lang { - padding: 7px 0 7px 0; + padding: 8px 6.5px; cursor: pointer; + border-radius: 23px; } /* The container
- needed to position the dropdown content */ @@ -708,9 +709,9 @@ span.btn_profile_name { .dropbtn_lang { - background: url('/static/img/png/ru.png') no-repeat left center; - padding-left: 25px; - width: 40px; + background: url('/static/img/svg/ru.svg') no-repeat left center; + /*padding-left: 25px;*/ + /*width: 40px;*/ color: transparent; } @@ -726,16 +727,19 @@ span.btn_profile_name { #ru_lang { - background: url('/static/img/png/ru.png') no-repeat left center; + background: url('/static/img/svg/ru.svg') no-repeat center; color: transparent; - padding: 10px; + padding: 6px; + margin: 5px 0; + border-radius: 5px; } #en_lang { - background: url('/static/img/png/en.png') no-repeat left center; + background: url('/static/img/svg/gb.svg') no-repeat center; color: transparent; - padding: 10px; + padding: 6px; + border-radius: 5px; } /* Links inside the dropdown */ @@ -762,6 +766,7 @@ span.btn_profile_name { .header-second>div>img{ margin-right: 5px; + margin-left: 10px; } #customer_service{ margin-right: 35px; diff --git a/static/img/svg/gb.svg b/static/img/svg/gb.svg new file mode 100644 index 0000000..ef048dc --- /dev/null +++ b/static/img/svg/gb.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/static/img/svg/ru.svg b/static/img/svg/ru.svg new file mode 100644 index 0000000..d643087 --- /dev/null +++ b/static/img/svg/ru.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/static/js/global_js.js b/static/js/global_js.js index 5d0f8a5..782217a 100644 --- a/static/js/global_js.js +++ b/static/js/global_js.js @@ -49,14 +49,16 @@ function getInfoAboutUser (){ document.addEventListener('DOMContentLoaded', function() { let img = document.getElementById('dropbtn_lang') if (window.location.href.indexOf("ru") > -1){ - img.style.background = "url('/static/img/png/ru.png')" + img.style.background = "url('/static/img/svg/ru.svg')" img.style.backgroundRepeat = "no-repeat" - img.style.backgroundPosition = "left center" + img.style.backgroundPosition = "center" + // img.style.backgroundSize = '50%' }else if(window.location.href.indexOf("en") > -1){ - img.style.background = "url('/static/img/png/en.png')" + img.style.background = "url('/static/img/svg/gb.svg')" img.style.backgroundRepeat = "no-repeat" - img.style.backgroundPosition = "left center" + img.style.backgroundPosition = "center" + // img.style.backgroundSize = '50%' } });