Sha256: 511444885aedc08c267133abe398d5489e714562704bdef5c9142dac036be6db

Contents?: true

Size: 1.88 KB

Versions: 21

Compression:

Stored size: 1.88 KB

Contents

%div{:class => "carousel #{"carousel-#{carousel.identifier}"} slide", "data-ride" => "carousel", :id => dom_id(carousel) }
  - if options[:indicators]
    %ol.carousel-indicators
      - carousel.item_details.count.times do |i|
        %li{:class => (i == 0) ? "active" : "", "data-slide-to" => i, "data-target" => "##{dom_id(carousel)}"}
  .carousel-inner
    - carousel.item_details.each_with_index do |item_detail, i|
      - next if item_detail.asset.nil?
      %div{:class => "carousel-item #{(i == 0) ? "active" : ""}"}
        - if item_detail.image?
          %img.d-block.w-100{:src => main_app.url_for(item_detail.asset.variant(variant_options))}/
          - if item_detail.description.present?
            .carousel-caption.d-none.d-md-block
              = markup_helper(self).to_html(item_detail, :description)
        - elsif item_detail.video?
          .carousel-video
            %video.w-100{ video_html_options.reverse_merge(id: "#{dom_id(item_detail)}-video") }
              %source{ src: main_app.url_for(item_detail.asset), type: "video/mp4" }
            .video-overlay.h-100
              .container.content
                -# overlayed content goes here.
              .video-controls.text-white
                %a{ data: { video: { target: "##{dom_id(item_detail)}-video", control: :play } } }
                  %i.fas.fa-play
                %a{ data: { video: { target: "##{dom_id(item_detail)}-video", control: :pause } } }
                  %i.fas.fa-pause
  - if options[:controls]
    %a.carousel-control-prev{"data-slide" => "prev", :href => "##{dom_id(carousel)}", :role => "button"}
      %span.carousel-control-prev-icon{"aria-hidden" => "true"}
      %span.sr-only= t('.previous')
    %a.carousel-control-next{"data-slide" => "next", :href => "##{dom_id(carousel)}", :role => "button"}
      %span.carousel-control-next-icon{"aria-hidden" => "true"}
      %span.sr-only= t('.next')

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
cmor_carousels-0.0.60.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.59.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.58.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.57.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.56.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.55.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.54.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.53.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.52.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.51.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.50.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.49.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.48.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.45.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.44.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.43.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.42.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.41.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.40.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml
cmor_carousels-0.0.39.pre app/views/cmor/carousels/application_view_helper/_render_carousel.html.haml