Skip to content

Commit e52c3df

Browse files
committed
Added back in "view section"; arrow UI still missing
1 parent 8f6b305 commit e52c3df

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tcf_website/templates/course/course_professor.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,22 @@ <h2 class="mr-md-3">{{ course.title }}</h2>
227227
{% endif %}
228228
</div>
229229

230+
<script>
231+
document.querySelector("#sectionInfo").style.marginTop = "-" + window.getComputedStyle(sectionInfo).height;
232+
233+
function toggleSections(div) {
234+
const arrow = div.getElementsByTagName("i")[0],
235+
sectionInfo = document.querySelector("#sectionInfo");
236+
arrow.classList.toggle("rotated");
237+
sectionInfo.classList.toggle("show");
238+
if (sectionInfo.classList.contains("show")) {
239+
sectionInfo.style.marginTop = '10px';
240+
} else {
241+
sectionInfo.style.marginTop = "-" + window.getComputedStyle(sectionInfo).height;
242+
}
243+
}
244+
</script>
245+
230246
<ul class="nav nav-tabs" id="reviews">
231247
<li class="nav-item">
232248
<a class="nav-link active" id="reviewsTab" data-toggle="tab" href="#reviewsTabContent" style="font-size: 18px;">Reviews</a>

0 commit comments

Comments
 (0)