<% if section.gutters? %> <% section_one_padding = 'pr-md-2' %> <% section_two_padding = 'pl-md-2' %> <% if section.fullscreen? %> <% section_one_padding = 'px-3 pr-md-2' %> <% section_two_padding = 'px-3 pl-md-2' %> <% end %> <% else %> <% if section.fullscreen? %> <% section_one_padding = 'px-0' %> <% section_two_padding = 'px-0' %> <% else %> <% section_one_padding = 'pr-md-0' %> <% section_two_padding = 'pl-md-0' %> <% end %> <% end %> <% if section.link_one.present? && section.link_type_one == 'Spree::Taxon' %> <% link_one = spree.nested_taxons_path(section.link_one) %> <% elsif section.link_one.present? && section.link_type_one == 'Spree::Product' %> <% link_one = spree.product_path(section.link_one) %> <% else %> <% link_one = nil %> <% end %> <% if section.link_two.present? && section.link_type_two == 'Spree::Taxon' %> <% link_two = spree.nested_taxons_path(section.link_two) %> <% elsif section.link_two.present? && section.link_type_two == 'Spree::Product' %> <% link_two = spree.product_path(section.link_two) %> <% else %> <% link_two = nil %> <% end %>
<%= link_to link_one, class: "d-flex align-items-end justify-content-center bg-light text-center overflow-hidden homepage-bottom-box #{'pointer-events-none cursor-default' unless link_one}", style: '--aspect-ratio:54/35;' do %> <% if section.image_one&.attachment&.attached? %> <%= section&.title_one %> <%= section&.title_one %> <%= section&.title_one %> <% else %> <%= icon( name: 'card-image', classes: 'text-black-50', width: 26, height: 26) %> <% end %> <% if section.title_one.present? || section.subtitle_one.present? %> <% end %> <% end %>
<%= link_to link_two, class: "d-flex align-items-end justify-content-center bg-light text-center overflow-hidden homepage-bottom-box #{'pointer-events-none cursor-default' unless link_two}", style: '--aspect-ratio:54/35;' do %> <% if section.image_two&.attachment&.attached? %> <%= section&.title_two %> <%= section&.title_two %> <%= section&.title_two %> <% else %> <%= icon( name: 'card-image', classes: 'text-black-50', width: 26, height: 26) %> <% end %> <% if section.title_two.present? || section.subtitle_two.present? %> <% end %> <% end %>