Update assignments page to also show images

parent 4b29953b
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %} {% load static %}
{% block styles %} {% block styles %}
<link rel="stylesheet" type="text/css" href="{% static 'assignments/style.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'assignments/style.css' %}">
{% endblock %} {% endblock %}
...@@ -9,6 +10,9 @@ ...@@ -9,6 +10,9 @@
<h1>{{assignment.course.course_code}} | {{assignment.course.course_title}} - {{assignment.course.section}}</h1> <h1>{{assignment.course.course_code}} | {{assignment.course.course_title}} - {{assignment.course.section}}</h1>
<div> <div>
<h2>Assignment: {{assignment.name}}</h2> <h2>Assignment: {{assignment.name}}</h2>
{% if assignment.assignment_image %}
<img src = "{{ assignment.assignment_image.url }}"><br>
{% endif %}
<p> <p>
<span>Description:</span> {{assignment.description}}<br><br> <span>Description:</span> {{assignment.description}}<br><br>
<span>Passing Score:</span> <span class="passing">{{assignment.passing_score}}</span><br> <span>Passing Score:</span> <span class="passing">{{assignment.passing_score}}</span><br>
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %} {% load static %}
{% block styles %} {% block styles %}
<link rel="stylesheet" type="text/css" href="{% static 'assignments/style.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'assignments/style.css' %}">
{% endblock %} {% endblock %}
{% block title %}Assignments{% endblock %} {% block title %}Assignments{% endblock %}
{% block content %} {% block content %}
<h1>Assignments Per Course</h1> <h1>Assignments Per Course</h1>
......
body { body {
font-family: sans-serif, Arial, Helvetica; font-family: sans-serif, Arial, Helvetica;
color:#2d384e; color:#2d384e;
margin: 40px;
line-height: 2; line-height: 2;
} }
...@@ -9,7 +8,7 @@ div { ...@@ -9,7 +8,7 @@ div {
margin: auto; margin: auto;
width: 50%; width: 50%;
border: 3px solid rgb(194, 129, 7); border: 3px solid rgb(194, 129, 7);
padding: 20px 40px 40px 80px; padding: 30px 40px 40px 40px;
} }
h1 { h1 {
...@@ -20,6 +19,7 @@ h1 { ...@@ -20,6 +19,7 @@ h1 {
h2 { h2 {
font-size: 28px; font-size: 28px;
margin: 0px 0px 10px 0px;
} }
li { li {
...@@ -41,3 +41,8 @@ span.perfect { ...@@ -41,3 +41,8 @@ span.perfect {
span.passing { span.passing {
color:#bb5959 color:#bb5959
} }
img {
max-width: 100%;
height: auto;
}
\ 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