diff --git a/AnswerEasy/__pycache__/__init__.cpython-38.pyc b/AnswerEasy/__pycache__/__init__.cpython-38.pyc index b118ed4..5f3d628 100644 Binary files a/AnswerEasy/__pycache__/__init__.cpython-38.pyc and b/AnswerEasy/__pycache__/__init__.cpython-38.pyc differ diff --git a/AnswerEasy/__pycache__/settings.cpython-38.pyc b/AnswerEasy/__pycache__/settings.cpython-38.pyc index 22ba0fd..dd3dc80 100644 Binary files a/AnswerEasy/__pycache__/settings.cpython-38.pyc and b/AnswerEasy/__pycache__/settings.cpython-38.pyc differ diff --git a/AnswerEasy/__pycache__/urls.cpython-38.pyc b/AnswerEasy/__pycache__/urls.cpython-38.pyc index de82693..4ef6862 100644 Binary files a/AnswerEasy/__pycache__/urls.cpython-38.pyc and b/AnswerEasy/__pycache__/urls.cpython-38.pyc differ diff --git a/AnswerEasy/__pycache__/views.cpython-38.pyc b/AnswerEasy/__pycache__/views.cpython-38.pyc index 1ba09a6..5037171 100644 Binary files a/AnswerEasy/__pycache__/views.cpython-38.pyc and b/AnswerEasy/__pycache__/views.cpython-38.pyc differ diff --git a/AnswerEasy/__pycache__/wsgi.cpython-38.pyc b/AnswerEasy/__pycache__/wsgi.cpython-38.pyc index 664abb1..70c8efa 100644 Binary files a/AnswerEasy/__pycache__/wsgi.cpython-38.pyc and b/AnswerEasy/__pycache__/wsgi.cpython-38.pyc differ diff --git a/AnswerEasy/settings.py b/AnswerEasy/settings.py index 9b2b973..86c5294 100644 --- a/AnswerEasy/settings.py +++ b/AnswerEasy/settings.py @@ -13,6 +13,15 @@ from pathlib import Path import os + +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' +EMAIL_HOST = 'smtp.gmail.com' +EMAIL_USE_TLS = True +EMAIL_PORT = 587 +EMAIL_HOST_USER = 'capturedwebster@gmail.com' +EMAIL_HOST_PASSWORD = 'Capturedwebster2020' + + # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -32,6 +41,7 @@ # Application definition INSTALLED_APPS = [ + 'AskMe', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -76,8 +86,12 @@ DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'Web20', + 'USER':'root', + 'PASSWORD':'', + 'HOST':'localhost', + 'PORT': '3306', } } @@ -120,3 +134,5 @@ STATIC_URL = '/static/' STATICFILES_DIRS=[os.path.join(BASE_DIR, 'static')] +MEDIA_URL='/media/' +MEDIA_ROOT=os.path.join(BASE_DIR,'media') \ No newline at end of file diff --git a/AnswerEasy/urls.py b/AnswerEasy/urls.py index b9f2217..4e3d9ca 100644 --- a/AnswerEasy/urls.py +++ b/AnswerEasy/urls.py @@ -14,10 +14,15 @@ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin -from django.urls import path +from django.urls import path,include from . import views +from django.conf import settings +from django.conf.urls.static import static + urlpatterns = [ - path('home', views.home,name='home'), + path('admin/', admin.site.urls), + path('', include('AskMe.urls')), -] \ No newline at end of file +] +urlpatterns=urlpatterns+static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT) \ No newline at end of file diff --git a/AnswerEasy/views.py b/AnswerEasy/views.py index 711821c..783a55d 100644 --- a/AnswerEasy/views.py +++ b/AnswerEasy/views.py @@ -2,5 +2,3 @@ from django.http import HttpResponse # Create your views here. -def home(request): - return render(request,'index.html') \ No newline at end of file diff --git a/AskMe/__init__.py b/AskMe/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/AskMe/__pycache__/__init__.cpython-38.pyc b/AskMe/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..c874acd Binary files /dev/null and b/AskMe/__pycache__/__init__.cpython-38.pyc differ diff --git a/AskMe/__pycache__/admin.cpython-38.pyc b/AskMe/__pycache__/admin.cpython-38.pyc new file mode 100644 index 0000000..d78a751 Binary files /dev/null and b/AskMe/__pycache__/admin.cpython-38.pyc differ diff --git a/AskMe/__pycache__/forms.cpython-38.pyc b/AskMe/__pycache__/forms.cpython-38.pyc new file mode 100644 index 0000000..1f5d327 Binary files /dev/null and b/AskMe/__pycache__/forms.cpython-38.pyc differ diff --git a/AskMe/__pycache__/models.cpython-38.pyc b/AskMe/__pycache__/models.cpython-38.pyc new file mode 100644 index 0000000..0b86cc7 Binary files /dev/null and b/AskMe/__pycache__/models.cpython-38.pyc differ diff --git a/AskMe/__pycache__/urls.cpython-38.pyc b/AskMe/__pycache__/urls.cpython-38.pyc new file mode 100644 index 0000000..705b47a Binary files /dev/null and b/AskMe/__pycache__/urls.cpython-38.pyc differ diff --git a/AskMe/__pycache__/views.cpython-38.pyc b/AskMe/__pycache__/views.cpython-38.pyc new file mode 100644 index 0000000..2b19539 Binary files /dev/null and b/AskMe/__pycache__/views.cpython-38.pyc differ diff --git a/AskMe/admin.py b/AskMe/admin.py new file mode 100644 index 0000000..4c3c684 --- /dev/null +++ b/AskMe/admin.py @@ -0,0 +1,8 @@ +from django.contrib import admin +from . models import * +# Register your models here. + + +admin.site.register(Question) +admin.site.register(Answer) +admin.site.register(Detail) \ No newline at end of file diff --git a/AskMe/apps.py b/AskMe/apps.py new file mode 100644 index 0000000..835f3fa --- /dev/null +++ b/AskMe/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class AskmeConfig(AppConfig): + name = 'AskMe' diff --git a/AskMe/forms.py b/AskMe/forms.py new file mode 100644 index 0000000..e306cb7 --- /dev/null +++ b/AskMe/forms.py @@ -0,0 +1,7 @@ +from django.forms import ModelForm +from .models import Answer,Question + +class QuestionForm(ModelForm): + class Meta: + model=Question + fields=('quesText','quesImg') \ No newline at end of file diff --git a/AskMe/migrations/0001_initial.py b/AskMe/migrations/0001_initial.py new file mode 100644 index 0000000..e91f5e5 --- /dev/null +++ b/AskMe/migrations/0001_initial.py @@ -0,0 +1,41 @@ +# Generated by Django 3.1.2 on 2020-10-15 07:21 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Question', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=300)), + ('detail', models.TextField()), + ('time', models.DateTimeField(auto_now_add=True)), + ('accepted', models.BooleanField(default='false')), + ('acceptedBy', models.CharField(blank=True, default='', max_length=50)), + ('answered', models.BooleanField(default='false')), + ('expired', models.BooleanField(default='false')), + ('quesImg', models.ImageField(blank=True, default='', null=True, upload_to='quesimages')), + ('contextUrl', models.URLField(blank=True, null=True)), + ], + ), + migrations.CreateModel( + name='Answer', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('detail', models.TextField()), + ('time', models.DateTimeField(auto_now_add=True)), + ('ansImg', models.ImageField(blank=True, default='', null=True, upload_to='ansimages')), + ('contextUrl', models.URLField(blank=True, null=True)), + ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='AskMe.question')), + ], + ), + ] diff --git a/AskMe/migrations/0002_auto_20201015_2306.py b/AskMe/migrations/0002_auto_20201015_2306.py new file mode 100644 index 0000000..c750a03 --- /dev/null +++ b/AskMe/migrations/0002_auto_20201015_2306.py @@ -0,0 +1,33 @@ +# Generated by Django 3.1.2 on 2020-10-15 17:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('AskMe', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Detail', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('category', models.CharField(max_length=10)), + ('quesNo', models.IntegerField(default=0)), + ('ansNo', models.IntegerField(default=0)), + ('profilepic', models.ImageField(blank=True, default='', null=True, upload_to='pictures')), + ], + ), + migrations.RenameField( + model_name='answer', + old_name='detail', + new_name='ansText', + ), + migrations.RenameField( + model_name='question', + old_name='detail', + new_name='quesText', + ), + ] diff --git a/AskMe/migrations/0003_detail_username.py b/AskMe/migrations/0003_detail_username.py new file mode 100644 index 0000000..3a67b46 --- /dev/null +++ b/AskMe/migrations/0003_detail_username.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.2 on 2020-10-15 20:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('AskMe', '0002_auto_20201015_2306'), + ] + + operations = [ + migrations.AddField( + model_name='detail', + name='userName', + field=models.CharField(default='', max_length=50), + ), + ] diff --git a/AskMe/migrations/0004_auto_20201016_1747.py b/AskMe/migrations/0004_auto_20201016_1747.py new file mode 100644 index 0000000..8e43822 --- /dev/null +++ b/AskMe/migrations/0004_auto_20201016_1747.py @@ -0,0 +1,35 @@ +# Generated by Django 3.1.2 on 2020-10-16 12:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('AskMe', '0003_detail_username'), + ] + + operations = [ + migrations.RemoveField( + model_name='answer', + name='contextUrl', + ), + migrations.RemoveField( + model_name='question', + name='contextUrl', + ), + migrations.RemoveField( + model_name='question', + name='title', + ), + migrations.AddField( + model_name='answer', + name='answeredBy', + field=models.CharField(default='', max_length=50), + ), + migrations.AddField( + model_name='question', + name='postedBy', + field=models.CharField(default='', max_length=50), + ), + ] diff --git a/AskMe/migrations/0005_auto_20201017_0040.py b/AskMe/migrations/0005_auto_20201017_0040.py new file mode 100644 index 0000000..ae608f1 --- /dev/null +++ b/AskMe/migrations/0005_auto_20201017_0040.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.2 on 2020-10-16 19:10 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('AskMe', '0004_auto_20201016_1747'), + ] + + operations = [ + migrations.AlterField( + model_name='question', + name='quesText', + field=models.CharField(default='', max_length=300), + ), + ] diff --git a/AskMe/migrations/0006_auto_20201017_0051.py b/AskMe/migrations/0006_auto_20201017_0051.py new file mode 100644 index 0000000..ba39534 --- /dev/null +++ b/AskMe/migrations/0006_auto_20201017_0051.py @@ -0,0 +1,28 @@ +# Generated by Django 3.1.2 on 2020-10-16 19:21 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('AskMe', '0005_auto_20201017_0040'), + ] + + operations = [ + migrations.AlterField( + model_name='question', + name='accepted', + field=models.BooleanField(default=False), + ), + migrations.AlterField( + model_name='question', + name='answered', + field=models.BooleanField(default=False), + ), + migrations.AlterField( + model_name='question', + name='expired', + field=models.BooleanField(default=False), + ), + ] diff --git a/AskMe/migrations/0007_question_topic.py b/AskMe/migrations/0007_question_topic.py new file mode 100644 index 0000000..240f3d7 --- /dev/null +++ b/AskMe/migrations/0007_question_topic.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.2 on 2020-10-16 20:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('AskMe', '0006_auto_20201017_0051'), + ] + + operations = [ + migrations.AddField( + model_name='question', + name='topic', + field=models.CharField(default='', max_length=300), + ), + ] diff --git a/AskMe/migrations/__init__.py b/AskMe/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/AskMe/migrations/__pycache__/0001_initial.cpython-38.pyc b/AskMe/migrations/__pycache__/0001_initial.cpython-38.pyc new file mode 100644 index 0000000..76f77af Binary files /dev/null and b/AskMe/migrations/__pycache__/0001_initial.cpython-38.pyc differ diff --git a/AskMe/migrations/__pycache__/0002_auto_20201011_0602.cpython-38.pyc b/AskMe/migrations/__pycache__/0002_auto_20201011_0602.cpython-38.pyc new file mode 100644 index 0000000..31fa4f2 Binary files /dev/null and b/AskMe/migrations/__pycache__/0002_auto_20201011_0602.cpython-38.pyc differ diff --git a/AskMe/migrations/__pycache__/0002_auto_20201015_2306.cpython-38.pyc b/AskMe/migrations/__pycache__/0002_auto_20201015_2306.cpython-38.pyc new file mode 100644 index 0000000..715c4ab Binary files /dev/null and b/AskMe/migrations/__pycache__/0002_auto_20201015_2306.cpython-38.pyc differ diff --git a/AskMe/migrations/__pycache__/0003_delete_detail.cpython-38.pyc b/AskMe/migrations/__pycache__/0003_delete_detail.cpython-38.pyc new file mode 100644 index 0000000..55eb114 Binary files /dev/null and b/AskMe/migrations/__pycache__/0003_delete_detail.cpython-38.pyc differ diff --git a/AskMe/migrations/__pycache__/0003_detail_username.cpython-38.pyc b/AskMe/migrations/__pycache__/0003_detail_username.cpython-38.pyc new file mode 100644 index 0000000..7975ed2 Binary files /dev/null and b/AskMe/migrations/__pycache__/0003_detail_username.cpython-38.pyc differ diff --git a/AskMe/migrations/__pycache__/0004_auto_20201016_1747.cpython-38.pyc b/AskMe/migrations/__pycache__/0004_auto_20201016_1747.cpython-38.pyc new file mode 100644 index 0000000..ee1c057 Binary files /dev/null and b/AskMe/migrations/__pycache__/0004_auto_20201016_1747.cpython-38.pyc differ diff --git a/AskMe/migrations/__pycache__/0005_auto_20201017_0040.cpython-38.pyc b/AskMe/migrations/__pycache__/0005_auto_20201017_0040.cpython-38.pyc new file mode 100644 index 0000000..d63f147 Binary files /dev/null and b/AskMe/migrations/__pycache__/0005_auto_20201017_0040.cpython-38.pyc differ diff --git a/AskMe/migrations/__pycache__/0006_auto_20201017_0051.cpython-38.pyc b/AskMe/migrations/__pycache__/0006_auto_20201017_0051.cpython-38.pyc new file mode 100644 index 0000000..ac53568 Binary files /dev/null and b/AskMe/migrations/__pycache__/0006_auto_20201017_0051.cpython-38.pyc differ diff --git a/AskMe/migrations/__pycache__/0007_question_topic.cpython-38.pyc b/AskMe/migrations/__pycache__/0007_question_topic.cpython-38.pyc new file mode 100644 index 0000000..b181504 Binary files /dev/null and b/AskMe/migrations/__pycache__/0007_question_topic.cpython-38.pyc differ diff --git a/AskMe/migrations/__pycache__/__init__.cpython-38.pyc b/AskMe/migrations/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..fddc2b2 Binary files /dev/null and b/AskMe/migrations/__pycache__/__init__.cpython-38.pyc differ diff --git a/AskMe/models.py b/AskMe/models.py new file mode 100644 index 0000000..5142f5a --- /dev/null +++ b/AskMe/models.py @@ -0,0 +1,37 @@ +from django.db import models + + + +class Detail(models.Model): + category=models.CharField(max_length=10) + userName=models.CharField(max_length=50,default="") + #qualification=models.ChoiceField() + quesNo=models.IntegerField(default=0) + ansNo=models.IntegerField(default=0) + profilepic=models.ImageField(upload_to='pictures',default="",blank=True,null=True) + + + + + +class Question(models.Model): + topic=models.CharField(max_length=300,default="") + quesText=models.CharField(max_length=300,default="") + time=models.DateTimeField(auto_now_add=True) + postedBy=models.CharField(max_length=50,default="",null=False,blank=False) + accepted=models.BooleanField(default=False) + acceptedBy=models.CharField(max_length=50, default="",null=False,blank=True) + answered=models.BooleanField(default=False) + #tag= + expired=models.BooleanField(default=False) + quesImg=models.ImageField(upload_to='quesimages',default="",blank=True,null=True) + + +class Answer(models.Model): + question=models.ForeignKey(Question,on_delete=models.CASCADE) + ansText=models.TextField() + answeredBy=models.CharField(max_length=50,default="",null=False,blank=False) + time=models.DateTimeField(auto_now_add=True) + ansImg=models.ImageField(upload_to='ansimages',default="",blank=True,null=True) + + diff --git a/AskMe/tests.py b/AskMe/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/AskMe/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/AskMe/urls.py b/AskMe/urls.py new file mode 100644 index 0000000..5677a98 --- /dev/null +++ b/AskMe/urls.py @@ -0,0 +1,24 @@ + +from django.urls import path,include +from . import views +from django.conf import settings +from django.conf.urls.static import static + + +urlpatterns = [ + + path('home',views.home, name='home'), + path("register/tutor",views.registerTutor,name="registertutor"), + path("register/student",views.registerStudent,name="registerstudent"), + path("login",views.login,name="login"), + path("logout",views.logout,name="logout"), + path('dashboard',views.dashboard,name='dashboard'), + path('dashboard/question',views.Askquestion,name='question'), + path('dashboard/answer/',views.answer,name='answer'), + path('science',views.science,name='science'), + path('Social',views.Social,name='Social'), + path('Language',views.Language,name='Language'), + path('Miss',views.Miss,name='Miss') + +] +urlpatterns=urlpatterns+static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT) \ No newline at end of file diff --git a/AskMe/views.py b/AskMe/views.py new file mode 100644 index 0000000..3dd79af --- /dev/null +++ b/AskMe/views.py @@ -0,0 +1,208 @@ +from django.shortcuts import render,redirect +from . models import * +from django.http import HttpResponse +from django.contrib import messages +from django.contrib.auth import login +from django.contrib.auth.models import User,auth +from django.db.models import Count, F, Value +from .forms import QuestionForm +from django.conf import settings +from django.core.mail import send_mail + + +# Create your views here. +def home(request): + que=Question.objects.all().order_by('-id') + return render(request,'index.html',{'que':que}) + + + +def login(request): + if request.method=='POST': + username=request.POST['username'] + password=request.POST['password'] + + user = auth.authenticate(username=username,password=password) + + if user is not None: + auth.login(request,user) + return redirect('/home') + + else: + messages.info(request,'invalid credentials') + return redirect('login') + + else: + return render(request,'login.html') + + +def registerTutor(request): + + if request.method == 'POST': + username=request.POST['username'] + password1=request.POST['password1'] + password2=request.POST['password2'] + email=request.POST['email'] + category='Tutor' + + + if password1==password2: + if User.objects.filter(username=username).exists(): + messages.info(request,'username taken') + return redirect('register/tutor') + elif User.objects.filter(email=email).exists(): + messages.info(request,'email taken') + return redirect('register/tutor') + else: + user = User.objects.create_user(username=username,password=password1,email=email) + user.save() + detail=Detail.objects.create( + category=category, + userName=username, + quesNo=0, + ansNo=0 + ) + detail.save() + + subject = 'Registration done successfully' + message = f'Hi {user.username}, thank you for registering in Ask me Anything.' + email_from = settings.EMAIL_HOST_USER + recipient_list = [user.email, ] + send_mail( subject, message, email_from, recipient_list ) + print('user created') + return redirect('login') + + else: + messages.info(request,'password not matching..') + return redirect('register/tutor') + return redirect('/home') + else: + return render(request,'register.html') + +def registerStudent(request): + + if request.method == 'POST': + username=request.POST['username'] + password1=request.POST['password1'] + password2=request.POST['password2'] + email=request.POST['email'] + category='Student' + + + if password1==password2: + if User.objects.filter(username=username).exists(): + messages.info(request,'username taken') + return redirect('register/student') + elif User.objects.filter(email=email).exists(): + messages.info(request,'email taken') + return redirect('register/student') + else: + user = User.objects.create_user(username=username,password=password1,email=email) + user.save() + detail=Detail.objects.create( + category=category, + userName=username, + quesNo=0, + ansNo=0 + ) + detail.save() + print('user created') + return redirect('login') + + else: + messages.info(request,'password not matching..') + return redirect('register/student') + return redirect('/home') + else: + return render(request,'register.html') + + + +def logout(request): + auth.logout(request) + return redirect('/home') + + +def dashboard(request): + curruser=request.user.username + det=Detail.objects.get(userName=curruser) + cate=det.category + print(cate) + if cate =='Tutor': + que=Question.objects.all().order_by('-id') + + return render(request,'Tdashboard.html',{'que':que}) + else: + return render(request,'Sdashboard.html') + +def Askquestion(request): + form=QuestionForm + if request.method == 'POST': + quesText=request.POST['questxt'] + quesImg=request.POST['image'] + topic=request.POST['topic'] + postedBy=request.user.username + curruser=request.user.username + det=Detail.objects.get(userName=curruser) + + question=Question.objects.create( + topic=topic, + quesText=quesText, + postedBy=postedBy, + quesImg=quesImg + ) + det.quesNo=F('quesNo')+1 + det.save(update_fields=["quesNo"]) + question.save() + return redirect('dashboard') + + else: + return render(request,'question.html',{'form':form}) + +def answer(request,id): + if request.method=='POST': + ansText=request.POST['answertxt'] + ansImg=request.POST['image'] + answeredBy=request.user.username + curruser=request.user.username + det=Detail.objects.get(userName=curruser) + que=Question.objects.get(pk=id) + + ans=Answer.objects.create( + question=que, + ansText=ansText, + answeredBy=answeredBy, + ansImg=ansImg + ) + det.ansNo=F('ansNo')+1 + det.save(update_fields=["ansNo"]) + que.accepted=True + que.acceptedBy=curruser + que.save(update_fields=["accepted"]) + que.save(update_fields=["acceptedBy"]) + ans.save() + return redirect('dashboard') + + else: + queId=Question.objects.get(pk=id) + return render(request, 'answer.html',{'queId':queId}) + + + +# Adding questions according to topic + +def science(request): + que=Question.objects.all().order_by('-id') + return render(request,'science.html',{'que':que}) + +def Social(request): + que=Question.objects.all().order_by('-id') + return render(request,'Social.html',{'que':que}) + +def Language(request): + que=Question.objects.all().order_by('-id') + return render(request,'Language.html',{'que':que}) + +def Miss(request): + que=Question.objects.all().order_by('-id') + return render(request,'Miss.html',{'que':que}) \ No newline at end of file diff --git a/media/pictures/IMG20180314201016.jpg b/media/pictures/IMG20180314201016.jpg new file mode 100644 index 0000000..b5e9c6f Binary files /dev/null and b/media/pictures/IMG20180314201016.jpg differ diff --git a/media/pictures/IMG20180314201016_vrNYQSk.jpg b/media/pictures/IMG20180314201016_vrNYQSk.jpg new file mode 100644 index 0000000..b5e9c6f Binary files /dev/null and b/media/pictures/IMG20180314201016_vrNYQSk.jpg differ diff --git a/media/quesimages/IMG-20180515-WA0006.jpg b/media/quesimages/IMG-20180515-WA0006.jpg new file mode 100644 index 0000000..c119f5d Binary files /dev/null and b/media/quesimages/IMG-20180515-WA0006.jpg differ diff --git a/media/quesimages/IMG-20180515-WA0006_aiPLWog.jpg b/media/quesimages/IMG-20180515-WA0006_aiPLWog.jpg new file mode 100644 index 0000000..c119f5d Binary files /dev/null and b/media/quesimages/IMG-20180515-WA0006_aiPLWog.jpg differ diff --git a/static/answer.css b/static/answer.css new file mode 100644 index 0000000..5c17d8c --- /dev/null +++ b/static/answer.css @@ -0,0 +1,180 @@ +body {margin: 0; + + background-repeat: no-repeat; + background-size: cover; + } + + /*Question form*/ + .form-style + { + width:100%; + padding: 10px 20px; + background: #ffffff; + margin: 10px auto; + padding: 20px; + background: #ffffff; + border-radius: 8px; + font-family: Georgia, "Times New Roman", Times, serif; + } + .form-style fieldset + { + border: none; + } + .form-style legend + { + font-size: 1.4em; + margin-bottom: 10px; + } + .form-style label + { + display: block; + margin-bottom: 8px; + } + .form-style input[type="text"], + .form-style input[type="number"], + .form-style select + { + font-family: "Calibri"; + background: rgba(255,255,255,.1); + border: none; + border-radius: 4px; + font-size: 16px; + margin: 0; + outline: 0; + padding: 10px; + width: 100%; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + background-color: #e8eeef; + color:#8a97a0; + -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset; + box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset; + margin-bottom: 30px; + } + + #answer + { + height:400px; + width:100%; + } + .form-style input[type="number"]:focus, + + .form-style select:focus{ + background: #d2d9dd; + } + + textarea { + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + } + .form-style select + { + -webkit-appearance: menulist-button; + height:35px; + } + .form-style .number + { + background: #026670; + color:#edeae5; + height: 30px; + width: 30px; + display: inline-block; + font-size: 0.8em; + margin-right: 4px; + line-height: 30px; + text-align: center; + text-shadow: 0 1px 0 rgba(255,255,255,0.2); + } + + .form-style input[type="submit"], + .form-style input[type="button"] + { + position: relative; + display: block; + padding: 19px 39px 18px 39px; + color: #FFF; + margin: 20px auto; + background: #026670; + font-size: 18px; + text-align: center; + font-style: normal; + width: 100%; + border: 1px solid #026670; + border-width: 1px 1px 3px; + } + .form-style input[type="submit"]:hover, + .form-style input[type="button"]:hover + { + background: #9feddd; + } + + .sidebar { + height: 100%; /* 100% Full-height */ + width: 0; /* 0 width - change this with JavaScript */ + position: fixed; /* Stay in place */ + z-index: 1; /* Stay on top */ + top: 0; + left: 0; + background-color:#024e54; /* Black*/ + overflow-x: hidden; /* Disable horizontal scroll */ + padding-top: 60px; /* Place content 60px from the top */ + transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */ + } + + /* The sidebar links */ + .sidebar a { + padding: 8px 8px 8px 32px; + text-decoration: none; + font-size: 25px; + color: white; + display: block; + transition: 0.3s; + } + + /* When you mouse over the navigation links, change their color */ + .sidebar a:hover { + color: #fef9c7; + } + + /* Position and style the close button (top right corner) */ + .sidebar .closebtn { + position: absolute; + top: 0; + right: 25px; + font-size: 36px; + margin-left: 50px; + } + + /* The button used to open the sidebar */ + .openbtn { + font-size: 20px; + cursor: pointer; + background-color:#026670; + color: white; + padding: 10px 15px; + border: none; + } + + .openbtn:hover { + background-color:#024e54; + } + + label { + display: block; + font: 1.2rem "Calibri" + ; + } + + input, + label { + margin: .4rem 0; + } + + #submit{ + + margin-left:20px; + } + + \ No newline at end of file diff --git a/static/answer.js b/static/answer.js new file mode 100644 index 0000000..5c0d300 --- /dev/null +++ b/static/answer.js @@ -0,0 +1,27 @@ +function openNav() { + document.getElementById("mySidebar").style.width = "250px"; + document.getElementById("main").style.marginLeft = "250px"; + } + + function closeNav() { + document.getElementById("mySidebar").style.width = "0"; + document.getElementById("main").style.marginLeft= "0"; + } + + function myFunction(){ + + alert("Question has been Submitted"); + } + var doc = new jsPDF(); + var specialElementHandlers = { + '#editor': function (element, renderer) { + return true; + } + }; + $("#submit").click(function () { + doc.fromHTML($("#content").html(), 15, 15, { + 'width': 190, + 'elementHandlers': specialElementHandlers + }); + doc.save('sample-page.pdf'); + }); \ No newline at end of file diff --git a/static/graph.PNG b/static/graph.PNG new file mode 100644 index 0000000..a17a60a Binary files /dev/null and b/static/graph.PNG differ diff --git a/static/home.css b/static/home.css new file mode 100644 index 0000000..8ae06eb --- /dev/null +++ b/static/home.css @@ -0,0 +1,105 @@ +body {margin: 0; + +background-repeat: no-repeat; +background-size: cover; +} +.flex-container { + display: flex; + flex-direction: row; + background-color: #edeae5; + + +} +.flex-container > div { + + box-shadow: rgb(167, 166, 166) 2px 2px 2px 2px; + color: white; + margin: 10px; + height:500px; + width:200px; +} +#notify{ + padding: 3%; +} + +/*chart*/ + + + +/* The sidebar menu */ +.sidebar { + height: 100%; /* 100% Full-height */ + width: 0; /* 0 width - change this with JavaScript */ + position: fixed; /* Stay in place */ + z-index: 1; /* Stay on top */ + top: 0; + left: 0; + background-color:#024e54; /* Black*/ + overflow-x: hidden; /* Disable horizontal scroll */ + padding-top: 60px; /* Place content 60px from the top */ + transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */ +} + +/* The sidebar links */ +.sidebar a { + padding: 8px 8px 8px 32px; + text-decoration: none; + font-size: 25px; + color: white; + display: block; + transition: 0.3s; +} + +/* When you mouse over the navigation links, change their color */ +.sidebar a:hover { + color: #fef9c7; +} + +/* Position and style the close button (top right corner) */ +.sidebar .closebtn { + position: absolute; + top: 0; + right: 25px; + font-size: 36px; + margin-left: 50px; +} + +/* The button used to open the sidebar */ +.openbtn { + font-size: 20px; + cursor: pointer; + background-color:#026670; + color: white; + padding: 10px 15px; + border: none; +} + +.openbtn:hover { + background-color:#024e54; +} + +/* Style page content - use this if you want to push the page content to the right when you open the side navigation */ +#main { + transition: margin-left .5s; /* If you want a transition effect */ + padding: 20px; +} + +/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */ +@media screen and (max-height: 450px) { + .sidebar {padding-top: 15px;} + .sidebar a {font-size: 18px;} +} +@media screen and (max-width: 700px) { + .sidebar { + width: 100%; + height: auto; + position: relative; + } + .sidebar a {float: left;} + div.content {margin-left: 0;} +} + +@media screen and (max-width: 400px) { + .sidebar {padding-top: 15px;} + .sidebar a {font-size: 18px;} +} \ No newline at end of file diff --git a/static/question.css b/static/question.css new file mode 100644 index 0000000..42754de --- /dev/null +++ b/static/question.css @@ -0,0 +1,176 @@ +body {margin: 0; + + background-repeat: no-repeat; + background-size: cover; + } + + /*Question form*/ + .form-style + { + width:100%; + padding: 10px 20px; + background: #ffffff; + margin: 10px auto; + padding: 20px; + background: #ffffff; + border-radius: 8px; + font-family: Georgia, "Times New Roman", Times, serif; + } + .form-style fieldset + { + border: none; + } + .form-style legend + { + font-size: 1.4em; + margin-bottom: 10px; + } + .form-style label + { + display: block; + margin-bottom: 8px; + } + .form-style input[type="text"], + .form-style input[type="number"], + .form-style select + { + font-family: "Calibri"; + background: rgba(255,255,255,.1); + border: none; + border-radius: 4px; + font-size: 16px; + margin: 0; + outline: 0; + padding: 10px; + width: 100%; + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + background-color: #e8eeef; + color:#8a97a0; + -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset; + box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset; + margin-bottom: 30px; + } + + .form-style input[type="text"]:focus, + .form-style input[type="number"]:focus, + + .form-style select:focus{ + background: #d2d9dd; + } + + textarea { + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + } + .form-style select + { + -webkit-appearance: menulist-button; + height:35px; + } + .form-style .number + { + background: #026670; + color:#edeae5; + height: 30px; + width: 30px; + display: inline-block; + font-size: 0.8em; + margin-right: 4px; + line-height: 30px; + text-align: center; + text-shadow: 0 1px 0 rgba(255,255,255,0.2); + } + + .form-style input[type="submit"], + .form-style input[type="button"] + { + position: relative; + display: block; + padding: 19px 39px 18px 39px; + color: #FFF; + margin: 20px auto; + background: #026670; + font-size: 18px; + text-align: center; + font-style: normal; + width: 100%; + border: 1px solid #026670; + border-width: 1px 1px 3px; + } + .form-style input[type="submit"]:hover, + .form-style input[type="button"]:hover + { + background: #9feddd; + } + + .sidebar { + height: 100%; /* 100% Full-height */ + width: 0; /* 0 width - change this with JavaScript */ + position: fixed; /* Stay in place */ + z-index: 1; /* Stay on top */ + top: 0; + left: 0; + background-color:#024e54; /* Black*/ + overflow-x: hidden; /* Disable horizontal scroll */ + padding-top: 60px; /* Place content 60px from the top */ + transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */ + } + + /* The sidebar links */ + .sidebar a { + padding: 8px 8px 8px 32px; + text-decoration: none; + font-size: 25px; + color: white; + display: block; + transition: 0.3s; + } + + /* When you mouse over the navigation links, change their color */ + .sidebar a:hover { + color: #fef9c7; + } + + /* Position and style the close button (top right corner) */ + .sidebar .closebtn { + position: absolute; + top: 0; + right: 25px; + font-size: 36px; + margin-left: 50px; + } + + /* The button used to open the sidebar */ + .openbtn { + font-size: 20px; + cursor: pointer; + background-color:#026670; + color: white; + padding: 10px 15px; + border: none; + } + + .openbtn:hover { + background-color:#024e54; + } + + label { + display: block; + font: 1.2rem "Calibri" + ; + } + + input, + label { + margin: .4rem 0; + } + + #submit{ + + margin-left:20px; + } + + \ No newline at end of file diff --git a/static/question.js b/static/question.js new file mode 100644 index 0000000..5c0d300 --- /dev/null +++ b/static/question.js @@ -0,0 +1,27 @@ +function openNav() { + document.getElementById("mySidebar").style.width = "250px"; + document.getElementById("main").style.marginLeft = "250px"; + } + + function closeNav() { + document.getElementById("mySidebar").style.width = "0"; + document.getElementById("main").style.marginLeft= "0"; + } + + function myFunction(){ + + alert("Question has been Submitted"); + } + var doc = new jsPDF(); + var specialElementHandlers = { + '#editor': function (element, renderer) { + return true; + } + }; + $("#submit").click(function () { + doc.fromHTML($("#content").html(), 15, 15, { + 'width': 190, + 'elementHandlers': specialElementHandlers + }); + doc.save('sample-page.pdf'); + }); \ No newline at end of file diff --git a/static/style.css b/static/style.css index e2493d9..eec0943 100644 --- a/static/style.css +++ b/static/style.css @@ -1,501 +1,302 @@ /* Navbar css */ body {margin: 0; - background-color: white; - background-repeat: no-repeat; - background-size: cover; - } - input[type=text]{ - width:40%; - height:35px; - color:black; - border:none; - background-color: rgb(226, 226, 226); - /* background-color: grey; */ - /* box-shadow:inset 2px 2px 2px 2px rgb(54, 53, 53); */ - -webkit-transition-: 0.5s; - } - input[type=radio]{ - float: right; - } - - .forms{ - width:500px; - height:700px; - background-color:rgb(186, 184, 184); - border-style:solid ; - border-width: 3px; - border-color: black; - } - - /* About the website part in home */ - - .about + background-color:rgb(226, 224, 224); + background-repeat: no-repeat; + background-size: cover; + } + input[type=text]{ + width:40%; + height:35px; + color:black; + border:none; + background-color: rgb(226, 226, 226); + /* background-color: grey; */ + /* box-shadow:inset 2px 2px 2px 2px rgb(54, 53, 53); */ + -webkit-transition-: 0.5s; + } + input[type=radio]{ + float: right; + } + +.container{ + align-self: center; + padding-left: 150px; + padding-top: 20px; +} + .card{ + background-color: ivory; + box-shadow: #026670 2px 2px 2px 2px; + + } + + .forms{ + width:500px; + height:700px; + background-color:rgb(186, 184, 184); + border-style:solid ; + border-width: 3px; + border-color: black; + } + + /* About the website part in home */ + + .about { - position: relative; - width: 100%; - padding: 5%; - display: flex; + position: relative; + width: 100%; + padding: 5%; + display: flex; } .about .contentBx { - /* background: #162c3b; */ - background: #5cbda1; - padding: 100px; - width: 50%; + /* background: #162c3b; */ + background: #5cbda1; + padding: 100px; + width: 50%; } .heading{ - color: black; - font-size: 30px; - font-weight: 600; - letter-spacing: 1px; - margin-bottom: 10px; + color: black; + font-size: 30px; + font-weight: 600; + letter-spacing: 1px; + margin-bottom: 10px; } .text{ - color: black; - font-size: 16px; - font-weight: 300; - letter-spacing: 1px; + color: black; + font-size: 16px; + font-weight: 300; + letter-spacing: 1px; } .about .imgBx{ - background: url(about.jpeg); - width: 50%; - background-size:cover; - background-position: center; + background: url(about.jpeg); + width: 50%; + background-size:cover; + background-position: center; } - + /* Login sign up part css of home page */ @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap"); * { - margin: 0; - padding: 0; - box-sizing: border-box; +margin: 0; +padding: 0; +box-sizing: border-box; } body, input { - font-family: "Poppins", sans-serif; -} - -.container { - position: relative; - width: 100%; - background-color: #edeae5; - min-height: 100vh; - overflow: hidden; -} - -.forms-container { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; -} - -.signin-signup { - position: absolute; - top: 50%; - transform: translate(-50%, -50%); - left: 75%; - width: 50%; - transition: 1s 0.7s ease-in-out; - display: grid; - grid-template-columns: 1fr; - z-index: 5; -} - -form { - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; - padding: 0rem 5rem; - transition: all 0.2s 0.7s; - overflow: hidden; - grid-column: 1 / 2; - grid-row: 1 / 2; +font-family: "Poppins", sans-serif; } -form.sign-up-form { - opacity: 0; - z-index: 1; -} -form.sign-in-form { - z-index: 2; -} .title { - font-size: 2.2rem; - color: #444; - margin-bottom: 10px; +font-size: 2.2rem; +color: #444; +margin-bottom: 10px; } .input-field { - max-width: 380px; - width: 100%; - background-color: #f0f0f0; - margin: 10px 0; - height: 55px; - border-radius: 55px; - display: grid; - grid-template-columns: 15% 85%; - padding: 0 0.4rem; - position: relative; +max-width: 380px; +width: 100%; +background-color: #f0f0f0; +margin: 10px 0; +height: 55px; +border-radius: 55px; +display: grid; +grid-template-columns: 15% 85%; +padding: 0 0.4rem; +position: relative; } .input-field i { - text-align: center; - line-height: 55px; - color: #acacac; - transition: 0.5s; - font-size: 1.1rem; +text-align: center; +line-height: 55px; +color: #acacac; +transition: 0.5s; +font-size: 1.1rem; } .input-field input { - background: none; - outline: none; - border: none; - line-height: 1; - font-weight: 600; - font-size: 1.1rem; - color: #333; +background: none; +outline: none; +border: none; +line-height: 1; +font-weight: 600; +font-size: 1.1rem; +color: #333; } .input-field input::placeholder { - color: #aaa; - font-weight: 500; +color: #aaa; +font-weight: 500; } .social-text { - padding: 0.7rem 0; - font-size: 1rem; +padding: 0.7rem 0; +font-size: 1rem; } .social-media { - display: flex; - justify-content: center; +display: flex; +justify-content: center; } .social-icon { - height: 46px; - width: 46px; - display: flex; - justify-content: center; - align-items: center; - margin: 0 0.45rem; - color: #026670; - border-radius: 50%; - border: 1px solid #026670; - text-decoration: none; - font-size: 1.1rem; - transition: 0.3s; +height: 46px; +width: 46px; +display: flex; +justify-content: center; +align-items: center; +margin: 0 0.45rem; +color: #026670; +border-radius: 50%; +border: 1px solid #026670; +text-decoration: none; +font-size: 1.1rem; +transition: 0.3s; } .social-icon:hover { - color: #9fedd7; - border-color: #9fedd7; +color: #9fedd7; +border-color: #9fedd7; } .btn { - width: 150px; - background-color: #026670; - border: none; - outline: none; - height: 49px; - border-radius: 49px; - color: #fff; - text-transform: uppercase; - font-weight: 600; - margin: 10px 0; - cursor: pointer; - transition: 0.5s; +width: 150px; +background-color: #026670; +border: none; +outline: none; +height: 49px; +border-radius: 49px; +color: #fff; +text-transform: uppercase; +font-weight: 600; +margin: 10px 0; +cursor: pointer; +transition: 0.5s; } .btn:hover { - /* background-color: #4d84e2; */ - background-color: #edeae5; - color: #026670; -} -.panels-container { - position: absolute; - height: 100%; - width: 100%; - top: 0; - left: 0; - display: grid; - grid-template-columns: repeat(2, 1fr); -} - -.container:before { - content: ""; - position: absolute; - height: 2000px; - width: 2000px; - top: -10%; - right: 48%; - transform: translateY(-50%); - background-image: linear-gradient(-45deg, #026670 0%, #9fedd7 100%); - transition: 1.8s ease-in-out; - border-radius: 50%; - z-index: 6; -} - -.image { - width: 100%; - transition: transform 1.1s ease-in-out; - transition-delay: 0.4s; +/* background-color: #4d84e2; */ +background-color: #edeae5; +color: #026670; } -.panel { - display: flex; - flex-direction: column; - align-items: flex-end; - justify-content: space-around; - text-align: center; - z-index: 6; -} -.left-panel { - pointer-events: all; - padding: 3rem 17% 2rem 12%; +.image { +width: 100%; +transition: transform 1.1s ease-in-out; +transition-delay: 0.4s; } -.right-panel { - pointer-events: none; - padding: 3rem 12% 2rem 17%; -} -.panel .content { - color: #fff; - transition: transform 0.9s ease-in-out; - transition-delay: 0.6s; -} -.panel h3 { - font-weight: 600; - line-height: 1; - font-size: 1.5rem; -} - -.panel p { - font-size: 0.95rem; - padding: 0.7rem 0; -} -.btn.transparent { - margin: 0; - background: none; - border: 2px solid #fff; - width: 130px; - height: 41px; - font-weight: 600; - font-size: 0.8rem; +/* footer css */ +.footer{ + background: #026670; + padding: 30px 100px; + display: flex; + justify-content: space-between; + align-items: center; } +.footer ul{ + display: flex; + justify-content: center; + align-items:center; -.right-panel .image, -.right-panel .content { - transform: translateX(800px); } - -/* ANIMATION */ - -.container.sign-up-mode:before { - transform: translate(100%, -50%); - right: 52%; +.footer ul li{ + list-style: none; } - -.container.sign-up-mode .left-panel .image, -.container.sign-up-mode .left-panel .content { - transform: translateX(-800px); +.footer ul li a +{ + text-decoration: none; + display: inline-block; + margin: 0 10px; } - -.container.sign-up-mode .signin-signup { - left: 25%; +.footer ul li a img{ + filter: invert(1); + max-width: 20px; } -.container.sign-up-mode form.sign-up-form { - opacity: 1; - z-index: 2; +/* The sidebar menu */ +.sidebar { +height: 100%; /* 100% Full-height */ +width: 0; /* 0 width - change this with JavaScript */ +position: fixed; /* Stay in place */ +z-index: 1; /* Stay on top */ +top: 0; +left: 0; +background-color:#024e54; /* Black*/ +overflow-x: hidden; /* Disable horizontal scroll */ +padding-top: 60px; /* Place content 60px from the top */ +transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */ } -.container.sign-up-mode form.sign-in-form { - opacity: 0; - z-index: 1; +/* The sidebar links */ +.sidebar a { +padding: 8px 8px 8px 32px; +text-decoration: none; +font-size: 25px; +color: white; +display: block; +transition: 0.3s; } -.container.sign-up-mode .right-panel .image, -.container.sign-up-mode .right-panel .content { - transform: translateX(0%); +/* When you mouse over the navigation links, change their color */ +.sidebar a:hover { +color: #fef9c7; } -.container.sign-up-mode .left-panel { - pointer-events: none; +/* Position and style the close button (top right corner) */ +.sidebar .closebtn { +position: absolute; +top: 0; +right: 25px; +font-size: 36px; +margin-left: 50px; } -.container.sign-up-mode .right-panel { - pointer-events: all; +/* The button used to open the sidebar */ +.openbtn { +font-size: 20px; +cursor: pointer; +background-color:#026670; +color: white; +padding: 10px 15px; +border: none; } -@media (max-width: 870px) { - .container { - min-height: 800px; - height: 100vh; - } - .signin-signup { - width: 100%; - top: 95%; - transform: translate(-50%, -100%); - transition: 1s 0.8s ease-in-out; - } - - .signin-signup, - .container.sign-up-mode .signin-signup { - left: 50%; - } - - .panels-container { - grid-template-columns: 1fr; - grid-template-rows: 1fr 2fr 1fr; - } - - .panel { - flex-direction: row; - justify-content: space-around; - align-items: center; - padding: 2.5rem 8%; - grid-column: 1 / 2; - } - - .right-panel { - grid-row: 3 / 4; - } - - .left-panel { - grid-row: 1 / 2; - } - - .image { - width: 200px; - transition: transform 0.9s ease-in-out; - transition-delay: 0.6s; - } - - .panel .content { - padding-right: 15%; - transition: transform 0.9s ease-in-out; - transition-delay: 0.8s; - } - - .panel h3 { - font-size: 1.2rem; - } - - .panel p { - font-size: 0.7rem; - padding: 0.5rem 0; - } - - .btn.transparent { - width: 110px; - height: 35px; - font-size: 0.7rem; - } - - .container:before { - width: 1500px; - height: 1500px; - transform: translateX(-50%); - left: 30%; - bottom: 68%; - right: initial; - top: initial; - transition: 2s ease-in-out; - } - - .container.sign-up-mode:before { - transform: translate(-50%, 100%); - bottom: 32%; - right: initial; - } - - .container.sign-up-mode .left-panel .image, - .container.sign-up-mode .left-panel .content { - transform: translateY(-300px); - } - - .container.sign-up-mode .right-panel .image, - .container.sign-up-mode .right-panel .content { - transform: translateY(0px); - } - - .right-panel .image, - .right-panel .content { - transform: translateY(300px); - } - - .container.sign-up-mode .signin-signup { - top: 5%; - transform: translate(-50%, 0); - } +.openbtn:hover { +background-color:#024e54; } - -/* footer css */ -.footer{ - background: #026670; - padding: 30px 100px; - display: flex; - justify-content: space-between; - align-items: center; +/* Style page content - use this if you want to push the page content to the right when you open the side navigation */ +#main { +transition: margin-left .5s; /* If you want a transition effect */ +padding: 20px; } -.footer ul{ - display: flex; - justify-content: center; - align-items:center; +/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */ +@media screen and (max-height: 450px) { +.sidebar {padding-top: 15px;} +.sidebar a {font-size: 18px;} } -.footer ul li{ - list-style: none; -} -.footer ul li a -{ - text-decoration: none; - display: inline-block; - margin: 0 10px; +@media screen and (max-width: 700px) { +.sidebar { + width: 100%; + height: auto; + position: relative; } -.footer ul li a img{ - filter: invert(1); - max-width: 20px; +.sidebar a {float: left;} +div.content {margin-left: 0;} } -/* media visiblity */ - -@media (max-width: 570px) { - form { - padding: 0 1.5rem; - } - - .image { - display: none; - } - .panel .content { - padding: 0.5rem 1rem; - } - .container { - padding: 1.5rem; - } - - .container:before { - bottom: 72%; - left: 50%; - } - - .container.sign-up-mode:before { - bottom: 28%; - left: 50%; - } +@media screen and (max-width: 400px) { +.sidebar {padding-top: 15px;} +.sidebar a {font-size: 18px;} } \ No newline at end of file diff --git a/templates/Language.html b/templates/Language.html new file mode 100644 index 0000000..2249a6c --- /dev/null +++ b/templates/Language.html @@ -0,0 +1,39 @@ +{% load static %} + + + + + + + + + Language and literature + + +

Language and literature Related Questions

+
+ {% for i in que %} + {% if i.topic == 'Language and Literature' %} +
+
+
{{i.topic}}
+
posted by:{{i.postedBy}}
+

{{i.quesText}}

+ See Answer + Comments +
+
+
+ + {% endif %} + {% endfor %} + + +
+ + + \ No newline at end of file diff --git a/templates/Miss.html b/templates/Miss.html new file mode 100644 index 0000000..5673d5c --- /dev/null +++ b/templates/Miss.html @@ -0,0 +1,37 @@ +{% load static %} + + + + + + + + + Miscellaneous + + +

Miscellaneous Questions

+
+ {% for i in que %} + {% if i.topic == 'Miscellaneous' %} +
+
+
{{i.topic}}
+
posted by:{{i.postedBy}}
+

{{i.quesText}}

+ See Answer + Comments +
+
+
+ + {% endif %} + {% endfor %} +
+ + + \ No newline at end of file diff --git a/templates/Sdashboard.html b/templates/Sdashboard.html new file mode 100644 index 0000000..984d839 --- /dev/null +++ b/templates/Sdashboard.html @@ -0,0 +1,106 @@ +{% load static %} + + + + + + + + + + +
+ + + +
+ + +
+ + + +
+ +
+ yaha pe stars aur achievements wgera ayegi
+
+ +
+ +
+
+ + +
+ \ No newline at end of file diff --git a/templates/Social.html b/templates/Social.html new file mode 100644 index 0000000..3946e5e --- /dev/null +++ b/templates/Social.html @@ -0,0 +1,38 @@ +{% load static %} + + + + + + + + + Social Science + + +

Social science Related Questions

+
+ {% for i in que %} + {% if i.topic == 'Social Science' %} +
+
+
{{i.topic}}
+
posted by:{{i.postedBy}}
+

{{i.quesText}}

+ See Answer + Comments +
+
+
+ {% endif %} + {% endfor %} + + +
+ + + \ No newline at end of file diff --git a/templates/Tdashboard.html b/templates/Tdashboard.html new file mode 100644 index 0000000..17f38df --- /dev/null +++ b/templates/Tdashboard.html @@ -0,0 +1,125 @@ +{% load static %} + + + + + + + + + + +
+ + + +
+ + +
+ + + +
+ +
+ yaha pe stars aur achievements wgera ayegi
+
+ +
+ +
+
+
Notifications!
+ {% for i in que %} + {% if i.accepted == False %} + +
+ + + +
+

+ {% endif %} + {% endfor %} +
+ +
+ + +
+ \ No newline at end of file diff --git a/templates/answer.html b/templates/answer.html new file mode 100644 index 0000000..45791ce --- /dev/null +++ b/templates/answer.html @@ -0,0 +1,67 @@ + +{% load static %} + + + + + + Answer + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ {% csrf_token %} +
+ Answer +

{{queId.quesText}} {{queId.time}}

+ + +
+ + + + + +
+
+ + + + + diff --git a/templates/index.html b/templates/index.html index c7c6d9c..716c9fd 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,4 +1,4 @@ -{%load static%} +{% load static %} @@ -9,12 +9,14 @@ + crossorigin="anonymous" + > - +
+
+ +
+ {% for i in que %} +
+
+
{{i.topic}}
+
posted by:{{i.postedBy}}
+

{{i.quesText}}

+ See Answer + Comments +
+
+
+ {% endfor %} + + +
+ + + +
@@ -52,109 +90,6 @@

About the Content

- -
-
-
- -
- -
-
-
-

New here ?

-

- Register Now! -

- -
- -
-
-
-

One of us ?

-

- Log In here! -

- -
- -
-
-
- -