used proper flex layout, added assignment image

parent 720b75e0
...@@ -18,7 +18,7 @@ Name: {{assignment.name}}<br> ...@@ -18,7 +18,7 @@ Name: {{assignment.name}}<br>
Description: {% if assignment.description != None and assignment.description != '' %}{{ assignment.description }}{% else %}No description provided.{% endif %}<br> Description: {% if assignment.description != None and assignment.description != '' %}{{ assignment.description }}{% else %}No description provided.{% endif %}<br>
Perfect score: {{assignment.max_points}}<br> Perfect score: {{assignment.max_points}}<br>
Passing score: {{assignment.passing_score}}<br> Passing score: {{assignment.passing_score}}<br>
Image: {% if assignment.image != None %}<br>{{assignment.image}}{% else %}No image provided.{% endif %}<br> Image: {% if assignment.image != None %}<br><img src="{% get_media_prefix %}{{assignment.image}}" id="assignment-image" alt="Image failed to load.">{% else %}No image provided.{% endif %}<br>
</span> </span>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% load static %} {% load static %}
{% block styles %} {% block styles %}
<link rel="stylesheet" type="text/css" href="{% static 'assignments/css/style.css' %}"> <link rel="stylesheet" href="{% static 'assignments/css/style.css' %}">
{% endblock %} {% endblock %}
{% block title %}Assignments{% endblock %} {% block title %}Assignments{% endblock %}
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
{% if all_courses.count == 0 %} {% if all_courses.count == 0 %}
<p id="no-courses">No courses found.</p> <p id="no-courses">No courses found.</p>
{% else %} {% else %}
<ul id="table"> {% for course in all_courses %}
{% for course in all_courses %} <ul class="table">
<li>{{course.code}} {{course.title}} {{course.section}}</li> <li><strong>{{course.code}} {{course.title}} {{course.section}}</strong></li>
<ul> <ul class="subtable">
{% if course.assignment_set.all.count == 0 %} {% if course.assignment_set.all.count == 0 %}
<li>No assignments found.</li> <li>No assignments found.</li>
{% else %} {% else %}
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</ul> </ul>
{% endfor %}
</ul> </ul>
<div class="table-gutter"></div>
{% endfor %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment