spree_frontend 4.1.0.rc2 → 4.1.0.rc3
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/app/assets/javascripts/spree/frontend/cart.js +12 -0
- data/app/assets/javascripts/spree/frontend/checkout/address.js +2 -3
- data/app/assets/javascripts/spree/frontend/checkout/shipment.js +16 -4
- data/app/assets/javascripts/spree/frontend/views/spree/layouts/spree_application.js +30 -0
- data/app/assets/javascripts/spree/frontend/views/spree/products/modal_carousel.js +31 -12
- data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/thumbnails.js +77 -37
- data/app/assets/javascripts/spree/frontend/views/spree/shared/nav_bar.js +16 -7
- data/app/assets/javascripts/spree/frontend/views/spree/shared/product_added_modal.js +1 -1
- data/app/assets/stylesheets/spree/frontend/application.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/components-bootstrap/modal.scss +4 -0
- data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +14 -13
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/confirm.scss +5 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/registration.scss +0 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +9 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/products/cart_form.scss +17 -15
- data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/thumbnails.scss +3 -12
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/delete_address_popup.scss +3 -26
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/dropdown.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +2 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/quantity_select.scss +3 -1
- data/app/controllers/spree/products_controller.rb +13 -0
- data/app/controllers/spree/taxons_controller.rb +32 -7
- data/app/helpers/spree/addresses_helper.rb +3 -1
- data/app/helpers/spree/frontend_helper.rb +15 -6
- data/app/views/spree/checkout/_delivery.html.erb +2 -1
- data/app/views/spree/checkout/_summary.html.erb +29 -2
- data/app/views/spree/checkout/edit.html.erb +7 -5
- data/app/views/spree/checkout/registration.html.erb +1 -1
- data/app/views/spree/products/_cart_form.html.erb +2 -2
- data/app/views/spree/products/_filters_desktop.html.erb +3 -3
- data/app/views/spree/products/_filters_mobile.html.erb +7 -7
- data/app/views/spree/products/_gallery_modal.html.erb +2 -2
- data/app/views/spree/products/_sort_desktop.html.erb +2 -2
- data/app/views/spree/products/_sort_mobile.html.erb +2 -2
- data/app/views/spree/shared/_cart.html.erb +0 -2
- data/app/views/spree/shared/_checkout_header.html.erb +1 -1
- data/app/views/spree/shared/_copyright.html.erb +1 -1
- data/app/views/spree/shared/_header.html.erb +1 -1
- data/app/views/spree/shared/_link_to_cart.html.erb +5 -2
- data/app/views/spree/shared/_main_nav_bar.html.erb +3 -3
- data/app/views/spree/shared/_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_option_values.html.erb +1 -1
- data/app/views/spree/shared/_registration.html.erb +1 -1
- data/app/views/spree/shared/carousel/_thumbnails.html.erb +1 -1
- data/app/views/spree/taxons/_subcategories.html.erb +2 -3
- metadata +7 -6
@@ -1,22 +1,27 @@
|
|
1
1
|
module Spree
|
2
2
|
class TaxonsController < Spree::StoreController
|
3
|
+
include Spree::FrontendHelper
|
3
4
|
helper 'spree/products'
|
4
5
|
|
5
|
-
before_action :load_taxon
|
6
|
+
before_action :load_taxon
|
6
7
|
|
7
8
|
respond_to :html
|
8
9
|
|
9
10
|
def show
|
11
|
+
if stale?(etag: etag, last_modified: last_modified, public: true)
|
12
|
+
load_products
|
13
|
+
end
|
10
14
|
end
|
11
15
|
|
12
16
|
def product_carousel
|
13
|
-
if
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
+
if stale?(etag: carousel_etag, last_modified: last_modified, public: true)
|
18
|
+
load_products
|
19
|
+
if @products.any?
|
20
|
+
render template: 'spree/taxons/product_carousel', layout: false
|
21
|
+
else
|
22
|
+
head :no_content
|
23
|
+
end
|
17
24
|
end
|
18
|
-
|
19
|
-
fresh_when etag: "product-carousel/#{@taxon.cache_key_with_version}", last_modified: @taxon.updated_at.utc, public: true
|
20
25
|
end
|
21
26
|
|
22
27
|
private
|
@@ -33,5 +38,25 @@ module Spree
|
|
33
38
|
@searcher = build_searcher(params.merge(taxon: @taxon.id, include_images: true))
|
34
39
|
@products = @searcher.retrieve_products
|
35
40
|
end
|
41
|
+
|
42
|
+
def etag
|
43
|
+
[
|
44
|
+
store_etag,
|
45
|
+
@taxon,
|
46
|
+
available_option_types_cache_key,
|
47
|
+
filtering_params_cache_key
|
48
|
+
]
|
49
|
+
end
|
50
|
+
|
51
|
+
def carousel_etag
|
52
|
+
[
|
53
|
+
store_etag,
|
54
|
+
@taxon
|
55
|
+
]
|
56
|
+
end
|
57
|
+
|
58
|
+
def last_modified
|
59
|
+
@taxon.updated_at&.utc
|
60
|
+
end
|
36
61
|
end
|
37
62
|
end
|
@@ -7,10 +7,12 @@ module Spree
|
|
7
7
|
yield
|
8
8
|
else
|
9
9
|
is_required = Spree::Address.required_fields.include?(method)
|
10
|
+
method_name = I18n.t("activerecord.attributes.spree/address.#{method}")
|
11
|
+
required = Spree.t(:required)
|
10
12
|
form.text_field(method,
|
11
13
|
class: [is_required ? 'required' : nil, 'spree-flat-input'].compact,
|
12
14
|
required: is_required,
|
13
|
-
placeholder:
|
15
|
+
placeholder: is_required ? "#{method_name} #{required}" : method_name)
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -11,13 +11,14 @@ module Spree
|
|
11
11
|
return '' if current_page?('/') || taxon.nil?
|
12
12
|
|
13
13
|
separator = raw(separator)
|
14
|
-
crumbs = [content_tag(:li, content_tag(:span, link_to(content_tag(:span, Spree.t(:home), itemprop: 'name'), spree.root_path, itemprop: 'url') + separator, itemprop: 'item'), itemscope: 'itemscope', itemtype: 'https://schema.org/ListItem', itemprop: 'itemListElement', class: 'breadcrumb-item')]
|
14
|
+
crumbs = [content_tag(:li, content_tag(:span, link_to(content_tag(:span, Spree.t(:home), itemprop: 'name'), spree.root_path, itemprop: 'url') + separator, itemprop: 'item'), itemscope: 'itemscope', itemtype: 'https://schema.org/ListItem', itemprop: 'itemListElement', itemid: spree.root_path, class: 'breadcrumb-item', position: 0)]
|
15
15
|
if taxon
|
16
|
-
|
17
|
-
crumbs << content_tag(:li, content_tag(:span, link_to(content_tag(:span,
|
18
|
-
crumbs << content_tag(:li, content_tag(:span, content_tag(:span,
|
16
|
+
ancestors = taxon.ancestors.where.not(parent_id: nil)
|
17
|
+
crumbs << ancestors.each_with_index.map { |ancestor, index| content_tag(:li, content_tag(:span, link_to(content_tag(:span, ancestor.name, itemprop: 'name'), seo_url(ancestor, params: permitted_product_params), itemprop: 'url', itemid: seo_url(ancestor, params: permitted_product_params), position: index + 1) + separator, itemprop: 'item'), itemscope: 'itemscope', itemtype: 'https://schema.org/ListItem', itemprop: 'itemListElement', itemid: seo_url(ancestor, params: permitted_product_params), class: 'breadcrumb-item', position: index + 1) }
|
18
|
+
crumbs << content_tag(:li, content_tag(:span, link_to(content_tag(:span, taxon.name, itemprop: 'name'), seo_url(taxon, params: permitted_product_params), itemprop: 'url', itemid: seo_url(taxon, params: permitted_product_params), position: ancestors.size + 1) + separator, itemprop: 'item'), class: 'breadcrumb-item', itemscope: 'itemscope', itemtype: 'https://schema.org/ListItem', itemprop: 'itemListElement', itemid: seo_url(taxon, params: permitted_product_params), position: ancestors.size + 1)
|
19
|
+
crumbs << content_tag(:li, content_tag(:span, content_tag(:span, product.name) + separator, itemid: spree.product_path(product, taxon_id: taxon.try(:id)), position: ancestors.size + 2), class: 'breadcrumb-item', itemid: spree.product_path(product, taxon_id: taxon.try(:id)), position: ancestors.size + 2) if product
|
19
20
|
else
|
20
|
-
crumbs << content_tag(:li, content_tag(:span, Spree.t(:products), itemprop: 'item'), class: 'active', itemscope: 'itemscope', itemtype: 'https://schema.org/ListItem', itemprop: 'itemListElement')
|
21
|
+
crumbs << content_tag(:li, content_tag(:span, Spree.t(:products), itemprop: 'item'), class: 'active', itemscope: 'itemscope', itemtype: 'https://schema.org/ListItem', itemprop: 'itemListElement', position: 1)
|
21
22
|
end
|
22
23
|
crumb_list = content_tag(:ol, raw(crumbs.flatten.map(&:mb_chars).join), class: 'breadcrumb', itemscope: 'itemscope', itemtype: 'https://schema.org/BreadcrumbList')
|
23
24
|
content_tag(:nav, crumb_list, id: 'breadcrumbs', class: 'col-12 mt-1 mt-sm-3 mt-lg-4', aria: { label: 'breadcrumb' })
|
@@ -205,8 +206,16 @@ module Spree
|
|
205
206
|
available_option_types.map(&:filter_param).concat(static_filters)
|
206
207
|
end
|
207
208
|
|
209
|
+
def filtering_params_cache_key
|
210
|
+
params.permit(*filtering_params)&.reject { |_, v| v.blank? }&.to_s
|
211
|
+
end
|
212
|
+
|
213
|
+
def available_option_types_cache_key
|
214
|
+
@available_option_types_cache_key ||= Spree::OptionType.maximum(:updated_at)&.utc&.to_i
|
215
|
+
end
|
216
|
+
|
208
217
|
def available_option_types
|
209
|
-
@available_option_types ||= Rails.cache.fetch(
|
218
|
+
@available_option_types ||= Rails.cache.fetch("available-option-types/#{available_option_types_cache_key}") do
|
210
219
|
Spree::OptionType.includes(:option_values).to_a
|
211
220
|
end
|
212
221
|
@available_option_types
|
@@ -15,7 +15,8 @@
|
|
15
15
|
rate.id,
|
16
16
|
data: {
|
17
17
|
behavior: 'shipping-method-selector',
|
18
|
-
cost: rate.display_cost
|
18
|
+
cost: rate.display_cost,
|
19
|
+
tax: rate.display_tax_amount
|
19
20
|
} %>
|
20
21
|
<span class="spree-radio-label-custom-input"></span>
|
21
22
|
<span class="rate-name"><%= rate.name %></span>
|
@@ -13,13 +13,40 @@
|
|
13
13
|
|
14
14
|
<% order.all_adjustments.nonzero.tax.eligible.group_by(&:label).each do |label, adjustments| %>
|
15
15
|
<div class="d-table-cell"><%= label %></div>
|
16
|
-
|
16
|
+
<% tax_total = Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %>
|
17
|
+
<div class="d-table-cell text-right"
|
18
|
+
data-hook='tax-total'
|
19
|
+
data-currency='<%= Money::Currency.find(order.currency).symbol %>'
|
20
|
+
data-non-shipment-tax='<%= adjustments.reject{ |adj| adj.adjustable_type== 'Spree::Shipment'}.sum(&:amount) %>'
|
21
|
+
thousands-separator='<%= tax_total.thousands_separator %>'
|
22
|
+
decimal-mark='<%= tax_total.decimal_mark %>'
|
23
|
+
precision='<%= Money::Currency.find(order.currency).exponent %>'
|
24
|
+
>
|
25
|
+
<%= tax_total.to_html %>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
<% if order.all_adjustments.nonzero.tax.eligible.empty? %>
|
29
|
+
<div class="d-table-cell"><%= Spree::TaxRate.first&.name || Spree.t(:tax) %></div>
|
30
|
+
<div class="d-table-cell text-right"
|
31
|
+
data-hook='tax-total'
|
32
|
+
data-non-shipment-tax='0'
|
33
|
+
>
|
34
|
+
<%= Spree::Money.new(0, currency: order.currency) %>
|
35
|
+
</div>
|
17
36
|
<% end %>
|
18
37
|
|
19
38
|
<% if order.passed_checkout_step?("address") && order.shipments.any? %>
|
20
39
|
<div class="d-table-cell"><%= Spree.t(:shipping) %>:</div>
|
21
40
|
<% shipping_total = Spree::Money.new(order.shipments.to_a.sum(&:cost), currency: order.currency) %>
|
22
|
-
<div class="d-table-cell text-right"
|
41
|
+
<div class="d-table-cell text-right"
|
42
|
+
data-hook='shipping-total'
|
43
|
+
data-currency='<%= Money::Currency.find(order.currency).symbol %>'
|
44
|
+
thousands-separator='<%= shipping_total.thousands_separator %>'
|
45
|
+
decimal-mark='<%= shipping_total.decimal_mark %>'
|
46
|
+
precision='<%= Money::Currency.find(order.currency).exponent %>'
|
47
|
+
>
|
48
|
+
<%= shipping_total.to_html %>
|
49
|
+
</div>
|
23
50
|
|
24
51
|
<% if order.shipment_adjustments.nonzero.exists? %>
|
25
52
|
<% order.shipment_adjustments.nonzero.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
|
@@ -20,11 +20,13 @@
|
|
20
20
|
</div>
|
21
21
|
|
22
22
|
<% unless @order.confirm? %>
|
23
|
-
<div id="checkout-summary" class="col-md-12 col-lg-auto" data-hook="checkout_summary_box">
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
<div id="checkout-summary" class="col-md-12 col-lg-auto h-100" data-hook="checkout_summary_box">
|
24
|
+
<div class="checkout-summary-container position-sticky">
|
25
|
+
<%= render partial: 'summary', locals: { order: @order } %>
|
26
|
+
<div data-hook="buttons">
|
27
|
+
<% submit_label_key = @order.confirm? ? :place_order : :save_and_continue %>
|
28
|
+
<%= submit_tag Spree.t(submit_label_key), class: 'btn btn-primary text-uppercase font-weight-bold w-100 checkout-content-save-continue-button' %>
|
29
|
+
</div>
|
28
30
|
</div>
|
29
31
|
</div>
|
30
32
|
<% end %>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= render partial: 'spree/shared/login' if defined?(spree_login_path) %>
|
6
6
|
</div>
|
7
7
|
<div class="col-xs-12 col-lg-6">
|
8
|
-
<div class="col-lg-11 mx-auto
|
8
|
+
<div class="col-lg-11 mx-auto">
|
9
9
|
<% if defined?(spree_signup_path) %>
|
10
10
|
<%= render partial: 'spree/shared/registration', locals: { registration_button: '' } %>
|
11
11
|
<div class="checkout-registration-styled-or">
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%= render 'cart_form_availability_templates', type: 'out-of-stock' %>
|
15
15
|
</template>
|
16
16
|
|
17
|
-
<% is_product_available_in_currency = product_available_in_currency?
|
17
|
+
<% is_product_available_in_currency = product_available_in_currency? %>
|
18
18
|
<% default_variant = default_variant(@variants) %>
|
19
19
|
|
20
20
|
<%= form_for :order, html: {
|
@@ -27,7 +27,7 @@
|
|
27
27
|
<div id="inside-product-cart-form" data-hook="inside_product_cart_form">
|
28
28
|
<% if is_product_available_in_currency %>
|
29
29
|
<div id="product-price" class="mb-2 text-center text-md-left add-to-cart-form-price" data-hook="product_price">
|
30
|
-
<span class="price selling" content="<%= @
|
30
|
+
<span class="price selling" content="<%= @product_price.to_d %>">
|
31
31
|
<%= display_price(default_variant) %>
|
32
32
|
</span>
|
33
33
|
<span content="<%= current_currency %>"></span>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<% cache base_cache_key + [available_option_types, permitted_params
|
1
|
+
<% cache base_cache_key + [available_option_types, permitted_params] do %>
|
2
2
|
<div id="plp-filters-accordion" class="d-none d-lg-block col-lg-3 pr-5 position-sticky h-100 plp-filters" data-hook="taxon_sidebar_navigation">
|
3
3
|
<% @available_option_types.each do |option_type| %>
|
4
|
-
<div class="w-100
|
4
|
+
<div class="w-100 card plp-filters-card">
|
5
5
|
<% ot_downcase_name = option_type.filter_param %>
|
6
6
|
<% option_type_name = ot_downcase_name.titleize %>
|
7
7
|
|
@@ -29,7 +29,7 @@
|
|
29
29
|
</div>
|
30
30
|
<% end %>
|
31
31
|
|
32
|
-
<div class="w-100
|
32
|
+
<div class="w-100 card plp-filters-card">
|
33
33
|
<div class="card-header <%= 'collapsed' if params[:price].blank? %> px-1 plp-filters-card-header" id="filtersPrice" data-toggle="collapse" data-target="#collapseFilterPrice" aria-expanded="false" aria-controls="collapseFilterPrice" role="heading" aria-level="2">
|
34
34
|
<%= Spree.t('plp.price') %>
|
35
35
|
<%= icon(name: 'plus',
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% is_visible = params[:menu_open] ? 'block' : 'none' %>
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
<div id="filter-by-overlay" class="d-lg-none plp-overlay" style="display: <%= is_visible %>;">
|
4
|
+
<% cache base_cache_key + [available_option_types, permitted_params] do %>
|
5
5
|
<div class="plp-scroll">
|
6
6
|
<div class="container">
|
7
7
|
<div class="plp-overlay-header">
|
@@ -53,10 +53,10 @@
|
|
53
53
|
</div>
|
54
54
|
</div>
|
55
55
|
</div>
|
56
|
+
<% end %>
|
56
57
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
</div>
|
58
|
+
<div class="container position-absolute text-center mb-2 plp-overlay-buttons pt-3">
|
59
|
+
<%= link_to Spree.t('plp.clear_all'), permitted_params.select { |key, value| key == "sort_by"}, class: 'btn spree-btn btn-outline-primary w-100 mb-4' %>
|
60
|
+
<%= link_to Spree.t('plp.done'), permitted_params, class: 'btn btn-primary spree-btn w-100' %>
|
61
61
|
</div>
|
62
|
-
|
62
|
+
</div>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<div class="modal fade" id="picturesModal" tabindex="-1" role="dialog" >
|
2
2
|
<div class="modal-dialog--zoom modal-dialog mw-100 vh-100 mt-0 mb-0" role="document">
|
3
3
|
<div class="modal-content h-100">
|
4
|
-
<div class="modal-body">
|
4
|
+
<div class="modal-body h-100">
|
5
5
|
<button class="modal-close" type="button" class="close" data-dismiss="modal" aria-label="Close">
|
6
6
|
<span aria-hidden="true">✕</span>
|
7
7
|
</button>
|
8
8
|
<div class="d-flex justify-content-center align-items-center product-details-images h-100">
|
9
9
|
<% if @product_images.size > 1 %>
|
10
|
-
<div class="d-none d-sm-block product-details-thumbnails">
|
10
|
+
<div class="h-100 d-none d-sm-block product-details-thumbnails">
|
11
11
|
<%= render 'spree/shared/carousel/thumbnails',
|
12
12
|
images: @product_images,
|
13
13
|
group_id: 'main-product-modal-carousel',
|
@@ -13,8 +13,8 @@
|
|
13
13
|
|
14
14
|
<div class="dropdown-menu text-right plp-sort-dropdown">
|
15
15
|
<ul class="pt-1 plp-sort-dropdown-ul">
|
16
|
-
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by]
|
17
|
-
<%= link_to Spree.t('plp.default'), url_for(permitted_params.merge(sort_by:
|
16
|
+
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by].blank? %>">
|
17
|
+
<%= link_to Spree.t('plp.default'), url_for(permitted_params.merge(sort_by: nil)) %>
|
18
18
|
</li>
|
19
19
|
<li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'newest-first' %>">
|
20
20
|
<%= link_to Spree.t('plp.newest_first'), url_for(permitted_params.merge(sort_by: 'newest-first')) %>
|
@@ -7,8 +7,8 @@
|
|
7
7
|
</div>
|
8
8
|
<div class="plp-overlay-header-border"></div>
|
9
9
|
<ul class="pt-1 plp-overlay-ul">
|
10
|
-
<li class="p-3 plp-overlay-ul-li<%= '--active' if params[:sort_by]
|
11
|
-
<a href="<%= url_for(permitted_params.merge(sort_by:
|
10
|
+
<li class="p-3 plp-overlay-ul-li<%= '--active' if params[:sort_by].blank? %>">
|
11
|
+
<a href="<%= url_for(permitted_params.merge(sort_by: nil)) %>" >
|
12
12
|
<div class="plp-empty-dot">
|
13
13
|
<div class="filled-dot"></div>
|
14
14
|
</div>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<%= link_to Spree.t('back'), spree.cart_path, class: "d-sm-none text-uppercase", method: :get %>
|
11
11
|
</div>
|
12
12
|
<div class="d-flex flex-nowrap align-items-center justify-content-center">
|
13
|
-
<figure class="logo flex-grow-0 flex-xl-grow-0 order-xl-0 header-spree-fluid-logo">
|
13
|
+
<figure class="logo flex-grow-0 flex-xl-grow-0 order-xl-0 header-spree-fluid-logo m-0">
|
14
14
|
<%= logo(Spree::Config[:logo], method: :get) %>
|
15
15
|
</figure>
|
16
16
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="border-
|
1
|
+
<div class="border-top footer-spree-copyright">
|
2
2
|
<div class="container">
|
3
3
|
<div class="d-flex flex-column flex-lg-row align-items-center justify-content-center py-3 footer-spree-copyright-content">
|
4
4
|
<div>Designed and developed by</div>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
height: 16) %>
|
12
12
|
</button>
|
13
13
|
</div>
|
14
|
-
<figure class="logo flex-grow-0 flex-xl-grow-1 order-xl-0 header-spree-fluid-logo">
|
14
|
+
<figure class="logo flex-grow-0 flex-xl-grow-1 order-xl-0 header-spree-fluid-logo m-0">
|
15
15
|
<%= logo %>
|
16
16
|
</figure>
|
17
17
|
<div id="main-nav-bar" class="flex-grow-0 d-none d-xl-block h-100 header-spree-fluid-primary-navigation">
|
@@ -1,2 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<% item_count = simple_current_order&.item_count || 0 %>
|
2
|
+
<% cache [base_cache_key, 'cart-indicator', item_count] do %>
|
3
|
+
<%= render 'spree/shared/cart', class: 'd-none d-xl-inline-block cart-icon--xl', size: 36, item_count: item_count %>
|
4
|
+
<%= render 'spree/shared/cart', class: 'd-xl-none', size: 24, item_count: item_count %>
|
5
|
+
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<ul class="nav h-100 main-nav-bar">
|
3
3
|
<% spree_navigation_data.each do |root| %>
|
4
4
|
<li class="navbar main-nav-bar-dropdown main-nav-bar-category">
|
5
|
-
<%= link_to root[:title], root[:url], class:
|
5
|
+
<%= link_to root[:title], root[:url], class: "p-2 main-nav-bar-item main-nav-bar-category-button" %>
|
6
6
|
<% if root[:items].present? || root[:promo_banners].present? %>
|
7
7
|
<div class="w-100 shadow main-nav-bar-category-dropdown">
|
8
8
|
<div class="container p-0 d-flex justify-content-xl-around mx-auto">
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<ul class="pl-0">
|
18
18
|
<% root[:items].each do |item| %>
|
19
19
|
<li>
|
20
|
-
<%= link_to item[:title], item[:url], class:
|
20
|
+
<%= link_to item[:title], item[:url], class: "text-uppercase main-nav-bar-category-links" %>
|
21
21
|
</li>
|
22
22
|
<% end %>
|
23
23
|
</ul>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<% if root[:promo_banners].present? %>
|
27
27
|
<% root[:promo_banners].each do |promo_banner| %>
|
28
28
|
<%= link_to promo_banner[:url] do %>
|
29
|
-
<div class="category-image
|
29
|
+
<div class="category-image text-center mx-3">
|
30
30
|
<%= main_nav_image(promo_banner[:image], promo_banner[:title]) %>
|
31
31
|
<div class="category-box">
|
32
32
|
<div class="category-box-small-text">
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<% if defined?(spree.account_link_path) %>
|
22
22
|
<li>
|
23
23
|
<div class="dropdown navbar-right-dropdown">
|
24
|
-
<button type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle" aria-label="<%= Spree.t('nav_bar.show_user_menu')%>">
|
24
|
+
<button id="account-button" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle" aria-label="<%= Spree.t('nav_bar.show_user_menu')%>">
|
25
25
|
<%= icon(name: 'person',
|
26
26
|
classes: 'd-none d-xl-inline-block',
|
27
27
|
width: 41.4,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% cache base_cache_key + [ot_downcase_name, params_ot_downcase_name, permitted_params
|
1
|
+
<% cache base_cache_key + [ot_downcase_name, params_ot_downcase_name, permitted_params] do %>
|
2
2
|
<% selected_option_values = params_ot_downcase_name&.split(',')&.map(&:to_i) || [] %>
|
3
3
|
<% option_type.option_values.each do |option_value| %>
|
4
4
|
<% id = option_value.id %>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<% if defined?(spree_signup_path) %>
|
2
|
-
<h3 class="spree-
|
2
|
+
<h3 class="spree-mb-large spree-mt-large spree-header"><%= Spree.t('dont_have_account') %></h3>
|
3
3
|
<%= link_to Spree.t(:sign_up), spree_signup_path, class: "btn btn-block btn-outline-primary spree-btn #{registration_button}" %>
|
4
4
|
<% end %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<% if image_index % per_page == 0 %>
|
14
14
|
<div class="carousel-item product-thumbnails-carousel-item<%= ' active' if image_index == 0 %>">
|
15
15
|
<div class="h-100 d-flex flex-column justify-content-center">
|
16
|
-
<div class="product-thumbnails-carousel-item-content">
|
16
|
+
<div class="product-thumbnails-carousel-item-content py-1">
|
17
17
|
<% end %>
|
18
18
|
<div
|
19
19
|
class="product-thumbnails-carousel-item-single product-thumbnails-carousel-item-single--visible"
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<% cache([base_cache_key, taxon, 'subcategories', permitted_product_params]) do %>
|
2
|
-
<% [taxon.parent, taxon].each do |current_taxon| %>
|
3
|
-
<% child_taxons = [current_taxon, *current_taxon.children] %>
|
4
|
-
|
2
|
+
<% [taxon.parent, taxon].compact.each do |current_taxon| %>
|
3
|
+
<% child_taxons = [current_taxon, *current_taxon.children.where(hide_from_nav: false)] %>
|
5
4
|
<% if current_taxon.level > 0 && child_taxons.size > 1 %>
|
6
5
|
<div class="d-flex justify-content-center position-sticky sticky-top-90px taxon-subcategories-wrapper">
|
7
6
|
<div class="py-1 text-uppercase d-none d-xl-flex overflow-x taxon-subcategories">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_frontend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.0.
|
4
|
+
version: 4.1.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_api
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.1.0.
|
19
|
+
version: 4.1.0.rc3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.1.0.
|
26
|
+
version: 4.1.0.rc3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: spree_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.1.0.
|
33
|
+
version: 4.1.0.rc3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.1.0.
|
40
|
+
version: 4.1.0.rc3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bootstrap
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -340,6 +340,7 @@ files:
|
|
340
340
|
- app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss
|
341
341
|
- app/assets/stylesheets/spree/frontend/views/spree/shared/category_nav_bar.scss
|
342
342
|
- app/assets/stylesheets/spree/frontend/views/spree/shared/delete_address_popup.scss
|
343
|
+
- app/assets/stylesheets/spree/frontend/views/spree/shared/dropdown.scss
|
343
344
|
- app/assets/stylesheets/spree/frontend/views/spree/shared/footer.scss
|
344
345
|
- app/assets/stylesheets/spree/frontend/views/spree/shared/header.scss
|
345
346
|
- app/assets/stylesheets/spree/frontend/views/spree/shared/login.scss
|