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