Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Re-factor naming of sections to be more descriptive.

Matthew Kennedy89ac87c366a1
diff --git a/backend/app/views/spree/admin/cms_sections/types/_brands.html.erb b/backend/app/views/spree/admin/cms_sections/types/_brands.html.erb
deleted file mode 100644
index 0f6b320f3e..0000000000
--- a/backend/app/views/spree/admin/cms_sections/types/_brands.html.erb
+++ /dev/null
@@ -1,44 +0,0 @@
-<% menu = Spree::Menu.
- by_store(@cms_section&.cms_page.store).
- for_brands(@cms_section&.cms_page.locale).menu %>
-
-<div class="row">
- <div class="col-12 col-md-6">
- <%= f.field_container :title, class: ['form-group'] do %>
- <%= f.label :title, Spree.t(:title) %>
- <%= f.text_field :title, class: 'form-control' %>
- <%= f.error_message_on :title %>
- <% end %>
-
- <%= f.field_container :subtitle, class: ['form-group'] do %>
- <%= f.label :subtitle, Spree.t(:subtitle) %>
- <%= f.text_field :subtitle, class: 'form-control' %>
- <%= f.error_message_on :subtitle %>
- <% end %>
-
- <%= 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 class="col-6">
- <% if menu.present? %>
- <div class="pt-4">
- <%= raw Spree.t('admin.cms.brand_bar.uses_menu', menu: menu.name) %>
- <%= link_to Spree.t('admin.cms.click_here'), spree.edit_admin_menu_path(menu) %>
- <%= raw Spree.t('admin.cms.brand_bar.vist_menu_to_edit', menu: menu.name) %>
- </div>
- <% else %>
- <div class="alert alert-info mt-4">
- Create a Branding Menu with the following settings
- <span class="badge badge-secondary mx-2">
- <%= svg_icon name: "store.svg", width: '18', height: '18' %> <%= @cms_section.cms_page.store.unique_name %>
- </span>
- <span class="badge badge-secondary">
- <%= svg_icon name: "translate.svg", width: '18', height: '18' %> <%= locale_full_name(@cms_section.cms_page.locale) %>
- </span>
- </div>
- <% end %>
- </div>
-</div>
diff --git a/backend/app/views/spree/admin/cms_sections/types/_carousel.html.erb b/backend/app/views/spree/admin/cms_sections/types/_carousel.html.erb
deleted file mode 100644
index 44e7c35363..0000000000
--- a/backend/app/views/spree/admin/cms_sections/types/_carousel.html.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class="row">
- <div class="col-12">
- <%= render "spree/admin/shared/link_fields", resource: @cms_section, f: f %>
- </div>
-</div>
diff --git a/backend/app/views/spree/admin/cms_sections/types/_hero.html.erb b/backend/app/views/spree/admin/cms_sections/types/_hero.html.erb
deleted file mode 100644
index 8b8a2d5a13..0000000000
--- a/backend/app/views/spree/admin/cms_sections/types/_hero.html.erb
+++ /dev/null
@@ -1,60 +0,0 @@
-<div class="row">
- <div class="col-12 col-md-6">
- <%= f.field_container :title, class: ['form-group'] do %>
- <%= f.label :title, Spree.t('admin.cms.title') %>
- <%= f.text_field :title, class: 'form-control' %>
- <%= f.error_message_on :title %>
- <% end %>
-
- <%= f.field_container :button_text, class: ['form-group'] do %>
- <%= f.label :button_text, Spree.t('admin.cms.button_text') %>
- <%= f.text_field :button_text, class: 'form-control' %>
- <%= f.error_message_on :button_text %>
- <% end %>
-
- <%= 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 class="col-12 col-md-6 pt-4">
- <% @cms_section.build_icon unless @cms_section.icon %>
- <%= f.fields_for :icon do |icon_field| %>
- <%= f.field_container :icon_attachment do %>
- <% unless @cms_section.icon.new_record? %>
- <figure class="admin-img-holder">
- <%= image_tag(main_app.url_for(@cms_section.icon.attachment)) %>
- </figure>
- <% end %>
- <%= icon_field.file_field :attachment %>
- <% end %>
-
- <small class="form-text text-muted"><%= Spree.t('admin.cms.hero.aspect_ratio') %></small>
-
- <%= f.field_container :icon_alt do %>
- <% unless @cms_section.icon.new_record? %>
- <div class="form-group my-3">
- <%= icon_field.label :alt, Spree.t('image_alt_text') %>
- <%= icon_field.text_field :alt, class: 'form-control' %>
- </div>
- <% end %>
- <% end %>
- <% end %>
- </div>
- <div class="col-12"><hr></div>
- <div class="col-12 col-md-6">
- <%= f.field_container :linked_resource_type, class: ['form-group'] do %>
- <%= f.label :linked_resource_type, Spree.t('admin.navigation.link_to') %>
- <%= f.select(:linked_resource_type,
- spree_humanize_dropdown_values('Spree::Cms::Sections::Hero',
- { const: 'LINKED_RESOURCE_TYPE' }),
- { include_blank: false },
- class: 'link_switcher') %>
- <%= f.error_message_on :linked_resource_type %>
- <% end %>
- </div>
- <div class="col-12 col-md-6">
- <%= render "spree/admin/shared/link_fields", resource: @cms_section, f: f %>
- </div>
-</div>
diff --git a/backend/app/views/spree/admin/cms_sections/types/_promo.html.erb b/backend/app/views/spree/admin/cms_sections/types/_promo.html.erb
deleted file mode 100644
index 6b0bf5c0d6..0000000000
--- a/backend/app/views/spree/admin/cms_sections/types/_promo.html.erb
+++ /dev/null
@@ -1,70 +0,0 @@
-<div class="row">
- <div class="col-12 col-md-6">
- <%= f.field_container :title, class: ['form-group'] do %>
- <%= f.label :title, Spree.t(:title) %>
- <%= f.text_field :title, class: 'form-control' %>
- <%= f.error_message_on :title %>
- <% end %>
-
- <%= f.field_container :subtitle, class: ['form-group'] do %>
- <%= f.label :subtitle, Spree.t(:subtitle) %>
- <%= f.text_field :subtitle, class: 'form-control' %>
- <%= f.error_message_on :subtitle %>
- <% end %>
-
- <%= 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 class="row">
- <%= f.field_container :full_width_on_small, class: ['form-group col-6'] do %>
- <div class="custom-control custom-checkbox">
- <%= f.check_box :full_width_on_small, class: 'custom-control-input' %>
- <%= f.label :full_width_on_small, Spree.t('admin.cms.full_width_on_small'), class: 'custom-control-label' %>
- <%= f.error_message_on :full_width_on_small %>
- </div>
- <% end %>
- </div>
- </div>
- <div class="col-12 col-md-6 pt-4">
- <% @cms_section.build_icon unless @cms_section.icon %>
- <%= f.fields_for :icon do |icon_field| %>
- <%= f.field_container :icon_attachment do %>
- <% unless @cms_section.icon.new_record? %>
- <figure class="admin-img-holder">
- <%= image_tag(main_app.url_for(@cms_section.icon.attachment)) %>
- </figure>
- <% end %>
- <%= icon_field.file_field :attachment %>
- <% end %>
-
- <small class="form-text text-muted"><%= Spree.t('admin.cms.promo.aspect_ratio') %></small>
-
- <%= f.field_container :icon_alt do %>
- <% unless @cms_section.icon.new_record? %>
- <div class="form-group my-3">
- <%= icon_field.label :alt, Spree.t('image_alt_text') %>
- <%= icon_field.text_field :alt, class: 'form-control' %>
- </div>
- <% end %>
- <% end %>
- <% end %>
- </div>
- <div class="col-12"><hr></div>
- <div class="col-12 col-md-6">
- <%= f.field_container :linked_resource_type, class: ['form-group'] do %>
- <%= f.label :linked_resource_type, Spree.t('admin.navigation.link_to') %>
- <%= f.select(:linked_resource_type,
- spree_humanize_dropdown_values('Spree::Cms::Sections::Promo',
- { const: 'LINKED_RESOURCE_TYPE' }),
- { include_blank: false },
- class: 'link_switcher') %>
- <%= f.error_message_on :linked_resource_type %>
- <% end %>
- </div>
- <div class="col-12 col-md-6">
- <%= render "spree/admin/shared/link_fields", resource: @cms_section, f: f %>
- </div>
-</div>
diff --git a/backend/app/views/spree/admin/cms_sections/types/_taxon_category.html.erb b/backend/app/views/spree/admin/cms_sections/types/_taxon_category.html.erb
deleted file mode 100644
index 2b4ce9d92d..0000000000
--- a/backend/app/views/spree/admin/cms_sections/types/_taxon_category.html.erb
+++ /dev/null
@@ -1,89 +0,0 @@
-<div class="row">
- <div class="col-12 col-md-6">
- <%= f.field_container :image_one, class: ['form-group'] do %>
- <% if @cms_section.image_one.attached? && @cms_section.image_one.variable? %>
- <%= image_tag main_app.url_for(@cms_section.image_one.variant(resize: '244x104>')) %>
- <% elsif @cms_section.image_one.attached? && @cms_section.image_one.image? %>
- <%= image_tag main_app.url_for(@cms_section.image_one) %>
- <% end %>
- <%= f.field_container :image_one, class: ['form-group'] do %>
- <%= f.label :image_one, Spree.t(:image_one) %><br>
- <%= f.file_field :image_one %>
- <%= f.error_message_on :image_one %>
- <% end %>
- <% end %>
-
- <%= f.field_container :title, class: ['form-group'] do %>
- <%= f.label :title, Spree.t('admin.cms.taxon_category.section_one') %>
- <%= f.select :title,
- options_from_collection_for_select([@cms_section],
- :title, :title, @cms_section.title || nil),
- { include_blank: true },
- class: 'select2autocomplete',
- data: { autocomplete_placeholder_value: Spree.t('admin.navigation.seach_for_a_taxon'),
- autocomplete_clear_value: true,
- autocomplete_url_value: 'taxons_api_v2',
- autocomplete_return_attr_value: 'permalink',
- autocomplete_custom_return_id_value: 'permalink' } %>
- <%= f.error_message_on :title %>
- <% end %>
- </div>
-
- <div class="col-12 col-md-6">
- <%= f.field_container :image_two, class: ['form-group'] do %>
- <% if @cms_section.image_two.attached? && @cms_section.image_two.variable? %>
- <%= image_tag main_app.url_for(@cms_section.image_two.variant(resize: '244x104>')) %>
- <% elsif @cms_section.image_two.attached? && @cms_section.image_two.image? %>
- <%= image_tag main_app.url_for(@cms_section.image_two) %>
- <% end %>
- <%= f.field_container :image_two, class: ['form-group'] do %>
- <%= f.label :image_two, Spree.t(:image_two) %><br>
- <%= f.file_field :image_two %>
- <%= f.error_message_on :image_two %>
- <% end %>
- <% end %>
- <%= f.field_container :subtitle, class: ['form-group'] do %>
- <%= f.label :subtitle, Spree.t('admin.cms.taxon_category.section_two') %>
- <%= f.select :subtitle,
- options_from_collection_for_select([@cms_section],
- :subtitle, :subtitle, @cms_section.subtitle || nil),
- { include_blank: true },
- class: 'select2autocomplete',
- data: { autocomplete_placeholder_value: Spree.t('admin.navigation.seach_for_a_taxon'),
- autocomplete_clear_value: true,
- autocomplete_url_value: 'taxons_api_v2',
- autocomplete_return_attr_value: 'permalink',
- autocomplete_custom_return_id_value: 'permalink' } %>
- <%= f.error_message_on :subtitle %>
- <% end %>
- </div>
-
- <div class="col-12 col-md-6">
- <%= f.field_container :image_three, class: ['form-group'] do %>
- <% if @cms_section.image_three.attached? && @cms_section.image_three.variable? %>
- <%= image_tag main_app.url_for(@cms_section.image_three.variant(resize: '244x104>')) %>
- <% elsif @cms_section.image_three.attached? && @cms_section.image_three.image? %>
- <%= image_tag main_app.url_for(@cms_section.image_three) %>
- <% end %>
- <%= f.field_container :image_three, class: ['form-group'] do %>
- <%= f.label :image_three, Spree.t(:image_three) %><br>
- <%= f.file_field :image_three %>
- <%= f.error_message_on :image_three %>
- <% end %>
- <% end %>
- <%= f.field_container :button_text, class: ['form-group'] do %>
- <%= f.label :button_text, Spree.t('admin.cms.taxon_category.section_three') %>
- <%= f.select :button_text,
- options_from_collection_for_select([@cms_section],
- :button_text, :button_text, @cms_section.button_text || nil),
- { include_blank: true },
- class: 'select2autocomplete',
- data: { autocomplete_placeholder_value: Spree.t('admin.navigation.seach_for_a_taxon'),
- autocomplete_clear_value: true,
- autocomplete_url_value: 'taxons_api_v2',
- autocomplete_return_attr_value: 'permalink',
- autocomplete_custom_return_id_value: 'permalink' } %>
- <%= f.error_message_on :button_text %>
- <% end %>
- </div>
-</div>
diff --git a/core/app/models/spree/cms/sections/brands.rb b/core/app/models/spree/cms/sections/brands.rb
deleted file mode 100644
index ad076b6fc4..0000000000
--- a/core/app/models/spree/cms/sections/brands.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-module Spree::Cms::Sections
- class Brands < Spree::CmsSection
- after_initialize :default_values
-
- def widths
- ['Full']
- end
-
- private
-
- def default_values
- self.width ||= 'Full'
- self.fit ||= 'Screen'
- end
- end
-end
diff --git a/core/app/models/spree/cms/sections/carousel.rb b/core/app/models/spree/cms/sections/carousel.rb
deleted file mode 100644
index 0473f9cd55..0000000000
--- a/core/app/models/spree/cms/sections/carousel.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-module Spree::Cms::Sections
- class Carousel < Spree::CmsSection
- after_initialize :default_values
-
- LINKED_RESOURCE_TYPE = ['Spree::Taxon']
-
- def widths
- ['Full']
- end
-
- private
-
- def default_values
- self.width ||= 'Full'
- self.fit ||= 'Screen'
- self.linked_resource_type ||= 'Spree::Taxon'
- end
- end
-end
diff --git a/core/app/models/spree/cms/sections/hero.rb b/core/app/models/spree/cms/sections/hero.rb
deleted file mode 100644
index 9295f11a49..0000000000
--- a/core/app/models/spree/cms/sections/hero.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-module Spree::Cms::Sections
- class Hero < Spree::CmsSection
- after_initialize :default_values
-
- has_one :icon, as: :viewable, dependent: :destroy, class_name: 'Spree::Icon'
- accepts_nested_attributes_for :icon, reject_if: :all_blank
-
- LINKED_RESOURCE_TYPE = ['Spree::Taxon', 'Spree::Product']
-
- def widths
- ['Full']
- end
-
- private
-
- def default_values
- self.width ||= 'Full'
- self.fit ||= 'Screen'
- self.linked_resource_type ||= 'Spree::Taxon'
- end
- end
-end
diff --git a/core/app/models/spree/cms/sections/promo.rb b/core/app/models/spree/cms/sections/promo.rb
deleted file mode 100644
index ffb30c16a5..0000000000
--- a/core/app/models/spree/cms/sections/promo.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-module Spree::Cms::Sections
- class Promo < Spree::CmsSection
- after_initialize :default_values
-
- has_one :icon, as: :viewable, dependent: :destroy, class_name: 'Spree::Icon'
- accepts_nested_attributes_for :icon, reject_if: :all_blank
-
- LINKED_RESOURCE_TYPE = ['Spree::Taxon', 'Spree::Product']
-
- # Overide this per section type
- def widths
- ['Half']
- end
-
- private
-
- def default_values
- self.width ||= 'Half'
- self.fit ||= 'Container'
- self.linked_resource_type ||= 'Spree::Taxon'
- end
- end
-end
diff --git a/core/app/models/spree/cms/sections/taxon_category.rb b/core/app/models/spree/cms/sections/taxon_category.rb
deleted file mode 100644
index 8759d9b5a0..0000000000
--- a/core/app/models/spree/cms/sections/taxon_category.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-module Spree::Cms::Sections
- class TaxonCategory < Spree::CmsSection
- after_initialize :default_values
-
- has_one_attached :image_one
- has_one_attached :image_two
- has_one_attached :image_three
-
- def widths
- ['Full']
- end
-
- private
-
- def default_values
- self.width ||= 'Full'
- end
- end
-end
diff --git a/core/app/models/spree/cms_section.rb b/core/app/models/spree/cms_section.rb
index ab7f3000bb..9569db90c2 100644
--- a/core/app/models/spree/cms_section.rb
+++ b/core/app/models/spree/cms_section.rb
@@ -11,12 +11,12 @@ module Spree
LINKED_RESOURCE_TYPE = []
- TYPES = ['Spree::Cms::Sections::Hero',
- 'Spree::Cms::Sections::Promo',
+ TYPES = ['Spree::Cms::Sections::FullScreenHeroImage',
+ 'Spree::Cms::Sections::HalfScreenPromotionBlock',
'Spree::Cms::Sections::FeaturedArticle',
- 'Spree::Cms::Sections::Carousel',
- 'Spree::Cms::Sections::TaxonCategory',
- 'Spree::Cms::Sections::Brands']
+ 'Spree::Cms::Sections::ProductCarousel',
+ 'Spree::Cms::Sections::ThreeTaxonCategoriesBlock',
+ 'Spree::Cms::Sections::StaticBrandingBar']
# Overide this per section type
def boundaries
diff --git a/frontend/app/views/spree/shared/cms/sections/_brands.html.erb b/frontend/app/views/spree/shared/cms/sections/_brands.html.erb
deleted file mode 100644
index f3807aac0e..0000000000
--- a/frontend/app/views/spree/shared/cms/sections/_brands.html.erb
+++ /dev/null
@@ -1,36 +0,0 @@
-<div class="<%= width %> mb-3">
- <div class="<%= fit %>">
- <div class="col-12">
- <div class="row py-4">
-
- <% if section.title.present? || section.subtitle.present? %>
- <div class="col-12 mb-3 text-center">
- <% if section.title %>
- <h3 class="mb-0"><%= section.title %></h3>
- <% end %>
- <% if section.subtitle %>
- <h5 class="text-muted"><%= section.subtitle %></h5>
- <% end %>
- </div>
- <% end %>
-
- <% if spree_menu('brands').present? %>
- <% spree_menu('brands').children.each do |brand| %>
- <div class="col d-flex justify-content-center">
- <%= spree_nav_link_tag(brand, { class: "brand d-flex align-middle justify-content-center" }) do %>
- <% if brand.icon.present? %>
- <img class="lazyload"
- data-src="<%= main_app.url_for(brand.icon.attachment) %>"
- data-srcset="<%= main_app.url_for(brand.icon.attachment) %>"
- alt="<%= brand.icon.alt %>"
- title="<%= brand.name %>">
- <% end %>
- <% end %>
- </div>
- <% end %>
- <% end %>
-
- </div>
- </div>
- </div>
-</div>
diff --git a/frontend/app/views/spree/shared/cms/sections/_carousel.html.erb b/frontend/app/views/spree/shared/cms/sections/_carousel.html.erb
deleted file mode 100644
index ae5fbdf989..0000000000
--- a/frontend/app/views/spree/shared/cms/sections/_carousel.html.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-<% if section.linked_resource %>
- <div class="<%= width %>">
- <div class="<%= fit %>">
- <div data-product-carousel-taxon-id='<%= section.linked_resource.permalink %>' class="my-3"></div>
- </div>
- </div>
-<% end %>
diff --git a/frontend/app/views/spree/shared/cms/sections/_hero.html.erb b/frontend/app/views/spree/shared/cms/sections/_hero.html.erb
deleted file mode 100644
index 55e1bcbfb2..0000000000
--- a/frontend/app/views/spree/shared/cms/sections/_hero.html.erb
+++ /dev/null
@@ -1,60 +0,0 @@
-<div class="<%= width %>">
- <div class="<%= fit %>">
- <div class="homepage-hero-image mb-3 position-relative p-0 bg-light">
- <% if section.icon.present? %>
- <!-- XS to MD -->
- <div class="d-sm-none" style="--aspect-ratio:12/5;">
- <img class="lazyload"
- data-src="<%= main_app.url_for(section.icon.attachment.variant(resize: '768x320>')) %>"
- data-srcset="<%= main_app.url_for(section.icon.attachment.variant(resize: '768x320>')) %>"
- alt="<%= section.icon.alt %>">
- </div>
-
- <!-- SM to MD -->
- <div class="d-none d-sm-block d-md-none" style="--aspect-ratio:12/5;">
- <img class="lazyload"
- data-src="<%= main_app.url_for(section.icon.attachment.variant(resize: '990x412>')) %>"
- data-srcset="<%= main_app.url_for(section.icon.attachment.variant(resize: '990x412>')) %>"
- alt="<%= section.icon.alt %>">
- </div>
-
- <!-- MD to LG -->
- <div class="d-none d-md-block d-lg-none" style="--aspect-ratio:12/5;">
- <img class="lazyload"
- data-src="<%= main_app.url_for(section.icon.attachment.variant(resize: '1200x500>')) %>"
- data-srcset="<%= main_app.url_for(section.icon.attachment.variant(resize: '1200x500>')) %>"
- alt="<%= section.icon.alt %>">
- </div>
-
- <!-- XL UP -->
- <div class="d-none d-lg-block" style="--aspect-ratio:12/5;">
- <img class="lazyload"
- data-src="<%= main_app.url_for(section.icon.attachment.variant(resize: '2400x1000>')) %>"
- data-srcset="<%= main_app.url_for(section.icon.attachment.variant(resize: '2400x1000>')) %>"
- alt="<%= section.icon.alt %>">
- </div>
- <% else %>
- <div style="--aspect-ratio:12/5;">
- <%= icon( name: 'card-image',
- classes: 'text-black-50',
- width: 26,
- height: 26) %>
- </div>
- <% 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 spree-btn px-5' %>
- </div>
- <% end %>
- </div>
- </div>
- </div>
-</div>
diff --git a/frontend/app/views/spree/shared/cms/sections/_promo.html.erb b/frontend/app/views/spree/shared/cms/sections/_promo.html.erb
deleted file mode 100644
index 6501dd0dc2..0000000000
--- a/frontend/app/views/spree/shared/cms/sections/_promo.html.erb
+++ /dev/null
@@ -1,50 +0,0 @@
-<aside class="<%= width %> mb-3">
- <div class="<%= fit %>">
- <%= link_to section.link do %>
- <div class="d-flex
- align-items-end
- justify-content-center
- bg-light text-center
- overflow-hidden
- homepage-bottom-box"
- style="--aspect-ratio:54/35;">
-
- <% if section.icon.present? %>
- <!-- XS to MD -->
- <img class="d-md-none lazyload"
- data-src="<%= main_app.url_for(section.icon.attachment.variant(resize: '387x250>')) %>"
- data-srcset="<%= main_app.url_for(section.icon.attachment.variant(resize: '387x250>')) %>"
- alt="<%= section.icon.alt %>">
-
- <!-- MD to XL -->
- <img class="d-none d-md-block d-xl-none lazyload"
- data-src="<%= main_app.url_for(section.icon.attachment.variant(resize: '734x476>')) %>"
- data-srcset="<%= main_app.url_for(section.icon.attachment.variant(resize: '734x476>')) %>"
- alt="<%= section.icon.alt %>">
-
- <!-- XL UP -->
- <img class="d-none d-xl-block lazyload"
- data-src="<%= main_app.url_for(section.icon.attachment.variant(resize: '1468x952>')) %>"
- data-srcset="<%= main_app.url_for(section.icon.attachment.variant(resize: '1468x952>')) %>"
- alt="<%= section.icon.alt %>">
- <% else %>
- <%= icon( name: 'card-image',
- classes: 'text-black-50',
- width: 26,
- height: 26) %>
- <% end %>
-
- <% if section.title.present? && section.subtitle.present? %>
- <div class="homepage-bottom-box-inner p-1 p-sm-2 p-md-4 homepage-hpb" role="img" aria-label="New Collection">
- <div class="homepage-bottom-box-inner-small-text">
- <%= section.title %>
- </div>
- <div class="homepage-bottom-box-inner-big-text">
- <%= section.subtitle %>
- </div>
- </div>
- <% end %>
- </div>
- <% end %>
- </div>
-</aside>
diff --git a/frontend/app/views/spree/shared/cms/sections/_taxon_category.html.erb b/frontend/app/views/spree/shared/cms/sections/_taxon_category.html.erb
deleted file mode 100644
index 32cdde1cf5..0000000000
--- a/frontend/app/views/spree/shared/cms/sections/_taxon_category.html.erb
+++ /dev/null
@@ -1,112 +0,0 @@
-<div class="col-12">
- <div class="row">
- <div class="col-6 mb-3">
- <% if section.title.present? %>
- <%= link_to spree.nested_taxons_path(section.title), class: "homepage-taxon-box mb-3 bg-light" 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: '387x250>')) %>"
- data-srcset="<%= main_app.url_for(section.image_one.attachment.variant(resize: '387x250>')) %>"
- alt="<%= section.title %>">
-
- <!-- 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: '734x476>')) %>"
- data-srcset="<%= main_app.url_for(section.image_one.attachment.variant(resize: '734x476>')) %>"
- alt="<%= section.title %>">
-
- <!-- XL UP -->
- <img class="d-none d-xl-block lazyload"
- data-src="<%= main_app.url_for(section.image_one.attachment.variant(resize: '1468x952>')) %>"
- data-srcset="<%= main_app.url_for(section.image_one.attachment.variant(resize: '1468x952>')) %>"
- alt="<%= section.title %>">
- <% else %>
- <div style="--aspect-ratio:54/35;">
- <%= icon( name: 'card-image',
- classes: 'homepage-taxon-box text-black-50',
- width: 26,
- height: 26) %>
- </div>
- <% end %>
-
- <div class="homepage-taxon-box-text ">
- <h3 class="homepage-hpb"><%= section.title %></h3>
- </div>
- <% end %>
- <% end %>
-
- <% if section.button_text.present? %>
- <%= link_to spree.nested_taxons_path(section.button_text), class: "homepage-taxon-box bg-light" 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: '387x250>')) %>"
- data-srcset="<%= main_app.url_for(section.image_three.attachment.variant(resize: '387x250>')) %>"
- alt="<%= section.button_text %>">
-
- <!-- 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: '734x476>')) %>"
- data-srcset="<%= main_app.url_for(section.image_three.attachment.variant(resize: '734x476>')) %>"
- alt="<%= section.button_text %>">
-
- <!-- XL UP -->
- <img class="d-none d-xl-block lazyload"
- data-src="<%= main_app.url_for(section.image_three.attachment.variant(resize: '1468x952>')) %>"
- data-srcset="<%= main_app.url_for(section.image_three.attachment.variant(resize: '1468x952>')) %>"
- alt="<%= section.button_text %>">
- <% else %>
- <div style="--aspect-ratio:54/35;">
- <%= icon( name: 'card-image',
- classes: 'homepage-taxon-box text-black-50',
- width: 26,
- height: 26) %>
- </div>
- <% end %>
-
- <div class="homepage-taxon-box-text" role="img" aria-label="Sportswear">
- <h3 class="homepage-hpb"><%= section.button_text %></h3>
- </div>
- <% end %>
- <% end %>
- </div>
-
- <div class="col-6 mb-3 d-flex flex-column">
- <% if section.button_text.present? %>
- <%= link_to spree.nested_taxons_path(section.subtitle), class: "homepage-taxon-box flex-grow-1 bg-light" 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: '387x250>')) %>"
- data-srcset="<%= main_app.url_for(section.image_two.variant(resize: '387x250>')) %>"
- alt="<%= section.subtitle %>">
-
- <!-- 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: '734x476>')) %>"
- data-srcset="<%= main_app.url_for(section.image_two.variant(resize: '734x476>')) %>"
- alt="<%= section.subtitle %>">
-
- <!-- XL UP -->
- <img class="d-none d-xl-block lazyload"
- data-src="<%= main_app.url_for(section.image_two.variant(resize: '1468x952>')) %>"
- data-srcset="<%= main_app.url_for(section.image_two.variant(resize: '1468x952>')) %>"
- alt="<%= section.subtitle %>">
- <% else %>
- <div style="--aspect-ratio:27/40; margin: 50px;">
- <%= icon( name: 'file-image',
- classes: 'homepage-taxon-box text-black-50',
- width: 26,
- height: 26) %>
- </div>
- <% end %>
-
- <div class="homepage-taxon-box-text">
- <h3 class="homepage-hpb"><%= section.subtitle %></h3>
- </div>
- <% end %>
- <% end %>
- </div>
- </div>
-</div>