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.

Use only Link or Container menu item types for out-of-the-box simplicity. Add ability to link to external sites in new window from footer menu. Add ability to use none linking labels in footer menu.

Matthew Kennedy689c0adfb05e
diff --git a/core/app/models/spree/menu_item.rb b/core/app/models/spree/menu_item.rb
index 9c1fdba13d..8c34cc03f9 100644
--- a/core/app/models/spree/menu_item.rb
+++ b/core/app/models/spree/menu_item.rb
@@ -11,7 +11,7 @@ module Spree
after_save :touch_ancestors_and_menu
after_touch :touch_ancestors_and_menu
- ITEM_TYPE = %w[Link Promotion Container]
+ ITEM_TYPE = %w[Link Container]
LINKED_RESOURCE_TYPE = ['URL']
STATIC_RESOURCE_TYPE = ['Home Page']
diff --git a/frontend/app/assets/stylesheets/spree/frontend/views/spree/shared/footer.scss b/frontend/app/assets/stylesheets/spree/frontend/views/spree/shared/footer.scss
index ccd4bd21b2..6152396cea 100644
--- a/frontend/app/assets/stylesheets/spree/frontend/views/spree/shared/footer.scss
+++ b/frontend/app/assets/stylesheets/spree/frontend/views/spree/shared/footer.scss
@@ -41,6 +41,10 @@
@include media-breakpoint-up(xl) {
font-size: font-px-to-rem(16px);
font-weight: 500;
+
+ a {
+ font-size: font-px-to-rem(16px) !important;
+ }
}
}
&-info {
diff --git a/frontend/app/views/spree/shared/_footer.html.erb b/frontend/app/views/spree/shared/_footer.html.erb
index ccbf72df2c..54366ae7d3 100644
--- a/frontend/app/views/spree/shared/_footer.html.erb
+++ b/frontend/app/views/spree/shared/_footer.html.erb
@@ -53,10 +53,20 @@
<% spree_menu('footer').children.each do |parent| %>
<div class="col-3">
<div class="footer-spree-label">
- <%= link_to parent.name, spree_localized_item_link(parent) %>
+ <% if parent.item_type == 'Container' %>
+ <%= parent.name %>
+ <% else %>
+ <%= link_to parent.name, spree_localized_item_link(parent) %>
+ <% end %>
</div>
<% parent.children.each do |child| %>
- <div class="pt-2"><%= link_to child.name, spree_localized_item_link(child) %></div>
+ <div class="pt-2">
+ <% if child.new_window %>
+ <%= link_to child.name, spree_localized_item_link(child), target: '_blank', rel: 'noopener noreferrer' %>
+ <% else %>
+ <%= link_to child.name, spree_localized_item_link(child) %>
+ <% end %>
+ </div>
<% end %>
</div>
<% end %>