diff --git a/lms/static/js/program_marketing.js b/lms/static/js/program_marketing.js index c01a5717f6..87cceee687 100644 --- a/lms/static/js/program_marketing.js +++ b/lms/static/js/program_marketing.js @@ -4,3 +4,18 @@ function playVideo(src) { document.querySelector('#program_video iframe').style = 'display:block;'; document.querySelector('#program_video iframe').src = src; } +$(".instructor-image, .instructor-label").leanModal({closeButton: ".modal_close", top: '10%'}); +// Create MutationObserver which prevents the body of +// the page from scrolling when a modal window is displayed +var observer = new MutationObserver(function(mutations, obv){ + mutations.forEach(function(mutation) { + if ($(mutation.target).css('display') === 'block') { + $('body').css('overflow','hidden'); + } else { + $('body').css('overflow', 'auto'); + } + }); +}); +$('.modal').each(function(index, element){ + observer.observe(element, {attributes: true, attributeFilter:['style']}); +}); \ No newline at end of file diff --git a/lms/static/sass/views/_program-marketing-page.scss b/lms/static/sass/views/_program-marketing-page.scss index 19d09e0679..f5fb5b3109 100644 --- a/lms/static/sass/views/_program-marketing-page.scss +++ b/lms/static/sass/views/_program-marketing-page.scss @@ -1,3 +1,8 @@ +.content-wrapper { + margin-left: auto; + margin-right: auto; +} + #program-details-hero { .program_title { font-weight: bold; @@ -22,6 +27,7 @@ .btn { font-size: 20px; font-weight: $font-weight-bold; + .original-price { text-decoration: line-through; font-weight: $font-weight-normal; @@ -172,25 +178,33 @@ #instructors { .instructor { margin: $baseline 0; - - * { - text-align: center; - margin: auto; - } + display: flex; + flex-direction: column; + align-items: center; img { + display: block; height: 100px; width: 100px; border-radius: 100px; + margin: auto; } .instructor-name { font-weight: bold; } - .instructor-position { + .instructor-org { font-weight: bold; } + + .instructor-bio-toggle { + margin-top: 5px; + } + + .hidden { + display: none; + } } } @@ -202,4 +216,44 @@ margin-top: $baseline; } } + + a:focus, + a:active { + text-decoration: none; + outline: 0; + } + + .modal-custom { + max-width: 500px; + max-height: 80%; + width: 90%; + top: 10%; + bottom: unset; + right: 0 !important; + left: 0 !important; + margin-left: auto !important; + margin-right: auto !important; + background-color: #fff; + overflow: auto; + + .modal-header { + padding-top: 0; + justify-content: center; + text-align: center; + } + + .instructor-bio { + padding: 10px 0; + } + + .btn-close.modal_close { + text-align: right; + + i { + font-size: 28px; + cursor: pointer; + padding: 5px; + } + } + } } diff --git a/lms/templates/courseware/program_marketing.html b/lms/templates/courseware/program_marketing.html index 2b7f1133d3..a2e1b8c069 100644 --- a/lms/templates/courseware/program_marketing.html +++ b/lms/templates/courseware/program_marketing.html @@ -50,6 +50,7 @@ endorser_org = endorser_position.get('organization_name') or corporate_endorseme %> <%block name="js_extra"> + @@ -130,31 +131,33 @@ endorser_org = endorser_position.get('organization_name') or corporate_endorseme -
+
- +
+ +
-
+
@@ -341,14 +344,47 @@ endorser_org = endorser_position.get('organization_name') or corporate_endorseme

${_('Instructors')}

% for instructor in instructors: -
-
+ <% + instructor_hash = hash(instructor['name']) + %> +
+ + + +
${instructor['name']}
+
+ % if instructor.get('title'): +
${instructor['title']}
+ % endif + % if instructor.get('organization'): +
${instructor['organization']}
+ % endif + % if instructor.get('bio'): +
+
+ +
-
${instructor['name']}
- % if instructor.get('position'): -
${instructor['position'].get('position')}
-
${instructor['position'].get('organization_name')}
% endif
% endfor