diff --git a/static/css/styles.css b/static/css/styles.css index 52a5e1a..7324a93 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -154,7 +154,7 @@ html, body{ .wrapper_content { margin: 20px; max-width: 1720px; - position: relative; + /*position: relative;*/ min-height: 695px; max-height: 100%; } diff --git a/static/v2/css/blocks/b_login_modal.css b/static/v2/css/blocks/b_login_modal.css new file mode 100644 index 0000000..c97c7ae --- /dev/null +++ b/static/v2/css/blocks/b_login_modal.css @@ -0,0 +1,91 @@ +.b_login_modal { + position: fixed; + top: 0; + left: 0; + + width: 100%; + height: 100%; + + --modal-width: 690px; + --modal-height: 492px; + --modal-padding: 28px 28.7px 40px 52px; + + box-sizing: border-box; + + z-index: 10000000; + + .b_login_modal_container_content{ + position: fixed; + background: #FFFFFF; + box-shadow: 0 3px 14px rgba(74, 58, 255, 0.03), 0 -2px 4px rgba(20, 20, 43, 0.12), 0 12px 44px rgba(20, 20, 43, 0.34); + border-radius: 30px; + + width: var(--modal-width); + height: var(--modal-height); + padding: var(--modal-padding); + + left: calc(50% - (var(--modal-width) / 2)); + top: calc(50% - (var(--modal-height) / 2)); + z-index: 1000000000; + + box-sizing: border-box; + } + + .b_login_modal_content{ + position: relative; + + text-align: -webkit-center; + } + + .xmark{ + position: absolute; + top: 0; + right: 0; + width: 16px; + height: 16px; + display: block; + cursor: pointer; + } + + .lock_img_container{ + position: relative; + background: #E1E1E1; + border-radius: 39px; + margin-top: 8px; + width: 140px; + height: 140px; + img{ + width: 130px; + height: 130px; + position: absolute; + top: 5px; + left: 5px; + } + } + + .modal_title{ + margin-top: 40px; + + font-size: 34px; + font-weight: 700; + color: #272424; + } + + .modal_description{ + margin: 20px 0; + + font-size: 20px; + font-weight: 400; + color: #272424; + + width: 495px; + overflow-wrap: break-word; + } + + .registr_btn{ + margin-top: 10px; + font-size: 18px; + font-weight: 600; + color: #27242499; + } +} \ No newline at end of file diff --git a/static/v2/css/service/btns.css b/static/v2/css/service/btns.css new file mode 100644 index 0000000..88a8411 --- /dev/null +++ b/static/v2/css/service/btns.css @@ -0,0 +1,27 @@ +.primary_btn{ + --background: #FF613A; + --border: none; + --box-shadow: 0px 3px 12px rgba(74, 58, 255, 0.18); + --border-radius: 10px; + --margin: 0; + --padding: 19px 0 21px 0; + + --font-size: 18px; + --font-weight: 700; + --color: #FFFFFF; + --text-align: center; + + background: var(--background); + border: var(--border); + box-shadow: var(--box-shadow); + border-radius: var(--border-radius); + margin: var(--margin); + padding: var(--padding); + + font-size: var(--font-size); + font-weight: var(--font-weight); + color: var(--color); + text-align: var(--text-align); + + cursor: pointer; +} \ No newline at end of file diff --git a/static/v2/css/service/modal.css b/static/v2/css/service/modal.css new file mode 100644 index 0000000..0353526 --- /dev/null +++ b/static/v2/css/service/modal.css @@ -0,0 +1,15 @@ +.modal { + display: none; + &.open{ + display: block; + } + .overlay{ + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #0000009C; + z-index: 10000000; + } +} \ No newline at end of file diff --git a/static/v2/icons/blocks/b_login_modal/lock.png b/static/v2/icons/blocks/b_login_modal/lock.png new file mode 100644 index 0000000..4f552bd Binary files /dev/null and b/static/v2/icons/blocks/b_login_modal/lock.png differ diff --git a/static/v2/icons/service/modal/xmark.svg b/static/v2/icons/service/modal/xmark.svg new file mode 100644 index 0000000..7d93344 --- /dev/null +++ b/static/v2/icons/service/modal/xmark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/static/v2/js/service/modal.js b/static/v2/js/service/modal.js new file mode 100644 index 0000000..91c9b55 --- /dev/null +++ b/static/v2/js/service/modal.js @@ -0,0 +1,6 @@ +function closeModal(el) { + let $parent = el.closest('.modal'); + $parent.classList.remove('open'); + + $("body")[0].style.overflow = "auto"; +} \ No newline at end of file diff --git a/static/v2/js/widgets/w_route_card.js b/static/v2/js/widgets/w_route_card.js index 243ffed..531b81d 100644 --- a/static/v2/js/widgets/w_route_card.js +++ b/static/v2/js/widgets/w_route_card.js @@ -116,14 +116,19 @@ function highlightRoute(el) { request.ajaxRequest() } -function respondBtnClickEvent(el) { +function respondBtnClickEvent(el, authentificated) { if (!el) return; - let $parent = el.closest(".w_route_card") - let $responde_cont = $parent.querySelector(".respond_route_cont") - if (window.innerWidth < 1160) $responde_cont = $parent.querySelector(".respond_route_cont.mobile") + if (authentificated !== 'False') { + let $parent = el.closest(".w_route_card") + let $responde_cont = $parent.querySelector(".respond_route_cont") + if (window.innerWidth < 1160) $responde_cont = $parent.querySelector(".respond_route_cont.mobile") - $(el).fadeOut(500); - sleep(500).then(() => { - $($responde_cont).fadeIn(500); - }) + $(el).fadeOut(500); + sleep(500).then(() => { + $($responde_cont).fadeIn(500); + }) + } else { + $(".b_login_modal").addClass('open'); + $("body")[0].style.overflow = "hidden"; + } } \ No newline at end of file diff --git a/templates/tb_base.html b/templates/tb_base.html index 652488e..5c23975 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -91,6 +91,8 @@ function gtag_report_conversion(url) { + + @@ -100,6 +102,7 @@ function gtag_report_conversion(url) { + diff --git a/templates/v2/blocks/b_login_modal.html b/templates/v2/blocks/b_login_modal.html new file mode 100644 index 0000000..9c9085b --- /dev/null +++ b/templates/v2/blocks/b_login_modal.html @@ -0,0 +1,19 @@ +{% load static %} +{% load i18n %} + + + \ No newline at end of file diff --git a/templates/v2/content_widgets/w_route_card/route_card_actions_container_for_search.html b/templates/v2/content_widgets/w_route_card/route_card_actions_container_for_search.html index 37da3af..94c823a 100644 --- a/templates/v2/content_widgets/w_route_card/route_card_actions_container_for_search.html +++ b/templates/v2/content_widgets/w_route_card/route_card_actions_container_for_search.html @@ -10,6 +10,6 @@ -
+
{% trans "Откликнуться" %}
\ No newline at end of file diff --git a/templates/v2/content_widgets/w_route_card/route_card_info_data_for_search.html b/templates/v2/content_widgets/w_route_card/route_card_info_data_for_search.html index 94ee74a..5306b18 100644 --- a/templates/v2/content_widgets/w_route_card/route_card_info_data_for_search.html +++ b/templates/v2/content_widgets/w_route_card/route_card_info_data_for_search.html @@ -20,7 +20,7 @@
-
+
{% trans "Откликнуться" %}
@@ -59,10 +59,12 @@ {% trans "Комментарий отсутствует" %} {% endif %} -
- -
{% trans "Текст сообщения доступен только авторизированным пользователям." %}
-
+ {% if not user.if_authenticated %} +
+ +
{% trans "Текст сообщения доступен только авторизированным пользователям." %}
+
+ {% endif %}
{% trans "Объявление №" %} {{ route.id }}
\ No newline at end of file diff --git a/templates/v2/pages/p_search_route_results.html b/templates/v2/pages/p_search_route_results.html index 815a75f..73b41e7 100644 --- a/templates/v2/pages/p_search_route_results.html +++ b/templates/v2/pages/p_search_route_results.html @@ -19,6 +19,7 @@ {% block content %}
{% trans "Поиск посылки" %}
{% include 'v2/blocks/b_search_routes.html' %} + {% if not user.is_authenticated %}{% include 'v2/blocks/b_login_modal.html' %}{% endif %}
{% include "v2/blocks/b_filter_routes.html" %}