File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
tcf_website/templates/course Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments