diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 2a59978..4d62111 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -28,7 +28,7 @@ } .wrapper_main{ - max-width: 1280px; + max-width: 1720px; margin: auto; } diff --git a/static/css/styles.css b/static/css/styles.css index b126b29..9d921eb 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -153,7 +153,7 @@ html, body{ .wrapper_content { margin: 20px; - max-width: 1280px; + max-width: 1720px; position: relative; min-height: 695px; max-height: 100%; diff --git a/static/v2/css/forms.css b/static/v2/css/forms.css index def3385..3a5717a 100644 --- a/static/v2/css/forms.css +++ b/static/v2/css/forms.css @@ -11,6 +11,12 @@ --label-font-size: 16px; --label-font-weight: 500; + --textarea-min-width: 100%; + --textarea-max-width: 100%; + --textarea-width: 100%; + --textarea-height: unset; + --textarea-resize: none; + box-sizing: border-box; label{ display: block; @@ -27,9 +33,37 @@ input{ padding: 20px 10px; - border: 1px solid var(--input-border); + border: 2px solid var(--input-border); border-radius: var(--input-border-radius); font-size: var(--input-font-size); + font-family: var(--main-font-family), serif; + box-sizing: border-box; + outline: none; + &.dropped{ + border: none; + outline: none; + background: none; + padding: 0; + border-radius: 0; + } + &::placeholder{ + font-size: var(--placeholder-font-size); + color: var(--placeholder-color); + } + } + textarea{ + padding: 20px 10px; + border: 2px solid var(--input-border); + border-radius: var(--input-border-radius); + font-size: var(--input-font-size); + font-family: var(--main-font-family), serif; + min-width: var(--textarea-min-width); + max-width: var(--textarea-max-width); + width: var(--textarea-width); + height: var(--textarea-height); + resize: var(--textarea-resize); + outline: none; + box-sizing: border-box; &::placeholder{ font-size: var(--placeholder-font-size); color: var(--placeholder-color); diff --git a/static/v2/css/forms/f_make_poster_order.css b/static/v2/css/forms/f_make_poster_order.css new file mode 100644 index 0000000..77647ee --- /dev/null +++ b/static/v2/css/forms/f_make_poster_order.css @@ -0,0 +1,9 @@ +.f_make_poster_order{ + .form_line{ + padding: 40px 0; + border-bottom: 1px solid #E6E6E6; + &:last-of-type{ + border-bottom: none; + } + } +} \ No newline at end of file diff --git a/static/v2/css/twb.css b/static/v2/css/twb.css new file mode 100644 index 0000000..da7352c --- /dev/null +++ b/static/v2/css/twb.css @@ -0,0 +1,7 @@ +:root{ + --main-font-family: 'Inter'; +} + +.trans_block{ + display: none!important; +} \ No newline at end of file diff --git a/static/v2/css/widgets/w_datarangepicker.css b/static/v2/css/widgets/w_datarangepicker.css new file mode 100644 index 0000000..485a197 --- /dev/null +++ b/static/v2/css/widgets/w_datarangepicker.css @@ -0,0 +1,20 @@ +.w_daterangepicker{ + --range-picker-border: #E6E6E6; + --range-picker-border-radius: 10px; + .date_range_input_cont{ + display: flex; + justify-content: space-between; + gap: 10px; + border: 2px solid var(--range-picker-border); + border-radius: var(--range-picker-border-radius); + padding: 24px 10px; + background: #FFFFFF; + input{ + width: calc(100% - 28px); + } + img{ + width: 18px; + height: 20px; + } + } +} \ No newline at end of file diff --git a/static/v2/css/widgets/w_pay_attention.css b/static/v2/css/widgets/w_pay_attention.css new file mode 100644 index 0000000..51a7d38 --- /dev/null +++ b/static/v2/css/widgets/w_pay_attention.css @@ -0,0 +1,15 @@ +.w_pay_attention { + --pay-attenttion-text-color: #27242499; + display: flex; + align-items: center; + gap: 5px; + margin-top: 20px; + img{ + height: 24px; + width: 24px; + display: block; + } + div{ + color: var(--pay-attenttion-text-color); + } +} \ No newline at end of file diff --git a/static/v2/css/widgets/w_radio_inputs.css b/static/v2/css/widgets/w_radio_inputs.css new file mode 100644 index 0000000..5042f13 --- /dev/null +++ b/static/v2/css/widgets/w_radio_inputs.css @@ -0,0 +1,29 @@ +.w_radio_inputs{ + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 20px 40px; + margin-top: 20px; + --radio-font-size: 16px; + .cw_w_radio_inputs_radio_input{ + display: flex; + align-items: center; + gap: 10px; + .radio{ + background: #FFFFFF; + border: 1px solid #E6E6E6; + height: 30px; + width: 30px; + border-radius: 10px; + &:hover{ + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12); + } + &.checked{ + background: #FF613A; + box-shadow: 0 -1px 10px rgba(198, 199, 203, 0.2), -1px 4px 10px rgba(198, 199, 203, 0.2); + } + } + .radio_label{ + font-size: var(--radio-font-size); + } + } +} \ No newline at end of file diff --git a/static/v2/css/widgets/w_select_country.css b/static/v2/css/widgets/w_select_country.css index 1d18b13..5807be4 100644 --- a/static/v2/css/widgets/w_select_country.css +++ b/static/v2/css/widgets/w_select_country.css @@ -1,9 +1,9 @@ .w_select_country { position: relative; - --header-padding: 10px 20px; + --header-padding: 20px 10px; --select-border: #E6E6E6; --select-border-radius: 10px 10px 0 0; - --select-height: 48px; + --select-height: 68px; &.closed{ --select-border-radius: 10px; @@ -15,9 +15,9 @@ align-items: center; gap: 10px; justify-content: space-between; - border: 1px solid var(--select-border); + border: 2px solid var(--select-border); border-radius: var(--select-border-radius); - padding: 10px; + padding: 19px 10px; background: #FFFFFF; .select_country_header_left_part{ @@ -44,12 +44,7 @@ } } input{ - border: none; - outline: none; - background: none; - padding: 0; flex-grow: 1; - border-radius: 0; } } .w_select_country_icon{ @@ -68,22 +63,14 @@ max-height: 200px; overflow: auto; - &::-webkit-scrollbar-thumb { - background-color: #CCCED1FF; - border-radius: 5px; - width: 6px; - display: block; - border: 1px solid #EDEDEDFF; - transition: 200ms all; - } &::-webkit-scrollbar { - background-color: #EDEDEDFF; - width: 8px; - display: block; - padding-left: 15px; - transition: 500ms all; - opacity: 100%; - border-radius: 5px; + width: 10px; + + } + &::-webkit-scrollbar-thumb { + background-color: #FF613A; + border-radius: 20px; + border: 3px solid white; } } .cw_w_select_widget_for_select{ diff --git a/static/v2/css/widgets/w_textarea_w_counter.css b/static/v2/css/widgets/w_textarea_w_counter.css new file mode 100644 index 0000000..fca3ad7 --- /dev/null +++ b/static/v2/css/widgets/w_textarea_w_counter.css @@ -0,0 +1,10 @@ +.w_textarea_w_counter { + --counter-font-size: 14px; + --counter-color: #27242499; + .symbols_counter{ + width: 100%; + text-align: right; + font-size: var(--counter-font-size); + color: var(--counter-color); + } +} \ No newline at end of file diff --git a/static/v2/icons/widgets/w_datarangepicker/datarangepicker_icon.svg b/static/v2/icons/widgets/w_datarangepicker/datarangepicker_icon.svg new file mode 100644 index 0000000..0cb5a16 --- /dev/null +++ b/static/v2/icons/widgets/w_datarangepicker/datarangepicker_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/v2/icons/widgets/w_pay_attention/attention_icon.svg b/static/v2/icons/widgets/w_pay_attention/attention_icon.svg new file mode 100644 index 0000000..4ffcf68 --- /dev/null +++ b/static/v2/icons/widgets/w_pay_attention/attention_icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/static/v2/js/service/trans.js b/static/v2/js/service/trans.js new file mode 100644 index 0000000..9c6094b --- /dev/null +++ b/static/v2/js/service/trans.js @@ -0,0 +1,5 @@ +function getTransFromEl (el) { + if (!el) return; + let trans_block = el.querySelector('.trans_block'); + return trans_block.dataset.trans +} \ No newline at end of file diff --git a/static/v2/js/widgets/w_daterangepicker.js b/static/v2/js/widgets/w_daterangepicker.js new file mode 100644 index 0000000..dd71a62 --- /dev/null +++ b/static/v2/js/widgets/w_daterangepicker.js @@ -0,0 +1,51 @@ +const locale_ru = new Object({ + direction: "ltr", + format: "DD.MM.YYYY", + separator: " - ", + applyLabel: "Принять", + cancelLabel: "Отменить", + weekLabel: "Н", + customRangeLabel: "Custom Range", +}); + +const locale_en = new Object({ + direction: "ltr", + format: "DD.MM.YYYY", + separator: " - ", + applyLabel: "Apply", + cancelLabel: "Cancel", + weekLabel: "W", + customRangeLabel: "Custom Range", +}); + +let last_opened_daterangepicker = false; + +function setLocalSets() { + let locale_lang = document.documentElement.lang === 'ru'? locale_ru : locale_en; + let lang = document.documentElement.lang; + + moment.locale(lang); + + return locale_lang +} + +$(function (){daterangepickerInit($('.date_range_input_cont input'), daterangepickerInit)}) + +function daterangepickerInit(el, callback) { + $('.date_range_input_cont input').daterangepicker({ + "autoapply": true, + "linkedCalendars": false, + "singleDatePicker": true, + "timePicker": false, + "timePicker24Hour": false, + "minDate": moment(), + "locale": setLocalSets(), + }, function (start, end, label) { + let $parent = el.closest('.w_daterangepicker') + if (last_opened_daterangepicker) $parent = last_opened_daterangepicker.closest('.w_daterangepicker'); + let $input = $parent.find(".date_range_input_cont input") + $input.val(start.format('DD.MM.YYYY')); + if (callback) callback(el) + }); +} + diff --git a/static/v2/js/widgets/w_radio_inputs.js b/static/v2/js/widgets/w_radio_inputs.js new file mode 100644 index 0000000..df927a4 --- /dev/null +++ b/static/v2/js/widgets/w_radio_inputs.js @@ -0,0 +1,14 @@ +function chooseRadioInput(el, callback){ + if (!el) return; + let $parent = el.closest('.w_radio_inputs'); + if (!$parent) return; + + let $radios = $parent.querySelectorAll('.radio'); + $radios.forEach(radio => { + radio.classList.remove('checked') + }) + el.classList.toggle("checked"); + + let checked_state = el.classList.contains("checked"); + if (callback) callback(checked_state) +} \ No newline at end of file diff --git a/static/v2/js/widgets/w_select_country.js b/static/v2/js/widgets/w_select_country.js index 04d6aa7..58e5d3f 100644 --- a/static/v2/js/widgets/w_select_country.js +++ b/static/v2/js/widgets/w_select_country.js @@ -39,11 +39,15 @@ let search_country_timeout = false; function searchCountry(el) { resetCountrySelect(el) closeSelectCountry(el) + if (el && el.value.length < 3) closeSelectCountry(el) if (!el || el.value.length < 3) return; let $parent = el.closest('.w_select_country'); + let $search_icon_cont = $parent.querySelector('.w_select_country_icon'); let $content_part = $parent.querySelector('.w_select_country_content'); + $search_icon_cont.src = '/static/v2/loaders/search_spinner.svg' + if (search_country_timeout) { clearTimeout(search_country_timeout); search_country_timeout = false; @@ -59,6 +63,7 @@ function searchCountry(el) { data_type: 'json', success: function (data) { if (!data.res_search_list && data.res_search_list !== '') console.log(`request data has not html => ${url}`); + $search_icon_cont.src = '/static/v2/icons/widgets/w_select_country/pin.svg' $content_part.innerHTML = data.res_search_list; openSelectCountry(el) }, error: function (data) { diff --git a/static/v2/js/widgets/w_textarea_w_counter.js b/static/v2/js/widgets/w_textarea_w_counter.js new file mode 100644 index 0000000..ca64c81 --- /dev/null +++ b/static/v2/js/widgets/w_textarea_w_counter.js @@ -0,0 +1,15 @@ +function textareaInputE (el, callback){ + if (!el) return; + + let $counter = $(".symbols_counter")[0] + let $parent = el.closest(".w_textarea_w_counter") + + if (el.value.length > $parent.dataset.max_val){ + el.value = el.value.slice(0, -1) + return; + } + let str = `${el.value.length} ${getTransFromEl($parent)} ${$parent.dataset.max_val}` + $counter.innerHTML = str + + if (callback) callback(str) +} \ No newline at end of file diff --git a/static/v2/loaders/search_spinner.svg b/static/v2/loaders/search_spinner.svg new file mode 100644 index 0000000..bee2fe2 --- /dev/null +++ b/static/v2/loaders/search_spinner.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/pages/profile/p_user_profile.html b/templates/pages/profile/p_user_profile.html index 2ad7c8b..640a246 100644 --- a/templates/pages/profile/p_user_profile.html +++ b/templates/pages/profile/p_user_profile.html @@ -31,6 +31,9 @@ + + + {% include "connect_ws_js.html" %} diff --git a/templates/tb_base.html b/templates/tb_base.html index 997732f..7cfc06d 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -84,6 +84,7 @@ function gtag_report_conversion(url) { + @@ -95,6 +96,7 @@ function gtag_report_conversion(url) { + @@ -102,7 +104,6 @@ function gtag_report_conversion(url) { {# #} - diff --git a/templates/v2/blocks/b_make_poster_order.html b/templates/v2/blocks/b_make_poster_order.html index 4d911d3..3fae2c7 100644 --- a/templates/v2/blocks/b_make_poster_order.html +++ b/templates/v2/blocks/b_make_poster_order.html @@ -1,8 +1,14 @@ {% load static %} {% load i18n %} - + + + + + + +
{% trans "Заполните форму, чтобы отправить посылку" %}
diff --git a/templates/v2/content_widgets/cw_w_radio_inputs_radio_input.html b/templates/v2/content_widgets/cw_w_radio_inputs_radio_input.html new file mode 100644 index 0000000..15fedf7 --- /dev/null +++ b/templates/v2/content_widgets/cw_w_radio_inputs_radio_input.html @@ -0,0 +1,7 @@ +{% load static %} +{% load i18n %} + +
+
+
{{ item.1 }}
+
\ No newline at end of file diff --git a/templates/v2/forms/f_make_poster_order.html b/templates/v2/forms/f_make_poster_order.html index 433a344..03e9acb 100644 --- a/templates/v2/forms/f_make_poster_order.html +++ b/templates/v2/forms/f_make_poster_order.html @@ -5,13 +5,54 @@ {% trans "Укажите город" as placeholder_for_city %}
-
+
{% include 'v2/widgets/w_select_country.html' with name='from_city' placeholder=placeholder_for_city %}
-
+
{% include 'v2/widgets/w_select_country.html' with name='to_city' placeholder=placeholder_for_city %}
+
+
+ + {% include 'v2/widgets/w_radio_inputs.html' with name='cargo_type' list=form.fields.cargo_type.choices %} +
+
+
+
+ + {% include 'v2/widgets/w_daterangepicker.html' with name='arrival_DT' %} +
+
+
+
+ {% trans "Обязательно учитывайте Правила и особенности перевозки выбранным Вами видом транспорта" as attention_type_transport %} + + {% include 'v2/widgets/w_radio_inputs.html' with name='type_transport' list=form.fields.type_transport.choices %} + {% include 'v2/widgets/w_pay_attention.html' with text=attention_type_transport %} +
+
+
+
+ {% trans "Если вы оставите это поле пустым - перевозчики смогут только написать вам в личные сообщения на нашем сайте TripWB.com" as attention_phone %} + + + {% include 'v2/widgets/w_pay_attention.html' with text=attention_phone %} +
+
+
+
+ {% trans 'Если желаете, то здесь можно указать важную информацию, например: вес, габариты посылки, количество попутчиков и т.д.)' as comment_placeholder %} + + {% include 'v2/widgets/w_textarea_w_counter.html' with name='comment' placeholder=comment_placeholder max_val='300' %} +
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/templates/v2/widgets/w_daterangepicker.html b/templates/v2/widgets/w_daterangepicker.html new file mode 100644 index 0000000..6304b45 --- /dev/null +++ b/templates/v2/widgets/w_daterangepicker.html @@ -0,0 +1,9 @@ +{% load static %} +{% load i18n %} + +
+
+ + +
+
\ No newline at end of file diff --git a/templates/v2/widgets/w_pay_attention.html b/templates/v2/widgets/w_pay_attention.html new file mode 100644 index 0000000..e30cfe8 --- /dev/null +++ b/templates/v2/widgets/w_pay_attention.html @@ -0,0 +1,7 @@ +{% load static %} +{% load i18n %} + +
+ +
{{ text }}
+
\ No newline at end of file diff --git a/templates/v2/widgets/w_radio_inputs.html b/templates/v2/widgets/w_radio_inputs.html new file mode 100644 index 0000000..a8bdcee --- /dev/null +++ b/templates/v2/widgets/w_radio_inputs.html @@ -0,0 +1,8 @@ +{% load static %} +{% load i18n %} + +
+ {% for item in list %} + {% include 'v2/content_widgets/cw_w_radio_inputs_radio_input.html' %} + {% endfor %} +
\ No newline at end of file diff --git a/templates/v2/widgets/w_select_country.html b/templates/v2/widgets/w_select_country.html index d52ae23..a6b7d1f 100644 --- a/templates/v2/widgets/w_select_country.html +++ b/templates/v2/widgets/w_select_country.html @@ -8,7 +8,7 @@
- +
diff --git a/templates/v2/widgets/w_textarea_w_counter.html b/templates/v2/widgets/w_textarea_w_counter.html new file mode 100644 index 0000000..51f2eb7 --- /dev/null +++ b/templates/v2/widgets/w_textarea_w_counter.html @@ -0,0 +1,7 @@ +{% load static %} +{% load i18n %} +
+
+ +
0 {% trans "из" %} {{ max_val }}
+
\ No newline at end of file