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>
<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">
<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>
Description: {{assignment.description}}<br>
Perfect Score: {{assignment.max_points}}<br>
Passing Score: {{assignment.passing_score}}<br>
</p>
</body>
</html>
\ No newline at end of file
{% extends 'assignments/base.html' %}
{% block title %}{{assignment.name}} | {{assignment.course.course_code}}{% endblock %}
{% block content %}
<h1>{{assignment.course.course_code}} | {{assignment.course.course_title}} - {{assignment.course.section}}</h1>
<div>
<h2>Assignment: {{assignment.name}}</h2>
<p>
<span>Description:</span> {{assignment.description}}<br><br>
<span>Passing Score:</span> <span class="passing">{{assignment.passing_score}}</span><br>
<span>Perfect Score:</span> <span class="perfect">{{assignment.max_points}}</span><br>
</p>
</div>
{% endblock %}
\ No newline at end of file
<!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">
<title>Assignments</title>
</head>
<body>
{% extends 'assignments/base.html' %}
{% block content %}
<h1>Assignments Per Course</h1>
<h2>List of Courses:</h3>
{% if assignment_list %}
<ul>
{% for course in course_list %}
<li>{{course.course_code}} | {{course.course_title}} - {{course.section}}</li>
{% for assignment in assignment_list %}
{% if assignment.course.course_code == course.course_code %}
<div>
<h2>List of Courses:</h3>
{% if assignment_list %}
<ul>
<li><a href="{% url 'assignments:details' assignment.id %}">{{assignment.name}}</a></li>
{% for course in course_list %}
<li><span>{{course.course_code}}</span> | {{course.course_title}} - {{course.section}}</li>
{% for assignment in assignment_list %}
{% if assignment.course.course_code == course.course_code %}
<ul>
<li><a href="{% url 'assignments:details' assignment.id %}">{{assignment.name}}</a></li>
</ul>
{% endif %}
{% endfor %}
<br><br>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
<br>
{% endfor %}
</ul>
{% else %}
<p>There are no assignments under any course.</p>
{% endif %}
</body>
</html>
\ No newline at end of file
{% else %}
<p>There are no assignments under any course.</p>
{% endif %}
</div>
{% 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