diff --git a/hwlog/db.sqlite3 b/hwlog/db.sqlite3 index 728d2af..8c1f865 100644 Binary files a/hwlog/db.sqlite3 and b/hwlog/db.sqlite3 differ diff --git a/hwlog/log/__pycache__/views.cpython-36.pyc b/hwlog/log/__pycache__/views.cpython-36.pyc index 0762590..75d988a 100644 Binary files a/hwlog/log/__pycache__/views.cpython-36.pyc and b/hwlog/log/__pycache__/views.cpython-36.pyc differ diff --git a/hwlog/log/static/log/images/edit-icon.svg b/hwlog/log/static/log/images/edit-icon.svg new file mode 100644 index 0000000..0f64f84 --- /dev/null +++ b/hwlog/log/static/log/images/edit-icon.svg @@ -0,0 +1,11 @@ + + + + + + diff --git a/hwlog/log/static/log/style.css b/hwlog/log/static/log/style.css index 86e343e..0bbfbdb 100644 --- a/hwlog/log/static/log/style.css +++ b/hwlog/log/static/log/style.css @@ -8,7 +8,7 @@ html { min-height: 100%; } body { - font-family: sans-serif; + font-family: "Helvetica", "Arial", sans-serif; } p { @@ -40,28 +40,33 @@ footer { color: #d6d6d6 } -.hw-table{ +.log-container{ width: 900px; - border: 4px solid black; - border-collapse: collapse; +} +.log-container-row{ + display:flex; + flex-direction: row; + width:100%; + height: 100px; + margin-bottom: 5px; } .course-name-box{ - width: 30%; + width: 35%; + padding: 15px; + display: flex; + position: relative; + justify-content: center; text-align: center; - vertical-align: center; + align-items: center; color: white; background-color: #515151; } .hw-box{ - vertical-align: top; -} -.course-name-box,.hw-box{ - border: 3px solid black; - border-collapse: collapse; - height: 100px; + width: inherit; + display: flex; padding: 15px; + background-color: #e8e8e8; } - .menu-container { display: flex; width: 900px; @@ -146,6 +151,9 @@ footer { justify-content: center; } +.content-heading{ + margin-bottom: 25px; +} .lgn-container{ display: flex; flex-direction: column; @@ -189,6 +197,15 @@ td { background-color: lightgrey; border: 2px solid black; } +.edit-icon{ + position: absolute; + bottom: 10px; + right: 10px; + width: 8%; +} +.icon-flex{ + display:flex; +} @media only screen and (max-width: 400px) {} diff --git a/hwlog/log/templates/configure.html b/hwlog/log/templates/configure.html index ff9061c..ea65070 100644 --- a/hwlog/log/templates/configure.html +++ b/hwlog/log/templates/configure.html @@ -2,43 +2,46 @@ {% block title %}Settings{% endblock %} {% block content %} - -
-
-
-

Select your classes

- {% csrf_token %} - {% load widget_tweaks %} -
- - {% render_field form.course_1 id+="c1" %} -
-
- - {% render_field form.course_2 id+="c2" %} -
-
- - {% render_field form.course_3 id+="c3" %} -
-
- - {% render_field form.course_4 id+="c4" %} -
-
- - {% render_field form.course_5 id+="c5" %} -
-
- - {% render_field form.course_6 id+="c6" %} -
-
- - {% render_field form.course_7 id+="c7" %} + {% if user.is_authenticated %} + +
+
+

Select your classes

+ {% csrf_token %} + {% load widget_tweaks %} +
+ + {% render_field form.course_1 id+="c1" %} +
+
+ + {% render_field form.course_2 id+="c2" %} +
+
+ + {% render_field form.course_3 id+="c3" %} +
+
+ + {% render_field form.course_4 id+="c4" %} +
+
+ + {% render_field form.course_5 id+="c5" %} +
+
+ + {% render_field form.course_6 id+="c6" %} +
+
+ + {% render_field form.course_7 id+="c7" %} +
+
-
-
- + + {% else %} + Login before you can edit! + {% endif %} {% endblock %} diff --git a/hwlog/log/templates/detail.html b/hwlog/log/templates/detail.html index 48cb254..39ffffb 100644 --- a/hwlog/log/templates/detail.html +++ b/hwlog/log/templates/detail.html @@ -2,14 +2,20 @@ {% block title %}Edit HW{% endblock %} {% block content %} - {% if user.is_authenticated %} -

{{course.course_name}}

-
- {% csrf_token %} - {{ form.as_p }} - -
- {% else %} - Login before you can edit! - {% endif %} +
+
+ {% if user.is_authenticated %} +

{{course.course_name}}

+
+ {% csrf_token %} +
+ {{ form.hw }} +
+ +
+ {% else %} + Login before you can edit! + {% endif %} +
+
{% endblock %} diff --git a/hwlog/log/templates/index.html b/hwlog/log/templates/index.html index abcfcb5..46665ac 100644 --- a/hwlog/log/templates/index.html +++ b/hwlog/log/templates/index.html @@ -5,17 +5,37 @@
{% if user.is_authenticated %} {% if user.courses_joined.count > 0 %} + +
+ {% for course in user.courses_joined.all %} + {% if course.course_name == "None" %} + {% else %} +
+
{{course.course_name}} + + {% load static %} +
+
{{course.hw}}
+
+ {% endif %} + {% endfor %} +
{% else %} Please select your classes first! {% endif %} diff --git a/hwlog/log/templates/registration/login.html b/hwlog/log/templates/registration/login.html index 6f02ec8..71e9b53 100644 --- a/hwlog/log/templates/registration/login.html +++ b/hwlog/log/templates/registration/login.html @@ -5,7 +5,7 @@ {% block content %}
-

Login

+

Login

{% csrf_token %} diff --git a/hwlog/log/templates/signup.html b/hwlog/log/templates/signup.html index 86479d9..e28fe59 100644 --- a/hwlog/log/templates/signup.html +++ b/hwlog/log/templates/signup.html @@ -1,9 +1,10 @@ {% extends 'base.html' %} +{% block title %}Sign up{% endblock %} {% block content %}
-

Sign up

+

Sign up

{% csrf_token %} {{ form.as_p }} diff --git a/hwlog/log/views.py b/hwlog/log/views.py index ce3a142..6bec318 100644 --- a/hwlog/log/views.py +++ b/hwlog/log/views.py @@ -19,7 +19,7 @@ def signup(request): #signup page if request.method == 'POST': form = UserCreationForm(request.POST) if form.is_valid(): - form.save() + form.save() #what does this do username = form.cleaned_data.get('username') raw_password = form.cleaned_data.get('password1') user = authenticate(username=username, password=raw_password) diff --git a/imgs/edit-icon.svg b/imgs/edit-icon.svg new file mode 100644 index 0000000..4218d23 --- /dev/null +++ b/imgs/edit-icon.svg @@ -0,0 +1,9 @@ + + + + + +