Sha256: a1143a1b54adf4036c1f13741159d0b0d116442b75c6de6fde004a10869e520e

Contents?: true

Size: 1.12 KB

Versions: 11

Compression:

Stored size: 1.12 KB

Contents

<% if object.present? && object.asset.present? %>
  <% max_img_size = object.max_image_size %>

  <% if object.background_image? %>
    <div style="background-image: url('<%= object.asset.image.url(max_img_size, max_img_size, quality: 65) %>'); height: 100%; min-height: <%= object.min_height %>px">
      &nbsp;
    </div>

  <% else %>
    <% if object.disallow_resize? %>
      <% img_path = object.asset.image.url %>
    <% else %>
      <% img_path = object.asset.image.url(max_img_size, max_img_size, quality: 65) %>
    <% end %>

    <% if object.url.present? %>
      <%= link_to object.url, target: object.target do %>
        <%= image_tag img_path, alt: '', class: 'img-fluid' %>
      <% end %>

    <% else %>
      <%= image_tag img_path, alt: '', class: 'img-fluid' %>
    <% end %>

    <% if object.caption.present? %>
      <% if Udongo.config.flexible_content.picture_caption_editor? %>
        <div class="img-caption">
          <%= object.caption.html_safe %>
        </div>
      <% else %>
        <div class="text-center">
          <%= object.caption %>
        </div>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
udongo-7.9.0 app/views/frontend/flexible_content/_picture.html.erb
udongo-7.8.1 app/views/frontend/flexible_content/_picture.html.erb
udongo-7.8.0 app/views/frontend/flexible_content/_picture.html.erb
udongo-7.7.2 app/views/frontend/flexible_content/_picture.html.erb
udongo-7.7.1 app/views/frontend/flexible_content/_picture.html.erb
udongo-7.7.0 app/views/frontend/flexible_content/_picture.html.erb
udongo-7.6.2 app/views/frontend/flexible_content/_picture.html.erb
udongo-7.6.1 app/views/frontend/flexible_content/_picture.html.erb
udongo-7.6.0 app/views/frontend/flexible_content/_picture.html.erb
udongo-7.5.1 app/views/frontend/flexible_content/_picture.html.erb
udongo-7.5.0 app/views/frontend/flexible_content/_picture.html.erb