Module: Workarea::Storefront::SliderHelper

Defined in:
app/helpers/workarea/storefront/slider_helper.rb

Instance Method Summary collapse

Instance Method Details

#style_guide_autoplay_stop_optionsObject



35
36
37
38
39
40
41
42
43
44
# File 'app/helpers/workarea/storefront/slider_helper.rb', line 35

def style_guide_autoplay_stop_options
  {
    options: {
      autoplay: true,
      autoplaySpeed: 2000,
      pauseOnHover: false
    },
    stopOnInteraction: true
  }.to_json
end

#style_guide_slider_optionsObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'app/helpers/workarea/storefront/slider_helper.rb', line 4

def style_guide_slider_options
  {
    options: {
      slidesToShow: 1,
      slidesToScroll: 1,
      autoplay: true,
      mobileFirst: true,
      responsive: [
        {
          breakpoint: Workarea.config.storefront_break_points[:medium] - 1,
          settings: {
            arrows: false,
            dots: true,
            slidesToShow: 2,
            slidesToScroll: 2
          }
        },
        {
          breakpoint: Workarea.config.storefront_break_points[:wide] - 1,
          settings: {
            arrows: false,
            dots: true,
            slidesToShow: 4,
            slidesToScroll: 4
          }
        }
      ]
    }
  }.to_json
end

#style_guide_slider_wait_for_imagesObject



46
47
48
49
50
51
52
53
54
# File 'app/helpers/workarea/storefront/slider_helper.rb', line 46

def style_guide_slider_wait_for_images
  {
    options: {
      slidesToShow: 1,
      slidesToScroll: 1
    },
    waitForImages: true
  }.to_json
end