Sha256: c3232ec99263093d9e3e044172f4c17854718778c913cd1d7052a411805aa56b

Contents?: true

Size: 1.31 KB

Versions: 12

Compression:

Stored size: 1.31 KB

Contents

<% if comp
     fit_class = comp.fit ? "v-image--fit-#{comp.fit}" : ''
     position = comp.position ? comp.position.map(&:to_s).join(' ') : nil
     styles = {
          'min-width' => (comp.min_width if comp.min_width),
          'width' => (comp.width if comp.width),
          'max-width' => (comp.max_width if comp.max_width),
          'min-height' => (comp.min_height if comp.min_height),
          'height' => (comp.height if comp.height),
          'max-height' => (comp.max_height if comp.max_height),
          'border' => ("#{comp.border} solid" if comp.border),
          'border-color' => (comp.border_color if comp.border_color),
          'border-radius' => (comp.border_radius if comp.border_radius),
          'object-position' => (position unless position.empty?)
     }.compact
%>
<img id="<%= comp.id %>"
     class="v-image <%= fit_class %> <%= 'v-actionable' if comp.events %>"
     src="<%= comp.url %>"
     <% if comp.description %>alt="<%= comp.description %>"<% end %>
     style="<%= styles.map { |k, v| "#{k}: #{v}" }.join('; ') %>"
     draggable="false"
     <%= partial "components/event", :locals => {comp: comp, events: comp.events, parent_id: comp.event_parent_id} if comp.events&.any? %>>
<%= partial "components/tooltip" , :locals => {comp: comp.tooltip, parent_id: comp.id} if comp.tooltip %>
<% end %>

Version data entries

12 entries across 12 versions & 1 rubygems

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