Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Add ability to reverse 3 image layout.
Matthew Kennedy57de948b25b8
diff --git a/backend/app/assets/images/backend-default-layout.svg b/backend/app/assets/images/backend-default-layout.svgnew file mode 100644index 0000000000..3420ecc3b7--- /dev/null+++ b/backend/app/assets/images/backend-default-layout.svg@@ -0,0 +1,6 @@+<svg viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5">+ <path d="M959.135 94.233c0-34.377-27.91-62.287-62.287-62.287H605.892c-34.377 0-62.287 27.91-62.287 62.287v808.965c0 34.377 27.91 62.287 62.287 62.287h290.956c34.377 0 62.287-27.91 62.287-62.287V94.233zM456.186 94.097c0-34.447-27.967-62.414-62.414-62.414H103.07c-34.447 0-62.414 27.967-62.414 62.414v304.939c0 34.447 27.967 62.414 62.414 62.414h290.702c34.447 0 62.414-27.967 62.414-62.414V94.097zM456.214 598.525c0-34.868-28.309-63.177-63.177-63.177H103.861c-34.869 0-63.177 28.309-63.177 63.177v303.413c0 34.868 28.308 63.177 63.177 63.177h289.176c34.868 0 63.177-28.309 63.177-63.177V598.525z" fill="none" stroke="currentColor" stroke-width="41.67"/>+ <text x="141.599" y="355.618" font-family="Helvetica" font-size="300">A</text>+ <text x="140.455" y="860.271" font-family="Helvetica" font-size="300">C</text>+ <text x="653.924" y="607.221" font-family="Helvetica" font-size="300">B</text>+</svg>diff --git a/backend/app/assets/images/backend-reversed-layout.svg b/backend/app/assets/images/backend-reversed-layout.svgnew file mode 100644index 0000000000..5b5427d8c2--- /dev/null+++ b/backend/app/assets/images/backend-reversed-layout.svg@@ -0,0 +1,6 @@+<svg viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5">+ <path d="M452.624 94.233c0-34.377-27.91-62.287-62.288-62.287H99.381c-34.377 0-62.287 27.91-62.287 62.287v808.965c0 34.377 27.91 62.287 62.287 62.287h290.955c34.378 0 62.288-27.91 62.288-62.287V94.233zM958.245 94.097c0-34.447-27.967-62.414-62.414-62.414H605.129c-34.447 0-62.414 27.967-62.414 62.414v304.939c0 34.447 27.967 62.414 62.414 62.414h290.702c34.447 0 62.414-27.967 62.414-62.414V94.097zM958.245 598.525c0-34.868-28.309-63.177-63.177-63.177H605.892c-34.868 0-63.177 28.309-63.177 63.177v303.413c0 34.868 28.309 63.177 63.177 63.177h289.176c34.868 0 63.177-28.309 63.177-63.177V598.525z" fill="none" stroke="currentColor" stroke-width="41.67"/>+ <text x="652.782" y="355.618" font-family="Helvetica" font-size="300">A</text>+ <text x="637.342" y="859.271" font-family="Helvetica" font-size="300">C</text>+ <text x="139.772" y="607.221" font-family="Helvetica" font-size="300">B</text>+</svg>diff --git a/backend/app/assets/javascripts/spree/backend/cms/section.es6 b/backend/app/assets/javascripts/spree/backend/cms/section.es6index 513ba6d29c..7de4c005d4 100644--- a/backend/app/assets/javascripts/spree/backend/cms/section.es6+++ b/backend/app/assets/javascripts/spree/backend/cms/section.es6@@ -1,5 +1,6 @@document.addEventListener('DOMContentLoaded', function() {const sectionKindSelector = $('#cms_section_type').select2()+ const layoutSwitcher = $('#cms_section_layout_style').select2()sectionKindSelector.on('change', function() {const selectedValue = $(sectionKindSelector).val()@@ -24,4 +25,19 @@ document.addEventListener('DOMContentLoaded', function() {message.classList.add('d-block')}});++ if (!layoutSwitcher) return++ layoutSwitcher.on('change', function() {+ const layoutDefault = document.querySelector('#Default')+ const layoutReverse = document.querySelector('#Reversed')++ if (this.value === 'Default') {+ layoutDefault.classList = 'd-block'+ layoutReverse.classList = 'd-none'+ } else {+ layoutDefault.classList = 'd-none'+ layoutReverse.classList = 'd-block'+ }+ })})diff --git a/backend/app/assets/stylesheets/spree/backend/views/_cms_pages.scss b/backend/app/assets/stylesheets/spree/backend/views/_cms_pages.scssindex d2255a6658..2c2ffc070c 100644--- a/backend/app/assets/stylesheets/spree/backend/views/_cms_pages.scss+++ b/backend/app/assets/stylesheets/spree/backend/views/_cms_pages.scss@@ -1,3 +1,15 @@+#ImageGalleryLayout {+ #LayoutType {+ color: rgb(134, 134, 134);+ }++ .select2-container--bootstrap4 {+ max-width: 200px;+ margin: auto;+ }+}++#standardPage {.sp-pb-0 {padding-bottom: 0 !important;diff --git a/backend/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb b/backend/app/views/spree/admin/cms_sections/types/_image_gallery.html.erbindex 8aeb167589..18980c32f7 100644--- a/backend/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb+++ b/backend/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb@@ -1,22 +1,47 @@-<div class="row pb-0">+<div class="row align-items-center">+ <div id="ImageGalleryLayout" class="col-6 text-center m-auto">+ <div id="LayoutType">+ <div id="Default" class="<% unless @cms_section.layout_style == 'Default' %>d-none<% end %>">+ <%= svg_icon name: "default-layout.svg", width: '150', height: '150' %>+ </div>+ <div id="Reversed" class="<% unless @cms_section.layout_style == 'Reversed' %>d-none<% end %>">+ <%= svg_icon name: "reversed-layout.svg", width: '150', height: '150' %>+ </div>+ </div>++ <%= f.field_container :layout_style, class: ['form-group'] do %>+ <%= f.label :layout_style, Spree.t('admin.cms.image_gallery.layout_style') %>+ <%= f.select(:layout_style,+ spree_humanize_dropdown_values('Spree::Cms::Sections::ImageGallery',+ { const: 'LAYOUT_OPTIONS' }),+ { include_blank: false }) %>+ <%= f.error_message_on :layout_style %>+ <% end %>+ </div>+</div>++<div class="row"><div class="col-12 col-md-4 mb-3"><div class="card p-3">- <h5 class="border-bottom"><%= Spree.t('admin.cms.three_taxon_block.top_left_block') %></h5>- <%= f.field_container :image_one, class: ['form-group'] do %>- <% if @cms_section.image_one.attached? && @cms_section.image_one.variable? %>- <figure class="admin-img-holder">- <%= image_tag main_app.url_for(@cms_section.image_one.variant(resize: '244x104>')) %>- </figure>- <% elsif @cms_section.image_one.attached? && @cms_section.image_one.image? %>- <figure class="admin-img-holder">- <%= image_tag main_app.url_for(@cms_section.image_one) %>- </figure>- <% end %>- <%= f.field_container :image_one, class: ['form-group mb-0'] do %>- <%= f.file_field :image_one %>- <%= f.error_message_on :image_one %>+ <div class="text-center">+ <h4 class="pb-2"><%= Spree.t('admin.cms.image_gallery.image_a') %></h4>+ <%= f.field_container :image_one, class: ['form-group'] do %>+ <% if @cms_section.image_one.attached? && @cms_section.image_one.variable? %>+ <figure class="admin-img-holder">+ <%= image_tag main_app.url_for(@cms_section.image_one.variant(resize: '244x104>')) %>+ </figure>+ <% elsif @cms_section.image_one.attached? && @cms_section.image_one.image? %>+ <figure class="admin-img-holder">+ <%= image_tag main_app.url_for(@cms_section.image_one) %>+ </figure>+ <% end %>+ <%= f.field_container :image_one, class: ['form-group mb-0'] do %>+ <%= f.file_field :image_one %>+ <%= f.error_message_on :image_one %>+ <% end %><% end %>- <% end %>+ </div>+ <small class="text-muted mb-4"><%= Spree.t('admin.cms.image_gallery.square_image') %></small><%= f.field_container :title_one, class: ['form-group'] do %><%= f.label :title_one, Spree.t('admin.cms.title') %>@@ -38,28 +63,30 @@autocomplete_custom_return_id_value: 'permalink' } %><%= f.error_message_on :permalink_ones %><% end %>- <small class="text-muted"><%= Spree.t('admin.cms.three_taxon_block.section_one_info') %></small></div></div><div class="col-12 col-md-4 mb-3"><div class="card p-3">- <h5 class="border-bottom"><%= Spree.t('admin.cms.three_taxon_block.right_tall_block') %></h5>- <%= f.field_container :image_two, class: ['form-group'] do %>- <% if @cms_section.image_two.attached? && @cms_section.image_two.variable? %>- <figure class="admin-img-holder">- <%= image_tag main_app.url_for(@cms_section.image_two.variant(resize: '244x104>')) %>- </figure>- <% elsif @cms_section.image_two.attached? && @cms_section.image_two.image? %>- <figure class="admin-img-holder">- <%= image_tag main_app.url_for(@cms_section.image_two) %>- </figure>- <% end %>- <%= f.field_container :image_two, class: ['form-group mb-0'] do %>- <%= f.file_field :image_two %>- <%= f.error_message_on :image_two %>+ <div class="text-center">+ <h4 class="pb-2"><%= Spree.t('admin.cms.image_gallery.image_b') %></h4>+ <%= f.field_container :image_two, class: ['form-group'] do %>+ <% if @cms_section.image_two.attached? && @cms_section.image_two.variable? %>+ <figure class="admin-img-holder">+ <%= image_tag main_app.url_for(@cms_section.image_two.variant(resize: '244x104>')) %>+ </figure>+ <% elsif @cms_section.image_two.attached? && @cms_section.image_two.image? %>+ <figure class="admin-img-holder">+ <%= image_tag main_app.url_for(@cms_section.image_two) %>+ </figure>+ <% end %>+ <%= f.field_container :image_two, class: ['form-group mb-0'] do %>+ <%= f.file_field :image_two %>+ <%= f.error_message_on :image_two %>+ <% end %><% end %>- <% end %>+ </div>+ <small class="text-muted mb-4"><%= Spree.t('admin.cms.image_gallery.tall_image') %></small><%= f.field_container :title_two, class: ['form-group'] do %><%= f.label :title_two, Spree.t('admin.cms.title') %>@@ -81,28 +108,30 @@autocomplete_custom_return_id_value: 'permalink' } %><%= f.error_message_on :permalink_two %><% end %>- <small class="text-muted"><%= Spree.t('admin.cms.three_taxon_block.section_two_info') %></small></div></div><div class="col-12 col-md-4 mb-3"><div class="card p-3">- <h5 class="border-bottom"><%= Spree.t('admin.cms.three_taxon_block.bottom_left_block') %></h5>- <%= f.field_container :image_three, class: ['form-group'] do %>- <% if @cms_section.image_three.attached? && @cms_section.image_three.variable? %>- <figure class="admin-img-holder">- <%= image_tag main_app.url_for(@cms_section.image_three.variant(resize: '244x104>')) %>- </figure>- <% elsif @cms_section.image_three.attached? && @cms_section.image_three.image? %>- <figure class="admin-img-holder">- <%= image_tag main_app.url_for(@cms_section.image_three) %>- </figure>- <% end %>- <%= f.field_container :image_three, class: ['form-group mb-0'] do %>- <%= f.file_field :image_three %>- <%= f.error_message_on :image_three %>+ <div class="text-center">+ <h4 class="pb-2"><%= Spree.t('admin.cms.image_gallery.image_c') %></h4>+ <%= f.field_container :image_three, class: ['form-group'] do %>+ <% if @cms_section.image_three.attached? && @cms_section.image_three.variable? %>+ <figure class="admin-img-holder">+ <%= image_tag main_app.url_for(@cms_section.image_three.variant(resize: '244x104>')) %>+ </figure>+ <% elsif @cms_section.image_three.attached? && @cms_section.image_three.image? %>+ <figure class="admin-img-holder">+ <%= image_tag main_app.url_for(@cms_section.image_three) %>+ </figure>+ <% end %>+ <%= f.field_container :image_three, class: ['form-group mb-0'] do %>+ <%= f.file_field :image_three %>+ <%= f.error_message_on :image_three %>+ <% end %><% end %>- <% end %>+ </div>+ <small class="text-muted mb-4"><%= Spree.t('admin.cms.image_gallery.square_image') %></small><%= f.field_container :title_three, class: ['form-group'] do %><%= f.label :title_three, Spree.t('admin.cms.title') %>@@ -124,14 +153,25 @@autocomplete_custom_return_id_value: 'permalink' } %><%= f.error_message_on :permalink_three %><% end %>- <small class="text-muted"><%= Spree.t('admin.cms.three_taxon_block.section_three_info') %></small></div></div>- <div class="col-12">- <%= f.field_container :fit, class: ['form-group'] do %>- <%= f.label :fit, Spree.t('admin.cms.fit') %>- <%= f.select(:fit, @cms_section.boundaries, {include_blank: false}, class: 'select2') %>- <%= f.error_message_on :fit %>- <% end %>- </div>+</div>++<div class="row pb-0">+ <div class="col-12"> <hr></div>+ <%= f.field_container :fit, class: ['form-group col-6'] do %>+ <%= f.label :fit, Spree.t('admin.cms.fit') %>+ <%= f.select(:fit, @cms_section.boundaries, {include_blank: false}, class: 'select2') %>+ <%= f.error_message_on :fit %>+ <% end %>++ <%= f.field_container :display_labels, class: ['form-group col-6'] do %>+ <%= f.label :display_labels, Spree.t('admin.cms.image_gallery.display_labels') %>+ <%= f.select(:display_labels,+ spree_humanize_dropdown_values('Spree::Cms::Sections::ImageGallery',+ { const: 'LABEL_OPTIONS' }),+ { include_blank: false },+ class:'select2') %>+ <%= f.error_message_on :display_labels %>+ <% end %></div>diff --git a/core/app/models/spree/cms/sections/image_gallery.rb b/core/app/models/spree/cms/sections/image_gallery.rbindex 4bf88a21ab..0a06a69ba8 100644--- a/core/app/models/spree/cms/sections/image_gallery.rb+++ b/core/app/models/spree/cms/sections/image_gallery.rb@@ -2,13 +2,19 @@ module Spree::Cms::Sectionsclass ImageGallery < Spree::CmsSectionafter_initialize :default_values+ LAYOUT_OPTIONS = ['Default', 'Reversed']+ LABEL_OPTIONS = ['Show', 'Hide']+store :content, accessors: [:permalink_one, :title_one,:permalink_two, :title_two,:permalink_three, :title_three], coder: JSON+ store :settings, accessors: [:layout_style, :display_labels], coder: JSON+privatedef default_values+ self.layout_style ||= 'Default'self.fit ||= 'Container'endenddiff --git a/core/config/locales/en.yml b/core/config/locales/en.ymlindex b2474b19fe..53ffd231dd 100644--- a/core/config/locales/en.yml+++ b/core/config/locales/en.yml@@ -607,13 +607,14 @@ en:left_image: Left Imageright_image: Right Imageimage_info: 'Please use an image with an aspect ratio of 54:35 (1468px x 952px).'- three_taxon_block:- top_left_block: Top Left Block- section_one_info: 'This section is displayed in the top left of the three image block. Please use an image with an aspect ratio of 18:13 (1080px x 780px).'- right_tall_block: Right Tall Block- section_two_info: 'This section is displayed on the right as the tall banner. Please use an image with an aspect ratio of 27:40 (1080px x 1600px).'- bottom_left_block: Bottom Left Block- section_three_info: 'This section is displayed on the left below section one. Please use an image with an aspect ratio of 18:13 (1080px x 780px).'+ image_gallery:+ display_labels: Display labels+ image_a: Image A+ image_b: Image B+ image_c: Image C+ layout_style: Layout Style+ square_image: Please use an image with an aspect ratio of 18:13 (1080px x 780px).+ tall_image: Please use an image with an aspect ratio of 27:40 (1080px x 1600px).linkable:seach_for_a_page: Search for a pagetab:diff --git a/frontend/app/views/spree/shared/cms/sections/_image_gallery.html.erb b/frontend/app/views/spree/shared/cms/sections/_image_gallery.html.erbindex 24a4da79e0..ec56cb126d 100644--- a/frontend/app/views/spree/shared/cms/sections/_image_gallery.html.erb+++ b/frontend/app/views/spree/shared/cms/sections/_image_gallery.html.erb@@ -1,128 +1,162 @@<% if section.fullscreen? %>- <% section_one_padding = 'pl-3' %>- <% section_two_padding = 'pr-3' %>+ <% if section.layout_style == 'Default' %>+ <% section_one_padding = 'pl-3' %>+ <% section_two_padding = 'pr-3' %>+ <% else %>+ <% section_one_padding = 'pr-3 order-2' %>+ <% section_two_padding = 'pl-3 order-1' %>+ <% end %>+<% else %>+ <% if section.layout_style == 'Default' %>+ <% section_one_padding = '' %>+ <% section_two_padding = '' %>+ <% else %>+ <% section_one_padding = 'order-2' %>+ <% section_two_padding = 'order-1' %>+ <% end %>+<% end %>++<% if section.display_labels == 'Hide' %>+ <% labels_class = 'd-none' %>+<% else %>+ <% labels_class = 'homepage-taxon-box-text' %>+<% end %>++<% if section.permalink_one.present? %>+ <% link_one = spree.nested_taxons_path(section.permalink_one) %>+ <% link_one_classes = 'homepage-taxon-box bg-light' %>+<% else %>+ <% link_one = nil %>+ <% link_one_classes = 'homepage-taxon-box bg-light pointer-events-none cursor-default' %>+<% end %>++<% if section.permalink_two.present? %>+ <% link_two = spree.nested_taxons_path(section.permalink_two) %>+ <% link_two_classes = 'homepage-taxon-box bg-light' %><% else %>- <% section_one_padding = '' %>- <% section_two_padding = '' %>+ <% link_two = nil %>+ <% link_two_classes = 'homepage-taxon-box bg-light pointer-events-none cursor-default' %><% end %>++<% if section.permalink_three.present? %>+ <% link_three = spree.nested_taxons_path(section.permalink_two) %>+ <% link_three_classes = 'homepage-taxon-box bg-light' %>+<% else %>+ <% link_three = nil %>+ <% link_three_classes = 'homepage-taxon-box bg-light pointer-events-none cursor-default' %>+<% end %>+<!-- Left Block --><div class="col-6 <%= section_one_padding %>"><!-- Top Left Block SQUARE -->- <% if section.permalink_one.present? %>-- <!-- margin-bottom: 3.7% is important for keeping the bottom of the sections aligned -->- <div class="row" style="margin-bottom: 3.7%;">- <div class="col-12">-- <%= link_to spree.nested_taxons_path(section.permalink_one), class: 'homepage-taxon-box bg-light', style: '--aspect-ratio:18/13;' do %>- <% if section.image_one.attached? && section.image_one.variable? %>-- <!-- XS to MD -->- <img class="d-md-none lazyload"- data-src="<%= main_app.url_for(section.image_one.attachment.variant(resize: '270x195>')) %>"- data-srcset="<%= main_app.url_for(section.image_one.attachment.variant(resize: '270x195>')) %>"- alt="<%= section&.title_one %>">-- <!-- MD to XL -->- <img class="d-none d-md-block d-xl-none lazyload"- data-src="<%= main_app.url_for(section.image_one.attachment.variant(resize: '540x390>')) %>"- data-srcset="<%= main_app.url_for(section.image_one.attachment.variant(resize: '540x390>')) %>"- alt="<%= section&.title_one %>">-- <!-- XL UP -->- <img class="d-none d-xl-block lazyload"- data-src="<%= main_app.url_for(section.image_one.attachment.variant(resize: '1080x780>')) %>"- data-srcset="<%= main_app.url_for(section.image_one.attachment.variant(resize: '1080x780>')) %>"- alt="<%= section&.title_one %>">- <% else %>- <%= icon( name: 'card-image',- classes: 'homepage-taxon-box text-black-50',- width: 26,- height: 26) %>- <% end %>- <div class="homepage-taxon-box-text" aria-label="<%= section&.title_one %>">- <h3 class="homepage-hpb"><%= section&.title_one %></h3>- </div>+ <!-- margin-bottom: 3.7% is important for keeping the bottom of the sections aligned -->+ <div class="row" style="margin-bottom: 3.7%;">+ <div class="col-12">++ <%= link_to link_one, class: link_one_classes, style: '--aspect-ratio:18/13;' do %>+ <% if section.image_one.attached? && section.image_one.variable? %>++ <!-- XS to MD -->+ <img class="d-md-none lazyload"+ data-src="<%= main_app.url_for(section.image_one.attachment.variant(resize: '270x195>')) %>"+ data-srcset="<%= main_app.url_for(section.image_one.attachment.variant(resize: '270x195>')) %>"+ alt="<%= section&.title_one %>">++ <!-- MD to XL -->+ <img class="d-none d-md-block d-xl-none lazyload"+ data-src="<%= main_app.url_for(section.image_one.attachment.variant(resize: '540x390>')) %>"+ data-srcset="<%= main_app.url_for(section.image_one.attachment.variant(resize: '540x390>')) %>"+ alt="<%= section&.title_one %>">++ <!-- XL UP -->+ <img class="d-none d-xl-block lazyload"+ data-src="<%= main_app.url_for(section.image_one.attachment.variant(resize: '1080x780>')) %>"+ data-srcset="<%= main_app.url_for(section.image_one.attachment.variant(resize: '1080x780>')) %>"+ alt="<%= section&.title_one %>">+ <% else %>+ <%= icon( name: 'card-image',+ classes: 'homepage-taxon-box text-black-50',+ width: 26,+ height: 26) %><% end %>+ <div class="<%= labels_class %>" aria-label="<%= section&.title_one %>">+ <h3 class="homepage-hpb"><%= section&.title_one %></h3>+ </div>+ <% end %>- </div></div>- <% end %>+ </div><!-- Bottom Left Block SQUARE -->- <% if section.permalink_three.present? %>- <div class="row">- <div class="col-12">-- <%= link_to spree.nested_taxons_path(section.permalink_three), class: 'homepage-taxon-box bg-light', style: '--aspect-ratio:18/13;' do %>- <% if section.image_three.attached? && section.image_three.variable? %>-- <!-- XS to MD -->- <img class="d-md-none lazyload"- data-src="<%= main_app.url_for(section.image_three.attachment.variant(resize: '270x195>')) %>"- data-srcset="<%= main_app.url_for(section.image_three.attachment.variant(resize: '270x195>')) %>"- alt="<%= section&.title_three %>">-- <!-- MD to XL -->- <img class="d-none d-md-block d-xl-none lazyload"- data-src="<%= main_app.url_for(section.image_three.attachment.variant(resize: '540x390>')) %>"- data-srcset="<%= main_app.url_for(section.image_three.attachment.variant(resize: '540x390>')) %>"- alt="<%= section&.title_three %>">-- <!-- XL UP -->- <img class="d-none d-xl-block lazyload"- data-src="<%= main_app.url_for(section.image_three.attachment.variant(resize: '1080x780>')) %>"- data-srcset="<%= main_app.url_for(section.image_three.attachment.variant(resize: '1080x780>')) %>"- alt="<%= section&.title_three %>">- <% else %>- <%= icon( name: 'card-image',- classes: 'homepage-taxon-box text-black-50',- width: 26,- height: 26) %>- <% end %>- <div class="homepage-taxon-box-text" aria-label="<%= section&.title_three %>">- <h3 class="homepage-hpb"><%= section&.title_three %></h3>- </div>+ <div class="row">+ <div class="col-12">++ <%= link_to link_three, class: link_three_classes, style: '--aspect-ratio:18/13;' do %>+ <% if section.image_three.attached? && section.image_three.variable? %>++ <!-- XS to MD -->+ <img class="d-md-none lazyload"+ data-src="<%= main_app.url_for(section.image_three.attachment.variant(resize: '270x195>')) %>"+ data-srcset="<%= main_app.url_for(section.image_three.attachment.variant(resize: '270x195>')) %>"+ alt="<%= section&.title_three %>">++ <!-- MD to XL -->+ <img class="d-none d-md-block d-xl-none lazyload"+ data-src="<%= main_app.url_for(section.image_three.attachment.variant(resize: '540x390>')) %>"+ data-srcset="<%= main_app.url_for(section.image_three.attachment.variant(resize: '540x390>')) %>"+ alt="<%= section&.title_three %>">++ <!-- XL UP -->+ <img class="d-none d-xl-block lazyload"+ data-src="<%= main_app.url_for(section.image_three.attachment.variant(resize: '1080x780>')) %>"+ data-srcset="<%= main_app.url_for(section.image_three.attachment.variant(resize: '1080x780>')) %>"+ alt="<%= section&.title_three %>">+ <% else %>+ <%= icon( name: 'card-image',+ classes: 'homepage-taxon-box text-black-50',+ width: 26,+ height: 26) %><% end %>+ <div class="<%= labels_class %>" aria-label="<%= section&.title_three %>">+ <h3 class="homepage-hpb"><%= section&.title_three %></h3>+ </div>+ <% end %>- </div></div>- <% end %>+ </div></div><!-- Right Block TALL --><div class="col-6 <%= section_two_padding %>">- <% if section.permalink_two.present? %>- <%= link_to spree.nested_taxons_path(section.permalink_two), class: 'homepage-taxon-box bg-light', style: '--aspect-ratio:27/40;' do %>- <% if section.image_two.attached? && section.image_two.variable? %>-- <!-- XS to MD -->- <img class="d-md-none lazyload"- data-src="<%= main_app.url_for(section.image_two.variant(resize: '270x400>')) %>"- data-srcset="<%= main_app.url_for(section.image_two.variant(resize: '270x400>')) %>"- alt="<%= section&.title_two %>">-- <!-- MD to XL -->- <img class="d-none d-md-block d-xl-none lazyload"- data-src="<%= main_app.url_for(section.image_two.variant(resize: '540x800>')) %>"- data-srcset="<%= main_app.url_for(section.image_two.variant(resize: '540x800>')) %>"- alt="<%= section&.title_two %>">-- <!-- XL UP -->- <img class="d-none d-xl-block lazyload"- data-src="<%= main_app.url_for(section.image_two.variant(resize: '1080x1600>')) %>"- data-srcset="<%= main_app.url_for(section.image_two.variant(resize: '1080x1600>')) %>"- alt="<%= section&.title_two %>">- <% else %>- <%= icon( name: 'file-image',- classes: 'homepage-taxon-box text-black-50',- width: 26,- height: 26) %>- <% end %>- <div class="homepage-taxon-box-text" aria-label="<%= section&.title_two %>">- <h3 class="homepage-hpb"><%= section&.title_two %></h3>- </div>+ <%= link_to link_two, class: link_two_classes, style: '--aspect-ratio:27/40;' do %>+ <% if section.image_two.attached? && section.image_two.variable? %>++ <!-- XS to MD -->+ <img class="d-md-none lazyload"+ data-src="<%= main_app.url_for(section.image_two.variant(resize: '270x400>')) %>"+ data-srcset="<%= main_app.url_for(section.image_two.variant(resize: '270x400>')) %>"+ alt="<%= section&.title_two %>">++ <!-- MD to XL -->+ <img class="d-none d-md-block d-xl-none lazyload"+ data-src="<%= main_app.url_for(section.image_two.variant(resize: '540x800>')) %>"+ data-srcset="<%= main_app.url_for(section.image_two.variant(resize: '540x800>')) %>"+ alt="<%= section&.title_two %>">++ <!-- XL UP -->+ <img class="d-none d-xl-block lazyload"+ data-src="<%= main_app.url_for(section.image_two.variant(resize: '1080x1600>')) %>"+ data-srcset="<%= main_app.url_for(section.image_two.variant(resize: '1080x1600>')) %>"+ alt="<%= section&.title_two %>">+ <% else %>+ <%= icon( name: 'file-image',+ classes: 'homepage-taxon-box text-black-50',+ width: 26,+ height: 26) %><% end %>+ <div class="<%= labels_class %>" aria-label="<%= section&.title_two %>">+ <h3 class="homepage-hpb"><%= section&.title_two %></h3>+ </div><% end %></div>