Sha256: 70e8b5672f938e3a3c4bb73fd615e5b9ddb81216d3cb849386d76c7497ec77c2

Contents?: true

Size: 1.68 KB

Versions: 12

Compression:

Stored size: 1.68 KB

Contents

<%
  types = {
      'standard' => '',
      'text-protection' => 'mdc-image-list--with-text-protection',
      'masonry' => 'mdc-image-list--masonry'
  }
%>

<ul class="mdc-image-list <%= types[comp.list_type] %> v-image-list-<%= comp.list_type %>-<%= comp.columns %>">
  <% for image in comp.images %>
    <%
      styles = {
        'border-width' => ("#{image.border}" if image.border),
        'border-style' => ('solid' if image.border),
        'border-radius' => (image.border_radius if image.border_radius)
      }.compact
    %>
    <li class="mdc-image-list__item" <%= "style='margin: #{comp.spacing}'" if comp.spacing %>>
      <% if comp.list_type != 'masonry' %><div class="mdc-image-list__image-aspect-container"><% end %>
        <img id="<%= image.id %>"
             class="mdc-image-list__image
                    <%= 'v-actionable' if image.events %>
                    <%= "v-image-list__border-#{image.border_color}"  if image.border_color %>"
             src="<%= image.url %>"
             <% if image.description %>alt="<%= image.description %>"<% end %>
             style="<%= styles.map { |k, v| "#{k}: #{v}" }.join('; ') %>"
             draggable="false"
             <%= partial "components/event", :locals => {comp: image, events: image.events, parent_id: image.event_parent_id} if image.events&.any? %>>
        <%= partial "components/tooltip" , :locals => {comp: image.tooltip, parent_id: image.id} if image.tooltip %>
      <% if comp.list_type != 'masonry' %></div><% end %>
      <% if image.label %>
        <div class="mdc-image-list__supporting">
          <span class="mdc-image-list__label"><%= image.label %></span>
        </div>
      <% end %>
    </li>
    <% end %>
</ul>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 views/mdc/components/_image_list.erb
coprl-3.0.0.beta.11 views/mdc/components/_image_list.erb
coprl-3.0.0.beta.10 views/mdc/components/_image_list.erb
coprl-3.0.0.beta.9 views/mdc/components/_image_list.erb
coprl-3.0.0.beta.8 views/mdc/components/_image_list.erb
coprl-3.0.0.beta.7 views/mdc/components/_image_list.erb
coprl-3.0.0.beta.6 views/mdc/components/_image_list.erb
coprl-3.0.0.beta.5 views/mdc/components/_image_list.erb
coprl-3.0.0.beta.4 views/mdc/components/_image_list.erb
coprl-3.0.0.beta.3 views/mdc/components/_image_list.erb
coprl-3.0.0.beta.2 views/mdc/components/_image_list.erb
coprl-3.0.0.beta.1 views/mdc/components/_image_list.erb