# HG changeset patch # User souliane # Date 1430816598 -7200 # Node ID d54f2f09a73a3f904f26bdccc3c52eff77449cd2 # Parent 84c2e20d3de188f83cf9b959dbbd2a7fc3250f32 fixes displaying two carousels on the same page diff -r 84c2e20d3de1 -r d54f2f09a73a static/css/sat_website.css --- a/static/css/sat_website.css Tue May 05 09:47:55 2015 +0200 +++ b/static/css/sat_website.css Tue May 05 11:03:18 2015 +0200 @@ -48,11 +48,13 @@ .carousel-caption { padding: 10px; - bottom: -55px; + bottom: -75px; color: black; font-style: italic; font-size: 14px; text-shadow: none; + left: 0px; + width: 100%; } .carousel-indicators { @@ -141,23 +143,23 @@ border-bottom-style: none; } -#carousel-screenshots img, #carousel-screenshots video { +.my-carousel img, .my-carousel video { cursor: pointer; height: 200px; width: auto; display: table-cell; } -#modal-screenshots .modal-dialog { +#my-modal .modal-dialog { max-width: 90%; width: auto; } -#carousel-screenshots-modal .carousel-inner { - padding-bottom: 80px; +.my-carousel-modal .carousel-inner { + padding-bottom: 100px; } -#carousel-screenshots-modal img, #carousel-screenshots-modal video { +.my-carousel-modal img, .my-carousel-modal video { margin: auto; } diff -r 84c2e20d3de1 -r d54f2f09a73a static/js/sat_website.js --- a/static/js/sat_website.js Tue May 05 09:47:55 2015 +0200 +++ b/static/js/sat_website.js Tue May 05 11:03:18 2015 +0200 @@ -14,20 +14,4 @@ } }); - // open the big gallery when a thumbnail is clicked - $('#carousel-screenshots .thumbnail').click(function() { - $('#modal-screenshots').modal('show'); - index = parseInt($(this).attr('index')); - $('#carousel-screenshots-modal').carousel(index); - // start playing the big video - if ($(this)[0].tagName == 'VIDEO') { - $('#carousel-screenshots-modal img, #carousel-screenshots-modal video')[index].play(); - } - }); - - // thumbail's video starts playing when clicked, pause it - $('#carousel-screenshots video.thumbnail').each(function(index) { - $(this).on('play', function(e) { $(this)[0].pause(); }); - }); - }); diff -r 84c2e20d3de1 -r d54f2f09a73a templates/sat_website/base.html --- a/templates/sat_website/base.html Tue May 05 09:47:55 2015 +0200 +++ b/templates/sat_website/base.html Tue May 05 11:03:18 2015 +0200 @@ -56,8 +56,8 @@ + {% block content %}{% endblock %} - diff -r 84c2e20d3de1 -r d54f2f09a73a templates/sat_website/gallery.html --- a/templates/sat_website/gallery.html Tue May 05 09:47:55 2015 +0200 +++ b/templates/sat_website/gallery.html Tue May 05 11:03:18 2015 +0200 @@ -22,11 +22,11 @@ {% load staticfiles %} {% load utils %} - -