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
Open source page sections templates
Damian Legawiecd4c1e48e96ff
diff --git a/storefront/app/views/themes/default/spree/page_sections/_announcement_bar.html.erb b/storefront/app/views/themes/default/spree/page_sections/_announcement_bar.html.erbnew file mode 100644index 0000000000..c3107f50cf--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_announcement_bar.html.erb@@ -0,0 +1,10 @@+<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(section) do %>+ <% if section.present? && section.text.body.to_plain_text.present? %>+ <div+ class='w-full justify-center items-center flex announcement-bar'+ style='<%= section_styles(section) %>'+ >+ <div class='text-sm tracking-widest'><%= section.text.body %></div>+ </div>+ <% end %>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_custom_code.html.erb b/storefront/app/views/themes/default/spree/page_sections/_custom_code.html.erbnew file mode 100644index 0000000000..ad2e7533b9--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_custom_code.html.erb@@ -0,0 +1,5 @@+<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(section) do %>+ <div style="<%= section_styles(section) %>">+ <%= raw(section.preferred_custom_code) %>+ </div>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_featured_product.html.erb b/storefront/app/views/themes/default/spree/page_sections/_featured_product.html.erbnew file mode 100644index 0000000000..98061f6662--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_featured_product.html.erb@@ -0,0 +1,133 @@+<% view_full_details_rendered = false %>+<%= turbo_frame_tag "section-#{section.id}" do %>+ <% options_param_name = "featured-product-#{section.id}-options" %>+ <% presenter = Spree::FeaturedProductPresenter.new(section, params: params[options_param_name], currency: current_currency) %>+ <% images = presenter.product.present? ? product_media_gallery_images(presenter.product, selected_variant: presenter.selected_variant, variant_from_options: presenter.variant_from_options, options_param_name: options_param_name) : [] %>+ <% current_variant = presenter.selected_variant || presenter.variant_from_options || presenter.product&.first_or_default_variant(current_currency) %>+ <% @selected_variant = presenter.selected_variant %>+ <% @variant_from_options = presenter.variant_from_options %>+ <div style="<%= section_styles(section) %>">+ <div+ class="page-container py-5"+ data-controller="product-form"+ data-product-form-no-cache-value="true"+ data-product-form-url-value="<%= spree.page_section_url(section.id, host: current_store.url) %>"+ data-product-form-frame-name-value="section-<%= section.id %>"+ data-product-form-options-param-name-value="<%= options_param_name %>"+ data-product-form-required-options-value='<%= presenter.product&.option_type_ids&.map(&:to_s)&.to_json %>'+ data-product-form-variant-from-options-disabled-value='<%= !presenter.variant_from_options&.in_stock? %>'+ >+ <% if presenter.product %>+ <div class="lg:hidden -ml-4 -mr-4">+ <%= render 'spree/products/media_gallery', images: images, product: presenter.product %>+ </div>+ <% end %>+ <div id="product-details-page" class="grid-cols-1 lg:grid-cols-12 gap-x-14 <%= presenter.product ? 'grid' : 'flex justify-center w-full' %>">+ <% if presenter.product %>+ <div class="lg:col-span-7 relative">+ <!-- media gallery for desktop -->+ <div class="hidden lg:block">+ <%= render 'spree/products/media_gallery', images: images, product: presenter.product, desktop: true %>+ </div>+ </div>+ <% end %>+ <div class="lg:col-span-5 lg:col-start-8">+ <div+ data-controller="modal"+ data-modal-allow-background-close="true"+ class="h-full w-full waitlist-modal"+ data-modal-backdrop-color-value="rgba(0,0,0,0.32)">+ <%= form_with url: spree.line_items_path, method: :post, data: { controller: 'sticky-button', 'product-form-target': 'form' } do %>+ <% if presenter.product %>+ <div class='pt-[4.25rem] lg:pt-0'></div>+ <% section.blocks.each do |block| %>+ <div <%= block_attributes(block) %>>+ <% case block.type %>+ <% when 'Spree::PageBlocks::Products::Brand' %>+ <% if presenter.product&.brand&.page_builder_url %>+ <%= link_to spree_storefront_resource_url(presenter.product&.brand), title: strip_tags(presenter.product&.brand&.name).strip, data: { turbo_frame: '_top' } do %>+ <h3 class="text-sm uppercase font-semibold">+ <%= presenter.product&.brand&.name %>+ </h3>+ <% end %>+ <% else %>+ <h3 class="text-sm uppercase font-semibold">+ <%= presenter.product&.brand&.name %>+ </h3>+ <% end %>+ <% when 'Spree::PageBlocks::Products::Title' %>+ <h2 class="tracking-tight <%= block.preferred_size == 'small' ? 'text-base lg:text-xl' : block.preferred_size == 'medium' ? 'text-xl lg:text-2xl' : 'text-2xl lg:text-2xl' %> uppercase font-medium">+ <%= presenter.product ? presenter.product.name : 'Example product' %>+ </h2>+ <% when 'Spree::PageBlocks::Products::Price' %>+ <%=+ render 'spree/products/price',+ product: presenter.product,+ use_variant: true,+ selected_variant: presenter.selected_variant,+ price_class: "lg:text-lg lg:font-medium"+ %>+ <% when 'Spree::PageBlocks::Products::QuantitySelector' %>+ <%= render 'spree/products/quantity_selector', product: presenter.product, selected_variant: presenter.selected_variant %>+ <% when 'Spree::PageBlocks::Products::BuyButtons' %>+ <div class="flex w-full my-5">+ <%= render 'spree/products/add_to_cart_button', product: presenter.product, selected_variant: presenter.selected_variant, sticky_button_classes: "w-full", without_fixed_button: true, options_param_name: options_param_name %>+ <%= render 'spree/products/add_to_wishlist', variant: current_variant, css_classes: 'btn-secondary ml-5 h-12 !py-0 !px-3 border-default', icon_size: 24 %>+ </div>+ <% when 'Spree::PageBlocks::Products::Share' %>+ <div class="flex justify-between">+ <details>+ <summary class="inline-flex space-x-2 group cursor-pointer">+ <%= heroicon 'arrow-up-tray'%>+ <div class="group-hover:underline">+ <%= block.text %>+ </div>+ </summary>+ <% if presenter.product %>+ <div class="absolute flex" data-controller="copy-input">+ <div class="has-float-label flex flex-col max-w-[200px]">+ <%= text_field_tag "product-#{presenter.product.id}-share-link", spree.product_url(presenter.product, host: current_store.url), class: 'text-ellipsis text-input border-r-0 !rounded-r-none !rounded-l-md', readonly: true, type: 'text', onclick: 'this.select()', data: { copy_input_target: 'input' } %>+ <%= label_tag "product-#{presenter.product.id}-share-link", Spree.t(:link) %>+ </div>+ <button+ class="bg-input-bg block border-t-2 border-r-2 border-b-2 rounded-r-md pr-3"+ data-copy-input-target="copyButton"+ type="button">+ <%= heroicon 'clipboard', variant: :outline %>+ <span class="sr-only"><%= Spree.t(:copy_link) %></span>+ </button>+ </div>+ <% end %>+ </details>+ <% if block == section.blocks.last %>+ <% view_full_details_rendered = true %>+ <%= link_to spree_storefront_resource_url(presenter.product) || '#', class: class_names('hover:underline flex space-x-2 group', {'cursor-not-allowed' => presenter.product.nil?}), data: { turbo: 'false' }, aria: { disabled: presenter.product.nil? } do %>+ <span>+ <%= Spree.t(:view_full_details) %>+ </span>+ <%= heroicon 'arrow-long-right' %>+ <% end %>+ <% end %>+ </div>+ <% when 'Spree::PageBlocks::Products::VariantPicker' %>+ <%= render 'spree/products/variant_picker', product: presenter.product, selected_variant: presenter.selected_variant, options_param_name: options_param_name %>+ <% end %>+ </div>+ <% end %>+ <% end %>+ <% unless view_full_details_rendered %>+ <%= link_to spree_storefront_resource_url(presenter.product) || '#', class: class_names('hover:underline flex space-x-2 group', {'cursor-not-allowed' => presenter.product.nil?}), data: { turbo: 'false' }, aria: { disabled: presenter.product.nil? } do %>+ <span>+ <%= Spree.t(:view_full_details) %>+ </span>+ <%= heroicon 'arrow-long-right' %>+ <% end %>+ <% end %>+ <% end %>+ <%= render('spree/products/add_to_waitlist', variant: current_variant) if current_variant.present? %>+ </div>+ </div>+ </div>+ </div>+ </div>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_featured_taxon.html.erb b/storefront/app/views/themes/default/spree/page_sections/_featured_taxon.html.erbnew file mode 100644index 0000000000..f3b075d273--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_featured_taxon.html.erb@@ -0,0 +1,116 @@+<div style='<%= section_styles(section) %>' class='animate-fadeIn'>+ <div class='page-container'>+ <% heading_size = case section.preferred_heading_size+ when 'small' then 'text-base font-medium'+ when 'medium' then 'text-lg lg:text-xl font-medium'+ when 'large' then 'text-xl lg:text-2xl font-medium'+ end %>+ <% if section.taxon&.image&.attached? && section.preferred_show_taxon_image %>+ <% desktop_slides_amount = 2.5 %>+ <% section_with_image = true %>+ <% arrows_on_top = false %>+ <% else %>+ <% desktop_slides_amount = 4 %>+ <% section_with_image = false %>+ <% arrows_on_top = true %>+ <% end %>+ <% if section.preferred_heading.present? %>+ <div class='mb-8 flex justify-between items-end'>+ <div class="md:basis-2/5">+ <h3+ class='<%= heading_size %> featured-taxon--title font-medium text-<%= section.preferred_heading_alignment %>'+ data-title="<%= section.preferred_heading.downcase %>"+ style='<%= section_heading_styles(section) %>'>+ <% if section.taxon.present? %>+ <%= link_to section.preferred_heading, spree_storefront_resource_url(section.taxon), data: { turbo_frame: "_top" } %>+ <% else %>+ <%= section.preferred_heading %>+ <% end %>+ </h3>++ <% if section.description_to_use.present? %>+ <div class='pt-4 text-<%= section.preferred_description_alignment %>'>+ <%= section.description_to_use %>+ </div>+ <% end %>+ </div>+ <% if section.taxon.present? %>+ <%= link_to spree_storefront_resource_url(section.taxon), class: class_names(section.preferred_button_style == "primary" ? "btn-primary" : "btn-secondary", " text-center hidden md:inline-block"), data: { turbo_frame: '_top' } do %>+ <%= section.preferred_button_text %>+ <% end %>+ <% end %>+ </div>+ <% end %>+ <% if loaded && section.taxon.present? %>+ <% if section.products(current_currency).any? %>+ <div class='grid grid-cols-1 lg:grid-cols-12 gap-4 lg:gap-6'>+ <% if section_with_image %>+ <div class='lg:col-span-5'>+ <%= link_to spree.nested_taxons_path(section.taxon), data: { turbo_frame: "_top" } do %>+ <%= image_tag main_app.cdn_image_url(section.taxon.image.variant(spree_image_variant_options(resize_to_fill: [1000, 1000]))), height: 500, width: 500, class: 'h-full w-full object-cover object-center', loading: :lazy %>+ <% end %>+ </div>+ <% end %>+ <div class='<%= section_with_image ? "lg:col-span-7" : "lg:col-span-12" %>'>+ <%= render 'spree/products/swiper', products: section.products(current_currency).first(section.preferred_max_products_to_show), desktop_slides: desktop_slides_amount, pagination: 'bottom', arrows_on_top: arrows_on_top, section: section %>+ </div>+ </div>+ <% end %>+ <% else %>+ <div class='grid grid-cols-1 md:grid-cols-12 gap-4 md:gap-6'>+ <% if section_with_image %>+ <div class='md:col-span-5 w-full aspect-1 md:h-[536px] bg-accent'></div>+ <% end %>+ <div class='<%= section_with_image ? "md:col-span-7" : "md:col-span-12" %> flex justify-between flex-col overflow-hidden'>+ <% if section_with_image %>+ <div class='grid gap-4 md:gap-6 grid-cols-8 md:grid-cols-5'>+ <div class='col-span-6 md:col-span-2'>+ <div class='aspect-1 bg-accent w-full'></div>+ <div class='h-6 mt-2 w-32 bg-accent rounded'></div>+ <div class='h-8 mt-2 w-16 bg-accent rounded'></div>+ </div>+ <div class='col-span-2 flex flex-col h-full overflow-hidden'>+ <div class='h-full md:aspect-1 bg-accent w-full'></div>+ <div class='h-6 mt-2 w-32 bg-accent rounded shrink-0'></div>+ <div class='h-8 mt-2 w-16 bg-accent rounded shrink-0'></div>+ </div>+ <div class='hidden md:block'>+ <div class='aspect-[1/2] bg-accent w-full'></div>+ <div class='h-6 mt-2 w-32 bg-accent rounded'></div>+ <div class='h-8 mt-2 w-16 bg-accent rounded'></div>+ </div>+ </div>+ <div class='md:flex <%= section.preferred_show_more_button ? "justify-between" : "justify-end" %> items-end'>+ <div class='bg-accent h-12 rounded-full w-full md:w-56 mt-8 md:order-1 hidden md:block'></div>+ <div class='<%= section.preferred_show_more_button ? "" : "hidden" %> bg-accent h-12 rounded-button w-full md:w-72 mt-6'></div>+ </div>+ <% else %>+ <div class='grid gap-4 md:gap-6 grid-cols-8 relative'>+ <div class='col-span-6 md:col-span-2'>+ <div class='aspect-1 bg-accent w-full'></div>+ <div class='h-6 mt-2 w-32 bg-accent rounded'></div>+ <div class='h-8 mt-2 w-16 bg-accent rounded'></div>+ </div>+ <div class='col-span-2 md:col-span-2 flex flex-col'>+ <div class='aspect-[1/3] md:aspect-1 bg-accent w-full flex-1'></div>+ <div class='h-6 mt-2 w-32 bg-accent rounded'></div>+ <div class='h-8 mt-2 w-16 bg-accent rounded'></div>+ </div>+ <div class='col-span-2 hidden md:block'>+ <div class='aspect-1 bg-accent w-full'></div>+ <div class='h-6 mt-2 w-32 bg-accent rounded'></div>+ <div class='h-8 mt-2 w-16 bg-accent rounded'></div>+ </div>+ <div class='col-span-2 hidden md:block'>+ <div class='aspect-1 bg-accent w-full'></div>+ <div class='h-6 mt-2 w-32 bg-accent rounded'></div>+ <div class='h-8 mt-2 w-16 bg-accent rounded'></div>+ </div>+ </div>+ <div class="md:hidden w-full block rounded-button bg-accent h-12 mt-8"></div>+ <% end %>+ </div>+ </div>+ <% end %>+ </div>+</div>diff --git a/storefront/app/views/themes/default/spree/page_sections/_featured_taxons.html.erb b/storefront/app/views/themes/default/spree/page_sections/_featured_taxons.html.erbnew file mode 100644index 0000000000..423f1314eb--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_featured_taxons.html.erb@@ -0,0 +1,71 @@+<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(section) do %>+ <div class="page-container py-5" style="<%= section_styles(section) %>">+ <% heading_size = case section.preferred_heading_size+ when 'small' then 'text-base font-medium'+ when 'medium' then 'text-lg lg:text-xl font-medium'+ when 'large' then 'text-xl lg:text-2xl font-medium'+ end+ %>+ <h3 class="<%= heading_size %> mb-4 text-<%= section.preferred_heading_alignment %>">+ <%= section.preferred_heading %>+ </h3>+ <div class="gap-6 grid-cols-2 sm:grid-cols-4 lg:grid-cols-6 xl:gap-x-8 mb-7 hidden md:grid">+ <% section.links.each do |link| %>+ <%= page_builder_link_to link, title: link.label, class: 'group block overflow-hidden', target: link.open_in_new_tab.presence && '_blank' do %>+ <% if link.linkable.image&.attached? && link.linkable.image&.variable? %>+ <div class="flex space-y-2 flex-col">+ <%= image_tag main_app.cdn_image_url(link.linkable.image.variant(spree_image_variant_options(resize_to_fill: [600, 600]))), height: 300, width: 300, class: 'h-full w-full object-cover object-center group-hover:opacity-75 rounded-md bg-gray-200', loading: :lazy, alt: link.label %>+ <span><%= link.label %></span>+ </div>+ <% else %>+ <div class="aspect-1 w-full group-hover:bg-gray-100 bg-gray-200 rounded-md flex items-center justify-center relative">+ <span><%= link.label %></span>+ </div>+ <% end %>+ <% end %>+ <% end %>+ </div>+ <div class="pt-5 flex items-center space-x-2 md:hidden">+ <button class='swiper-custom-button-prev'>+ <%= render 'spree/shared/icons/arrow-left' %>+ </button>+ <div class="swiper-container overflow-hidden mb-7 relative flex-1" data-controller='carousel' data-carousel-options-value='{+ "slidesPerView": "auto",+ "centeredSlides": false,+ "spaceBetween": 10,+ "grabCursor": true,+ "freeMode": true,+ "navigation": {+ "nextEl": ".swiper-custom-button-next",+ "prevEl": ".swiper-custom-button-prev"+ },+ "pagination": {+ "el": ".swiper-pagination"+ }+ }'>+ <div class='swiper-wrapper'>+ <% section.links.each do |link| %>+ <div class='swiper-slide w-[200px]'>+ <%= page_builder_link_to link, title: link.label, class: 'group block overflow-hidden', target: link.open_in_new_tab.presence && '_blank' do %>+ <% if link.linkable.image&.attached? && link.linkable.image&.variable? %>+ <div class="flex space-y-2 flex-col">+ <%= image_tag main_app.cdn_image_url(link.linkable.image.variant(spree_image_variant_options(resize_to_fill: [400, 400]))), height: 200, width: 200, class: 'h-full w-full object-cover object-center group-hover:opacity-75 rounded-md bg-gray-200', loading: :lazy, alt: link.label %>+ <span><%= link.label %></span>+ </div>+ <% else %>+ <div class="aspect-1 w-full group-hover:bg-gray-100 bg-gray-200 flex items-center justify-center relative">+ <span><%= link.label %></span>+ </div>+ <% end %>+ <% end %>+ </div>+ <% end %>+ </div>+ <div class="swiper-pagination !relative mt-10 items-center flex mx-auto align-center justify-center"></div>+ </div>+ <button class='swiper-custom-button-next'>+ <%= render 'spree/shared/icons/arrow-right' %>+ </button>+ </div>+ </div>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_footer.html.erb b/storefront/app/views/themes/default/spree/page_sections/_footer.html.erbnew file mode 100644index 0000000000..3f7a1e14d2--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_footer.html.erb@@ -0,0 +1,59 @@+<% cache_unless page_builder_enabled?, [*spree_base_cache_scope.call(section), current_store] do %>+ <footer+ id='footer'+ <% unless current_theme_preview %>+ data-turbo-permanent+ <% end %>>+ <div style='<%= section_styles(section) %>'>+ <div class="page-container">+ <div class="flex gap-0 md:gap-6 md:flex-row flex-col">+ <div class="flex justify-center flex-grow py-2 md:py-0 border-b md:border-none lg:w-60">+ <%= render 'spree/shared/logo', logo: section.logo.attached? ? section.logo : current_header_logo %>+ </div>+ <div class="grid grid-cols-1 lg:grid-cols-4 grow w-full">+ <% section.blocks.includes(:links).each do |block| %>+ <div class="flex-grow gap-1 flex flex-col py-6 md:py-0 border-b md:border-none border-default lg:mb-6">+ <div <%= block_attributes(block) %>>+ <h3 class="text-sm py-2"><%= block.preferred_label %></h3>+ <ul class="uppercase text-sm tracking-wider !leading-4 flex flex-col gap-1">+ <% block.links.each do |link| %>+ <li class='py-2'>+ <%= page_builder_link_to link, target: ('_blank' if link.open_in_new_tab), rel: ('noopener noreferrer' if link.open_in_new_tab), **link_attributes(link, as_html: false) do %>+ <%= link.label %>+ <% end %>+ </li>+ <% end %>+ </ul>+ </div>+ </div>+ <% end %>+ </div>+ <div class="flex-grow gap-4 flex flex-col justify-between lg:w-60">+ <div class="gap-1 flex flex-col py-6 md:py-0">+ <h3 class="text-sm py-2"><%= Spree.t(:follow_us) %></h3>+ <div class="flex flex-wrap gap-2 max-w-48 py-2">+ <% cache spree_base_cache_scope.call(current_store) do %>+ <% Spree::Store::SUPPORTED_SOCIAL_NETWORKS.each do |media| %>+ <% if current_store.send(media).present? %>+ <%= link_to current_store.send("#{media}_link") do %>+ <%= render "spree/shared/icons/#{media.gsub('_', '-')}" %>+ <span class='hidden'><%= current_store.send("#{media}_handle") %></span>+ <% end %>+ <% end %>+ <% end %>+ <% end %>+ </div>+ </div>+ </div>+ </div>+ <div class="flex justify-end w-full"></div>+ </div>+ </div>+ <div class="text-sm" style="color: <%= section.preferred_copyright_text_color %>; background-color: <%= section.preferred_copyright_background_color %>">+ <div class='page-container py-2 flex justify-center'>+ <span>© <%= Time.now.year %>+ <a href='/'><%= current_store.name %></a>. <%= Spree.t(:all_rights_reserved) %>.</span>+ </div>+ </div>+ </footer>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_header.html.erb b/storefront/app/views/themes/default/spree/page_sections/_header.html.erbnew file mode 100644index 0000000000..82cf259107--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_header.html.erb@@ -0,0 +1,167 @@+<% layout = section.preferred_layout %>+<% show_account_pane = !try_spree_current_user && canonical_path != spree_login_path && canonical_path != spree_signup_path && canonical_path != spree_forgot_password_path %>+<header+ class='sticky has-[.currency-and-locale-modal:not(.hidden)]:relative top-0 z-50 has-[.currency-and-locale-modal:not(.hidden)]:z-[unset] header-<%= layout %>'+ data-controller='header toggle-menu slideover <%= "slideover-account" if show_account_pane %>'+ data-toggle-menu-class='hamburger-visible'+ data-slideover-invisible-class='translate-x-full,opacity-0'+ data-slideover-visible-class='translate-x-0,opacity-100'+ data-slideover-active-target='#slideover-cart'+ data-slideover-account-invisible-class='translate-x-full,opacity-0'+ data-slideover-account-visible-class='translate-x-0,opacity-100'+ data-slideover-account-active-target='#slideover-account'+>+ <nav+ aria-label='Top'+ style="<%= section_styles(section) %>"+ class="transition-transform duration-300 relative">+ <div class='page-container'>+ <div class='flex items-center<%= " lg:items-end" if layout == "logo-centered" %> <%= " lg:items-center" unless layout == "logo-centered" %> justify-between '>+ <% unless layout == 'logo-centered' %>+ <div class='hidden lg:flex' id='header-logo'>+ <%= render 'spree/shared/logo', logo: section.logo, height: section.preferred_desktop_logo_height %>+ </div>+ <% end %>++ <div class='flex -order-1 flex-1 <%= " lg:flex-none lg:order-1 z-10 lg:mr-8" unless layout == "logo-centered" %>'>+ <!-- Mobile menu toggle, controls the 'mobileMenuOpen' state. -->+ <button+ type='button'+ data-action='click->toggle-menu#toggle touch->toggle-menu#toggle'+ class='lg:hidden relative w-6'+ data-toggle-menu-target='button'+ >+ <span class='sr-only'><%= Spree.t(:toggle_menu) %></span>+ <div+ class='absolute top-0'+ >+ <%= render 'spree/shared/icons/menu', color: section.preferred_text_color %>+ </div>+ <div+ class='absolute top-0 opacity-0'+ >+ <%= render 'spree/shared/icons/close', color: section.preferred_text_color %>+ </div>+ </button>++ <!-- Search button -->+ <div class='<%= "lg:relative" unless layout == "logo-centered" %> flex'>+ <button+ class='ml-4 lg:ml-0 flex items-center'+ id='open-search'+ data-action='click->toggle-menu#hide touch->toggle-menu#hide'+ >+ <%= render 'spree/shared/icons/search', color: section.preferred_text_color %>+ <span class='hidden lg:block ml-2 text-sm !leading-6 uppercase'><%= Spree.t(:search) %></span>+ </button>+ </div>+ </div>++ <div class='flex items-center flex-col<%= " lg:flex-1" unless layout == "logo-centered" %> header-nav-container'>+ <!-- Logo -->+ <div class='<%= "flex lg:pb-4" if layout == "logo-centered" %><%= "lg:hidden" unless layout == "logo-centered" %>' id='header-logo'>+ <%= render 'spree/shared/logo', logo: section.logo, height: section.preferred_desktop_logo_height %>+ </div>++ <!-- Desktop Menu -->+ <% if layout == 'nav-centered' %>+ <div+ class='hidden lg:flex absolute top-px left-1/2 -translate-x-1/2 justify-center w-[calc(100%-29rem)] overflow-auto'+ >+ <% end %>+ <div class='hidden lg:flex<%= " w-full px-12" if layout == "left" %>'>+ <div class='flex flex-wrap justify-center h-full mx-4'>+ <%= render 'spree/page_sections/nav/desktop', section: section %>+ </div>+ </div>+ </div>+ <% if layout == 'nav-centered' %></div><% end %>+ <div+ class='flex items-center gap-4 flex-1 justify-end<%= " lg:flex-none order-2" unless layout == "logo-centered" %>'+ >+ <% if should_render_currency_dropdown? || should_render_locale_dropdown? %>+ <div+ data-controller="modal"+ data-modal-allow-background-close="true"+ data-modal-+ class="hidden lg:flex"+ data-modal-backdrop-color-value="rgba(0,0,0,0.32)">+ <%= button_tag class: 'flex gap-2 items-center', data: {action: 'modal#open'} do %>+ <% if should_render_currency_dropdown? %>+ <span>+ <%= "#{current_currency} (#{currency_money(current_currency).symbol})" %>+ </span>+ <% end %>+ <% if should_render_locale_dropdown? %>+ <span class="uppercase <%= should_render_currency_dropdown?.presence && "border-l pl-2" %> flex items-center gap-1">+ <% country_code = current_locale.to_s.split("-").last %>+ <%= svg_country_icon(country_code) %>+ <span ><%= country_code %></span>+ </span>+ <% end %>+ <% end %>+ <%= turbo_frame_tag :settings_modal, src: spree.settings_path, loading: :eager %>+ </div>+ <% end %>++ <!-- Desktop Account -->+ <div class='hidden lg:flex'>+ <% if show_account_pane %>+ <button+ data-action='click->slideover-account#toggle click@window->slideover-account#hide click->toggle-menu#hide touch->toggle-menu#hide'+ >+ <%= render 'spree/shared/icons/account', color: section.preferred_text_color, section: section %>+ </button>+ <% else %>+ <%= link_to spree.account_path do %>+ <%= render 'spree/shared/icons/account', color: section.preferred_text_color, section: section %>+ <% end %>+ <% end %>+ </div>++ <% if show_account_pane %>+ <%= form_with url: spree.account_wishlist_path, method: :get, data: { turbo_stream: true } do %>+ <button+ type="submit"+ id="wishlist-icon"+ class="flex items-end">+ <%= render 'spree/shared/wishlist_icon', wishlist: current_wishlist, background_color: section.preferred_background_color %>+ </button>+ <% end %>+ <% else %>+ <%= link_to spree.account_wishlist_path, id: "wishlist-icon" do %>+ <%= render 'spree/shared/wishlist_icon', background_color: section.preferred_background_color %>+ <% end %>+ <% end %>++ <!-- Cart -->+ <div+ data-action='click->toggle-menu#hide touch->toggle-menu#hide'+ >+ <%= render 'spree/shared/cart_icon' %>+ </div>+ </div>+ </div>+ </div>+ <div+ class='hide-on-load h-0 opacity-0 pointer-events-none'+ data-toggle-menu-target='toggleable'+ role='dialog'+ aria-modal='true'+ >+ <div+ class='flex justify-between flex-col lg:hidden w-full transition-transform translate-x-[-50%] has-[.currency-and-locale-modal:not(.hidden)]:transform-none body header--mobile-menu'+ data-toggle-menu-target='content'+ style='background-color: <%= section.preferred_background_color %>; height: calc(100dvh - 38px);'+ >+ <%= render 'spree/page_sections/nav/mobile', section: section %>+ </div>+ </div>+ </nav>+ <%= render 'spree/shared/cart_pane', section: section %>+ <% if show_account_pane %>+ <%= render 'spree/shared/account_pane', section: section %>+ <% end %>++ <%= render 'spree/shared/search', section: section, logo: section.logo, logo_height: section.preferred_desktop_logo_height %>+</header>diff --git a/storefront/app/views/themes/default/spree/page_sections/_image_banner.html.erb b/storefront/app/views/themes/default/spree/page_sections/_image_banner.html.erbnew file mode 100644index 0000000000..07bd069661--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_image_banner.html.erb@@ -0,0 +1,57 @@+<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(section) do %>+ <div class="w-full relative image-banner" style="<%= section_styles(section) %>;height: <%= section.preferred_height %>px">+ <div class="w-full absolute left-0 image-banner--image-wrapper" style="height: <%= section.preferred_height %>px; opacity: <%= section.preferred_overlay_transparency %>%;">+ <% if section.image.attached? && section.image.variable? %>+ <picture>+ <source media="(max-width: 640px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [640, nil]))) %>">+ <source media="(max-width: 750px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [750, nil]))) %>">+ <source media="(max-width: 828px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [828, nil]))) %>">+ <source media="(max-width: 1080px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [1080, nil]))) %>">+ <source media="(max-width: 1200px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [1200, nil]))) %>">+ <source media="(min-width: 1201px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [2000, nil]))) %>">+ <%= image_tag main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [2000, nil]))), class: "w-full h-full object-cover", loading: "lazy" %>+ </picture>+ <% end %>+ </div>+ <%+ vertical_alignment_class = case section.preferred_vertical_alignment+ when 'top'+ 'justify-start'+ when 'bottom'+ 'justify-end'+ else+ 'justify-center'+ end+ %>+ <div class="flex h-full w-full items-center justify-center">+ <div class="flex flex-col <%= vertical_alignment_class %> p-5 z-10 w-full gap-y-2 h-full image-banner--block-wrapper">+ <% section.blocks.includes(:rich_text_text, :links).each do |block| %>+ <% case block.type %>+ <% when 'Spree::PageBlocks::Heading' %>+ <h2 class="w-full font-medium <%= block.preferred_size == 'small' ? 'text-lg' : (block.preferred_size == 'medium' ? 'text-xl' : 'text-2xl lg:text-3xl') %> image-banner--heading" <%= block_attributes(block) %>>+ <%= block.text %>+ </h2>+ <% when 'Spree::PageBlocks::Text' %>+ <div class="w-full image-banner--text" <%= block_attributes(block) %>>+ <%= block.text %>+ </div>+ <% when 'Spree::PageBlocks::Buttons' %>+ <div <%= block_attributes(block) %> class="w-full text-center image-banner--buttons">+ <div class="inline-block">+ <div class="flex flex-col lg:flex-row gap-4">+ <% if block.link.present? %>+ <% if block.link.linkable_url.present? %>+ <%= page_builder_link_to block.link, label: block.link.label, class: "btn-#{block.preferred_button_style_1}", target: (block.link.open_in_new_tab ? "_blank" : nil) %>+ <% else %>+ <%= button_tag block.link.label, class: "btn-#{block.preferred_button_style_1}", disabled: true %>+ <% end %>+ <% end %>+ </div>+ </div>+ </div>+ <% end %>+ <% end %>+ </div>+ </div>+ </div>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_image_with_text.html.erb b/storefront/app/views/themes/default/spree/page_sections/_image_with_text.html.erbnew file mode 100644index 0000000000..4aa07db7a9--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_image_with_text.html.erb@@ -0,0 +1,66 @@+<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(section) do %>+ <div style="<%= section_styles(section) %>" class="image-with-text <%= 'right-aligned' if section.preferred_desktop_image_alignment == 'right' %>">+ <div class="page-container">+ <div class="lg:grid lg:grid-cols-12 lg:gap-6 image-with-text--container">+ <div class="lg:col-span-6 aspect-[6/7] <%= 'lg:col-start-7 lg:order-1' if section.preferred_desktop_image_alignment == 'right' %> image-with-text--image-wrapper">+ <%= page_builder_link_to(section.link, title: section.link&.label, target: (section.link&.open_in_new_tab ? '_blank' : nil)) do %>+ <% if section.image.present? %>+ <%= image_tag main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_fill: [2000, nil]))),+ class: "w-full h-full object-cover",+ loading: :lazy,+ sizes: "(max-width: 1024px) 100vw, 50vw",+ srcset: [640, 750, 828, 1080, 1200, 2000].map { |width|+ "#{main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_fill: [width, nil])))} #{width}w"+ }.join(', ')+ %>+ <% else %>+ <div class="w-full h-full object-cover bg-gray-100"></div>+ <% end %>+ <% end %>+ </div>+ <%+ vertical_alignment_class = case section.preferred_vertical_alignment+ when 'top'+ 'lg:content-start'+ when 'bottom'+ 'lg:content-end'+ else+ 'lg:content-center'+ end+ %>+ <div class="lg:grid lg:col-span-5 <%= vertical_alignment_class %> <%= 'lg:col-start-8' if section.preferred_desktop_image_alignment == 'left' %> image-with-text--blocks-wrapper">+ <% section.blocks.includes(:rich_text_text, :links).each do |block| %>+ <% case block.type %>+ <% when 'Spree::PageBlocks::Heading' %>+ <%= page_builder_link_to(section.link, target: (section.link&.open_in_new_tab ? '_blank' : nil), class: "image-with-text--heading", style: block_background_color_style(block)) do %>+ <h2 class="<%= block.preferred_size == 'small' ? 'text-lg' : (block.preferred_size == 'medium' ? 'text-xl' : 'text-2xl lg:text-3xl') %> font-medium" <%= block_attributes(block) %>>+ <%= block.text %>+ </h2>+ <% end %>+ <% when 'Spree::PageBlocks::Text' %>+ <%= page_builder_link_to(section.link, target: (section.link&.open_in_new_tab ? '_blank' : nil), class: "image-with-text--text", style: block_background_color_style(block)) do %>+ <div <%= block_attributes(block) %>>+ <%= block.text %>+ </div>+ <% end %>+ <% when 'Spree::PageBlocks::Buttons' %>+ <div class="w-full image-with-text--buttons" <%= block_attributes(block) %>>+ <div class="inline-block">+ <div class="flex flex-col lg:flex-row gap-4">+ <% if block.link %>+ <%= page_builder_link_to block.link,+ label: block.link.label,+ class: block.preferred_button_style_1 == 'secondary' ? 'btn-secondary' : 'btn-primary',+ target: (block.link.open_in_new_tab ? '_blank' : nil),+ rel: (block.link.open_in_new_tab ? 'noopener noreferrer' : nil) %>+ <% end %>+ </div>+ </div>+ </div>+ <% end %>+ <% end %>+ </div>+ </div>+ </div>+ </div>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_main_password_footer.html.erb b/storefront/app/views/themes/default/spree/page_sections/_main_password_footer.html.erbnew file mode 100644index 0000000000..91aa043e18--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_main_password_footer.html.erb@@ -0,0 +1,64 @@+<% logo = section.logo || current_store.logo %>++<footer+ id='password-footer'+ style='<%= section_styles(section) %>'+ <%= 'data-turbo-permanent' unless page_builder_enabled? %>>+ <div class='page-container'>+ <div class='flex flex-col lg:flex-row lg:justify-between'>+ <div class='flex justify-center items-center'>+ <%= render 'spree/shared/logo', logo: logo %>+ </div>+ <div class='flex justify-center gap-4 lg:gap-0 py-6 lg:py-0 items-end'>+ <% if current_store.instagram.present? %>+ <%= link_to current_store.instagram_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>+ <%= render 'spree/shared/icons/instagram' %>+ <span class='hidden'><%= current_store.instagram_handle %></span>+ <% end %>+ <% end %>++ <% if current_store.tiktok.present? %>+ <%= link_to current_store.tiktok_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>+ <%= render 'spree/shared/icons/tiktok' %>+ <span class='hidden'><%= current_store.tiktok_handle %></span>+ <% end %>+ <% end %>++ <% if current_store.facebook.present? %>+ <%= link_to current_store.facebook_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>+ <%= render 'spree/shared/icons/facebook' %>+ <span class='hidden'><%= current_store.facebook_handle %></span>+ <% end %>+ <% end %>++ <% if current_store.twitter.present? %>+ <%= link_to current_store.twitter_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>+ <%= render 'spree/shared/icons/twitter' %>+ <span class='hidden'><%= current_store.twitter_handle %></span>+ <% end %>+ <% end %>++ <% if current_store.youtube.present? %>+ <%= link_to current_store.youtube_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>+ <%= render 'spree/shared/icons/youtube' %>+ <span class='hidden'><%= current_store.youtube_handle %></span>+ <% end %>+ <% end %>++ <% if current_store.spotify.present? %>+ <%= link_to current_store.spotify_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>+ <%= render 'spree/shared/icons/spotify' %>+ <span class='hidden'><%= current_store.spotify_handle %></span>+ <% end %>+ <% end %>++ <% if current_store.pinterest.present? %>+ <%= link_to current_store.pinterest_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>+ <%= render 'spree/shared/icons/pinterest' %>+ <span class='hidden'><%= current_store.pinterest_handle %></span>+ <% end %>+ <% end %>+ </div>+ </div>+ </div>+</footer>diff --git a/storefront/app/views/themes/default/spree/page_sections/_main_password_header.html.erb b/storefront/app/views/themes/default/spree/page_sections/_main_password_header.html.erbnew file mode 100644index 0000000000..75873d8fc0--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_main_password_header.html.erb@@ -0,0 +1,54 @@+<% logo = section.logo || current_store.logo %>+<div style='<%= section_styles(section) %>'>+ <div class="page-container">+ <div class="bg-background text-text flex flex-col items-center gap-2 md:flex-row justify-between">+ <% if logo&.attached? && logo.variable? %>+ <%= render 'spree/shared/logo', logo: section.logo, height: section.preferred_desktop_logo_height %>+ <% else %>+ <h1 class="text-2xl"><%= current_store.name %></h1>+ <% end %>++ <div+ data-controller="modal"+ data-modal-allow-background-close="true"+ data-modal-backdrop-color-value="rgba(0,0,0,0.32)"+ class="h-full">+ <%= button_tag class: "underline flex gap-2 items-center", data: { action: "click->modal#open" } do %>+ <span>+ <%= render 'spree/shared/icons/lock', class: "w-5 h-5" %>+ </span>+ <%= Spree.t(:enter_using_password) %>+ <% end %>++ <div+ data-modal-target="container"+ data-action="click->modal#closeBackground keyup@window->modal#closeWithKeyboard"+ class="hidden animated fadeIn fixed inset-0 overflow-y-auto flex items-center justify-center z-[9999]">+ <div class="w-full lg:w-[800px] relative h-[100dvh] lg:h-auto lg:max-h-screen flex items-center">+ <div class="lg:mx-0 w-full bg-background">+ <div class="px-8 py-6">+ <div class="flex justify-between uppercase mb-4">+ <%= Spree.t(:enter_using_password) %>+ <%= button_tag data: { action: "click->modal#close" } do %>+ <%= render 'spree/shared/icons/close' %>+ <span class="sr-only"><%= Spree.t(:close) %></span>+ <% end %>+ </div>+ <div class="text-sm p-1">+ <%= form_with url: spree.password_path, method: :post, class: "flex gap-2" do |f| %>+ <%= f.password_field :password,+ class: 'text-input w-full px-4 py-3',+ placeholder: Spree.t(:password),+ required: true,+ autofocus: true %>+ <%= f.button Spree.t(:enter), type: :submit, class: "btn w-40 btn-primary" %>+ <% end %>+ </div>+ </div>+ </div>+ </div>+ </div>+ </div>+ </div>+ </div>+</div>diff --git a/storefront/app/views/themes/default/spree/page_sections/_newsletter.html.erb b/storefront/app/views/themes/default/spree/page_sections/_newsletter.html.erbnew file mode 100644index 0000000000..1a8371eeaf--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_newsletter.html.erb@@ -0,0 +1,46 @@+<% img = section.image %>++<div class="w-full flex justify-center items-center relative" style="<%= section_styles(section) %>">+ <% if img.attached? && img.variable? %>+ <img+ class="w-full h-full absolute top-0 object-cover z-0"+ style="opacity: <%= section.preferred_overlay_transparency %>%"+ src="<%= main_app.cdn_image_url(img.variant(spree_image_variant_options(resize_to_limit: [2000, nil]))) %>" />+ <% end %>+ <div class="w-full page-container flex flex-col text-center py-5 px-5 z-10">+ <% section.blocks.includes(:rich_text_text).each do |block| %>+ <% case block.type %>+ <% when 'Spree::PageBlocks::Heading' %>+ <h2 class='font-medium <%= block.preferred_size == 'small' ? 'text-xl lg:text-2xl' : block.preferred_size == 'medium' ? 'text-xl lg:text-3xl' : 'text-2xl lg:text-3xl' %>' <%= block_attributes(block) %>>+ <%= block.text.body %>+ </h2>+ <% when 'Spree::PageBlocks::Text' %>+ <div class='text-sm lg:text-base' <%= block_attributes(block) %>>+ <%= block.text.body %>+ </div>+ <% when 'Spree::PageBlocks::NewsletterForm' %>+ <form action="<%= subscribers_path %>" method="post" class="flex items-center flex-col md:flex-row w-full <%= block_css_classes(block) %>" <%= block_attributes(block) %>>+ <div class='relative w-full lg:w-[424px] flex'>+ <%= hidden_field_tag :section_id, section.id %>+ <%= email_field_tag 'newsletter[email]', nil, placeholder: block.preferred_placeholder, required: true, class: 'focus:border-primary focus:ring-primary pr-36 text-sm bg-accent rounded-input border-accent py-2 px-4 w-full relative z-30 !leading-[46px]' %>+ <div class="absolute right-2 top-1/2 transform -translate-y-1/2 z-40">+ <button type='submit' class='<%= block.preferred_button_style == 'secondary' ? 'btn-secondary' : 'btn-primary' %> content-center'>+ <%= block.preferred_button_text.html_safe %>+ </button>+ </div>+ </div>+ <% when 'Spree::PageBlocks::Subheading' %>+ <h3 class='<%= block.size == 'small' ? 'text-lg' : block.size == 'medium' ? 'text-xl' : 'text-xl' %>' <%= block_attributes(block) %>>+ <%= block.text.body %>+ </h3>+ <% when 'Spree::PageBlocks::Image' %>+ <div <%= block_attributes(block) %> class="flex justify-center w-full">+ <% if block.image.attached? && block.image.variable? %>+ <% image_style = "aspect-ratio: #{as_aspect_ratio(block.image)}; --desktop-height: #{block.preferred_height}px; --mobile-height: #{block.preferred_mobile_height}px;" %>+ <%= image_tag main_app.cdn_image_url(block.image.variant(spree_image_variant_options(resize_to_fill: [1000, 1000]))), height: block.preferred_height, width: block.preferred_width, class: "custom-desktop-height custom-mobile-height", style: image_style %>+ <% end %>+ </div>+ <% end %>+ <% end %>+ </div>+</div>diff --git a/storefront/app/views/themes/default/spree/page_sections/_page_title.html.erb b/storefront/app/views/themes/default/spree/page_sections/_page_title.html.erbnew file mode 100644index 0000000000..b76dce97b5--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_page_title.html.erb@@ -0,0 +1,7 @@+<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(section) do %>+ <div class="page-container">+ <h1 class="text-xl lg:text-2xl font-medium py-10 lg:pt-16 lg:pb-6" style="<%= section_heading_styles(section) %>">+ <%= section.preferred_title.presence || title %>+ </h1>+ </div>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_post_details.html.erb b/storefront/app/views/themes/default/spree/page_sections/_post_details.html.erbnew file mode 100644index 0000000000..108377e650--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_post_details.html.erb@@ -0,0 +1,19 @@+<div style="<%= section_styles(section) %>">+ <div class="page-container">+ <div class="flex flex-col max-w-3xl m-auto mt-16 first:mt-0">+ <% if post.image.attached? && post.image.variable? %>+ <%= image_tag main_app.cdn_image_url(post.image.variant(spree_image_variant_options(resize_to_fit: [nil, 800]))), height: 400, class: 'h-full w-full object-cover object-center', loading: :lazy, alt: post.title %>+ <% end %>++ <h1 class="uppercase text-2xl font-medium mt-4"><%= post.title %></h1>++ <% if post.published? %>+ <div class="mt-2 text-sm"><%= local_time(post.published_at, '%B %e, %Y') %></div>+ <% end %>++ <div class="mt-8 post-details-content"><%= post.content %></div>+ </div>+ </div>+</div>++<%= render 'spree/posts/json_ld', post: post %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_post_grid.html.erb b/storefront/app/views/themes/default/spree/page_sections/_post_grid.html.erbnew file mode 100644index 0000000000..837ace39ea--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_post_grid.html.erb@@ -0,0 +1,11 @@+<div style="<%= section_styles(section) %>">+ <% if @posts.any? %>+ <div class="page-container">+ <%= turbo_frame_tag :posts, class: 'flex flex-col' do %>+ <%= render partial: 'spree/posts/post', collection: @posts %>+ <% end %>++ <%= render 'spree/posts/pagination' %>+ </div>+ <% end %>+</div>diff --git a/storefront/app/views/themes/default/spree/page_sections/_product_details.html.erb b/storefront/app/views/themes/default/spree/page_sections/_product_details.html.erbnew file mode 100644index 0000000000..1b229bedb1--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_product_details.html.erb@@ -0,0 +1,99 @@+<turbo-frame id="main-product-<%= product.id %>" target="_top">+ <% current_variant = @selected_variant || @variant_from_options || product.first_or_default_variant(current_currency) %>+ <div class="main-product-container" style="<%= section_styles(section) %>">+ <div+ class="page-container lg:mb-16"+ <%= 'data-controller=product-form' %>+ data-product-form-required-options-value='<%= product.option_type_ids.map(&:to_s).to_json %>'+ data-product-form-selected-variant-disabled-value='<%= !@selected_variant&.in_stock? %>'+ data-product-form-variant-from-options-disabled-value='<%= !@variant_from_options&.in_stock? %>'+ data-product-form-frame-name-value="main-product-<%= product.id %>"+ data-product-form-url-value="<%= spree.product_url(product) %>">+ <template data-product-form-target="spinnerTemplate">+ <%= render "spree/shared/icons/spinner" %>+ </template>+ <%= render 'spree/products/breadcrumbs', product: product, taxons: product_breadcrumb_taxons(product) %>+ <div id="product-details-page" class="grid grid-cols-1 lg:grid-cols-12 gap-x-14">+ <div class="lg:hidden">+ <% if product.brand %>+ <%= link_to spree.nested_taxons_path(product.brand), title: product.brand_name do %>+ <h3 class="text-sm lg:mt-0 inline-block mb-1">+ <%= product.brand_name %>+ </h3>+ <% end %>+ <% end %>+ <h1 class="text-2xl uppercase tracking-tight mb-4 font-medium">+ <%= product.name %>+ </h1>+ <%= link_to spree.product_path(product), class: "text-2xl uppercase tracking-tight font-medium hidden" do %>+ <%= product.name %>+ <% end %>+ <%=+ render 'spree/products/price',+ product: product,+ use_variant: true,+ selected_variant: @selected_variant,+ price_class: "my-4 lg:text-lg lg:font-medium",+ price_container_class: "w-full"+ %>+ </div>++ <div class="lg:col-span-7 relative">+ <% images = product_media_gallery_images(product, selected_variant: @selected_variant, variant_from_options: @variant_from_options) %>++ <div class="lg:hidden mb-6">+ <%= render 'spree/products/media_gallery', images: images, product: product %>+ </div>+ <div class="hidden lg:block" data-product-form-target="desktopMediaGallery">+ <%= render 'spree/products/media_gallery', images: images, desktop: true, product: product %>+ </div>+ </div>++ <div class="lg:col-span-5 lg:col-start-8">+ <div data-controller='sticky-button' data-product-form-target="productDetails">+ <div class="hidden lg:block">+ <% if product.brand %>+ <%= link_to spree.nested_taxons_path(product.brand), title: product.brand_name do %>+ <h3 class="text-sm mt-3 lg:mt-0 inline-block uppercase">+ <%= product.brand_name %>+ </h3>+ <% end %>+ <% end %>+ <h1 class="text-2xl uppercase tracking-tight mb-4 mt-2 font-medium">+ <%= product.name %>+ </h1>++ <%=+ render 'spree/products/price',+ product: product,+ use_variant: true,+ selected_variant: @selected_variant,+ price_class: "my-4 lg:text-lg lg:font-medium"+ %>+ </div>+ <%= render 'spree/products/tags', product: product %>+ <div+ data-controller="modal"+ data-modal-allow-background-close="true"+ class="h-full w-full waitlist-modal"+ data-modal-backdrop-color-value="rgba(0,0,0,0.32)">+ <%= form_with(url: spree.line_items_path, method: :post, data: { controller: "turbo-stream-form", product_form_target: "form" }) do |f| %>+ <%= render 'spree/products/variant_picker', product: product, selected_variant: @selected_variant %>+ <%= render 'spree/products/quantity_selector', product: product, selected_variant: @selected_variant %>+ <div class="flex w-full my-5">+ <%= render 'spree/products/add_to_cart_button', product: product, selected_variant: @selected_variant, sticky_button_classes: "w-full" %>+ <%= render 'spree/products/add_to_wishlist', variant: current_variant, css_classes: 'btn-secondary ml-5 h-12 !py-0 !px-3 border-default', icon_size: 24 %>+ </div>+ <% end %>+ <%= render 'spree/products/add_to_waitlist', variant: current_variant %>+ </div>++ <%= render 'spree/products/details', product: product %>+ </div>+ </div>+ </div>+ </div>+ </div>++ <%= render 'spree/products/json_ld', product: product, selected_variant: @selected_variant %>+</turbo-frame>diff --git a/storefront/app/views/themes/default/spree/page_sections/_product_grid.html.erb b/storefront/app/views/themes/default/spree/page_sections/_product_grid.html.erbnew file mode 100644index 0000000000..9e78a90e38--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_product_grid.html.erb@@ -0,0 +1,52 @@+<%= turbo_frame_tag :products_list do %>+ <div class='page-container'>+ <div class='flex justify-between'>+ <div+ data-controller='slideover'+ data-slideover-invisible-class='-translate-x-full,opacity-0'+ data-slideover-visible-class='translate-x-0,opacity-100'+ data-slideover-active-target='#slideover-filters'+ >+ <%= button_tag(+ type: 'button',+ class: 'uppercase flex gap-2 text-sm items-center font-semibold py-3',+ data: {+ action: 'click->slideover#toggle click@window->slideover#hide'+ }+ ) do %>+ <%= render 'spree/shared/icons/filter' %>+ <%= Spree.t(:filter) %>+ <% if products_selected_filters_count > 0 %>+ <span class="font-normal opacity-50">(<%= products_selected_filters_count %>)</span>+ <% end %>+ <% end %>+ <!-- begin sidebar/slideover -->+ <div+ data-slideover-target='overlay'+ class='fixed inset-0 flex flex-row z-50 transition-opacity hidden'+ >+ <div class='fixed inset-0'>+ <div data-action='click->slideover#toggle' class='absolute inset-0 bg-background opacity-75'></div>+ </div>+ <%= render 'spree/products/filters' %>+ </div>+ <!-- end sidebar/slideover -->+ </div>++ <%= render 'spree/products/sort' %>+ </div>+ </div>++ <% if products %>+ <div style='<%= section_styles(section) %>'>+ <div class='page-container'>+ <div class='grid gap-y-8 gap-x-4 grid-cols-2 lg:grid-cols-4 lg:gap-x-6 lg:gap-y-10 mb-7' id='products'>+ <%= render 'spree/shared/products', products: products %>+ </div>+ </div>+ <%= render 'spree/products/show_more_button' %>+ </div>++ <%= render 'spree/products/json_ld_list', products: products %>+ <% end %>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_related_products.html.erb b/storefront/app/views/themes/default/spree/page_sections/_related_products.html.erbnew file mode 100644index 0000000000..ecd62e691d--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_related_products.html.erb@@ -0,0 +1,15 @@+<% loaded ||= false %>+<% products ||= [] %>++<% if section && loaded && products.present? %>+ <div style="<%= section_styles(section) %>" class="animate-fadeIn">+ <div class="page-container">+ <%= render partial: 'spree/products/swiper', locals: {+ section: section,+ products: products,+ heading: section.preferred_heading,+ arrows_on_top: true+ } %>+ </div>+ </div>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_rich_text.html.erb b/storefront/app/views/themes/default/spree/page_sections/_rich_text.html.erbnew file mode 100644index 0000000000..cffb593546--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_rich_text.html.erb@@ -0,0 +1,18 @@+<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(section) do %>+ <div style="<%= section_styles(section) %>">+ <div class="page-container rich-text">+ <% section.blocks.each do |block| %>+ <% case block.type %>+ <% when 'Spree::PageBlocks::Heading' %>+ <h2 class="w-full <%= block.preferred_size == 'small' ? 'text-xl' : (block.preferred_size == 'medium' ? 'text-xl' : 'text-4xl') %> rich-text--heading" <%= block_attributes(block) %>>+ <%= block.text %>+ </h2>+ <% when 'Spree::PageBlocks::Text' %>+ <div class="w-full rich-text--text" <%= block_attributes(block) %>>+ <%= block.text %>+ </div>+ <% end %>+ <% end %>+ </div>+ </div>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_taxon_banner.html.erb b/storefront/app/views/themes/default/spree/page_sections/_taxon_banner.html.erbnew file mode 100644index 0000000000..db34db7e76--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_taxon_banner.html.erb@@ -0,0 +1,37 @@+<% cache_unless page_builder_enabled?, [*spree_base_cache_scope.call(section), taxon].compact do %>+ <div+ style="<%= section_styles(section) %>"+ id="taxon-banner-<%= taxon.id %>"+ <%= 'data-turbo-permanent' unless page_builder_enabled? %>>+ <div class="page-container">+ <div class="lg:gap-6 lg:grid lg:grid-cols-12">+ <% if taxon.image.present? %>+ <div class="flex lg:col-span-7 lg:col-start-6 lg:order-1 lg:items-center lg:justify-end">+ <% aspect_ratio_style = "aspect-ratio: #{as_aspect_ratio(taxon.image)};" %>+ <%= image_tag main_app.cdn_image_url(taxon.image.variant(spree_image_variant_options(resize_to_limit: [720, 720]))), alt: taxon.name, class: 'w-full lg:max-h-[280px] h-full lg:w-auto mb-6', style: aspect_ratio_style, loading: :lazy %>+ </div>+ <% end %>+ <div class="lg:col-span-5 flex flex-col justify-center items-start gap-1">+ <div class="text-xs lg:text-sm tracking-widest" style="<%= section_heading_styles(section) %>"><%= taxon.taxonomy.name.singularize %></div>+ <h1 class="self-stretch text-2xl lg:text-3xl font-medium" style="<%= section_heading_styles(section) %>"><%= taxon.name %></h1>+ <% description_text = taxon.description.to_plain_text %>+ <div+ data-controller="read-more"+ class="flex flex-col gap-4"+ data-read-more-more-text-value="<%= Spree.t(:read_more) %>"+ data-read-more-less-text-value="<%= Spree.t(:read_less) %>">+ <div class="prose self-stretch text-lg font-normal <%= 'product-description-truncated' if description_text.length > 250 %>" data-read-more-target="content">+ <%= taxon.description %>+ </div>+ <% if description_text.length > 250 %>+ <%= button_tag Spree.t(:read_more),+ type: 'button',+ class: "font-bold underline",+ data: { action: "read-more#toggle" } %>+ <% end %>+ </div>+ </div>+ </div>+ </div>+ </div>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_taxon_grid.html.erb b/storefront/app/views/themes/default/spree/page_sections/_taxon_grid.html.erbnew file mode 100644index 0000000000..4e9ea0b2fe--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_taxon_grid.html.erb@@ -0,0 +1,103 @@+<% cache_unless page_builder_enabled?, [*spree_base_cache_scope.call(section), @taxons].compact do %>+ <div style='<%= section_styles(section) %>'>+ <h1 class='text-xl lg:text-2xl font-medium pb-8 page-container' style='<%= section_heading_styles(section) %>'>+ <%= section.heading %>+ </h1>++ <div class='border-y border-default py-3'>+ <ul class='page-container overflow-auto flex gap-2 items-center justify-between text-sm'>+ <li>+ <%= link_to '#', class: 'block !leading-4 py-2 transition-all duration-300 border-b-[1.5px] border-transparent hover:border-accent uppercase', data: { controller: 'scroll-to', 'scroll-to-offset-value': '100', 'scroll-to-behavior-value': 'smooth' } do %>+ <%= Spree.t(:all) %>+ <% end %>+ </li>+ <% @taxons_grouped_by_letter.each do |letter, taxons| %>+ <li>+ <% if taxons.present? %>+ <%= link_to "##{letter}", class: 'block w-8 !leading-4 py-2 text-center transition-all duration-300 border-b-[1.5px] border-transparent hover:border-accent', data: { controller: 'scroll-to', 'scroll-to-offset-value': '100', 'scroll-to-behavior-value': 'smooth' } do %>+ <%= letter %>+ <% end %>+ <% else %>+ <span class='block w-8 !leading-4 py-2 text-center transition-all duration-300 border-b-[1.5px] border-transparent hover:border-accent text-neutral cursor-default'>+ <%= letter %>+ </span>+ <% end %>+ </li>+ <% end %>+ <li>+ <% if @taxons_grouped_by_numbers.any? %>+ <%= link_to '#0-9', class: 'block w-8 !leading-4 py-2 text-center transition-all duration-300 border-b-[1.5px] border-transparent hover:border-accent uppercase', data: { controller: 'scroll-to', 'scroll-to-offset-value': '100', 'scroll-to-behavior-value': 'smooth' } do %>+ 0-9+ <% end %>+ <% else %>+ <span class='block w-8 !leading-4 py-2 text-center transition-all duration-300 border-b-[1.5px] border-transparent hover:border-accent uppercase text-neutral cursor-default'>+ 0-9+ </span>+ <% end %>+ </li>+ <li>+ <% if @taxons_grouped_by_other.any? %>+ <%= link_to '##', class: 'block !leading-4 py-2 text-center transition-all duration-300 border-b-[1.5px] border-transparent hover:border-accent uppercase', data: { controller: 'scroll-to', 'scroll-to-offset-value': '100', 'scroll-to-behavior-value': 'smooth' } do %>+ <%= Spree.t(:other) %>+ <% end %>+ <% else %>+ <span class='block !leading-4 py-2 text-center transition-all duration-300 border-b-[1.5px] border-transparent hover:border-accent uppercase text-neutral cursor-default'>+ <%= Spree.t(:other) %>+ </span>+ <% end %>+ </li>+ </ul>+ </div>++ <div class='page-container mt-10 mb-10 lg:mb-16'>+ <div class='grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3'>+ <% @taxons_grouped_by_letter.each do |letter, taxons| %>+ <div id='<%= letter %>' class='grid gap-6 grid-cols-3 lg:grid-cols-2 border-b border-deafult py-6 lg:pr-6'>+ <p class='font-medium text-2xl<%= ' pointer-events-none opacity-30' unless taxons.present? %>'>+ <%= letter %>+ </p>+ <% if taxons.present? %>+ <ul class='col-span-2 lg:col-span-1'>+ <% taxons.each do |taxon| %>+ <li>+ <%= link_to taxon.name, spree.nested_taxons_path(taxon), class: 'block py-1 border-b-[1.5px] border-transparent hover:border-accent transition-all duration-300' %>+ </li>+ <% end %>+ </ul>+ <% end %>+ </div>+ <% end %>++ <div id='0-9' class='grid gap-6 grid-cols-3 lg:grid-cols-2 border-b border-deafult py-6'>+ <p class='font-medium text-2xl uppercase<%= ' pointer-events-none opacity-30' unless @taxons_grouped_by_numbers.any? %>'>+ 0-9+ </p>+ <ul class='col-span-2 lg:col-span-1'>+ <% @taxons_grouped_by_numbers.each do |_, taxons| %>+ <% taxons.each do |taxon| %>+ <li>+ <%= link_to taxon.name, spree.nested_taxons_path(taxon), class: 'block py-1 border-b-[1.5px] border-transparent hover:border-accent transition-all duration-300' %>+ </li>+ <% end %>+ <% end %>+ </ul>+ </div>++ <div id='#' class='grid gap-6 grid-cols-3 lg:grid-cols-2 border-b border-deafult py-6'>+ <p class='font-medium text-2xl uppercase<%= ' pointer-events-none opacity-30' unless @taxons_grouped_by_other.any? %>'>+ <%= Spree.t(:other) %>+ </p>+ <ul class='col-span-2 lg:col-span-1'>+ <% @taxons_grouped_by_other.each do |_, taxons| %>+ <% taxons.each do |taxon| %>+ <li>+ <%= link_to taxon.name, spree.nested_taxons_path(taxon), class: 'block py-1 border-b-[1.5px] border-transparent hover:border-accent transition-all duration-300' %>+ </li>+ <% end %>+ <% end %>+ </ul>+ </div>+ </div>+ </div>+ </div>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/_video.html.erb b/storefront/app/views/themes/default/spree/page_sections/_video.html.erbnew file mode 100644index 0000000000..2b0f5a3800--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/_video.html.erb@@ -0,0 +1,27 @@+<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(section) do %>+ <% separated_vertically = section.preferred_separated == 'vertically' %>++ <div style="<%= section_styles(section) %>">+ <div class="page-container">+ <div class="<%= 'lg:grid lg:grid-cols-12 lg:gap-6' if separated_vertically %>">+ <div class="<%= 'lg:col-span-6' if separated_vertically %>">+ <% section.blocks.includes(:rich_text_text).each do |block| %>+ <h2 class="text-center <%= 'lg:text-left' if separated_vertically %> <%= block.preferred_size == 'small' ? 'text-lg' : (block.preferred_size == 'medium' ? 'text-xl' : 'text-2xl lg:text-3xl') %> font-medium" <%= block_attributes(block) %>>+ <%= block.text %>+ </h2>+ <% end %>+ </div>++ <% if section.video_embed.present? %>+ <div class="<%= 'lg:col-span-5' if separated_vertically %>">+ <div class="mx-auto <%= 'lg:mr-0' if separated_vertically %> rounded overflow-hidden">+ <div class="video-embed-container">+ <%= section.video_embed.raw_html.html_safe %>+ </div>+ </div>+ </div>+ <% end %>+ </div>+ </div>+ </div>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/nav/_desktop.html.erb b/storefront/app/views/themes/default/spree/page_sections/nav/_desktop.html.erbnew file mode 100644index 0000000000..462d80e731--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/nav/_desktop.html.erb@@ -0,0 +1,49 @@+<% if section.blocks.any? %>+ <% section.blocks.includes(:links).each do |block| %>+ <% presenter = Spree::MegaNavPresenter.new(block) %>+ <% main_link = presenter.main_link %>+ <% next unless main_link.present? %>+ <div class="header--nav-item group" <%= block_attributes(block, allowed_styles: ['padding-top', 'padding-bottom']) %>>+ <%= active_link_to spree_storefront_resource_url(main_link.linkable || main_link), data: { title: main_link.label.downcase.strip }, class: "shrink-0 menu-item header--nav-link px-4 py-1", class_active: "menu-item--active", target: main_link.open_in_new_tab.presence && "_blank", rel: main_link.open_in_new_tab.presence && "noopener noreferrer" do %>+ <span class="group-hover:border-b-[1.5px] group-hover:border-b-accent"><%= main_link.label %></span>+ <% end %>+ <% if presenter.columns.any? %>+ <div class="w-full bg-transparent invisible absolute translate-y-[10%] group-hover:translate-y-0 left-0 group-hover:opacity-100 opacity-0 group-hover:visible transition-none border-default border-b duration-150 ease-in block pointer-events-none group-hover:pointer-events-auto z-10 header--mega-nav-container" style="--bottom-padding: <%= section.preferred_bottom_padding %>px; --top-without-bottom-padding: calc(100% - var(--bottom-padding)); padding-top: calc(var(--bottom-padding) + var(--section--border-bottom-width)); top: var(--top-without-bottom-padding);">+ <div class="bg-section-background">+ <div class="page-container py-6 grid grid-cols-4 gap-5">+ <% presenter.columns.each do |column| %>+ <div class="flex flex-col">+ <h6 class="uppercase text-sm tracking-widest px-2 font-semibold mb-5"><%= column.title %></h6>+ <% column.links.each do |link| %>+ <div class="p-2">+ <%= page_builder_link_to link, data: { title: link.label.downcase.strip }, class: "shrink-0 menu-item !normal-case header--nav-link", target: link.open_in_new_tab.presence && "_blank", rel: link.open_in_new_tab.presence && "noopener noreferrer" do %>+ <span><%= link.label %></span>+ <% end %>+ </div>+ <% end %>+ <%= link_to Spree.t(:view_all), spree_storefront_resource_url(column.view_all_linkable), class: "py-3 px-2 uppercase text-sm inline-block tracking-widest font-semibold" %>+ </div>+ <% end %>+ <% if block.try(:featured_taxon) %>+ <% cache spree_base_cache_scope.call(block.featured_taxon) do %>+ <% if block.featured_taxon.image.attached? && block.featured_taxon.image.variable? %>+ <%= link_to spree_storefront_resource_url(block.featured_taxon), class: "flex flex-col col-start-4" do %>+ <%= image_tag main_app.cdn_image_url(block.featured_taxon.image.variant(spree_image_variant_options(resize_to_fill: [700, 700]))), class: 'w-full h-auto aspect-1', loading: :lazy, alt: block.featured_taxon.name %>+ <span class="py-3 px-2 bg-accent block uppercase text-sm tracking-widest font-semibold header--mega-nav-featured-taxon-title"><%= Spree.t(:explore_taxon, taxon_name: block.featured_taxon.name) %></span>+ <% end %>+ <% end %>+ <% end %>+ <% end %>+ </div>+ </div>+ </div>+ <% end %>+ </div>+ <% end %>+<% else %>+ <% section.links.each do |link| %>+ <%= active_link_to spree_storefront_resource_url(link.linkable || link), data: { title: link.label.downcase.strip }, class: "shrink-0 menu-item header--nav-link px-4 py-1 focus:mx-0 focus:px-4", class_active: "menu-item--active", target: link.open_in_new_tab.presence && "_blank", rel: link.open_in_new_tab.presence && "noopener noreferrer", **link_attributes(link, as_html: false) do %>+ <span><%= link.label %></span>+ <% end %>+ <% end %>+<% end %>diff --git a/storefront/app/views/themes/default/spree/page_sections/nav/_mobile.html.erb b/storefront/app/views/themes/default/spree/page_sections/nav/_mobile.html.erbnew file mode 100644index 0000000000..51e9aca920--- /dev/null+++ b/storefront/app/views/themes/default/spree/page_sections/nav/_mobile.html.erb@@ -0,0 +1,134 @@+<div class="mt-4 border-default border-t overflow-x-hidden h-full w-screen overflow-y-hidden">+ <div class="h-full flex transform has-[.currency-and-locale-modal:not(.hidden)]:transform-none relative transition-transform duration-300" data-controller="mobile-nav">+ <div class="w-screen shrink-0 flex flex-col h-full flex-grow-0">+ <div class="flex-grow overflow-y-scroll">+ <% if section.blocks.any? %>+ <% section.blocks.each do |block| %>+ <% presenter = Spree::MegaNavPresenter.new(block) %>+ <% main_link = presenter.main_link %>+ <% next unless main_link.present? %>+ <% if presenter.columns.any? %>+ <button+ data-action="click->mobile-nav#openSubmenu touch->mobile-nav#openSubmenu"+ data-title="<%= main_link.label.downcase.strip %>"+ class='text-base text-left tracking-widest p-4 w-full uppercase border-default border-b flex justify-between items-center header--nav-link'>+ <%= main_link.label %>+ <%= render 'spree/shared/icons/chevron_right', size: 12 %>+ <template>+ <button data-action="click->mobile-nav#closeSubmenu touch->mobile-nav#closeSubmenu" class='flex gap-2 items-center text-base font-medium text-left tracking-widest p-4 w-full uppercase border-default border-b header--mega-nav-close-submenu bg-background sticky top-0'>+ <%= render 'spree/shared/icons/chevron', size: 12 %>+ <%= main_link.label %>+ </button>+ <div class="p-4 pt-0 w-full gap-2 flex flex-col">+ <% if block.try(:featured_taxon) %>+ <% cache spree_base_cache_scope.call(block.featured_taxon) do %>+ <% if block.featured_taxon.image.attached? && block.featured_taxon.image.variable? %>+ <%= link_to spree_storefront_resource_url(block.featured_taxon), class: "flex w-full pt-4" do %>+ <%= image_tag main_app.cdn_image_url(block.featured_taxon.image.variant(spree_image_variant_options(resize_to_fill: [280, 280]))), class: 'h-auto aspect-1 w-2/5 max-w-[140px]', loading: :lazy, alt: block.featured_taxon.name %>+ <span class="bg-accent w-full flex items-center justify-center header--mega-nav-featured-taxon-title text-sm tracking-widest font-semibold uppercase">+ <%= Spree.t(:explore_taxon, taxon_name: block.featured_taxon.name) %>+ </span>+ <% end %>+ <% end %>+ <% end %>+ <% end %>+ <% presenter.columns.each do |column| %>+ <div+ data-controller='toggle'+ data-toggle-class='hidden'+ class="w-full flex flex-col gap-2">+ <% unless presenter.columns.size == 1 %>+ <button+ type="button"+ class="text-base font-semibold tracking-widest uppercase w-full inline-flex justify-between py-3"+ data-action='click->toggle#toggle touch->toggle#toggle'>+ <%= column.title %>+ <span data-toggle-target='toggleable'>+ <%= render 'spree/shared/icons/chevron_down' %>+ </span>+ <span data-toggle-target='toggleable' class="hidden rotate-180">+ <%= render 'spree/shared/icons/chevron_down' %>+ </span>+ </button>+ <% end %>+ <div+ class="<%= class_names(hidden: presenter.columns.size != 1) %>"+ data-toggle-target='toggleable'>+ <% column.links.each do |link| %>+ <%= page_builder_link_to link, data: { title: link.label.downcase.strip }, class: "block text-base py-3 w-full uppercase header--nav-link", target: link.open_in_new_tab.presence && "_blank", rel: link.open_in_new_tab.presence && "noopener noreferrer" do %>+ <span><%= link.label %></span>+ <% end %>+ <% end %>+ </div>+ </div>+ <% end %>+ </div>+ </template>+ </button>+ <% else %>+ <%= page_builder_link_to main_link, data: { title: main_link.label.downcase.strip }, class: "block text-base tracking-widest p-4 w-full uppercase border-default border-b header--nav-link", target: main_link.open_in_new_tab.presence && "_blank", rel: main_link.open_in_new_tab.presence && "noopener noreferrer" do %>+ <span><%= main_link.label %></span>+ <% end %>+ <% end %>+ <% end %>+ <% else %>+ <% section.links.each do |link| %>+ <%= page_builder_link_to link, data: { title: link.label.downcase.strip }, class: "block text-base tracking-widest p-4 w-full uppercase border-default border-b header--nav-link", target: link.open_in_new_tab.presence && "_blank", rel: link.open_in_new_tab.presence && "noopener noreferrer" do %>+ <span><%= link.label %></span>+ <% end %>+ <% end %>+ <% end %>+ </div>+ <div class='p-4 bg-accent'>+ <% if try_spree_current_user %>+ <%= link_to spree.account_path, class: 'btn-secondary gap-2 flex justify-center items-center w-full' do %>+ <span><%= Spree.t(:my_account) %></span>+ <%= render 'spree/shared/icons/account' %>+ <% end %>++ <%= link_to spree_logout_path, method: :delete, data: { turbo_method: :delete }, class: 'btn-secondary gap-2 flex justify-center items-center w-full mt-2' do %>+ <%= Spree.t(:sign_out) %>+ <% end %>+ <% else %>+ <button+ id='mobile-menu'+ data-action='click->slideover-account#toggle click@window->slideover-account#hide click->toggle-menu#hide touch->toggle-menu#hide'+ class='btn-secondary gap-2 flex justify-center items-center w-full'>+ <span><%= Spree.t(:my_account) %></span>+ <%= render 'spree/shared/icons/account' %>+ </button>+ <% end %>++ <% if should_render_currency_dropdown? || should_render_locale_dropdown? %>+ <div class="flex mt-4 justify-end">+ <div+ data-controller="modal"+ data-modal-allow-background-close="true"+ data-modal-+ class=""+ data-modal-backdrop-color-value="rgba(0,0,0,0.32)">+ <%= button_tag class: 'flex gap-2 items-center', data: {action: 'modal#open'} do %>+ <% if should_render_currency_dropdown? %>+ <span>+ <%= "#{current_currency} (#{currency_money(current_currency).symbol})" %>+ </span>+ <% end %>+ <% if should_render_locale_dropdown? %>+ <span class="uppercase <%= should_render_currency_dropdown?.presence && "border-l pl-2" %> flex items-center gap-1">+ <% country_code = current_locale.to_s.split("-").last %>+ <%= svg_country_icon(country_code) %>+ <span ><%= country_code %></span>+ </span>+ <% end %>+ <% end %>+ <%= turbo_frame_tag :settings_modal, src: spree.settings_path, loading: :eager %>+ </div>+ </div>+ <% end %>+ </div>+ </div>+ <% if section.blocks.any? %>+ <div class="w-screen shrink-0 relative overflow-y-scroll" data-mobile-nav-target="submenuContainer"></div>+ <% end %>+ </div>+</div>diff --git a/storefront/app/views/themes/default/spree/page_sections/show.html.erb b/storefront/app/views/themes/default/spree/page_sections/show.html.erbdeleted file mode 100644index 71bc89ac4c..0000000000--- a/storefront/app/views/themes/default/spree/page_sections/show.html.erb+++ /dev/null@@ -1,3 +0,0 @@-<%= turbo_frame_tag "section-#{@section.id}" do %>- <%= render_section(@section, section_variables, lazy_allowed: false) %>-<% end %>diff --git a/storefront/app/views/themes/default/spree/posts/_json_ld.html.erb b/storefront/app/views/themes/default/spree/posts/_json_ld.html.erbnew file mode 100644index 0000000000..82a4927728--- /dev/null+++ b/storefront/app/views/themes/default/spree/posts/_json_ld.html.erb@@ -0,0 +1,20 @@+<script type="application/ld+json" data-test-id="post-json-ld">+ {+ "@context": "https://schema.org",+ "@type": "BlogPosting",+ "headline": "<%= post.title %>",+ "image": <%= post.image.attached? ? [main_app.cdn_image_url(post.image.variant(spree_image_variant_options(resize_to_limit: [1200, 675])))].to_json.html_safe : [].to_json.html_safe %>,+ "datePublished": "<%= post.published_at&.iso8601 %>",+ "dateModified": "<%= post.updated_at&.iso8601 %>",+ "author": [+ {+ "@type": "Person",+ "name": "<%= post.author_name %>"+ }+ ]+ }+</script>++<script type="application/ld+json" data-test-id="post-breadcrumbs-json-ld">+ <%= posts_json_ld_breadcrumbs(post).to_json.html_safe %>+</script>diff --git a/storefront/app/views/themes/default/spree/posts/_pagination.html.erb b/storefront/app/views/themes/default/spree/posts/_pagination.html.erbnew file mode 100644index 0000000000..e745c7e3d3--- /dev/null+++ b/storefront/app/views/themes/default/spree/posts/_pagination.html.erb@@ -0,0 +1 @@+<%= paginate @posts, theme: 'storefront', outer_window: 1, inner_window: 2 %>diff --git a/storefront/app/views/themes/default/spree/posts/_post.html.erb b/storefront/app/views/themes/default/spree/posts/_post.html.erbnew file mode 100644index 0000000000..f0da5a2ddb--- /dev/null+++ b/storefront/app/views/themes/default/spree/posts/_post.html.erb@@ -0,0 +1,11 @@+<div class="flex flex-col max-w-3xl m-auto mt-16 first:mt-0">+ <%= link_to spree.post_path(post), data: { turbo_frame: '_top' } do %>+ <% if post.image.attached? && post.image.variable? %>+ <%= image_tag main_app.cdn_image_url(post.image.variant(spree_image_variant_options(resize_to_fit: [nil, 800]))), height: 400, class: 'h-full w-full object-cover object-center', loading: :lazy, alt: post.title %>+ <% end %>++ <h1 class="uppercase text-lg font-medium mt-4"><%= post.title %></h1>+ <div class="mt-2 text-sm"><%= local_time(post.published_at, '%B %e, %Y') %></div>+ <div class="mt-4"><%= post.shortened_description %></div>+ <% end %>+</div>diff --git a/storefront/app/views/themes/default/spree/search/_suggestions.html.erb b/storefront/app/views/themes/default/spree/search/_suggestions.html.erbnew file mode 100644index 0000000000..91562b100e--- /dev/null+++ b/storefront/app/views/themes/default/spree/search/_suggestions.html.erb@@ -0,0 +1,90 @@+<% loaded ||= false %>+<% taxons ||= [] %>+<% has_more ||= false %>++<div class="bg-background w-full h-full flex flex-col">+ <div class="uppercase block py-4 lg:py-6 border-b border-default w-full font-semibold text-sm tracking-widest">+ <h3 class="page-container"><%= Spree.t(:top_suggestions) %></h3>+ </div>+ <div class="flex flex-col md:grid md:grid-cols-4 grid-rows-[1fr_min-content] w-full page-container h-full">+ <% if loaded %>+ <div class="flex flex-col justify-between md:!border-r border-default md:h-full md:w-full animate-fadeIn relative border-b md:!border-b-0 w-auto -mx-4">+ <div class="flex flex-col md:pr-6 mb-4">+ <h3 class="text-sm uppercase px-4 py-6"><%= Spree.t(:categories) %></h3>+ <% if taxons.any? %>+ <% taxons.each do |taxon| %>+ <%= link_to spree.nested_taxons_path(taxon), class: "leading-snug flex justify-between w-full p-4 hover:bg-accent" do %>+ <%= taxon.name %>+ <%= render 'spree/shared/icons/chevron_right' %>+ <% end %>+ <% end %>+ <% end %>+ </div>+ <% if has_more %>+ <div class="fixed md:sticky py-6 px-4 bottom-0 left-0 bg-accent w-full z-[60]">+ <%= link_to spree.search_path(q: query), class: "btn-primary text-center uppercase flex items-baseline justify-center" do %>+ <span class="whitespace-nowrap"><%= Spree.t(:search_all) %> "</span>+ <span class="whitespace-nowrap overflow-ellipsis w-min max-w-[12ch] overflow-hidden inline"><%= query %></span>+ <span>"</span>+ <% end %>+ </div>+ <% end %>+ </div>+ <div class="md:pl-[3.75rem] py-6 w-full h-full md:col-span-3 animate-fadeIn">+ <% if products.present? %>+ <div>+ <%= render 'spree/products/swiper',+ section: theme_layout_sections['header'],+ products: products,+ desktop_slides: 3,+ heading: Spree.t(:products),+ pagination: 'top',+ heading_class: "text-sm uppercase !leading-4 -mb-4 lg:mb-0 tracking-widest" %>+ </div>+ <% else %>+ <p class="text-center text-sm text-neutral font-bold">+ <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Product)) %>.+ </p>+ <% end %>+ </div>++ <% if has_more && taxons.none? %>+ <div class="fixed md:relative md:col-span-2 lg:col-span-1 py-6 px-10 bottom-0 left-0 bg-accent w-full z-[60]">+ <%= link_to spree.search_path(q: query), class: "btn-primary text-center uppercase flex items-baseline justify-center" do %>+ <span class="whitespace-nowrap"><%= Spree.t(:search_all) %> "</span>+ <span class="whitespace-nowrap overflow-ellipsis w-min max-w-[12ch] overflow-hidden inline"><%= query %></span>+ <span>"</span>+ <% end %>+ </div>+ <% end %>++ <% else %>+ <div class="flex flex-col p-4 md:border-r1 border-default pl-4 gap-2 md:h-full w-full">+ <% 5.times do %>+ <div class="block w-full animate-pulse bg-accent h-6"></div>+ <% end %>+ </div>+ <div class='grid grid-cols-1 lg:grid-cols-12 gap-4 lg:gap-6 px-4 md:px-[3.75rem] py-6 w-full h-full md:col-span-3 animate-pulse'>+ <div class='lg:col-span-12 flex justify-between flex-col overflow-hidden'>+ <div class='grid gap-4 lg:gap-6 grid-cols-8 lg:grid-cols-12'>+ <div class='col-span-6 lg:col-span-4'>+ <div class='aspect-1 bg-accent w-full'></div>+ <div class='h-6 mt-2 w-32 bg-accent rounded'></div>+ <div class='h-8 mt-2 w-16 bg-accent rounded'></div>+ </div>+ <div class='col-span-2 lg:col-span-4 flex flex-col h-full overflow-hidden'>+ <div class='h-full lg:aspect-1 bg-accent w-full'></div>+ <div class='h-6 mt-2 w-32 bg-accent rounded shrink-0'></div>+ <div class='h-8 mt-2 w-16 bg-accent rounded shrink-0'></div>+ </div>+ <div class='hidden col-span-2 lg:col-span-4 lg:flex flex-col h-full overflow-hidden'>+ <div class='h-full lg:aspect-1 bg-accent w-full'></div>+ <div class='h-6 mt-2 w-32 bg-accent rounded shrink-0'></div>+ <div class='h-8 mt-2 w-16 bg-accent rounded shrink-0'></div>+ </div>+ </div>+ </div>+ </div>+ <% end %>+ </div>+</div>diff --git a/storefront/app/views/themes/default/spree/settings/show.html.erb b/storefront/app/views/themes/default/spree/settings/show.html.erbnew file mode 100644index 0000000000..83f20d6999--- /dev/null+++ b/storefront/app/views/themes/default/spree/settings/show.html.erb@@ -0,0 +1,32 @@+<%= turbo_frame_tag :settings_modal do %>+ <div+ data-modal-target="container"+ data-action="click->modal#closeBackground keyup@window->modal#closeWithKeyboard"+ class="currency-and-locale-modal hidden animate-fadeIn fixed inset-0 overflow-y-auto flex items-end md:items-center justify-center z-[9999] h-dvh w-full"+ style="animation-duration: 150ms;">+ <div class="w-full lg:w-[600px] relative h-auto lg:max-h-screen flex justify-center flex-col gap-4 bg-background p-5 ">+ <button+ type="button"+ data-action="modal#close"+ class="absolute top-5 right-5">+ <%= render 'spree/shared/icons/close' %>+ </button>+ <h3 class="text-lg font-bold"><%= Spree.t("i18n.localization_settings") %></h3>+ <%= form_with url: spree.settings_path, method: :put, class: 'flex flex-col gap-4', data: {turbo: false} do |f| %>+ <% if should_render_currency_dropdown? %>+ <div class="flex flex-col gap-2">+ <%= f.label :switch_to_currency, Spree.t(:currency), class: 'text-xs text-neutral-600' %>+ <%= f.select :switch_to_currency, options_for_select(supported_currency_options, current_currency) %>+ </div>+ <% end %>+ <% if should_render_locale_dropdown? %>+ <div class="flex flex-col gap-2">+ <%= f.label :switch_to_locale, Spree.t("i18n.language"), class: 'text-xs text-neutral-600' %>+ <%= f.select :switch_to_locale, options_for_select(supported_locales_options, current_locale) %>+ </div>+ <% end %>+ <%= f.submit Spree.t("actions.save"), class: 'btn-primary' %>+ <% end %>+ </div>+ </div>+<% end %>