prepull commit, need some fixes
This commit is contained in:
parent
5216c7b78e
commit
88d9b57067
4 changed files with 33 additions and 38 deletions
|
@ -15,6 +15,7 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap-sass": "bootstrap-sass-official#^3.3.7",
|
"bootstrap-sass": "bootstrap-sass-official#^3.3.7",
|
||||||
"slick-carousel": "^1.6.0"
|
"slick-carousel": "^1.6.0",
|
||||||
|
"slick-lightbox": "^0.2.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,38 @@
|
||||||
{% load wagtailcore_tags wagtailimages_tags static %}
|
{% load compress static wagtailcore_tags wagtailimages_tags %}
|
||||||
|
{% compress js %}
|
||||||
|
<script src="{% static 'libs/jquery/dist/jquery.js' %}"></script>
|
||||||
|
<script src="{% static 'libs/slick-carousel/slick/slick.min.js' %}"></script>
|
||||||
|
<script src="{% static 'libs/slick-lightbox/dist/slick-lightbox.js' %}"></script>
|
||||||
|
<script type="text/javascript" src="{% static 'js/main.js' %}"></script>
|
||||||
|
{% endcompress %}
|
||||||
|
|
||||||
|
{% block extra_css %}
|
||||||
|
<link rel="stylesheet" type="text/x-scss" href="{% static 'libs/slick-carousel/slick/slick.scss' %}">
|
||||||
|
<link rel="stylesheet" type="text/x-scss" href="{% static 'libs/slick-carousel/slick/slick-theme.scss' %}">
|
||||||
|
<link rel="stylesheet" type="text/x-scss" href="{% static 'libs/slick-lightbox/src/styles/slick-lightbox.sass' %}">
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
<!-- Gallery Template -->
|
<!-- Gallery Template -->
|
||||||
<link rel="stylesheet" href="{% static "/css/sw_carousel.min.css" %}" />
|
|
||||||
<div class="container-carousel">
|
|
||||||
|
|
||||||
<div id="article_page-gallery" class="royalSlider rsDefault visibleNearby">
|
<div id="lazy" class="row">
|
||||||
{% for block in page.gallery %}
|
{% for block in page.gallery %}
|
||||||
{% for val in block.value %}
|
{% for val in block.value %}
|
||||||
|
|
||||||
{% image val.image height-400 as carouselimagedata %}
|
{% image val.image height-400 as carouselimagedata %}
|
||||||
<a class="rsImg" data-caption="{{ val.caption }}" data-rsw="{{ carouselimagedata.width }}" data-rsh="{{ carouselimagedata.height }}" href="{{ carouselimagedata.url }}">
|
<a class="thumbnail" href="{{ carouselimagedata.url }}" data-caption="{{ val.caption }}">
|
||||||
{% image val.image height-400 %}
|
{% image val.image height-400 %}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
{% endfor %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('#lazy').slickLightbox({
|
||||||
|
src: 'src',
|
||||||
|
itemSelector: 'img',
|
||||||
|
lazy: true,
|
||||||
|
useHistoryApi: 'true'
|
||||||
|
});
|
||||||
|
console.log($('#lazy').slickLightbox);
|
||||||
|
</script>
|
||||||
|
|
1
publichealth/static/css/sw_carousel.min.css
vendored
1
publichealth/static/css/sw_carousel.min.css
vendored
|
@ -1 +0,0 @@
|
||||||
#gallery-1{width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}#gallery-2,.gallery-2{margin:0 auto;display:block}@media (max-width: 600px){#gallery-2,.gallery-2{width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}}.rsDefault,.rsDefault .rsOverflow,.rsDefault .rsSlide,.rsDefault .rsVideoFrameHolder,.rsDefault .rsThumbs{background:#F8F8FF;color:#6d6f72;width:100%;padding-bottom:10px}.container-carousel{margin:10px 0 10px 0}.rsWithThumbs .rsGCaption{font-size:1em;line-height:18px;padding:12px 0 16px;background:#fff;width:100%;position:static;float:left;left:auto;bottom:auto;text-align:center;margin-bottom:10px;color:#6d6f72}.visibleNearby{width:100%;background:#F8F8FF;color:#333;padding-top:25px}.visibleNearby .rsGCaption{font-size:1em;line-height:18px;padding:12px 0 16px;background:#F8F8FF;width:100%;position:static;float:left;left:auto;bottom:auto;text-align:center;margin-bottom:10px;color:#6d6f72}.visibleNearby .rsGCaption span{display:block;clear:both;color:#6d6f72;font-size:1.2em;line-height:22px}.visibleNearby .rsSlide img{opacity:0.45;-webkit-transition:all 0.3s ease-out;-moz-transition:all 0.3s ease-out;transition:all 0.3s ease-out;-webkit-transform:scale(0.9);-moz-transform:scale(0.9);-ms-transform:scale(0.9);-o-transform:scale(0.9);transform:scale(0.9)}.visibleNearby .rsActiveSlide img{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}@media screen and (min-width: 0px) and (max-width: 900px){#gallery-1 .rsOverflow,.royalSlider#gallery-1{height:400px !important}}@media screen and (min-width: 0px) and (max-width: 500px){#gallery-1 .rsOverflow,.royalSlider#gallery-1{height:300px !important}}
|
|
|
@ -25,27 +25,4 @@ $(document).ready(function() {
|
||||||
// $(this).css('border-top', '3px solid ' + pastel);
|
// $(this).css('border-top', '3px solid ' + pastel);
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// Carousel gallery component (article_page)
|
|
||||||
var si = $('#article_page-gallery').royalSlider({
|
|
||||||
addActiveClass: true,
|
|
||||||
arrowsNav: true,
|
|
||||||
controlNavigation: 'none',
|
|
||||||
autoScaleSlider: true,
|
|
||||||
autoScaleSliderWidth: 900,
|
|
||||||
autoScaleSliderHeight: 250,
|
|
||||||
loop: true,
|
|
||||||
fadeinLoadedSlide: false,
|
|
||||||
globalCaption: true,
|
|
||||||
keyboardNavEnabled: true,
|
|
||||||
globalCaptionInside: false,
|
|
||||||
visibleNearby: {
|
|
||||||
enabled: true,
|
|
||||||
centerArea: 0.4,
|
|
||||||
center: true,
|
|
||||||
breakpoint: 650,
|
|
||||||
breakpointCenterArea: 0.64,
|
|
||||||
navigateByCenterClick: true
|
|
||||||
}
|
|
||||||
}).data('royalSlider');
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue