summaryrefslogtreecommitdiff
path: root/static/website/templates/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/website/templates/index.html')
-rw-r--r--static/website/templates/index.html20
1 files changed, 19 insertions, 1 deletions
diff --git a/static/website/templates/index.html b/static/website/templates/index.html
index 038aab6..5dd19e6 100644
--- a/static/website/templates/index.html
+++ b/static/website/templates/index.html
@@ -135,7 +135,8 @@
{% block javascript %}
<script>
$(document).ready(function(){
- $('.carousel').slick({
+
+ $carousel = $('.carousel').slick({
lazyLoad: 'ondemand',
dots: false,
touchMove: false,
@@ -145,8 +146,25 @@
speed: 2000,
autoplay: true,
autoplaySpeed: 2000,
+ infinite: true,
});
+ $(".slick-prev").unbind();
+ $(".slick-next").unbind();
+ $(".slick-prev").bind("click", function(e) {
+ var current_slide = $carousel.slickCurrentSlide();
+ $carousel.slickSetOption("slidesToScroll",3);
+ $carousel.slickGoTo(current_slide + 3);
+ $carousel.slickSetOption("slidesToScroll",1);
+ e.stopPropagation();
+ });
+ $(".slick-next").bind("click", function(e) {
+ var current_slide = $carousel.slickCurrentSlide();
+ $carousel.slickSetOption("slidesToScroll",3);
+ $carousel.slickGoTo(current_slide - 3);
+ $carousel.slickSetOption("slidesToScroll",1);
+ e.stopPropagation();
+ });
$("#filter-form").submit(function(e) {
var category = $("#filter-select").val();
if(category != -1) {