Merge pull request #676 from MITx/feature/kfiedler/ocw-links
Feature/kfiedler/ocw links
This commit is contained in:
@@ -101,6 +101,7 @@ def get_course_about_section(course, section_key):
|
||||
- textbook
|
||||
- faq
|
||||
- more_info
|
||||
- ocw_links
|
||||
"""
|
||||
|
||||
# Many of these are stored as html files instead of some semantic
|
||||
@@ -112,7 +113,7 @@ def get_course_about_section(course, section_key):
|
||||
'course_staff_short', 'course_staff_extended',
|
||||
'requirements', 'syllabus', 'textbook', 'faq', 'more_info',
|
||||
'number', 'instructors', 'overview',
|
||||
'effort', 'end_date', 'prerequisites']:
|
||||
'effort', 'end_date', 'prerequisites', 'ocw_links']:
|
||||
|
||||
try:
|
||||
fs = course.system.resources_fs
|
||||
|
||||
BIN
lms/static/images/link-icon.png
Normal file
BIN
lms/static/images/link-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 326 B |
BIN
lms/static/images/opencourseware.png
Normal file
BIN
lms/static/images/opencourseware.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -335,13 +335,43 @@
|
||||
|
||||
.course-sidebar {
|
||||
@include box-sizing(border-box);
|
||||
@include box-shadow(inset 0 0 3px 0 rgba(0,0,0, 0.15));
|
||||
border: 1px solid rgb(200,200,200);
|
||||
border-top: none;
|
||||
float: left;
|
||||
padding: 16px 20px 30px;
|
||||
width: flex-grid(4);
|
||||
|
||||
> section {
|
||||
@include box-shadow(inset 0 0 3px 0 rgba(0,0,0, 0.15));
|
||||
border: 1px solid rgb(200,200,200);
|
||||
|
||||
&.course-summary {
|
||||
padding: 16px 20px 30px;
|
||||
margin-bottom: 220px;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
&.additional-resources {
|
||||
padding: 30px;
|
||||
|
||||
.opencourseware {
|
||||
text-indent: -9999px;
|
||||
background: url('../images/opencourseware.png') 0 0 no-repeat;
|
||||
width: 266px;
|
||||
height: 31px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
padding-left: 29px;
|
||||
background: url('../images/link-icon.png') left center no-repeat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
margin-bottom: 30px;
|
||||
padding-bottom: 16px;
|
||||
@@ -441,6 +471,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
font: 1em $serif;
|
||||
letter-spacing: 0;
|
||||
color: #999;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.important-dates {
|
||||
|
||||
@@ -155,6 +155,21 @@
|
||||
% endif
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
|
||||
## For now, ocw links are the only thing that goes in additional resources
|
||||
% if get_course_about_section(course, "ocw_links"):
|
||||
<section class="additional-resources">
|
||||
<header>
|
||||
<h1>Additional Resources</h1>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
<h2 class="opencourseware">MITOpenCourseware</h2>
|
||||
${get_course_about_section(course, "ocw_links")}
|
||||
</section>
|
||||
</section>
|
||||
%endif
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user