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 7e70bd4..39b6783 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/background_for_table_1.svg b/static/css/background_for_table_1.svg new file mode 100644 index 0000000..46ad0e9 --- /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/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 new file mode 100644 index 0000000..1662420 --- /dev/null +++ b/static/css/firegame_css.css @@ -0,0 +1,232 @@ +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: 1300px; + 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-border-1{ + border: 4px solid #C7A4FF; +} + +.level-border-2{ + 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); + 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-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{ + border-radius: 20px; + height: 100%; + width: 100%; +} + +.container-content-level{ + 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: 80%; +} + +.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; +} + +.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; +} 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/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/static/js/firegame_js.js b/static/js/firegame_js.js new file mode 100644 index 0000000..e69de29 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/b_header.html b/templates/blocks/b_header.html new file mode 100644 index 0000000..97f04b7 --- /dev/null +++ b/templates/blocks/b_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..b3cc729 --- /dev/null +++ b/templates/pages/choose_table.html @@ -0,0 +1,13 @@ +{% extends "tb_base.html" %} +{% load static %} +{% block CONTENT %} +

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

+
+ {% 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 new file mode 100644 index 0000000..ba0968c --- /dev/null +++ b/templates/tb_base.html @@ -0,0 +1,20 @@ +{% load static %} + + + + + FairPlay + + + + + {% 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.html b/templates/widgets/w_level.html new file mode 100644 index 0000000..dfa467d --- /dev/null +++ b/templates/widgets/w_level.html @@ -0,0 +1,20 @@ +{% load static %} +
+ +
+
+

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

+
+
+
Можно выиграть: +150%
+
Цена входа: 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..c0dfb9c --- /dev/null +++ b/templates/widgets/w_level_2.html @@ -0,0 +1,21 @@ +{% load static %} + +
+ +
+
+

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

+
+
+
Можно выиграть: +250%
+
Цена входа: 2$
+
+
+ +
+
+
+
+
\ No newline at end of file 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..f651cda --- /dev/null +++ b/templates/widgets/w_workout.html @@ -0,0 +1,21 @@ +{% load static %} + +
+ +
+
+

+ ТРЕНИРОВКА +

+
+
+
Вы получите: 0%
+
Цена входа: 0$
+
+
+ +
+
+
+
+
\ No newline at end of file