Sha256: e9324ea0450d4030bcaaa32edf1e8e9bb2dcbfe75e01efdfc3d38c6eaabfa6cb

Contents?: true

Size: 1.73 KB

Versions: 1

Compression:

Stored size: 1.73 KB

Contents

<!-- Slider main container -->
<div class="swiper-container">

  <!-- Additional required wrapper -->
  <div class="swiper-wrapper">

    <!-- Slides -->
    <% frames.each_with_index do |frame, index| %>

          <!--Slide #<%= index %>-->

          <% if options[:mark_lazy].present? %>
            <div class="swiper-slide frame_index_<%= index %>" data-link-url='<%= frame.link_url %>'>
              <!-- Required swiper-lazy class and image source specified in data-src attribute -->
              <img data-src="<%= frame.image.thumb_lg %>" class="swiper-lazy">
              <!-- Preloader image -->
              <div class="swiper-lazy-preloader"></div>
            </div>
          <% else %>
            <div class="swiper-slide frame_index_<%= index %>" data-link-url='<%= frame.link_url %>' style="background-image:url(<%= frame.image.thumb_lg %>)">

              <h3><%= frame.title %></h3>
              <% frame.fcaptions.each_with_index do |fcaption, index2| %>
              <div class="fcaption fcaption_index_<%= index2 %>">
                <%= fcaption.value.html_safe %>
              </div>
              <% end %>

            </div>
          <% end %>

    <% end %>

  </div>

  <% if options[:mark_pagination].present? %>
    <!-- If we need pagination -->
    <div class="swiper-pagination"></div>
  <% end %>

  <% if options[:mark_buttons].present? %>
    <!-- If we need navigation buttons -->
    <div class="swiper-button-prev"></div>
    <div class="swiper-button-next"></div>
  <% end %>

  <% if options[:mark_scrollbar].present? %>
    <!-- If we need scrollbar -->
    <div class="swiper-scrollbar"></div>
  <% end %>

</div>

<script>
  create_swiper(<%= options.to_json.html_safe %>);
  handle_swiper_frames_clicks();
</script>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
c80_swiper-0.1.0.1 app/views/c80_swiper/_swipe.html.erb