Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
update! :)
  • Loading branch information
nishi7409 committed Dec 28, 2020
1 parent 0cfa118 commit 61c2330
Show file tree
Hide file tree
Showing 26 changed files with 258 additions and 64 deletions.
Binary file modified web_app/app/__pycache__/models.cpython-36.pyc
Binary file not shown.
Binary file modified web_app/app/__pycache__/views.cpython-36.pyc
Binary file not shown.
File renamed without changes.
Binary file not shown.
34 changes: 34 additions & 0 deletions web_app/app/migrations/0002_auto_20201227_1759.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Generated by Django 2.2.13 on 2020-12-27 17:59

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('app', '0001_initial'),
]

operations = [
migrations.RenameField(
model_name='student',
old_name='first_name',
new_name='name',
),
migrations.RemoveField(
model_name='student',
name='last_name',
),
migrations.RemoveField(
model_name='student',
name='username',
),
migrations.RemoveField(
model_name='university',
name='address',
),
migrations.RemoveField(
model_name='university',
name='phone_num',
),
]
Binary file not shown.
4 changes: 2 additions & 2 deletions web_app/app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
class University(models.Model):
name = models.CharField(max_length=200, null=False, blank=False)
domain = models.CharField(max_length=20, null=False, blank=False)
# registeredStudents = modals.IntegerField()

class Student(models.Model):
email = models.CharField(max_length=100, null=False, blank=False)
Expand All @@ -14,6 +15,5 @@ class Student(models.Model):
class URLCalendar(models.Model):
calendar = models.CharField(max_length=200, null=False, blank=False)


def saveUni(self):

pass
15 changes: 12 additions & 3 deletions web_app/app/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.http import HttpResponse, HttpRequest, HttpResponseServerError, HttpResponseRedirect
from django.shortcuts import render, redirect
from django.shortcuts import redirect
from django.shortcuts import render
from django.conf import settings
from .models import *
Expand All @@ -14,7 +14,7 @@
from django.db.models import Q
from django import forms
import json
from ..microservices.googleCal import urlGenerator
from .microservices.googleCal import urlGenerator

# Create your views here.
def index(request):
Expand All @@ -33,4 +33,13 @@ def save_student(request):
newStud = Student(name="Nishant Srivastava", email="[email protected]", phone_num=5186182796, calendar_link=uniqueURL)
newStud.save()
else:
pass
pass

def register(request):
pass

def login(request):
pass

def otp():
pass
Binary file modified web_app/mydatabase
Binary file not shown.
30 changes: 30 additions & 0 deletions web_app/static/css/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.top{
color: white;
background-image: url("https://images.pexels.com/photos/159490/yale-university-landscape-universities-schools-159490.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260");
background-repeat: no-repeat;
background-size: cover;
height: 100%;
width: 100%;
}

#titleHeader{
font-size: 5vw;
}

#titleSubtitle{
font-size: 1vw;
}

.middle{
background-color: whitesmoke;
height: 100%;
width: 100%;
}

.video{
background-image: url("https://images.pexels.com/photos/3877381/pexels-photo-3877381.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260");
background-repeat: no-repeat;
background-size: cover;
width: 100%;
height: 100%;
}
Binary file added web_app/static/img/google_calendar_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_app/static/img/ical_calendar_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_app/static/img/outlook_calendar_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
53 changes: 53 additions & 0 deletions web_app/static/scripts/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
document.addEventListener('DOMContentLoaded', function () {

// Modals

var rootEl = document.documentElement;
var allModals = getAll('.modal');
var modalButtons = getAll('.modal-button');
var modalCloses = getAll('.modal-background, .modal-close, .modal-card-head .delete, .modal-card-foot .button');

if (modalButtons.length > 0) {
modalButtons.forEach(function (el) {
el.addEventListener('click', function () {
var target = document.getElementById(el.dataset.target);
rootEl.classList.add('is-clipped');
target.classList.add('is-active');
});
});
}

if (modalCloses.length > 0) {
modalCloses.forEach(function (el) {
el.addEventListener('click', function () {
closeModals();
});
});
}

document.addEventListener('keydown', function (event) {
var e = event || window.event;
if (e.keyCode === 27) {
closeModals();
}
});

function closeModals() {
rootEl.classList.remove('is-clipped');
allModals.forEach(function (el) {
el.classList.remove('is-active');
});
}

// Functions

function getAll(selector) {
return Array.prototype.slice.call(document.querySelectorAll(selector), 0);
}
});


function toggleModal(modal){
var count_modal = document.getElementById('countModal');
count_modal.classList.toggle('is-active');
}
43 changes: 6 additions & 37 deletions web_app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,22 @@

<head>
<title>{% block title %}Home{% endblock %}</title>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<script src="https://kit.fontawesome.com/38a0fd0978.js" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/38a0fd0jquery978.js" crossorigin="anonymous"></script>
</head>

<body>
<!-- Navigational Bar [START] -->
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/">
<img src="https://media.discordapp.net/attachments/771416611092692992/792773588099923968/unknown.png" width="112" height="28">
</a>
</div>
<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
<a class="button is-danger">
<strong>Sign up</strong>
</a>
<a class="button is-success">
Log in
</a>
</div>
</div>
</div>
</div>
</nav>
<!-- Navigational Bar [END] -->

{% include 'navbar.html' %}

<!-- Main Content [START] -->
<div class='page' style="width:100%;height:100%;margin:0;">
<div class='page'">
{% block content %}
{% endblock %}
</div>
<!-- Main Content [END] -->

<!-- Footer Bar [START] -->
<footer class="footer" style="width:100%;margin:0;">
<div class="content has-text-centered">
<p>
<strong>CourseCal</strong> was developed by <a href="https://github.com/nishi7409/CourseCal/">amazing people</a> <i style="color:tomato;" class="fas fa-heart"></i></a>
</p>
</div>
</footer>
<!-- Footer Bar [END] -->

{% include 'footer.html' %}
</body>
</html>
8 changes: 8 additions & 0 deletions web_app/templates/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<footer class="footer" style="width:100%;">
<div class="content has-text-centered">
<p>
<strong>CourseCal</strong> was developed by <a href="https://github.com/nishi7409/CourseCal/">amazing
people</a> <i style="color:tomato;" class="fas fa-heart"></i></a>
</p>
</div>
</footer>
109 changes: 87 additions & 22 deletions web_app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,92 @@
<!-- put main code here -->
{% block content %}

<div class="card">
<div class="card-content">
<p class="title">
“Life is a journey”
</p>
<p class="subtitle">
Dad
</p>
</div>
<footer class="card-footer">
<p class="card-footer-item">
<span>
View on <a href="https://twitter.com/codinghorror/status/506010907021828096">Twitter</a>
</span>
</p>
<p class="card-footer-item">
<span>
Share on <a href="#">Facebook</a>
</span>
</p>
</footer>
</div>
<script type="text/javascript" src="{% static '/scripts/index.js' %}"></script>
<link rel="stylesheet" type="text/css" href="{% static 'css/index.css' %}" />

<div class="top">
<section class="section">
<div class="container.is-widescreen">
<h1 id="titleHeader">CourseCal</h1>
<p id="titleSubtitle">Automate the process of taking your school's schedule and implementing it into your personal calendar</p>
</div>
</section>
</div>
<div class="middle">
<section class="section">
<div class="container.is-max-desktop">
<div class="columns is-mobile">
<div class="column is-one-third">
<div class="card">
<header class="card-header">
<p class="card-header-title">Security</p>
<a href="#" class="card-header-icon" aria-label="more options">
<span class="icon">
<i class="fas fa-angle-down" aria-hidden="true"></i>
</span>
</a>
</header>
<div class="card-content">
<div class="content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
</div>
</div>
</div>
</div>
<div class="column is-one-third">
<div class="card">
<header class="card-header">
<p class="card-header-title">Students</p>
<a href="#" class="card-header-icon" aria-label="more options">
<span class="icon">
<i class="fas fa-angle-down" aria-hidden="true"></i>
</span>
</a>
</header>
<div class="card-content">
<div class="content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris. Lorem ipsum dolor sit
amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Phasellus nec iaculis mauris.Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Phasellus nec iaculis mauris.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis
mauris.
</div>
</div>
</div>
</div>
<div class="column is-one-third">
<div class="card">
<header class="card-header">
<p class="card-header-title">Automated</p>
<a href="#" class="card-header-icon" aria-label="more options">
<span class="icon">
<i class="fas fa-angle-down" aria-hidden="true"></i>
</span>
</a>
</header>
<div class="card-content">
<div class="content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris. Lorem ipsum dolor sit
amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Phasellus nec iaculis mauris.Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Phasellus nec iaculis mauris.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis
mauris.
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<div class="video">
<section class="section">
<div class="container.is-max-desktop">
<figure class="image is-16by9">
<iframe class="has-ratio" src="https://www.youtube.com/embed/duqFO4wony8"
allowfullscreen></iframe>
</figure>
</div>
</section>
</div>
{% endblock %}
22 changes: 22 additions & 0 deletions web_app/templates/navbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/">
<img src="https://media.discordapp.net/attachments/771416611092692992/792773588099923968/unknown.png"
width="112" height="28">
</a>
</div>
<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
<a class="button is-danger">
<strong>Sign up</strong>
</a>
<a class="button is-success">
Log in
</a>
</div>
</div>
</div>
</div>
</nav>
Binary file modified web_app/web_app/__pycache__/settings.cpython-36.pyc
Binary file not shown.
4 changes: 4 additions & 0 deletions web_app/web_app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,7 @@
# https://docs.djangoproject.com/en/2.2/howto/static-files/

STATIC_URL = '/static/'

STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static/'),
)

0 comments on commit 61c2330

Please sign in to comment.