From ed402e6b2dc0ac9c483a2357230e1791fc4b9ea1 Mon Sep 17 00:00:00 2001 From: borissedw Date: Wed, 12 Jul 2023 20:00:10 +0300 Subject: [PATCH 1/8] 0.0.1 add new page levels --- FirePlayProj/settings.py | 4 + FirePlayProj/urls.py | 2 + QuestionsApp/views.py | 10 ++- static/css/firegame_css.css | 113 ++++++++++++++++++++++++++++ static/images/icons/user_icon.svg | 7 ++ static/images/logos/logo_header.svg | 36 +++++++++ static/js/firegame_js.js | 0 templates/blocks/header.html | 22 ++++++ templates/pages/choose_table.html | 8 ++ templates/tb_base.html | 19 +++++ templates/widgets/w_level.html | 13 ++++ 11 files changed, 232 insertions(+), 2 deletions(-) create mode 100644 static/css/firegame_css.css create mode 100644 static/images/icons/user_icon.svg create mode 100644 static/images/logos/logo_header.svg create mode 100644 static/js/firegame_js.js create mode 100644 templates/blocks/header.html create mode 100644 templates/pages/choose_table.html create mode 100644 templates/tb_base.html create mode 100644 templates/widgets/w_level.html diff --git a/FirePlayProj/settings.py b/FirePlayProj/settings.py index 7318324..6f6c6a8 100644 --- a/FirePlayProj/settings.py +++ b/FirePlayProj/settings.py @@ -133,6 +133,10 @@ MEDIA_ROOT = 'media/' STATIC_URL = '/static/' STATIC_ROOT = '/' +STATICFILES_DIRS = [ + BASE_DIR / "static", +] + # Default primary key field type # https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field diff --git a/FirePlayProj/urls.py b/FirePlayProj/urls.py index 47205c5..d4b406a 100644 --- a/FirePlayProj/urls.py +++ b/FirePlayProj/urls.py @@ -19,8 +19,10 @@ from django.contrib import admin from django.urls import path, include from django.conf.urls.static import static from django.conf import settings +from QuestionsApp.views import view_main urlpatterns = [ + path('', view_main, name='table_view'), path('admin/', admin.site.urls), path('ckeditor/', include('ckeditor_uploader.urls')), path('', include('QuestionsApp.urls')) diff --git a/QuestionsApp/views.py b/QuestionsApp/views.py index f326023..51db122 100644 --- a/QuestionsApp/views.py +++ b/QuestionsApp/views.py @@ -1,9 +1,15 @@ from django.shortcuts import render from django.http import HttpResponse - +from django.template import loader, RequestContext def test_code(request): from GPTgeneratorAPI.views import get_subcategories, get_questions # res = get_subcategories() res = get_questions() - return HttpResponse(str(res)) \ No newline at end of file + return HttpResponse(str(res)) +def view_main (request): + + Dict = {} + t = loader.get_template("pages/choose_table.html") + res = HttpResponse(t.render(Dict,request)) + return res \ No newline at end of file diff --git a/static/css/firegame_css.css b/static/css/firegame_css.css new file mode 100644 index 0000000..62d936a --- /dev/null +++ b/static/css/firegame_css.css @@ -0,0 +1,113 @@ +body{ + background: #170731; + margin: 0; + font-family: 'Montserrat', sans-serif,'Inter'; +} + +h1{ + font-family: 'Inter'; + font-size: 40px; + color: #FFFFFF; + margin: 40px 0 80px 0; +} + +.header{ + height: 80px; + width: 100%; + border-bottom: 1px solid #FFFFFF80; + vertical-align: baseline; +} + +.cut-width{ + max-width: 1280px; + width: 100%; + margin: auto; + height: 100%; +} + +.header-text{ + color: white; + font-size: 14px; + width: fit-content; + float: left; + padding-top: 35px; + padding-left: 45px; +} + +.header-text a{ + padding-left: 14px; + text-decoration: none; + color: #FFFFFF; +} + +.Header-Logo-cont{ + float: left; + padding-top: 14px; + text-decoration: none; + color: #FFFFFF; +} + +.header-part-left{ + width: 50%; + height: 100%; + float: left; +} + +.header-part-right{ + width: 50%; + height: 100%; + float: right; +} + +.btn-exit-header{ + padding-left: 8px; + text-decoration: none; + color: #FFFFFF; + float: right; + padding-top: 35px; +} + +.user-icon{ + float:right; +} + +.btn-exit-a{ + display: block; + height: fit-content; + width: fit-content; + float: right; + text-decoration: none; + color: #FFFFFF; +} + +/*levels*/ + +.block-levels{ + display: flex; + flex-wrap: wrap; + width: 100%; +} + +.level-cont{ + border-radius: 20px; + border: 4px solid #C7A4FF; + opacity: 0.699999988079071; + background: rgba(255, 255, 255, 0.15); + width: 390px; + height: 220px; +} + +.level-grad-1{ + /*background: radial-gradient(88.47% 79.48% at 5.97% 105.30%, #5E1BB4 0%, rgba(94, 27, 180, 0.00) 99.78%);*/ + background: radial-gradient(45.47% 85.48% at 7.97% 105.3%, #5E1BB4 0%, rgba(94, 27, 180, 0.00) 99.78%); + height: 100%; + width: 100%; + border-radius: 20px; +} + +.level-grad-2{ + height: 100%; + width: 100%; + border-radius: 20px; + background: radial-gradient(246.21% 71.62% at 94.36% 72.44%, #B41B92 0%, #000 100%); +} diff --git a/static/images/icons/user_icon.svg b/static/images/icons/user_icon.svg new file mode 100644 index 0000000..427ef31 --- /dev/null +++ b/static/images/icons/user_icon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/static/images/logos/logo_header.svg b/static/images/logos/logo_header.svg new file mode 100644 index 0000000..1e58463 --- /dev/null +++ b/static/images/logos/logo_header.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/js/firegame_js.js b/static/js/firegame_js.js new file mode 100644 index 0000000..e69de29 diff --git a/templates/blocks/header.html b/templates/blocks/header.html new file mode 100644 index 0000000..fd6f0e6 --- /dev/null +++ b/templates/blocks/header.html @@ -0,0 +1,22 @@ +{% load static %} + +
+ +
\ No newline at end of file diff --git a/templates/pages/choose_table.html b/templates/pages/choose_table.html new file mode 100644 index 0000000..8a61341 --- /dev/null +++ b/templates/pages/choose_table.html @@ -0,0 +1,8 @@ +{% extends "tb_base.html" %} +{% load static %} +{% block CONTENT %} +

Выберите уровень

+
+ {% include "widgets/w_level.html" %} +
+{% endblock %} \ No newline at end of file diff --git a/templates/tb_base.html b/templates/tb_base.html new file mode 100644 index 0000000..9fabc5b --- /dev/null +++ b/templates/tb_base.html @@ -0,0 +1,19 @@ +{% load static %} + + + + + FairPlay + + + + {% include "blocks/header.html" %} +
+ {% block CONTENT %} + {% endblock %} +
+
+ +
+ + \ No newline at end of file diff --git a/templates/widgets/w_level.html b/templates/widgets/w_level.html new file mode 100644 index 0000000..5809968 --- /dev/null +++ b/templates/widgets/w_level.html @@ -0,0 +1,13 @@ +{% load static %} +
+
+
+ +
+
+
+

+ УРОВЕНЬ 1
Лёгкий +

+
+
\ No newline at end of file From 84ca39b16c57adecb3cac6aa2cb592f6879bc0b4 Mon Sep 17 00:00:00 2001 From: borissedw Date: Wed, 12 Jul 2023 20:10:44 +0300 Subject: [PATCH 2/8] 0.0.1 --- templates/widgets/w_level.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/widgets/w_level.html b/templates/widgets/w_level.html index 5809968..3c05dcf 100644 --- a/templates/widgets/w_level.html +++ b/templates/widgets/w_level.html @@ -10,4 +10,5 @@ УРОВЕНЬ 1
Лёгкий - \ No newline at end of file + +7 \ No newline at end of file From 60ddf2acaf544dd27cf8ac644cabc72e56ce8d9c Mon Sep 17 00:00:00 2001 From: borissedw Date: Wed, 12 Jul 2023 20:11:06 +0300 Subject: [PATCH 3/8] 0.0.1 --- templates/widgets/w_level.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/widgets/w_level.html b/templates/widgets/w_level.html index 3c05dcf..4b2fdb4 100644 --- a/templates/widgets/w_level.html +++ b/templates/widgets/w_level.html @@ -11,4 +11,4 @@ -7 \ No newline at end of file +7r674 \ No newline at end of file From 6479e24800d9bd67d0335457dc8b52d561e9ea47 Mon Sep 17 00:00:00 2001 From: borissedw Date: Wed, 12 Jul 2023 20:11:17 +0300 Subject: [PATCH 4/8] 0.0.1 --- templates/widgets/w_level.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/widgets/w_level.html b/templates/widgets/w_level.html index 4b2fdb4..5809968 100644 --- a/templates/widgets/w_level.html +++ b/templates/widgets/w_level.html @@ -10,5 +10,4 @@ УРОВЕНЬ 1
Лёгкий - -7r674 \ No newline at end of file + \ No newline at end of file From f55912467b2dd30025a43d17baa4b8109d95f4f9 Mon Sep 17 00:00:00 2001 From: borissedw Date: Wed, 12 Jul 2023 23:57:32 +0300 Subject: [PATCH 5/8] 0.0.2 --- static/css/background_for_table_1.svg | 30 ++++++ static/css/background_for_table_2.svg | 30 ++++++ static/css/firegame_css.css | 94 ++++++++++++++++--- .../images/p_table/background_for_table.svg | 30 ++++++ templates/pages/choose_table.html | 1 + templates/widgets/w_level.html | 23 +++-- templates/widgets/w_level_2.html | 21 +++++ 7 files changed, 210 insertions(+), 19 deletions(-) create mode 100644 static/css/background_for_table_1.svg create mode 100644 static/css/background_for_table_2.svg create mode 100644 static/images/p_table/background_for_table.svg create mode 100644 templates/widgets/w_level_2.html diff --git a/static/css/background_for_table_1.svg b/static/css/background_for_table_1.svg new file mode 100644 index 0000000..142dd75 --- /dev/null +++ b/static/css/background_for_table_1.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/css/background_for_table_2.svg b/static/css/background_for_table_2.svg new file mode 100644 index 0000000..a7030d9 --- /dev/null +++ b/static/css/background_for_table_2.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/css/firegame_css.css b/static/css/firegame_css.css index 62d936a..5f65172 100644 --- a/static/css/firegame_css.css +++ b/static/css/firegame_css.css @@ -88,26 +88,98 @@ h1{ width: 100%; } +.level-border-1{ + border: 4px solid #C7A4FF; +} + +.level-border-2{ + border: 4px solid #6BFFFF; +} + .level-cont{ border-radius: 20px; - border: 4px solid #C7A4FF; - opacity: 0.699999988079071; + background: rgba(255, 255, 255, 0.15); + width: 390px; + height: 220px; + margin-left: 45px; +} + +.level-cont:first-of-type{ + margin-left: 0; + border-radius: 20px; background: rgba(255, 255, 255, 0.15); width: 390px; height: 220px; } -.level-grad-1{ - /*background: radial-gradient(88.47% 79.48% at 5.97% 105.30%, #5E1BB4 0%, rgba(94, 27, 180, 0.00) 99.78%);*/ - background: radial-gradient(45.47% 85.48% at 7.97% 105.3%, #5E1BB4 0%, rgba(94, 27, 180, 0.00) 99.78%); - height: 100%; - width: 100%; - border-radius: 20px; +.level-background-1{ + background-image: url("background_for_table_1.svg") ; } -.level-grad-2{ +.level-background-2{ + background-image: url("background_for_table_2.svg") ; +} + + +.container-background-level{ + height: 100%; width: 100%; - border-radius: 20px; - background: radial-gradient(246.21% 71.62% at 94.36% 72.44%, #B41B92 0%, #000 100%); } + +.container-content-level{ + width: calc(100% - 36px); + height: calc(100% - 43px); + padding: 33px 18px 10px 18px; +} + +.container-content-level h2{ + color: #FFFFFF; + margin: 0; + height: 72%; +} + +.bottom-part_w{ + width: 100%; +} + +.description-level-card{ + color: rgba(255, 255, 255, 0.68); + font-family: 'Inter'; + font-size: 16px; + width: fit-content; + float: left; +} + +.description-level-card span:first-of-type{ + color: rgba(255, 255, 255, 0.68); + font-family: 'Inter'; + font-size: 18px; + width: fit-content; + float: left; +} + +.button-level-card{ + width: fit-content; + float: right; +} + +.button-level-card button{ + width: 130px; + height: 30px; + border-radius: 20px; + background: #FFF; + font-family: 'Montserrat'; + font-size: 18px; + font-weight: 500; + border: none; +} + +.color-button-level-card-1{ + color: #8D2C78; +} + +.color-button-level-card-2{ + color: #7FB47B; +} + diff --git a/static/images/p_table/background_for_table.svg b/static/images/p_table/background_for_table.svg new file mode 100644 index 0000000..142dd75 --- /dev/null +++ b/static/images/p_table/background_for_table.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/pages/choose_table.html b/templates/pages/choose_table.html index 8a61341..e244451 100644 --- a/templates/pages/choose_table.html +++ b/templates/pages/choose_table.html @@ -4,5 +4,6 @@

Выберите уровень

{% include "widgets/w_level.html" %} + {% include "widgets/w_level_2.html" %}
{% endblock %} \ No newline at end of file diff --git a/templates/widgets/w_level.html b/templates/widgets/w_level.html index 5809968..dfa467d 100644 --- a/templates/widgets/w_level.html +++ b/templates/widgets/w_level.html @@ -1,13 +1,20 @@ {% load static %} -
-
-
+
+
+
+

+ УРОВЕНЬ 1
Лёгкий +

+
+
+
Можно выиграть: +150%
+
Цена входа: 1$
+
+
+ +
+
-
-

- УРОВЕНЬ 1
Лёгкий -

-
\ No newline at end of file diff --git a/templates/widgets/w_level_2.html b/templates/widgets/w_level_2.html new file mode 100644 index 0000000..d31c192 --- /dev/null +++ b/templates/widgets/w_level_2.html @@ -0,0 +1,21 @@ +{% load static %} + +
+ +
+
+

+ УРОВЕНЬ 2
Средний +

+
+
+
Можно выиграть: +150%
+
Цена входа: 1$
+
+
+ +
+
+
+
+
\ No newline at end of file From 43669da23bd8efe23bcc44ac4b2cb274bde87654 Mon Sep 17 00:00:00 2001 From: borissedw Date: Thu, 13 Jul 2023 16:44:05 +0300 Subject: [PATCH 6/8] 0.0.3 --- static/css/background_for_table_1.svg | 2 +- static/css/background_for_table_3.svg | 30 +++++++++++ static/css/background_for_workout.svg | 30 +++++++++++ static/css/firegame_css.css | 53 +++++++++++++++++-- templates/blocks/b_footer.html | 4 ++ .../blocks/{header.html => b_header.html} | 2 +- templates/pages/choose_table.html | 4 ++ templates/tb_base.html | 20 +++---- templates/widgets/w_level_2.html | 4 +- templates/widgets/w_level_3.html | 21 ++++++++ templates/widgets/w_workout.html | 21 ++++++++ 11 files changed, 174 insertions(+), 17 deletions(-) create mode 100644 static/css/background_for_table_3.svg create mode 100644 static/css/background_for_workout.svg create mode 100644 templates/blocks/b_footer.html rename templates/blocks/{header.html => b_header.html} (92%) create mode 100644 templates/widgets/w_level_3.html create mode 100644 templates/widgets/w_workout.html diff --git a/static/css/background_for_table_1.svg b/static/css/background_for_table_1.svg index 142dd75..46ad0e9 100644 --- a/static/css/background_for_table_1.svg +++ b/static/css/background_for_table_1.svg @@ -18,7 +18,7 @@ viewBox="0 0 15844.29 8960.78" - + diff --git a/static/css/background_for_table_3.svg b/static/css/background_for_table_3.svg new file mode 100644 index 0000000..307cf40 --- /dev/null +++ b/static/css/background_for_table_3.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/css/background_for_workout.svg b/static/css/background_for_workout.svg new file mode 100644 index 0000000..afd26b6 --- /dev/null +++ b/static/css/background_for_workout.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/css/firegame_css.css b/static/css/firegame_css.css index 5f65172..75c4ed1 100644 --- a/static/css/firegame_css.css +++ b/static/css/firegame_css.css @@ -19,7 +19,7 @@ h1{ } .cut-width{ - max-width: 1280px; + max-width: 1300px; width: 100%; margin: auto; height: 100%; @@ -96,6 +96,16 @@ h1{ border: 4px solid #6BFFFF; } +.level-border-3{ + border: 4px solid #FFB26B; +} + +.level-border-4{ + border: 4px solid ; + border-image-source: linear-gradient(79.19deg, #316AA6 1.88%, #B224B5 93.73%); + +} + .level-cont{ border-radius: 20px; background: rgba(255, 255, 255, 0.15); @@ -114,15 +124,32 @@ h1{ .level-background-1{ background-image: url("background_for_table_1.svg") ; + box-shadow: 12px 12px 20px 0px rgba(159, 47, 135, 0.4); + } .level-background-2{ background-image: url("background_for_table_2.svg") ; + box-shadow: 12px 12px 20px 0px rgba(117, 163, 112, 0.4); + +} + +.level-background-3{ + background-image: url("background_for_table_3.svg") ; + box-shadow: 12px 12px 20px 0px rgba(152, 77, 77, 0.4); + +} + +.level-background-4{ + background-image: url("background_for_workout.svg") ; + box-shadow: 12px 12px 20px 0px rgba(178, 39, 186, 0.4); + } -.container-background-level{ +.container-background-level{ + border-radius: 20px; height: 100%; width: 100%; } @@ -131,12 +158,14 @@ h1{ width: calc(100% - 36px); height: calc(100% - 43px); padding: 33px 18px 10px 18px; + text-align: start; + border-radius: 20px; } .container-content-level h2{ color: #FFFFFF; margin: 0; - height: 72%; + height: 80%; } .bottom-part_w{ @@ -183,3 +212,21 @@ h1{ color: #7FB47B; } +.color-button-level-card-3{ + color: #C16374; +} + +.color-button-level-card-3{ + color: rgba(171, 43, 186, 1); +} + + +/*footer*/ + +.footer{ + width: 100%; + padding-top: 24px; + min-height: 150px; + max-width: 1300px; + margin: auto; +} \ No newline at end of file diff --git a/templates/blocks/b_footer.html b/templates/blocks/b_footer.html new file mode 100644 index 0000000..79e14ae --- /dev/null +++ b/templates/blocks/b_footer.html @@ -0,0 +1,4 @@ +{% load static %} + \ No newline at end of file diff --git a/templates/blocks/header.html b/templates/blocks/b_header.html similarity index 92% rename from templates/blocks/header.html rename to templates/blocks/b_header.html index fd6f0e6..97f04b7 100644 --- a/templates/blocks/header.html +++ b/templates/blocks/b_header.html @@ -3,7 +3,7 @@
- +
diff --git a/templates/pages/choose_table.html b/templates/pages/choose_table.html index e244451..b3cc729 100644 --- a/templates/pages/choose_table.html +++ b/templates/pages/choose_table.html @@ -5,5 +5,9 @@
{% include "widgets/w_level.html" %} {% include "widgets/w_level_2.html" %} + {% include "widgets/w_level_3.html" %} +
+
+ {% include "widgets/w_workout.html" %}
{% endblock %} \ No newline at end of file diff --git a/templates/tb_base.html b/templates/tb_base.html index 9fabc5b..e84eb46 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -6,14 +6,14 @@ FairPlay - - {% include "blocks/header.html" %} -
- {% block CONTENT %} - {% endblock %} -
-
- -
- + + {% include "blocks/b_header.html" %} +
+ {% block CONTENT %} + {% endblock %} +
+
+ {% include "blocks/b_footer.html" %} +
+ \ No newline at end of file diff --git a/templates/widgets/w_level_2.html b/templates/widgets/w_level_2.html index d31c192..c0dfb9c 100644 --- a/templates/widgets/w_level_2.html +++ b/templates/widgets/w_level_2.html @@ -9,8 +9,8 @@
-
Можно выиграть: +150%
-
Цена входа: 1$
+
Можно выиграть: +250%
+
Цена входа: 2$
diff --git a/templates/widgets/w_level_3.html b/templates/widgets/w_level_3.html new file mode 100644 index 0000000..bb126a9 --- /dev/null +++ b/templates/widgets/w_level_3.html @@ -0,0 +1,21 @@ +{% load static %} + +
+ +
+
+

+ УРОВЕНЬ 3
Тяжёлый +

+
+
+
Можно выиграть: +320%
+
Цена входа: 4$
+
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/templates/widgets/w_workout.html b/templates/widgets/w_workout.html new file mode 100644 index 0000000..5c86504 --- /dev/null +++ b/templates/widgets/w_workout.html @@ -0,0 +1,21 @@ +{% load static %} + +
+ +
+
+

+ УРОВЕНЬ 3
Тяжёлый +

+
+
+
Можно выиграть: +320%
+
Цена входа: 4$
+
+
+ +
+
+
+
+
\ No newline at end of file From a02d793a90bc132530084b526f761ad2ab43e2c7 Mon Sep 17 00:00:00 2001 From: borissedw Date: Thu, 13 Jul 2023 16:56:21 +0300 Subject: [PATCH 7/8] 0.0.4 --- static/css/firegame_css.css | 2 +- templates/tb_base.html | 1 + templates/widgets/w_workout.html | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/static/css/firegame_css.css b/static/css/firegame_css.css index 75c4ed1..1662420 100644 --- a/static/css/firegame_css.css +++ b/static/css/firegame_css.css @@ -229,4 +229,4 @@ h1{ min-height: 150px; max-width: 1300px; margin: auto; -} \ No newline at end of file +} diff --git a/templates/tb_base.html b/templates/tb_base.html index e84eb46..ba0968c 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -4,6 +4,7 @@ FairPlay + diff --git a/templates/widgets/w_workout.html b/templates/widgets/w_workout.html index 5c86504..b1af3a6 100644 --- a/templates/widgets/w_workout.html +++ b/templates/widgets/w_workout.html @@ -2,10 +2,10 @@
-
+

- УРОВЕНЬ 3
Тяжёлый + ТРЕНИРОВКА

@@ -13,7 +13,7 @@
Цена входа: 4$
- +
From ec495fd2f0163304df7209582618a48ed1022d0c Mon Sep 17 00:00:00 2001 From: borissedw Date: Thu, 13 Jul 2023 17:02:53 +0300 Subject: [PATCH 8/8] 0.0.5 --- templates/widgets/w_workout.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/widgets/w_workout.html b/templates/widgets/w_workout.html index b1af3a6..f651cda 100644 --- a/templates/widgets/w_workout.html +++ b/templates/widgets/w_workout.html @@ -9,8 +9,8 @@
-
Можно выиграть: +320%
-
Цена входа: 4$
+
Вы получите: 0%
+
Цена входа: 0$