spree_storefront 5.2.1 → 5.2.2
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/helpers/spree/storefront_helper.rb +1 -0
- data/app/views/spree/checkout/_line_item.html.erb +1 -1
- data/app/views/themes/default/spree/orders/_line_item.html.erb +1 -1
- data/app/views/themes/default/spree/products/_featured_image.html.erb +2 -2
- data/app/views/themes/default/spree/products/_json_ld.html.erb +1 -1
- data/app/views/themes/default/spree/products/_media_gallery.html.erb +5 -5
- data/app/views/themes/default/spree/shared/_meta_tags.html.erb +5 -1
- data/app/views/themes/default/spree/shared/_order_line_item.html.erb +1 -1
- data/lib/generators/spree/storefront/theme/templates/model.rb.tt +7 -4
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 64b94b1d67886671273a88ac37e0e54cd93b1222d1fe43d3b6b4c1f84d94835a
|
|
4
|
+
data.tar.gz: 16661f3a174aeadeed32afac4a5789e8f106a732472b4600e3705572a99cc7a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 866b87dfd43188a3426c0b8ef36b33535f90aa19a4e60bc2299f50c8b7ac2f701aaa905582892362e7ac279c2032e9ffb9179607b4c0bbc2b82b6d850ae9c18a
|
|
7
|
+
data.tar.gz: 435ee840f051fe181f2ca54feb43f3f0c31175cb26c877cc1e0946e7424b94857790810a62123ab90d29f491fb824f780ff695947c0f586509574437c53859c0
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</span>
|
|
6
6
|
<% image = line_item.variant.default_image %>
|
|
7
7
|
<% if image.present? && image.attached? && image.variable? %>
|
|
8
|
-
<%= spree_image_tag(image, class: 'rounded-sm border border-default bg-transparent object-cover object-center', loading: :lazy, width: 64, height: 64) %>
|
|
8
|
+
<%= spree_image_tag(image, class: 'rounded-sm border border-default bg-transparent object-cover object-center', loading: :lazy, variant: :mini, width: 64, height: 64) %>
|
|
9
9
|
<% else %>
|
|
10
10
|
<div class="w-16 h-16 bg-accent border border-default rounded-sm"></div>
|
|
11
11
|
<% end %>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<% image = line_item.variant.default_image %>
|
|
6
6
|
<% if image.present? && image.attached? && image.variable? %>
|
|
7
7
|
<%= link_to spree_storefront_resource_url(line_item.product), data: { 'turbo-frame': '_top' } do %>
|
|
8
|
-
<%= spree_image_tag(image, width: 128, height: 128, class: 'object-cover', loading: :lazy) %>
|
|
8
|
+
<%= spree_image_tag(image, width: 128, height: 128, variant: :small, class: 'object-cover', loading: :lazy) %>
|
|
9
9
|
<% end %>
|
|
10
10
|
<% else %>
|
|
11
11
|
<div class="w-32 h-32 bg-accent"></div>
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
<% image_hover_class = object.secondary_image.present? && object.secondary_image.attached? ?
|
|
13
13
|
"w-full group-hover:opacity-0 transition-opacity duration-500 z-10 relative h-full bg-background product-card !max-h-full #{object_class}" :
|
|
14
14
|
"w-full h-full !max-h-full #{object_class}" %>
|
|
15
|
-
<%= spree_image_tag(object.default_image, width: width, height: height, loading: :lazy, alt: "#{object.name} #{Spree.t('storefront.products.primary_image', default: 'primary image')}", class: image_hover_class) %>
|
|
15
|
+
<%= spree_image_tag(object.default_image, width: width, height: height, variant: :medium, loading: :lazy, alt: "#{object.name} #{Spree.t('storefront.products.primary_image', default: 'primary image')}", class: image_hover_class) %>
|
|
16
16
|
<% if object.secondary_image.present? && object.secondary_image.attached? %>
|
|
17
17
|
<% secondary_image_class = "w-full absolute top-0 left-0 opacity-100 h-full !max-h-full #{object_class}" %>
|
|
18
|
-
<%= spree_image_tag(object.secondary_image, width: width, height: height, loading: :lazy, alt: "#{object.name} #{Spree.t('storefront.products.secondary_image', default: 'secondary image')}", class: secondary_image_class) %>
|
|
18
|
+
<%= spree_image_tag(object.secondary_image, width: width, height: height, variant: :medium, loading: :lazy, alt: "#{object.name} #{Spree.t('storefront.products.secondary_image', default: 'secondary image')}", class: secondary_image_class) %>
|
|
19
19
|
<% end %>
|
|
20
20
|
</figure>
|
|
21
21
|
<% else %>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"url": <%= spree.product_url(product, host: current_store.url_or_custom_domain).to_json.html_safe %>,
|
|
8
8
|
<% if product.featured_image %>
|
|
9
9
|
"image": [
|
|
10
|
-
<%= spree_image_url(product.featured_image,
|
|
10
|
+
<%= spree_image_url(product.featured_image, variant: :large).to_json.html_safe %>
|
|
11
11
|
],
|
|
12
12
|
<% end %>
|
|
13
13
|
<% if product.description.present? %>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
class="relative aspect-1 w-full block "
|
|
22
22
|
id="thumb-desktop-product-image-<%= image.id %>"
|
|
23
23
|
data-turbo-permanent>
|
|
24
|
-
<%= spree_image_tag(image,
|
|
24
|
+
<%= spree_image_tag(image, variant: :small, alt: image_alt(image), class: 'w-full h-full') %>
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
<% end %>
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
class="product-image relative w-full aspect-1"
|
|
40
40
|
id="main-desktop-product-image-<%= image.id %>"
|
|
41
41
|
data-turbo-permanent>
|
|
42
|
-
<%= link_to spree_image_url(image,
|
|
42
|
+
<%= link_to spree_image_url(image, variant: :xlarge), data: { pswp_width: "2000", pswp_height: "2000" } do %>
|
|
43
43
|
<div class="zoom-icon hidden absolute bottom-2 right-2 p-4 bg-background rounded-full opacity-75 hover:opacity-100">
|
|
44
44
|
<%= render 'spree/shared/icons/zoom' %>
|
|
45
45
|
</div>
|
|
46
|
-
<%= spree_image_tag(image,
|
|
46
|
+
<%= spree_image_tag(image, variant: :xlarge, alt: image_alt(image), class: 'w-full h-full') %>
|
|
47
47
|
<% end %>
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
<div class="swiper-wrapper">
|
|
71
71
|
<% images.each do |image| %>
|
|
72
72
|
<div class="swiper-slide aspect-1" id="swiper-slide-<%= image.id %>">
|
|
73
|
-
<%= link_to spree_image_url(image,
|
|
73
|
+
<%= link_to spree_image_url(image, variant: :xlarge), class: "absolute top-2 right-2 p-2 bg-background rounded-full opacity-75 hover:opacity-100", data: { pswp_width: "2000", pswp_height: "2000" } do %>
|
|
74
74
|
<%= render 'spree/shared/icons/zoom' %>
|
|
75
75
|
<% end %>
|
|
76
76
|
<%= render 'spree/products/label', product: product, mobile_pdp: true %>
|
|
77
|
-
<%= spree_image_tag(image,
|
|
77
|
+
<%= spree_image_tag(image, variant: :large, alt: image_alt(image), class: 'h-full w-full object-cover object-center', style: 'min-height: 358px') %>
|
|
78
78
|
</div>
|
|
79
79
|
<% end %>
|
|
80
80
|
</div>
|
|
@@ -22,7 +22,11 @@
|
|
|
22
22
|
<meta property="og:description" content="<%= h(og_description) %>">
|
|
23
23
|
|
|
24
24
|
<% if page_image.present? && page_image.attached? && page_image.variable? %>
|
|
25
|
-
<%
|
|
25
|
+
<% if @product %>
|
|
26
|
+
<% image_url = spree_image_url(page_image, variant: :og_image) %>
|
|
27
|
+
<% else %>
|
|
28
|
+
<% image_url = spree_image_url(page_image, width: 1200, height: 630) %>
|
|
29
|
+
<% end %>
|
|
26
30
|
|
|
27
31
|
<meta property="og:image" content="<%= image_url %>">
|
|
28
32
|
<meta property="og:image:secure_url" content="<%= image_url %>">
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<% image = line_item.variant.default_image %>
|
|
7
7
|
<% if image.present? && image.attached? && image.variable? %>
|
|
8
8
|
<%= link_to spree_storefront_resource_url(line_item.product, relative: true) do %>
|
|
9
|
-
<%= spree_image_tag(image, width: 128, height: 128, loading: :lazy) %>
|
|
9
|
+
<%= spree_image_tag(image, width: 128, height: 128, variant: :small, loading: :lazy) %>
|
|
10
10
|
<% end %>
|
|
11
11
|
<% else %>
|
|
12
12
|
<div class="w-32 h-32 bg-accent"></div>
|
|
@@ -84,10 +84,13 @@ module Spree
|
|
|
84
84
|
preference :border_shadow_blur, :integer, default: 5
|
|
85
85
|
|
|
86
86
|
# PRODUCT IMAGES
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
preference :
|
|
87
|
+
# These defaults match preprocessed variant sizes for optimal performance:
|
|
88
|
+
# Desktop (360x360) → large variant (720x720 at 2x)
|
|
89
|
+
# Mobile (200x200) → medium variant (400x400 at 2x)
|
|
90
|
+
preference :product_listing_image_height, :integer, default: 360
|
|
91
|
+
preference :product_listing_image_width, :integer, default: 360
|
|
92
|
+
preference :product_listing_image_height_mobile, :integer, default: 200
|
|
93
|
+
preference :product_listing_image_width_mobile, :integer, default: 200
|
|
91
94
|
|
|
92
95
|
# Returns an array of available layout section classes for the theme, eg. header, footer, newsletter, etc.
|
|
93
96
|
#
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_storefront
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.2.
|
|
4
|
+
version: 5.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vendo Connect Inc.
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 5.2.
|
|
18
|
+
version: 5.2.2
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 5.2.
|
|
25
|
+
version: 5.2.2
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: active_link_to
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -570,9 +570,9 @@ licenses:
|
|
|
570
570
|
- AGPL-3.0-or-later
|
|
571
571
|
metadata:
|
|
572
572
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
|
573
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.
|
|
573
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.2
|
|
574
574
|
documentation_uri: https://docs.spreecommerce.org/
|
|
575
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.2.
|
|
575
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.2.2
|
|
576
576
|
rdoc_options: []
|
|
577
577
|
require_paths:
|
|
578
578
|
- lib
|