Sha256: e775e528e9cd94a1ae59eb8c8e7c08b94bd19b9f0eedb3eb79a3efdd4793fc89

Contents?: true

Size: 1.63 KB

Versions: 1

Compression:

Stored size: 1.63 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 %>">
              <!-- 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 %>" 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 %>);
</script>

Version data entries

1 entries across 1 versions & 1 rubygems

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