spree_frontend 4.7.0 → 4.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +37 -42
- data/.gem_release.yml +1 -1
- data/.github/CONTRIBUTING.md +1 -1
- data/.github/dependabot.yml +9 -30
- data/.rubocop.yml +10 -183
- data/.ruby-version +1 -0
- data/Gemfile +7 -7
- data/LICENSE +1 -1
- data/README.md +32 -39
- data/SECURITY.md +1 -1
- data/app/assets/config/spree_frontend_manifest.js +2 -1
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/logo/spree_50.png +0 -0
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/javascripts/spree/frontend/{account.js → account.es6} +2 -5
- data/app/assets/javascripts/spree/frontend/{api_tokens.js → api_tokens.es6} +2 -5
- data/app/assets/javascripts/spree/frontend/cart.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/address.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/address_book.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/payment.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/shipment.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout.js +1 -1
- data/app/assets/javascripts/spree/frontend/login.js +1 -1
- data/app/assets/javascripts/spree/frontend/main_nav_bar.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/layouts/spree_application.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +9 -2
- data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/modal_carousel.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/price_filters.es6 +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/single.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/swipes.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/thumbnails.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/delete_address_popup.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/quantity_select.js +1 -1
- data/app/assets/javascripts/spree/frontend.js +1 -1
- data/app/assets/javascripts/spree/lazysizes.config.js +1 -1
- data/app/assets/stylesheets/spree/frontend/components-custom/headers.scss +0 -2
- data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +4 -146
- data/app/assets/stylesheets/spree/frontend/fonts.scss +0 -136
- data/app/assets/stylesheets/spree/frontend/variables/variables.scss +21 -7
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +0 -3
- data/app/assets/stylesheets/spree/frontend/views/spree/layouts/spree_application.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +0 -20
- data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +2 -2
- data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +0 -20
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +0 -14
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/header.scss +0 -25
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/login.scss +0 -16
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +1 -8
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +1 -14
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/no_product_available.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/order_details.scss +0 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/taxons/show.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +0 -28
- data/app/helpers/spree/addresses_helper.rb +6 -10
- data/app/helpers/spree/frontend_helper.rb +2 -2
- data/app/helpers/spree/navigation_helper.rb +1 -1
- data/app/helpers/spree/products_filters_helper.rb +3 -3
- data/app/javascript/spree/frontend/application.js +2 -0
- data/app/views/spree/addresses/_form.html.erb +4 -5
- data/app/views/spree/addresses/edit.html.erb +1 -1
- data/app/views/spree/addresses/new.html.erb +1 -1
- data/app/views/spree/checkout/_address.html.erb +1 -1
- data/app/views/spree/checkout/_delivery.html.erb +1 -1
- data/app/views/spree/checkout/_summary.html.erb +2 -2
- data/app/views/spree/checkout/edit.html.erb +1 -1
- data/app/views/spree/checkout/payment/_gateway.html.erb +4 -4
- data/app/views/spree/checkout/payment/_storecredit.html.erb +1 -1
- data/app/views/spree/checkout/registration.html.erb +1 -1
- data/app/views/spree/layouts/spree_application.html.erb +4 -1
- data/app/views/spree/orders/_line_item_data.html.erb +1 -1
- data/app/views/spree/orders/show.html.erb +1 -1
- data/app/views/spree/products/_cart_form.html.erb +2 -2
- data/app/views/spree/products/_color_option_type.html.erb +1 -1
- data/app/views/spree/products/_description.html.erb +1 -1
- data/app/views/spree/products/_filters_desktop.html.erb +1 -1
- data/app/views/spree/products/_filters_mobile.html.erb +3 -3
- data/app/views/spree/products/_option_type.html.erb +1 -1
- data/app/views/spree/products/_promotions.html.erb +1 -1
- data/app/views/spree/products/_properties.html.erb +1 -1
- data/app/views/spree/products/_sort_desktop.html.erb +9 -24
- data/app/views/spree/products/index.html.erb +1 -1
- data/app/views/spree/products/related.html.erb +1 -1
- data/app/views/spree/shared/_checkout_header.html.erb +1 -1
- data/app/views/spree/shared/_currency_dropdown.html.erb +1 -1
- data/app/views/spree/shared/_delete_address_popup.html.erb +2 -2
- data/app/views/spree/shared/_footer.html.erb +3 -3
- data/app/views/spree/shared/_head.html.erb +2 -1
- data/app/views/spree/shared/_internationalization_options.html.erb +3 -3
- data/app/views/spree/shared/_line_item.html.erb +1 -1
- data/app/views/spree/shared/_locale_dropdown.html.erb +1 -1
- data/app/views/spree/shared/_login.html.erb +2 -2
- data/app/views/spree/shared/_main_nav_bar.html.erb +2 -2
- data/app/views/spree/shared/_mobile_internationalization_options.html.erb +1 -1
- data/app/views/spree/shared/_mobile_navigation.html.erb +1 -1
- data/app/views/spree/shared/_nav_bar.html.erb +5 -5
- data/app/views/spree/shared/_no_product_available.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +3 -3
- data/app/views/spree/shared/_product_added_modal.html.erb +2 -2
- data/app/views/spree/shared/_user_form.html.erb +3 -3
- data/app/views/spree/taxons/_header.html.erb +1 -1
- data/app/views/spree/taxons/_subcategories.html.erb +1 -1
- data/app/views/spree/taxons/product_carousel.html.erb +1 -1
- data/app/views/spree/users/edit.html.erb +1 -1
- data/app/views/spree/users/show.html.erb +1 -1
- data/config/importmap.rb +2 -0
- data/config/locales/en.yml +37 -0
- data/lib/generators/spree/frontend/install/install_generator.rb +0 -2
- data/lib/spree/frontend/configuration.rb +1 -1
- data/lib/spree/frontend/engine.rb +9 -5
- data/lib/spree/frontend/version.rb +3 -3
- data/lib/spree/frontend.rb +3 -1
- data/spree_frontend.gemspec +12 -10
- metadata +65 -50
- data/.deepsource.toml +0 -19
- data/.eslintignore +0 -7
- data/.eslintrc +0 -36
- data/.solargraph.yml +0 -20
- data/.stylelintignore +0 -4
- data/.stylelintrc +0 -6
- data/app/assets/images/logo-spree.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/logo.svg +0 -10
- data/app/assets/images/logo@2x.png +0 -0
- data/app/assets/images/logo@3x.png +0 -0
- data/app/assets/images/noimage/plp.png +0 -0
- data/app/assets/images/noimage/plp.svg +0 -16
- data/app/views/spree/shared/_get_started.html.erb +0 -32
- data/lib/generators/spree/frontend/install/templates/app/assets/config/manifest.js +0 -2
- data/license.md +0 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="product-variants-variant" data-option-type-id="<%= option_type[:id] %>">
|
|
2
|
-
<span class="d-block mb-2 text-center text-md-left
|
|
2
|
+
<span class="d-block mb-2 text-center text-md-left product-variants-variant-title">
|
|
3
3
|
<%= option_type[:presentation] %>
|
|
4
4
|
</span>
|
|
5
5
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<% if promotions.any? %>
|
|
4
4
|
<div id="promotions">
|
|
5
|
-
<h3 class="pt-4 font-weight-bold
|
|
5
|
+
<h3 class="pt-4 font-weight-bold product-details-subtitle"><%= Spree.t(:promotions) %></h3>
|
|
6
6
|
<% promotions.each do |promotion| %>
|
|
7
7
|
<div class="row">
|
|
8
8
|
<div class="col-12 col-md-7 col-lg-6 mb-3">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<% unless @product_properties.blank? %>
|
|
2
|
-
<h3 class="pt-4 font-weight-bold
|
|
2
|
+
<h3 class="pt-4 font-weight-bold product-details-subtitle"><%= Spree.t(:details) %></h3>
|
|
3
3
|
<ul id="product-properties" class="m-0 list-unstyled product-properies" data-hook>
|
|
4
4
|
<% @product_properties.each do |product_property| %>
|
|
5
5
|
<% if product_property.show_property? %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div class="
|
|
1
|
+
<div class="dropdown d-none d-lg-flex justify-content-end mt-5 pr-4 pb-3 plp-sort">
|
|
2
2
|
<a data-toggle="dropdown" class="plp-sort-header" href="#" role="button" aria-haspopup="true" aria-expanded="false">
|
|
3
3
|
<%= Spree.t("plp.#{ params[:sort_by].blank? ? 'sort_by': params[:sort_by].gsub('-', '_') }") %>
|
|
4
4
|
<%= icon(name: 'arrow-right',
|
|
@@ -10,27 +10,12 @@
|
|
|
10
10
|
width: 18,
|
|
11
11
|
height: 18) %>
|
|
12
12
|
</a>
|
|
13
|
-
<div class="dropdown-menu text-right
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</li>
|
|
22
|
-
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'name-z-a' %>">
|
|
23
|
-
<%= link_to Spree.t('plp.name_z_a'), url_for(permitted_params.merge(sort_by: 'name-z-a')), class: 'dropdown-item' %>
|
|
24
|
-
</li>
|
|
25
|
-
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'newest-first' %>">
|
|
26
|
-
<%= link_to Spree.t('plp.newest_first'), url_for(permitted_params.merge(sort_by: 'newest-first')), class: 'dropdown-item' %>
|
|
27
|
-
</li>
|
|
28
|
-
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'price-high-to-low' %>">
|
|
29
|
-
<%= link_to Spree.t('plp.price_high_to_low'), url_for(permitted_params.merge(sort_by: 'price-high-to-low')), class: 'dropdown-item' %>
|
|
30
|
-
</li>
|
|
31
|
-
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'price-low-to-high' %>">
|
|
32
|
-
<%= link_to Spree.t('plp.price_low_to_high'), url_for(permitted_params.merge(sort_by: 'price-low-to-high')), class: 'dropdown-item' %>
|
|
33
|
-
</li>
|
|
34
|
-
</ul>
|
|
35
|
-
</div>
|
|
13
|
+
<div class="dropdown-menu text-right">
|
|
14
|
+
<%= active_link_to Spree.t('plp.default'), url_for(permitted_params.merge(sort_by: nil)), class: 'dropdown-item', active: { sort_by: nil } %>
|
|
15
|
+
<%= active_link_to Spree.t('plp.name_a_z'), url_for(permitted_params.merge(sort_by: 'name-a-z')), class: 'dropdown-item', active: { sort_by: 'name-a-z' } %>
|
|
16
|
+
<%= active_link_to Spree.t('plp.name_z_a'), url_for(permitted_params.merge(sort_by: 'name-z-a')), class: 'dropdown-item', active: { sort_by: 'name-z-a' } %>
|
|
17
|
+
<%= active_link_to Spree.t('plp.newest_first'), url_for(permitted_params.merge(sort_by: 'newest-first')), class: 'dropdown-item', active: { sort_by: 'newest-first' } %>
|
|
18
|
+
<%= active_link_to Spree.t('plp.price_high_to_low'), url_for(permitted_params.merge(sort_by: 'price-high-to-low')), class: 'dropdown-item', active: { sort_by: 'price-high-to-low' } %>
|
|
19
|
+
<%= active_link_to Spree.t('plp.price_low_to_high'), url_for(permitted_params.merge(sort_by: 'price-low-to-high')), class: 'dropdown-item', active: { sort_by: 'price-low-to-high' } %>
|
|
20
|
+
</div>
|
|
36
21
|
</div>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<% else %>
|
|
12
12
|
<% if params[:keywords] %>
|
|
13
13
|
<div class="container d-md-flex pt-md-5">
|
|
14
|
-
<div class="plp-results-text
|
|
14
|
+
<div class="plp-results-text mx-md-auto py-md-5">
|
|
15
15
|
<%= "#{@products.total_count} #{Spree.t('plp.results_for')} '#{params[:keywords].upcase}'" %>
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<% if products.any? %>
|
|
7
7
|
<div class="product-details-related" id="product-details-related-<%= relation_type.id %>">
|
|
8
|
-
<p class="font-weight-bold text-center
|
|
8
|
+
<p class="font-weight-bold text-center product-details-carousel-text"><%= relation_type.name %></p>
|
|
9
9
|
<%= render 'spree/shared/carousel_4_products', id: "related-products-carousel-#{relation_type.id}", products: products %>
|
|
10
10
|
</div>
|
|
11
11
|
<% end %>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<div class="row">
|
|
5
5
|
|
|
6
6
|
<div class="col d-flex align-items-center truncate pr-0">
|
|
7
|
-
<%= link_to spree.cart_path, class: "
|
|
7
|
+
<%= link_to spree.cart_path, class: "truncate checkout-header-link-text btn btn-link", method: :get do %>
|
|
8
8
|
<%= icon(name: 'arrow-right',
|
|
9
9
|
classes: 'spree-icon-arrow spree-icon-arrow-left',
|
|
10
10
|
width: 14,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</label>
|
|
7
7
|
<%= select_tag(:switch_to_currency,
|
|
8
8
|
options_for_select(supported_currency_options, current_currency),
|
|
9
|
-
class: 'custom-select w-100') %>
|
|
9
|
+
class: 'custom-select custom-select-sm w-100') %>
|
|
10
10
|
<noscript><%= submit_tag %></noscript>
|
|
11
11
|
</div>
|
|
12
12
|
<% end %>
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
<div class="d-flex delete-address-popup-buttons">
|
|
15
|
-
<div class="btn bg-light-background text-primary border-2 border-primary
|
|
15
|
+
<div class="btn bg-light-background text-primary border-2 border-primary font-weight-bold delete-address-popup-button js-delete-address-popup-close-button"><%= Spree.t(:cancel) %></div>
|
|
16
16
|
<a
|
|
17
17
|
id="delete-address-popup-confirm"
|
|
18
|
-
class="btn btn-primary
|
|
18
|
+
class="btn btn-primary font-weight-bold delete-address-popup-button"
|
|
19
19
|
data-method="delete"
|
|
20
20
|
rel="nofollow"
|
|
21
21
|
href="#">
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
</div>
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
50
|
-
<div class="row d-none d-xl-flex border-top pt-5
|
|
50
|
+
<div class="row d-none d-xl-flex border-top pt-5 footer-spree-menu-links">
|
|
51
51
|
|
|
52
52
|
<% if spree_menu('footer').present? %>
|
|
53
53
|
<% spree_menu('footer').children.each do |parent| %>
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
<% if spree.respond_to?(:account_path) %>
|
|
72
72
|
<div class="col-3 mb-5">
|
|
73
73
|
<div class="footer-spree-label">
|
|
74
|
-
<%= Spree.t(
|
|
74
|
+
<%= Spree.t(:my_account) %>
|
|
75
75
|
</div>
|
|
76
76
|
<div class="pt-2">
|
|
77
|
-
<%= link_to Spree.t(:my_orders)
|
|
77
|
+
<%= link_to Spree.t(:my_orders), spree.account_path(anchor: "account-my-orders") %>
|
|
78
78
|
</div>
|
|
79
79
|
</div>
|
|
80
80
|
<% end %>
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
<%= favicon_link_tag(spree_favicon_path) %>
|
|
8
8
|
<%= stylesheet_link_tag 'spree/frontend/all', media: 'screen', data: { turbo_track: 'reload' } %>
|
|
9
9
|
<%= csrf_meta_tags %>
|
|
10
|
+
|
|
11
|
+
<%= javascript_importmap_tags('application-spree-frontend') %>
|
|
10
12
|
<%= render 'spree/shared/paths' %>
|
|
11
13
|
<%= render 'spree/shared/locale_and_currency' %>
|
|
12
|
-
<%= javascript_include_tag "application", defer: true, data: { turbo_track: 'reload' } %>
|
|
13
14
|
<%= javascript_include_tag 'spree/frontend/all', defer: true, data: { turbo_track: 'reload' } %>
|
|
14
15
|
<%= yield :head %>
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<button id="internationalization-button-desktop" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle" aria-label="<%= Spree.t(:internationalization) %>">
|
|
5
5
|
<%= icon(name: 'global',
|
|
6
6
|
classes: 'd-none d-xl-inline-block',
|
|
7
|
-
width:
|
|
8
|
-
height:
|
|
7
|
+
width: 24,
|
|
8
|
+
height: 24) %>
|
|
9
9
|
<%= icon(name: 'arrow-down',
|
|
10
10
|
classes: 'd-inline-block d-xl-none',
|
|
11
11
|
width: 15,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<% stores.each do |store| %>
|
|
18
18
|
<div class="pl-3 d-flex justify-content-between align-items-center stores-list">
|
|
19
19
|
<%= country_flag_icon(store_country_iso(store)) %>
|
|
20
|
-
<%= store_link(store, class: "dropdown-item
|
|
20
|
+
<%= store_link(store, class: "dropdown-item #{'font-weight-bold' if current_store == store}") %>
|
|
21
21
|
</div>
|
|
22
22
|
<% end %>
|
|
23
23
|
<% else %>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<%= link_to product_image(line_item.variant), spree.product_path(line_item.product) %>
|
|
5
5
|
<div class="d-flex flex-column mt-2 mt-lg-0">
|
|
6
6
|
<div><%= link_to line_item.name, spree.product_path(line_item.product) %></div>
|
|
7
|
-
<ul class="checkout-confirm-order-details-line-items-line-item-name-options
|
|
7
|
+
<ul class="checkout-confirm-order-details-line-items-line-item-name-options list-unstyled mb-0">
|
|
8
8
|
<% line_item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
|
|
9
9
|
<li>
|
|
10
10
|
<% # TODO: rework option values so options_text method can be used here %>
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
<div id="password-credentials" class="mb-4">
|
|
5
5
|
<div class="form-group mb-4">
|
|
6
6
|
<p class="form-group checkout-content-inner-field">
|
|
7
|
-
<%= f.email_field :email, class: '
|
|
7
|
+
<%= f.email_field :email, class: 'form-control', placeholder: Spree.t(:email), value: params.dig(:spree_user, :email) %>
|
|
8
8
|
</p>
|
|
9
9
|
</div>
|
|
10
10
|
<div class="form-group mb-4">
|
|
11
11
|
<p class="form-group checkout-content-inner-field">
|
|
12
|
-
<%= f.password_field :password, class: '
|
|
12
|
+
<%= f.password_field :password, class: 'form-control', placeholder: Spree.t(:password) %>
|
|
13
13
|
</p>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
<!-- Categories -->
|
|
23
23
|
<% if child.container? && child.code?('category') %>
|
|
24
24
|
<div class="category-links my-4 mx-2">
|
|
25
|
-
<div class="category-links-header
|
|
25
|
+
<div class="category-links-header">
|
|
26
26
|
<%= child.name %>
|
|
27
27
|
</div>
|
|
28
28
|
<% if child.children.present? %>
|
|
29
29
|
<ul class="pl-0">
|
|
30
30
|
<% child.children.each do |category_link| %>
|
|
31
31
|
<li>
|
|
32
|
-
<%= spree_nav_link_tag(category_link, { class: "
|
|
32
|
+
<%= spree_nav_link_tag(category_link, { class: "main-nav-bar-category-links dropdown-item truncate" }) %>
|
|
33
33
|
</li>
|
|
34
34
|
<% end %>
|
|
35
35
|
</ul>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<% stores.each do |store| %>
|
|
23
23
|
<li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
|
|
24
24
|
<%= country_flag_icon(store_country_iso(store)) %>
|
|
25
|
-
<%= store_link(store, class: "dropdown-item
|
|
25
|
+
<%= store_link(store, class: "dropdown-item d-flex #{'font-weight-bold' if current_store == store}") %>
|
|
26
26
|
</li>
|
|
27
27
|
<% end %>
|
|
28
28
|
<% else %>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<% if spree_menu.present? %>
|
|
2
|
-
<div class="position-fixed
|
|
2
|
+
<div class="position-fixed d-xl-none mobile-navigation" role="navigation" aria-label="<%= Spree.t('nav_bar.mobile') %>">
|
|
3
3
|
<div class="container d-flex align-items-center justify-content-between header-spree" data-hook>
|
|
4
4
|
<button class="m-0 p-0" id="mobile-navigation-back-button" aria-label="<%= Spree.t('nav_bar.go_to_previous_menu') %>">
|
|
5
5
|
<%= icon(name: 'arrow-right',
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<button type="button" class="navbar-right-dropdown-toggle search-icons" aria-label="<%= Spree.t('nav_bar.show_search') %>">
|
|
5
5
|
<%= icon(name: 'magnifying-glass',
|
|
6
6
|
classes: 'd-inline-block',
|
|
7
|
-
width:
|
|
8
|
-
height:
|
|
7
|
+
width: 24,
|
|
8
|
+
height: 24) %>
|
|
9
9
|
</button>
|
|
10
10
|
|
|
11
11
|
<div id="search-dropdown" class="p-0 px-md-4 py-md-2 w-100 shadow navbar-right-search-menu-dropdown hide-on-esc">
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
<button id="account-button" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle account-icon" aria-label="<%= Spree.t('nav_bar.show_user_menu') %>">
|
|
20
20
|
<%= icon(name: 'person',
|
|
21
21
|
classes: 'd-inline-block',
|
|
22
|
-
width:
|
|
23
|
-
height:
|
|
22
|
+
width: 24,
|
|
23
|
+
height: 24) %>
|
|
24
24
|
</button>
|
|
25
25
|
|
|
26
26
|
<div id="link-to-account" class="dropdown-menu dropdown-menu-right text-right">
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
</li>
|
|
30
30
|
<% end %>
|
|
31
31
|
<li id="link-to-cart">
|
|
32
|
-
<%= render 'spree/shared/cart', class: 'd-inline-block cart-icon', size:
|
|
32
|
+
<%= render 'spree/shared/cart', class: 'd-inline-block cart-icon', size: 24, item_count: 0 %>
|
|
33
33
|
</li>
|
|
34
34
|
<%= render partial: 'spree/shared/internationalization_options' %>
|
|
35
35
|
</ul>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<% end %>
|
|
16
16
|
<p>
|
|
17
17
|
|
|
18
|
-
<div class="btn btn-primary
|
|
18
|
+
<div class="btn btn-primary font-weight-bold d-flex no-product-available-button" id="no-product-available-hide-button">
|
|
19
19
|
<p class="d-flex m-auto no-product-available-button-text">
|
|
20
20
|
<%= Spree.t(:ok) %>
|
|
21
21
|
</p>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<%= Spree.t(:products) %>
|
|
57
57
|
</div>
|
|
58
58
|
<div class="d-table" data-hook="order_details">
|
|
59
|
-
<div class="d-none d-lg-table-row text-secondary
|
|
59
|
+
<div class="d-none d-lg-table-row text-secondary" data-hook="order_details_line_items_headers">
|
|
60
60
|
<p class="d-table-cell pb-1">
|
|
61
61
|
<%= Spree.t(:product) %>
|
|
62
62
|
</p>
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<%= link_to item.name, spree.product_path(item.product), class: 'checkout-confirm-order-details-line-items-line-item-name-link' %>
|
|
83
83
|
</div>
|
|
84
84
|
<% unless item.variant.is_master? %>
|
|
85
|
-
<ul class="checkout-confirm-order-details-line-items-line-item-name-options
|
|
85
|
+
<ul class="checkout-confirm-order-details-line-items-line-item-name-options list-unstyled mb-0">
|
|
86
86
|
<% item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
|
|
87
87
|
<li>
|
|
88
88
|
<% # TODO: rework option values so options_text method can be used here %>
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
<% unless @order.uneditable? %>
|
|
121
121
|
<div data-hook="buttons">
|
|
122
122
|
<% submit_label_key = @order.confirm? ? :place_order : :save_and_continue %>
|
|
123
|
-
<%= submit_tag Spree.t(submit_label_key), class: 'btn btn-primary
|
|
123
|
+
<%= submit_tag Spree.t(submit_label_key), class: 'btn btn-primary font-weight-bold w-100 checkout-content-save-continue-button' %>
|
|
124
124
|
</div>
|
|
125
125
|
<% end %>
|
|
126
126
|
</div>
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
<div class="container-fluid">
|
|
48
48
|
<div class="row pb-4 justify-content-center">
|
|
49
49
|
<div class="col-12 col-lg-8">
|
|
50
|
-
<%= link_to spree.checkout_path, class: 'btn btn-primary w-100 font-weight-bold
|
|
50
|
+
<%= link_to spree.checkout_path, class: 'btn btn-primary w-100 font-weight-bold product-added-modal-button', method: :get do %>
|
|
51
51
|
<%= Spree.t(:checkout) %>
|
|
52
52
|
<% end %>
|
|
53
53
|
</div>
|
|
54
54
|
</div>
|
|
55
55
|
<div class="row justify-content-center">
|
|
56
56
|
<div class="col-12 col-lg-8">
|
|
57
|
-
<%= link_to spree.cart_path, class: 'btn btn-outline-primary w-100 font-weight-bold
|
|
57
|
+
<%= link_to spree.cart_path, class: 'btn btn-outline-primary w-100 font-weight-bold product-added-modal-button' do %>
|
|
58
58
|
<%= Spree.t('pdp.view_cart') %>
|
|
59
59
|
<% end %>
|
|
60
60
|
</div>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<div class="form-group mb-5">
|
|
2
|
-
<%= f.email_field :email, class: '
|
|
2
|
+
<%= f.email_field :email, class: 'form-control', placeholder: Spree.t(:email) %>
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<div class="form-group mb-4">
|
|
6
|
-
<%= f.password_field :password, class: '
|
|
6
|
+
<%= f.password_field :password, class: 'form-control', placeholder: Spree.t(:password) %>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
<div class="form-group mb-5">
|
|
10
|
-
<%= f.password_field :password_confirmation, class: '
|
|
10
|
+
<%= f.password_field :password_confirmation, class: 'form-control', placeholder: Spree.t(:confirm_password) %>
|
|
11
11
|
</div>
|
|
12
12
|
<div data-hook="signup_below_password_fields"></div>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<% child_taxons = [current_taxon, *current_taxon.children.where(hide_from_nav: false)] %>
|
|
8
8
|
<% if current_taxon.level > 0 && child_taxons.size > 1 %>
|
|
9
9
|
<div class="d-flex justify-content-center position-sticky sticky-top-90px taxon-subcategories-wrapper">
|
|
10
|
-
<div class="py-1
|
|
10
|
+
<div class="py-1 d-none d-xl-flex overflow-x taxon-subcategories">
|
|
11
11
|
<% child_taxons.each_with_index.map do |subcategory, index| %>
|
|
12
12
|
<%=
|
|
13
13
|
link_to_unless subcategory == taxon,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<%= form_for Spree.user_class.new, as: @user, url: spree.user_path(@user), method: :put do |f| %>
|
|
6
6
|
<%= render partial: 'spree/shared/user_form', locals: { f: f, remember_me_field: false } %>
|
|
7
7
|
<div>
|
|
8
|
-
<%= f.submit Spree.t(:update), class: 'btn btn-lg btn-block btn-primary
|
|
8
|
+
<%= f.submit Spree.t(:update), class: 'btn btn-lg btn-block btn-primary font-weight-bold' %>
|
|
9
9
|
</div>
|
|
10
10
|
<% end %>
|
|
11
11
|
</div>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<dd class="account-page-user-info-item-definition"><%= @user.email %></dd>
|
|
13
13
|
|
|
14
14
|
<div class="d-lg-inline-block account-page-user-info-item-store-credits">
|
|
15
|
-
<p class="my-0 text-
|
|
15
|
+
<p class="my-0 text-center">
|
|
16
16
|
<%= Spree.t(:store_credit_name) %>
|
|
17
17
|
<% @user.available_store_credits(current_store).each do |value| %>
|
|
18
18
|
<br><b class="account-page-user-info-item-store-credits-amount"><%= value %></b>
|
data/config/importmap.rb
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
en:
|
|
2
|
+
spree:
|
|
3
|
+
pdp:
|
|
4
|
+
checkout: Checkout
|
|
5
|
+
description: Description
|
|
6
|
+
details: Details
|
|
7
|
+
products_included_in_promotion: Products included in the promotion
|
|
8
|
+
quantity: Quantity
|
|
9
|
+
view_cart: View cart
|
|
10
|
+
you_may_also_like: You may also like
|
|
11
|
+
plp:
|
|
12
|
+
best_selling: Best Selling
|
|
13
|
+
clear_all: Clear All
|
|
14
|
+
collection: Collection
|
|
15
|
+
color: Color
|
|
16
|
+
done: Done
|
|
17
|
+
default: Default
|
|
18
|
+
filter_by: Filter By
|
|
19
|
+
newest_first: Newest First
|
|
20
|
+
no_results: No results
|
|
21
|
+
no_results_found: No results found
|
|
22
|
+
not_found_filters1: We couldn’t find a match for these filters.
|
|
23
|
+
not_found_filters2: Please try another choose.
|
|
24
|
+
not_found_text1: We couldn’t find products for '%{keywords}'.
|
|
25
|
+
not_found_text2: Please try another search.
|
|
26
|
+
price: Price
|
|
27
|
+
price_high_to_low: Price (High - Low)
|
|
28
|
+
price_low_to_high: Price (Low - High)
|
|
29
|
+
name_a_z: Name (A-Z)
|
|
30
|
+
name_z_a: Name (Z-A)
|
|
31
|
+
result: Result
|
|
32
|
+
results_for: Results For
|
|
33
|
+
size: Size
|
|
34
|
+
sort_by: Sort By
|
|
35
|
+
top_sellers: Top Sellers
|
|
36
|
+
type: Type
|
|
37
|
+
|
|
@@ -23,8 +23,6 @@ module Spree
|
|
|
23
23
|
directory 'homepage', './app/assets/images/homepage'
|
|
24
24
|
# SCSS theming
|
|
25
25
|
template 'variables.scss', './app/assets/stylesheets/spree/frontend/variables/variables.scss'
|
|
26
|
-
# Sprockets 4 manifest
|
|
27
|
-
template 'app/assets/config/manifest.js', force: Rails.env.test?
|
|
28
26
|
# home page template
|
|
29
27
|
directory 'home', './app/views/spree/home'
|
|
30
28
|
end
|
|
@@ -4,7 +4,7 @@ module Spree
|
|
|
4
4
|
preference :additional_filters_partials, :array, default: %w()
|
|
5
5
|
preference :always_put_site_name_in_title, :boolean, default: true
|
|
6
6
|
preference :coupon_codes_enabled, :boolean, default: true # Determines if we show coupon code form at cart and checkout
|
|
7
|
-
preference :http_cache_enabled, :boolean, default:
|
|
7
|
+
preference :http_cache_enabled, :boolean, default: false
|
|
8
8
|
preference :layout, :string, default: 'spree/layouts/spree_application'
|
|
9
9
|
preference :locale, :string, default: nil
|
|
10
10
|
preference :products_filters, :array, default: %w(keywords price sort_by)
|
|
@@ -9,11 +9,15 @@ module Spree
|
|
|
9
9
|
config.action_view.sanitized_allowed_tags = %w(a b del em i ins mark p small strong sub sup)
|
|
10
10
|
config.action_view.sanitized_allowed_attributes = %w(href)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
app.config.assets.precompile += %w[
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
initializer "spree.frontend.assets" do |app|
|
|
13
|
+
app.config.assets.paths << root.join("app/javascript")
|
|
14
|
+
app.config.assets.precompile += %w[ spree_frontend_manifest ]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
initializer 'spree.frontend.importmap', before: 'importmap' do |app|
|
|
18
|
+
app.config.importmap.paths << root.join('config/importmap.rb')
|
|
19
|
+
# https://github.com/rails/importmap-rails?tab=readme-ov-file#sweeping-the-cache-in-development-and-test
|
|
20
|
+
app.config.importmap.cache_sweepers << root.join('app/javascript')
|
|
17
21
|
end
|
|
18
22
|
|
|
19
23
|
initializer 'spree.frontend.environment', before: :load_config_initializers do |_app|
|
data/lib/spree/frontend.rb
CHANGED
|
@@ -3,15 +3,17 @@ require 'spree_api'
|
|
|
3
3
|
|
|
4
4
|
require 'sprockets/railtie'
|
|
5
5
|
|
|
6
|
+
require 'importmap-rails'
|
|
6
7
|
require 'bootstrap'
|
|
7
8
|
require 'glyphicons'
|
|
8
9
|
require 'inline_svg'
|
|
9
10
|
require 'popper_js'
|
|
10
11
|
require 'canonical-rails'
|
|
11
12
|
require 'jquery-rails'
|
|
12
|
-
require 'jsbundling-rails'
|
|
13
13
|
require 'turbo-rails'
|
|
14
|
+
require 'stimulus-rails'
|
|
14
15
|
require 'responders'
|
|
16
|
+
require 'active_link_to'
|
|
15
17
|
|
|
16
18
|
require 'spree/frontend/middleware/seo_assist'
|
|
17
19
|
require 'spree/frontend/engine'
|
data/spree_frontend.gemspec
CHANGED
|
@@ -4,19 +4,19 @@ require_relative 'lib/spree/frontend/version'
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.platform = Gem::Platform::RUBY
|
|
6
6
|
s.name = 'spree_frontend'
|
|
7
|
-
s.version = Spree::Frontend
|
|
8
|
-
s.authors = ['Sean Schofield', 'Spark Solutions']
|
|
7
|
+
s.version = Spree::Frontend::VERSION
|
|
8
|
+
s.authors = ['Sean Schofield', 'Spark Solutions Sp. z o.o.', 'Vendo Connect Inc.']
|
|
9
9
|
s.email = 'hello@spreecommerce.org'
|
|
10
|
-
s.summary = '
|
|
10
|
+
s.summary = 'Spree Commerce Storefront built with Rails and Turbo/Hotwire'
|
|
11
11
|
s.description = s.summary
|
|
12
12
|
s.homepage = 'https://spreecommerce.org'
|
|
13
13
|
s.license = 'BSD-3-Clause'
|
|
14
14
|
|
|
15
15
|
s.metadata = {
|
|
16
|
-
"bug_tracker_uri" => "https://github.com/spree/
|
|
17
|
-
"changelog_uri" => "https://github.com/spree/
|
|
18
|
-
"documentation_uri" => "https://
|
|
19
|
-
"source_code_uri" => "https://github.com/spree/
|
|
16
|
+
"bug_tracker_uri" => "https://github.com/spree/spree_rails_frontend/issues",
|
|
17
|
+
"changelog_uri" => "https://github.com/spree/spree_rails_frontend/releases/tag/v#{s.version}",
|
|
18
|
+
"documentation_uri" => "https://docs.spreecommerce.org/",
|
|
19
|
+
"source_code_uri" => "https://github.com/spree/spree_rails_frontend/tree/v#{s.version}",
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
s.required_ruby_version = '>= 3.0'
|
|
@@ -25,21 +25,23 @@ Gem::Specification.new do |s|
|
|
|
25
25
|
s.require_path = 'lib'
|
|
26
26
|
s.requirements << 'none'
|
|
27
27
|
|
|
28
|
-
s.add_dependency 'spree_api', "
|
|
29
|
-
s.add_dependency 'spree_core', "
|
|
28
|
+
s.add_dependency 'spree_api', "~> 4.7"
|
|
29
|
+
s.add_dependency 'spree_core', "~> 4.7"
|
|
30
30
|
|
|
31
31
|
s.add_dependency 'babel-transpiler', '~> 0.7'
|
|
32
32
|
s.add_dependency 'bootstrap', '~> 4.0'
|
|
33
33
|
s.add_dependency 'glyphicons', '~> 1.0'
|
|
34
34
|
s.add_dependency 'canonical-rails', '~> 0.2', '>= 0.2.10'
|
|
35
35
|
s.add_dependency 'inline_svg', '~> 1.5'
|
|
36
|
-
s.add_dependency 'jsbundling-rails'
|
|
37
36
|
s.add_dependency 'jquery-rails', '~> 4.3'
|
|
38
37
|
s.add_dependency 'sass-rails', '>= 5'
|
|
39
38
|
s.add_dependency 'turbo-rails'
|
|
39
|
+
s.add_dependency 'stimulus-rails'
|
|
40
|
+
s.add_dependency 'importmap-rails'
|
|
40
41
|
s.add_dependency 'responders'
|
|
41
42
|
s.add_dependency 'sprockets', '~> 4.0'
|
|
42
43
|
s.add_dependency 'flag-icons-rails', '~> 3.4'
|
|
44
|
+
s.add_dependency 'active_link_to'
|
|
43
45
|
|
|
44
46
|
s.add_development_dependency 'capybara-accessible'
|
|
45
47
|
end
|