From f75e94f706b03a5986d93f05c1948c7763e8abde Mon Sep 17 00:00:00 2001 From: ArtemB Date: Fri, 12 Jan 2024 17:41:48 +0300 Subject: [PATCH 01/32] 0.1.335 upd cards_wrapper on main page --- static/css/mobile_styles.css | 68 +++++++++++++++--------------- static/css/styles.css | 82 ++++++++++++++++++++++++------------ templates/pages/p_main.html | 47 +++++++++++++++------ 3 files changed, 125 insertions(+), 72 deletions(-) diff --git a/static/css/mobile_styles.css b/static/css/mobile_styles.css index 272a04d..c85718e 100644 --- a/static/css/mobile_styles.css +++ b/static/css/mobile_styles.css @@ -71,41 +71,41 @@ left: 33%; } - .cards_item_1, - .cards_item_2, - .cards_item_3, - .cards_item_4 - { - width: 46%; - height: 180px; - background-size:60%; - } + /* .cards_item_1,*/ + /*.cards_item_2,*/ + /*.cards_item_3,*/ + /*.cards_item_4*/ + /*{*/ + /* width: 46%;*/ + /* height: 180px;*/ + /* background-size:60%;*/ + /*}*/ - .card_title_1{ - font-size: 34px; - font-style: normal; - font-weight: 700; - line-height: 42px; - margin: 22px 0 0 10px; - text-shadow: 1px 1px 0px #272424; - } - .card_title_2{ - font-size: 17px; - font-style: normal; - font-weight: 600; - line-height: 26px; - margin: 10px 0 0 10px; - text-shadow: 1px 1px 0px #272424; - } - .card_title_3{ - margin: 10px 0 0 10px; - width: 95%; - font-size: 12px; - font-style: normal; - font-weight: 400; - line-height: 20px; - text-shadow: 1px 1px 0px #272424; - } + /* .card_title_1{*/ + /* font-size: 34px;*/ + /* font-style: normal;*/ + /* font-weight: 700;*/ + /* line-height: 42px;*/ + /* margin: 22px 0 0 10px;*/ + /* text-shadow: 1px 1px 0px #272424;*/ + /*}*/ + /*.card_title_2{*/ + /* font-size: 17px;*/ + /* font-style: normal;*/ + /* font-weight: 600;*/ + /* line-height: 26px;*/ + /* margin: 10px 0 0 10px;*/ + /* text-shadow: 1px 1px 0px #272424;*/ + /*}*/ + /*.card_title_3{*/ + /* margin: 10px 0 0 10px;*/ + /* width: 95%;*/ + /* font-size: 12px;*/ + /* font-style: normal;*/ + /* font-weight: 400;*/ + /* line-height: 20px;*/ + /* text-shadow: 1px 1px 0px #272424;*/ + /*}*/ .sf_1_column { padding-left: 25px; padding-right: 90px; diff --git a/static/css/styles.css b/static/css/styles.css index a42f711..5812a2b 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -780,7 +780,7 @@ span.btn_profile_name { /*height: 60px;*/ font-size: 18px; font-weight: 500; - width: 100%; + width: 80%; margin-top: 10px; display: inline-block; @@ -2652,18 +2652,36 @@ button#send_feedback_form:active{ } .cards_wrapper{ - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: center; + /*display: flex;*/ + /*flex-direction: row;*/ + /*flex-wrap: wrap;*/ + /*justify-content: center;*/ + display: inline-block; +} +.cards_item_1, .cards_item_3{ + float: left; +} +.cards_item_2, .cards_item_4{ + float: right; +} +.cards_item_1>.cards_item_img>img, .cards_item_2>.cards_item_img>img, .cards_item_3>.cards_item_img>img, .cards_item_4>.cards_item_img>img{ + float: right; +} + +.cards_item_2>.cards_item_text>div, .cards_item_3>.cards_item_text>div{ + color: #1d1e20; } + + .cards_item_1{ + width: 48%; - height: 322px; + border-radius: 10px; - background: url(/static/img/png/cards_item_1.png) #1d1e20 50%; + /*background: url(/static/img/png/cards_item_1.png) #1d1e20 50%;*/ + background: #1d1e20 50%; background-repeat: no-repeat; background-position: right; @@ -2672,12 +2690,11 @@ button#send_feedback_form:active{ margin: 10px; } -.cards_item_1_left, -.cards_item_2_left, -.cards_item_3_left, -.cards_item_4_left{ - width: 55%; - float: left; +.cards_item_1, +.cards_item_2, +.cards_item_3, +.cards_item_4{ + height: 322px; } @@ -2694,9 +2711,10 @@ button#send_feedback_form:active{ .cards_item_2{ width: 48%; - height: 322px; + border-radius: 10px; - background: url(/static/img/png/cards_item_2.png) white 50%; + /*background: url(/static/img/png/cards_item_2.png) white 50%;*/ + background: white 50%; background-repeat: no-repeat; background-position: right; @@ -2706,13 +2724,23 @@ button#send_feedback_form:active{ } -.cards_item_2>div, -.cards_item_3>div{ - color: black; - text-shadow: none; - text-shadow: 1px 1px 0px #ffffff; +.cards_item_text { + float: left; + width: 50%; } +.cards_item_img { + float: right; + width: 50%; +} + +/*.cards_item_2>div,*/ +/*.cards_item_3>div{*/ +/* color: black;*/ +/* text-shadow: none;*/ +/* text-shadow: 1px 1px 0px #ffffff;*/ +/*}*/ + .cards_item_2_right{ float: right; border-radius: 10px; @@ -2739,9 +2767,10 @@ button#send_feedback_form:active{ .cards_item_3{ width: 48%; - height: 322px; + border-radius: 10px; - background: url(/static/img/png/cards_item_3.png) white 50%; + /*background: url(/static/img/png/cards_item_3.png) white 50%;*/ + background: white 50%; background-repeat: no-repeat; background-position: right; box-shadow: -1px 4px 10px 0px rgba(198, 199, 203, 0.20), 0px -1px 10px 0px rgba(198, 199, 203, 0.20); @@ -2762,9 +2791,10 @@ button#send_feedback_form:active{ .cards_item_4{ width: 48%; - height: 322px; + border-radius: 10px; - background: url(/static/img/png/cards_item_4.png), #111217 50%; + /*background: url(/static/img/png/cards_item_4.png), #111217 50%;*/ + background: #111217 50%; background-repeat: no-repeat; background-position: right; @@ -2789,7 +2819,7 @@ button#send_feedback_form:active{ font-style: normal; font-weight: 700; line-height: 52px; /* 118.182% */ - margin: 104px 0 0 20px; + margin: 67px 0 0 20px; } .card_title_2{ color: #FFF; @@ -2806,7 +2836,7 @@ button#send_feedback_form:active{ font-weight: 400; line-height: 22px; margin: 20px 0 0 20px; - width: 50%; + } /*faq_main_page*/ diff --git a/templates/pages/p_main.html b/templates/pages/p_main.html index a5e80ba..4501f79 100644 --- a/templates/pages/p_main.html +++ b/templates/pages/p_main.html @@ -167,31 +167,47 @@
+ +
+ +
+ +
{% translate "+5%" %}
{% translate "рост путешествий ежегодно" %}
{% translate "В среднем на 5% растёт количество путешествий ежегодно. Просто путешествуй и получай бонусы." %}
- -{#
#} -{#
#} -{#
#} +
+
+
+ +
+ +
{% translate "в 3 раза" %}
{% translate "быстрее других сервисов" %}
{% translate "Почтовые сервисы доставляет посылки в среднем за 10 дней. С нами - быстрее!" %}
+
+ + + + {#
#} - - -{#
#} -{# #} -{#
#}
+
+ +
+ +
{% translate "+142" %}
{% translate "заявки ежедневно" %}
{% translate "На перевозку или отправку посылок в разные уголки мира" %}
+
+ {#
#} {#
#} @@ -199,9 +215,16 @@
-
{% translate "30+" %}
-
{% translate "стран" %}
-
{% translate "С TWB отправляй посылки по всему миру! С нами нет границ!" %}
+
+ +
+ +
+
{% translate "30+" %}
+
{% translate "стран" %}
+
{% translate "С TWB отправляй посылки по всему миру! С нами нет границ!" %}
+
+ {#
#} {#
#} From 23718a5f3fc824afb1de1275a71a6fd3c083f545 Mon Sep 17 00:00:00 2001 From: ArtemB Date: Sat, 13 Jan 2024 13:46:58 +0300 Subject: [PATCH 02/32] 0.1.336 upd cards_item for main page --- static/css/mobile_styles.css | 50 ++++++++++++++++++++++++++++++++++++ static/css/styles.css | 33 ++++++++++++------------ 2 files changed, 66 insertions(+), 17 deletions(-) diff --git a/static/css/mobile_styles.css b/static/css/mobile_styles.css index eaba19f..661992f 100644 --- a/static/css/mobile_styles.css +++ b/static/css/mobile_styles.css @@ -159,6 +159,17 @@ rotate: 270deg; } + .cards_item_1, + .cards_item_2, + .cards_item_3, + .cards_item_4{ + height: 322px; + width: 65%; + float: unset; + margin: 15px auto; + + } + .filter_img{ width: 15px; display: block; @@ -1511,6 +1522,45 @@ + + .cards_item_1, + .cards_item_2, + .cards_item_3, + .cards_item_4{ + width: 70%; + height: unset; + float: unset; + margin: 15px auto; + + } + + .cards_item_img, .cards_item_text{ + float: unset; + width: unset; + } + + .cards_item_1>.cards_item_img>img, + .cards_item_2>.cards_item_img>img, + .cards_item_3>.cards_item_img>img, + .cards_item_4>.cards_item_img>img{ + float: unset; + aspect-ratio: 4/3; + object-fit: cover; + width: 100%; + border-radius: 10px; + } + .cards_item_text{ + padding-bottom: 20px; + } + + .card_title_1{ + margin: 25px 0 0 20px; + } + + + + + .read_more_about_subscribe{ padding: 0 14px; height: 30px; diff --git a/static/css/styles.css b/static/css/styles.css index 5812a2b..44f4003 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -2664,7 +2664,10 @@ button#send_feedback_form:active{ .cards_item_2, .cards_item_4{ float: right; } -.cards_item_1>.cards_item_img>img, .cards_item_2>.cards_item_img>img, .cards_item_3>.cards_item_img>img, .cards_item_4>.cards_item_img>img{ +.cards_item_1>.cards_item_img>img, +.cards_item_2>.cards_item_img>img, +.cards_item_3>.cards_item_img>img, +.cards_item_4>.cards_item_img>img{ float: right; } @@ -2676,9 +2679,6 @@ button#send_feedback_form:active{ .cards_item_1{ - - width: 48%; - border-radius: 10px; /*background: url(/static/img/png/cards_item_1.png) #1d1e20 50%;*/ background: #1d1e20 50%; @@ -2690,12 +2690,7 @@ button#send_feedback_form:active{ margin: 10px; } -.cards_item_1, -.cards_item_2, -.cards_item_3, -.cards_item_4{ - height: 322px; -} + @@ -2710,9 +2705,7 @@ button#send_feedback_form:active{ } .cards_item_2{ - width: 48%; - - border-radius: 10px; + border-radius: 10px; /*background: url(/static/img/png/cards_item_2.png) white 50%;*/ background: white 50%; background-repeat: no-repeat; @@ -2766,8 +2759,6 @@ button#send_feedback_form:active{ .cards_item_3{ - width: 48%; - border-radius: 10px; /*background: url(/static/img/png/cards_item_3.png) white 50%;*/ background: white 50%; @@ -2790,8 +2781,6 @@ button#send_feedback_form:active{ .cards_item_4{ - width: 48%; - border-radius: 10px; /*background: url(/static/img/png/cards_item_4.png), #111217 50%;*/ background: #111217 50%; @@ -2803,6 +2792,16 @@ button#send_feedback_form:active{ margin: 10px; } + +.cards_item_1, +.cards_item_2, +.cards_item_3, +.cards_item_4{ + height: 322px; + width: 48%; +} + + .cards_item_4_right{ float: right; border-radius: 10px; From bf18c96dbdb866895f68dc1c87defff74cfb921f Mon Sep 17 00:00:00 2001 From: ArtemB Date: Sat, 13 Jan 2024 14:12:25 +0300 Subject: [PATCH 03/32] 0.1.337 add google authorization button --- static/css/styles.css | 4 ++++ templates/forms/f_login.html | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 44f4003..14704dd 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -2671,6 +2671,10 @@ button#send_feedback_form:active{ float: right; } +#reg_or_text{ + margin: 10px; +} + .cards_item_2>.cards_item_text>div, .cards_item_3>.cards_item_text>div{ color: #1d1e20; } diff --git a/templates/forms/f_login.html b/templates/forms/f_login.html index 406b512..dfe923b 100644 --- a/templates/forms/f_login.html +++ b/templates/forms/f_login.html @@ -29,10 +29,13 @@
{% translate "Авторизуясь, вы соглашаетесь с Лицензионным соглашением Политикой конфиденциальности" %}
- {#
Или
#} - {#
#} - {#
Войти через Google
#} - {#
#} +
{% translate "Или" %}
+ + +
+
{% translate "Войти через" %} Google
+
+
{% translate "Нет аккаунта?" %} {% translate "Зарегистрируйтесь" %}
From 2e1f3a10ab197406e36f6aae0e0e9d1c300bd240 Mon Sep 17 00:00:00 2001 From: SDE Date: Sat, 13 Jan 2024 14:49:32 +0300 Subject: [PATCH 04/32] 0.11.0 Google Auth --- TWB/settings.py | 26 ++++++++++++++++++++++++++ TWB/urls.py | 2 +- requirements.pip | 1 + templates/forms/f_login.html | 7 ++++--- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/TWB/settings.py b/TWB/settings.py index f77f3e4..3333833 100644 --- a/TWB/settings.py +++ b/TWB/settings.py @@ -36,6 +36,25 @@ WEBPUSH_SETTINGS = { "VAPID_ADMIN_EMAIL": "admin@tripwb.com" } +AUTHENTICATION_BACKENDS = [ + 'django.contrib.auth.backends.ModelBackend', + 'allauth.account.auth_backends.AuthenticationBackend', +] + + + +SOCIALACCOUNT_PROVIDERS = { + 'google': { + 'SCOPE': [ + 'profile', + 'email', + ], + 'AUTH_PARAMS': { + 'access_type': 'online', + }, + } +} + # NOTIFICATION_KEY = 'BJLyGzmo8sLI3Qkc6pN2cz11frCXiJdewvgve7Yps-_fM1lY1LSnTQfQxYtAgQ_26nAji_rgeYC1DkLiTwxw0Mo' # SESSION_COOKIE_HTTPONLY = False @@ -63,6 +82,11 @@ INSTALLED_APPS = [ 'webpush', + 'allauth', + 'allauth.account', + 'allauth.socialaccount', + 'allauth.socialaccount.providers.google', + 'GeneralApp', 'AuthApp', 'RoutesApp', @@ -82,6 +106,8 @@ MIDDLEWARE = [ 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'AuthApp.middleware.ResponseInterceptionMiddleware', + + "allauth.account.middleware.AccountMiddleware", ] ROOT_URLCONF = 'TWB.urls' diff --git a/TWB/urls.py b/TWB/urls.py index c772353..a40b35d 100644 --- a/TWB/urls.py +++ b/TWB/urls.py @@ -12,7 +12,7 @@ urlpatterns = [ path('ckeditor/', include('ckeditor_uploader.urls')), path('i18n/', include('django.conf.urls.i18n')), - # path('webpush/', include('webpush.urls')), + path('accounts/', include('allauth.urls')), path('messages/', include('ChatServiceApp.urls')), diff --git a/requirements.pip b/requirements.pip index 618a0c6..75932d7 100644 --- a/requirements.pip +++ b/requirements.pip @@ -11,4 +11,5 @@ daphne==4.0.0 channels-redis==4.1.0 django-colorfield django-webpush==0.3.5 +django-allauth==0.60.0 diff --git a/templates/forms/f_login.html b/templates/forms/f_login.html index dfe923b..81368bb 100644 --- a/templates/forms/f_login.html +++ b/templates/forms/f_login.html @@ -1,12 +1,13 @@ {% load i18n %} +{% load socialaccount %} {% trans "Логин" as p_login %} {% trans "Пароль" as p_password %}
@@ -121,8 +124,8 @@
-

{% translate "Разместите объявление" %}

- {% translate "Укажите откуда, куда хотите перевезти посылку, а также Вашу дату отправления и прибытия. При желании Вы можете указать дополнительные параметры: тип, вес, вид перевозки и т.д" %} +

{% translate "Найдите отправителя" %}

+ {% translate "Зайдите на сайт Trip With Bonus и в форме вверху страницы, заполните данные для поиска отправителя посылки." %}
@@ -131,7 +134,7 @@

{% translate "Свяжитесь с отправителем" %}

- {% translate "В отобразившемся списке выберите подходящего отправителя и посылку, откройте контакты и свяжитесь удобным способом. Если не нашли подходящего отправителя с посылкой, разместите объявление о возможности перевезти посылку и отправители Вас сами найдут" %} + {% translate "Откройте контакты на сайте и договоритесь о месте встречи и условиях перевозки. В случае, если Вы не нашли объявления об отправителях по Вашему запросу, Вы можете разместить свое объявление воспользовавшись формой в личном кабинете." %}
@@ -140,7 +143,7 @@

{% translate "Передайте посылку" %}

- {% translate "Обсудите с отправителем все условия: время, место и прочие детали. Готово! Доставьте посылку из пункта А в пункт Б и получите благодарность отправителя!" %} + {% translate "Встречайтесь, знакомьтесь и принимайте посылку" %}
@@ -148,7 +151,10 @@
- + {% translate "Перевезти посылку" %} +
From acf7b702ee868fc53b151951a84b09485423293c Mon Sep 17 00:00:00 2001 From: SDE Date: Mon, 22 Jan 2024 17:32:03 +0300 Subject: [PATCH 32/32] 0.12.2 ws fix --- templates/tb_base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/tb_base.html b/templates/tb_base.html index bfba730..dbceb29 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -28,7 +28,7 @@