diff --git a/.gitignore b/.gitignore index aac87cd..31d976d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,8 @@ media # Backup files # *.bak -# If you are using PyCharm # +# If you are using PyCharm # +.idea/ # User-specific stuff .idea/**/workspace.xml .idea/**/tasks.xml @@ -103,7 +104,8 @@ env/ venv/ ENV/ env.bak/ -venv.bak/ +venv.bak/ +soita-venv/ # mkdocs documentation /site diff --git a/config/settings.py b/config/settings.py index dac18de..1c49906 100644 --- a/config/settings.py +++ b/config/settings.py @@ -68,7 +68,7 @@ ROOT_URLCONF = get_secret("ROOT_URLCONF") TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': os.path.join(BASE_DIR, "templates"), + 'DIRS': [os.path.join(BASE_DIR, "templates")], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ diff --git a/config/urls.py b/config/urls.py index a40f86d..49df139 100644 --- a/config/urls.py +++ b/config/urls.py @@ -16,8 +16,13 @@ Including another URLconf from django.contrib import admin from django.urls import include from django.urls import path +from .views import index, login, logout, register urlpatterns = [ + path('', index), + path('login/', login), + path('logout/', logout), + path('register/', register), path('users/', include("users.urls")), path('questions/', include("questions.urls")), path('answers/', include("answers.urls")), diff --git a/config/views.py b/config/views.py new file mode 100644 index 0000000..a8668ef --- /dev/null +++ b/config/views.py @@ -0,0 +1,27 @@ +from django.shortcuts import render, redirect +from django.template import loader + + +def index(request): + # context = { + # 'latest_question_list': latest_question_list, + # } + return render(request, 'index.html') + +def login(request): + # context = { + # 'latest_question_list': latest_question_list, + # } + return render(request, 'login.html') + +def logout(request): + # context = { + # 'latest_question_list': latest_question_list, + # } + return render(request, 'logout.html') + +def register(request): + # context = { + # 'latest_question_list': latest_question_list, + # } + return render(request, 'register.html') \ No newline at end of file diff --git a/palette.txt b/palette.txt new file mode 100644 index 0000000..b17e486 --- /dev/null +++ b/palette.txt @@ -0,0 +1,6 @@ +Color palette: +#00916E - Illuminating Emerald +#FEEFE5 - Linen +#FFCF00 - Cyber Yellow +#EE6123 - Orange Panteon +#FA003F - Red Munsell \ No newline at end of file diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..056942f --- /dev/null +++ b/static/style.css @@ -0,0 +1,109 @@ +.sidenav { + height: 100%; + width: 160px; + position: fixed; + z-index: 1; + top: 0; + left: 0; + background-color: #FA003F; + overflow-x: :hidden; + padding-top: 20px; +} + +.sidenav a { + padding: 6px 8px 6px 16px; + text-decoration: none; + font-size: 20px; + color: #FEEFE5; + display: block; + line-height: 1.6; +} + +.sidenav a:hover { + color: #00916E; +} + +.main { + margin-left: 160px; + padding: 0px 10px; +} + +.authContent { + top: 50%; + left: 50%; + position: absolute; + width: 400px; + height: 550px; + padding: 80px 40px; + background-color: #FEEFE5; + -webkit-transform: translate(-50%,-50%); + -moz-transform: translate(-50%,-50%); + -ms-transform: translate(-50%,-50%); + -o-transform: translate(-50%,-50%); + transform: translate(-50%,-50%); + color: #2B3D41; +} + +.authContent h2 { + margin: 0; + padding: 0 0 20px; + text-align: center; + text-transform: uppercase; +} + +.authContent p { + margin: 0; + padding: 0; + font-weight: bold; + line-height: 1.5; +} + +.authContent input { + width: 100%; + margin-bottom: 20px; +} + +.authContent input[type=text], +.authContent input[type=email], +.authContent input[type=password]{ + border: none; + border-bottom: 1px solid #2B3D41;; + background: transparent; + outline: none; + height: 35px; + color: #2B3D41;; +} + +.authContent input[type=submit]{ + height: 30px; + color: #FFF; + font-size: 15px; + background: #00916E; + cursor: pointer; + border-radius: 25px; + border: none; + outline: none; + margin-top: 15px; +} + +input[type=checkbox]{ + width: 20%; +} + +.titleBar { + height: 50px; + width: 100%; + position: fixed; + z-index: 1; + top: 0; + left: 0; + background-color: #2B3D41; + padding-top: 20px; + text-align: center; + text-decoration: none; + font-size: 30px; + color: #FEEFE5; + display: block; +} + +background-color:#FA003F diff --git a/templates/authBase.html b/templates/authBase.html new file mode 100644 index 0000000..6b6cc90 --- /dev/null +++ b/templates/authBase.html @@ -0,0 +1,22 @@ + +{% load static %} + + + + + SOITA | {% block title %}{% endblock %} + + + + +
+ SOITA +
+
+ {% block content %} + {% endblock %} +
+ + + + diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..8bb1cab --- /dev/null +++ b/templates/base.html @@ -0,0 +1,66 @@ + +{% load static %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SOITA | {% block title %}{% endblock %} + + + + +
+ Home + About + Category1 + Category2 + Category3 + Category4 + Category5 + Category6 + Category7 + Category8 + Category9 + Category10 +
+ +
+ {% block content %} + {% endblock %} +
+ + + + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..fdeba24 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,22 @@ +{% extends "base.html" %} + +{% block title %}Home{% endblock %} + +{% block content %} +

Welcome in SOITA/h1> + + {% for test in tests.all %} +
+

{{test.name}}

+
+ + {% endfor %} + + + + + + + +{% endblock %} + diff --git a/templates/login.html b/templates/login.html new file mode 100644 index 0000000..a8442a1 --- /dev/null +++ b/templates/login.html @@ -0,0 +1,16 @@ +{% extends "authBase.html" %} + +{% block title %}Log In{% endblock %} + +{% block content %} +

Log In

+
+

Email

+ +

Password

+ + +

Remember Me

+
+{% endblock %} + diff --git a/templates/logout.html b/templates/logout.html new file mode 100644 index 0000000..b1f4349 --- /dev/null +++ b/templates/logout.html @@ -0,0 +1,8 @@ +{% extends "authBase.html" %} + +{% block title %}Log Out{% endblock %} + +{% block content %} +

You have been logged out successfully

+{% endblock %} + diff --git a/templates/register.html b/templates/register.html new file mode 100644 index 0000000..a5a39b6 --- /dev/null +++ b/templates/register.html @@ -0,0 +1,22 @@ +{% extends "authBase.html" %} + +{% block title %}Create account{% endblock %} + +{% block content %} +

Register

+
+

First Name

+ +

Last Name

+ +

Email

+ +

Password

+ +

Repeat password

+ + +

Remember Me

+
+{% endblock %} +