1
1
{% extends 'base.html' %}
2
2
{% load tz %}
3
3
4
+ {% block styles %}
5
+ < style >
6
+ .course-header {
7
+ background-color : # f8f9fa ;
8
+ border-bottom : 2px solid # e9ecef ;
9
+ padding : 20px 0 ;
10
+ margin-bottom : 30px ;
11
+ }
12
+
13
+ .course-title {
14
+ color : # 343a40 ;
15
+ margin-bottom : 10px ;
16
+ }
17
+
18
+ .course-description {
19
+ color : # 6c757d ;
20
+ font-size : 1.1em ;
21
+ margin-bottom : 20px ;
22
+ }
23
+
24
+ .action-buttons {
25
+ margin-bottom : 30px ;
26
+ }
27
+
28
+ .action-buttons .btn {
29
+ margin-right : 10px ;
30
+ }
31
+
32
+ .section-title {
33
+ color : # 495057 ;
34
+ border-bottom : 2px solid # dee2e6 ;
35
+ padding-bottom : 10px ;
36
+ margin-bottom : 20px ;
37
+ }
38
+
39
+ .homework-item , .project-item {
40
+ background-color : # fff ;
41
+ border : 1px solid # dee2e6 ;
42
+ border-radius : 5px ;
43
+ padding : 15px ;
44
+ margin-bottom : 15px ;
45
+ transition : all 0.3s ease;
46
+ }
47
+
48
+ .homework-item : hover , .project-item : hover {
49
+ box-shadow : 0 5px 15px rgba (0 , 0 , 0 , 0.1 );
50
+ }
51
+
52
+ .item-title {
53
+ font-weight : bold;
54
+ color : # 007bff ;
55
+ }
56
+
57
+ .item-title a {
58
+ color : inherit;
59
+ text-decoration : none;
60
+ }
61
+
62
+ .item-title a : hover {
63
+ text-decoration : underline;
64
+ }
65
+
66
+ .item-date {
67
+ font-style : italic;
68
+ color : # 6c757d ;
69
+ }
70
+
71
+ .badge {
72
+ font-size : 0.9em ;
73
+ padding : 5px 10px ;
74
+ }
75
+
76
+ .alert-info {
77
+ background-color : # e1f5fe ;
78
+ border-color : # b3e5fc ;
79
+ color : # 01579b ;
80
+ }
81
+ </ style >
82
+ {% endblock %}
83
+
4
84
{% block breadcrumbs %}
5
- < li > < a href ="{% url 'course' course.slug %} "> {{ course.title }}</ a > </ li >
85
+ < li class =" breadcrumb-item active " aria-current =" page " > < a href ="{% url 'course' course.slug %} "> {{ course.title }}</ a > </ li >
6
86
{% endblock %}
7
87
8
88
{% block content %}
9
- < h2 > {{ course.title }}</ h2 >
10
-
11
- < div >
12
- < p > {{ course.description }}</ p >
89
+ < div class ="course-header ">
90
+ < h2 class ="course-title "> {{ course.title }}</ h2 >
91
+ < p class ="course-description "> {{ course.description }}</ p >
13
92
</ div >
14
93
15
- < div >
16
- < p >
17
- {% if course.first_homework_scored %}
18
- < a class ="btn btn-primary " href ="{% url 'leaderboard' course.slug %} " role ="button "> Course leaderboard</ a >
19
- {% endif %}
20
- {% if is_authenticated %}
21
- < a class ="btn btn-info " href ="{% url 'enrollment' course.slug %} " role ="button "> Edit course profile</ a >
22
- {% endif %}
23
- </ p >
94
+ < div class ="action-buttons ">
95
+ {% if course.first_homework_scored %}
96
+ < a class ="btn btn-primary " href ="{% url 'leaderboard' course.slug %} " role ="button "> Course leaderboard</ a >
97
+ {% endif %}
98
+ {% if is_authenticated %}
99
+ < a class ="btn btn-info " href ="{% url 'enrollment' course.slug %} " role ="button "> Edit course profile</ a >
100
+ {% endif %}
24
101
</ div >
25
102
26
-
27
103
{% if is_authenticated and course.first_homework_scored %}
28
104
< div class ="alert alert-info " role ="alert ">
29
- < p > Total score: {{ total_score }}</ p >
105
+ < p class =" mb-0 " > Total score: {{ total_score }}</ p >
30
106
</ div >
31
107
{% endif %}
32
108
33
109
{% if homeworks %}
34
110
< div class ="pb-3 ">
35
- < h2 > Homework </ h2 >
111
+ < h3 class =" section-title " > Homeworks </ h3 >
36
112
37
113
{% for hw in homeworks %}
38
- < div class ="p-2 {% cycle 'bg-white' '' %} ">
114
+ < div class ="homework-item ">
39
115
< div class ="row align-items-center ">
40
- < div class ="col-5 ">
116
+ < div class ="col-md-5 item-title ">
41
117
{% if hw.state == 'CL' %}
42
118
{{ hw.title }}
43
119
{% else %}
@@ -46,20 +122,20 @@ <h2>Homework</h2>
46
122
</ a >
47
123
{% endif %}
48
124
</ div >
49
- < div class ="col-4 text-md-right " data-toggle ="tooltip " data-placement ="right " title ="{{ hw.days_until_due }} days left ">
125
+ < div class ="col-md- 4 text-md-right item-date " data-toggle ="tooltip " data-placement ="right " title ="{{ hw.days_until_due }} days left ">
50
126
< span class ="local-date "> {{ hw.due_date | date:"c" }}</ span >
51
127
</ div >
52
- < div class ="col-3 text-md-right ">
128
+ < div class ="col-md- 3 text-md-right ">
53
129
{% if hw.state == 'CL' %}
54
- < span class ="badge bg -secondary "> Closed</ span >
130
+ < span class ="badge badge -secondary "> Closed</ span >
55
131
{% elif hw.is_scored and hw.submitted %}
56
- < span class ="badge bg -success "> Scored ({{ hw.score }})</ span >
132
+ < span class ="badge badge -success "> Scored ({{ hw.score }})</ span >
57
133
{% elif hw.is_scored %}
58
- < span class ="badge bg -secondary "> Scored</ span >
134
+ < span class ="badge badge -secondary "> Scored</ span >
59
135
{% elif not hw.is_scored and hw.submitted %}
60
- < span class ="badge bg -info "> Submitted</ span >
136
+ < span class ="badge badge -info "> Submitted</ span >
61
137
{% else %}
62
- < span class ="badge bg -warning "> Open</ span >
138
+ < span class ="badge badge -warning "> Open</ span >
63
139
{% endif %}
64
140
</ div >
65
141
</ div >
@@ -70,11 +146,11 @@ <h2>Homework</h2>
70
146
71
147
{% if projects %}
72
148
< div class ="pb-3 ">
73
- < h2 > Projects</ h2 >
149
+ < h3 class =" section-title " > Projects</ h3 >
74
150
{% for project in projects %}
75
- < div class ="p-2 {% cycle 'bg-white' '' %} ">
151
+ < div class ="project-item ">
76
152
< div class ="row align-items-center ">
77
- < div class ="col-5 ">
153
+ < div class ="col-md-5 item-title ">
78
154
{% if project.state == 'CS' %}
79
155
< a href ="{% url 'project' course_slug=course.slug project_slug=project.slug %} ">
80
156
{{ project.title }}
@@ -91,14 +167,14 @@ <h2>Projects</h2>
91
167
{{ project.title }}
92
168
{% endif %}
93
169
</ div >
94
- < div class ="col-4 text-md-right " data-toggle ="tooltip " data-placement ="right " title ="{{ project.days_until_due }} days left ">
170
+ < div class ="col-md- 4 text-md-right item-date " data-toggle ="tooltip " data-placement ="right " title ="{{ project.days_until_due }} days left ">
95
171
{% if project.state == 'CS' %}
96
172
< span class ="local-date "> {{ project.submission_due_date | date:"c" }}</ span >
97
173
{% else %}
98
174
< span class ="local-date "> {{ project.peer_review_due_date | date:"c" }}</ span >
99
175
{% endif %}
100
176
</ div >
101
- < div class ="col-3 text-md-right ">
177
+ < div class ="col-md- 3 text-md-right ">
102
178
< span class ="badge {{ project.status_badge_class }} "> {{ project.get_project_state_name }}</ span >
103
179
</ div >
104
180
</ div >
@@ -107,18 +183,15 @@ <h2>Projects</h2>
107
183
</ div >
108
184
{% endif %}
109
185
110
-
111
186
{% if not homeworks and not projects %}
112
187
< div class ="alert alert-info " role ="alert ">
113
- < p > There are no homeworks or projects available for this course yet. Come back later.</ p >
188
+ < p class =" mb-0 " > There are no homeworks or projects available for this course yet. Come back later.</ p >
114
189
</ div >
115
190
{% endif %}
116
191
117
-
118
192
< script >
119
193
$ ( function ( ) {
120
194
$ ( '[data-toggle="tooltip"]' ) . tooltip ( )
121
195
} )
122
196
</ script >
123
-
124
197
{% endblock %}
0 commit comments