Sha256: bbc19d0855c77e02e471a7942e1d9c8a0a5268e41b94cb1861095b77d1fad6c9

Contents?: true

Size: 1.64 KB

Versions: 1

Compression:

Stored size: 1.64 KB

Contents

<% if section.fullscreen? %>
  <% if section.gutters? %>
    <% section_padding = 'px-3' %>
  <% else %>
    <% section_padding = 'px-0' %>
  <% end %>
<% else %>
  <% section_padding = 'px-2' %>
<% end %>

<div class="col-12 homepage-hero-image position-relative p-0 <%= section_padding %>">
  <div class="bg-light" style="--aspect-ratio:12/5;">
    <% if section.image_one.present? %>

        <!-- XS to LG -->
        <img class="d-lg-none lazyload"
          data-src="<%= main_app.url_for(section.image_one.attachment.variant(resize: '1200x500>')) %>"
          data-srcset="<%= main_app.url_for(section.image_one.attachment.variant(resize: '1200x500>')) %>"
          alt="<%= section&.title %>">

        <!-- LG UP -->
        <img class="d-none d-lg-block lazyload"
          data-src="<%= main_app.url_for(section.image_one.attachment.variant(resize: '2400x1000>')) %>"
          data-srcset="<%= main_app.url_for(section.image_one.attachment.variant(resize: '2400x1000>')) %>"
          alt="<%= section&.title %>">

     <% else %>
       <%= icon( name: 'card-image',
                 classes: 'text-black-50',
                 width: 26,
                 height: 26) %>
     <% end %>

    <div class="hero-content position-absolute-y-center">
      <% if section.title.present? %>
        <div class="homepage-hero-image-text mx-auto pb-0 pb-sm-2 pb-md-3">
          <%= section.title %>
        </div>
      <% end %>

      <% if section.link.present? && section.button_text.present? %>
        <div>
          <%= link_to section.button_text, section.link, class: 'btn btn-primary harpiya-btn px-5' %>
        </div>
      <% end %>
    </div>
  </div>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
harpiya_frontend-4.3.0.alpha app/views/harpiya/shared/cms/sections/_hero_image.html.erb