diff --git a/publichealth/home/templates/home/photo_gallery.html b/publichealth/home/templates/home/photo_gallery.html index 7861412..823bc4f 100644 --- a/publichealth/home/templates/home/photo_gallery.html +++ b/publichealth/home/templates/home/photo_gallery.html @@ -13,3 +13,14 @@ {% endfor %} {% endfor %} + diff --git a/publichealth/static/css/main.scss b/publichealth/static/css/main.scss index 8bd1115..cd56fb3 100644 --- a/publichealth/static/css/main.scss +++ b/publichealth/static/css/main.scss @@ -14,3 +14,16 @@ body { @include mid-screen($screen-sm-min, $screen-md-min) { body { margin-top: 200px; } } +$slider-nav: 200px; +.slider-nav { + padding-bottom: 2.5em; + + .item { + height: $slider-nav; + + img { + width: 90%; + height: $slider-nav; + } + } +} diff --git a/publichealth/static/css/modules/_banner.scss b/publichealth/static/css/modules/_banner.scss index df422f3..6b01f87 100644 --- a/publichealth/static/css/modules/_banner.scss +++ b/publichealth/static/css/modules/_banner.scss @@ -193,9 +193,10 @@ $banner-height: 700px; } // Carousel gallery -$gallery-height: 400px; + +$gallery-height: 550px; .carousel-inner { - padding-bottom: 2.5em; + padding-bottom: 0; .item { height: $gallery-height; diff --git a/publichealth/static/css/paper/bootstrap.css b/publichealth/static/css/paper/bootstrap.css index 7326dea..44d2f95 100644 --- a/publichealth/static/css/paper/bootstrap.css +++ b/publichealth/static/css/paper/bootstrap.css @@ -6238,7 +6238,7 @@ button.close { .carousel { position: relative; } -.carousel-inner { +/*.carousel-inner { position: relative; overflow: hidden; width: 100%; @@ -6313,7 +6313,7 @@ button.close { } .carousel-inner > .active.right { left: 100%; -} +}*/ .carousel-control { position: absolute; top: 0; diff --git a/publichealth/static/js/main.js b/publichealth/static/js/main.js index f634172..abf8845 100644 --- a/publichealth/static/js/main.js +++ b/publichealth/static/js/main.js @@ -22,14 +22,11 @@ $(document).ready(function() { } else if ($('.carousel-gallery').length) { // Load gallery component $('.carousel-gallery').slick({ - autoplay: false, - dots: false, - fade: false, - infinite: true, - slidesToShow: 1, - centerMode: true, - prevArrow: '', - nextArrow: '', + slidesToShow: 1, + slidesToScroll: 1, + arrows: false, + fade: true, + asNavFor: '.slider-nav' }).slickLightbox({ src: 'data-src', itemSelector: 'img', @@ -37,7 +34,16 @@ $(document).ready(function() { // useHistoryApi: 'true' }); } - + $('.slider-nav').slick({ + slidesToShow: 3, + slidesToScroll: 1, + asNavFor: '.carousel-gallery', + dots: true, + centerMode: true, + focusOnSelect: true, + prevArrow: '', + nextArrow: '', + }); // Pastel colors on live news