Sha256: 0449afcc67b662bfa89675cc33d0824b8a3dd4c8bc25fa01a16954bd96b18f88

Contents?: true

Size: 1.33 KB

Versions: 5

Compression:

Stored size: 1.33 KB

Contents

<div id="<%= dom_id(carousel) %>" class="carousel slide" data-ride="carousel">
  <ol class="carousel-indicators">
    <% carousel.item_details.count.times do |i| %>
      <li data-target="#<%= dom_id(carousel) %>" data-slide-to="<%= i %>" class="<%= (i == 0) ? "active" : "" %>"></li>
    <% end %>
  </ol>
  <div class="carousel-inner">
    <% carousel.item_details.each_with_index do |item_detail, i| %>
      <div class="carousel-item <%= (i == 0) ? "active" : "" %>">
        <img class="d-block w-100" src="<%= main_app.url_for(item_detail.asset.variant(variant_options)) %>">
        <% if item_detail.description.present? %>
          <div class="carousel-caption d-none d-md-block">
            <%= markup_helper(self).to_html(item_detail, :description) %>
          </div>
        <% end %>
      </div>
    <% end %>
  </div>
  <% if options[:controls] %>
    <a class="carousel-control-prev" href="#<%= dom_id(carousel) %>" role="button" data-slide="prev">
      <span class="carousel-control-prev-icon" aria-hidden="true"></span>
      <span class="sr-only"><%= t('.previous') %></span>
    </a>
    <a class="carousel-control-next" href="#<%= dom_id(carousel) %>" role="button" data-slide="next">
      <span class="carousel-control-next-icon" aria-hidden="true"></span>
      <span class="sr-only"><%= t('.next') %></span>
    </a>
  <% end %>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cmor_carousels-0.0.11.pre app/views/cmor/carousels/application_view_helper/_render.html.erb
cmor_carousels-0.0.10.pre app/views/cmor/carousels/application_view_helper/_render.html.erb
cmor_carousels-0.0.9.pre app/views/cmor/carousels/application_view_helper/_render.html.erb
cmor_carousels-0.0.8.pre app/views/cmor/carousels/application_view_helper/_render.html.erb
cmor_carousels-0.0.7.pre app/views/cmor/carousels/application_view_helper/_render.html.erb