Add base html template and css styling to assignments

parent 3baf6e19
body {
font-family: sans-serif, Arial, Helvetica;
color:#2d384e;
margin: 40px;
line-height: 2;
}
div {
margin: auto;
width: 50%;
border: 3px solid rgb(194, 129, 7);
padding: 20px 40px 40px 80px;
}
h1 {
font-size: 40px;
text-align: center;
text-decoration: underline;
}
h2 {
font-size: 28px;
}
li {
font-size: 20px;
}
p {
font-size: 20px;
}
span {
font-weight: bold;
}
span.perfect {
color: rgb(96, 189, 96);
}
span.passing {
color:#bb5959
}
\ No newline at end of file
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="{% static 'assignments/style.css' %}">
<title>{% block title %} Assignments {% endblock %}</title>
</head>
<body>
{% block content %}
{% endblock %}
</body>
</html>
\ No newline at end of file
<!DOCTYPE html> {% extends 'assignments/base.html' %}
<html lang="en"> {% block title %}{{assignment.name}} | {{assignment.course.course_code}}{% endblock %}
<head> {% block content %}
<meta charset="UTF-8"> <h1>{{assignment.course.course_code}} | {{assignment.course.course_title}} - {{assignment.course.section}}</h1>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <div>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <h2>Assignment: {{assignment.name}}</h2>
<title>{{assignment.name}} | {{assignment.course.course_code}}</title>
</head>
<body>
<h1>Course/Section: {{assignment.course.course_code}} | {{assignment.course.course_title}} - {{assignment.course.section}}</h1>
<h2>Assignment Name: {{assignment.name}}</h2>
<p> <p>
Description: {{assignment.description}}<br> <span>Description:</span> {{assignment.description}}<br><br>
Perfect Score: {{assignment.max_points}}<br> <span>Passing Score:</span> <span class="passing">{{assignment.passing_score}}</span><br>
Passing Score: {{assignment.passing_score}}<br> <span>Perfect Score:</span> <span class="perfect">{{assignment.max_points}}</span><br>
</p> </p>
</body> </div>
</html> {% endblock %}
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html> {% extends 'assignments/base.html' %}
<html lang="en"> {% block content %}
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Assignments</title>
</head>
<body>
<h1>Assignments Per Course</h1> <h1>Assignments Per Course</h1>
<div>
<h2>List of Courses:</h3> <h2>List of Courses:</h3>
{% if assignment_list %} {% if assignment_list %}
<ul> <ul>
{% for course in course_list %} {% for course in course_list %}
<li>{{course.course_code}} | {{course.course_title}} - {{course.section}}</li> <li><span>{{course.course_code}}</span> | {{course.course_title}} - {{course.section}}</li>
{% for assignment in assignment_list %} {% for assignment in assignment_list %}
{% if assignment.course.course_code == course.course_code %} {% if assignment.course.course_code == course.course_code %}
<ul> <ul>
...@@ -20,12 +14,11 @@ ...@@ -20,12 +14,11 @@
</ul> </ul>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<br> <br><br>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
<p>There are no assignments under any course.</p> <p>There are no assignments under any course.</p>
{% endif %} {% endif %}
</div>
</body> {% endblock %}
</html> \ No newline at end of file
\ 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