spree_storefront 5.0.0.rc1 → 5.0.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/app/controllers/concerns/spree/locale_urls.rb +5 -1
- data/app/controllers/spree/policies_controller.rb +10 -1
- data/app/helpers/spree/checkout_helper.rb +1 -1
- data/app/helpers/spree/storefront_helper.rb +4 -17
- data/app/views/spree/checkout/_line_item.html.erb +14 -16
- data/app/views/spree/shared/_head.html.erb +1 -1
- data/app/views/themes/default/spree/orders/_line_item.html.erb +1 -1
- data/app/views/themes/default/spree/page_sections/_featured_taxon.html.erb +1 -1
- data/app/views/themes/default/spree/page_sections/_featured_taxons.html.erb +2 -2
- data/app/views/themes/default/spree/page_sections/_image_banner.html.erb +7 -7
- data/app/views/themes/default/spree/page_sections/_image_with_text.html.erb +2 -2
- data/app/views/themes/default/spree/page_sections/_newsletter.html.erb +3 -3
- data/app/views/themes/default/spree/page_sections/_post_details.html.erb +1 -1
- data/app/views/themes/default/spree/page_sections/_taxon_banner.html.erb +9 -3
- data/app/views/themes/default/spree/page_sections/nav/_desktop.html.erb +1 -1
- data/app/views/themes/default/spree/page_sections/nav/_mobile.html.erb +1 -1
- data/app/views/themes/default/spree/posts/_json_ld.html.erb +1 -1
- data/app/views/themes/default/spree/posts/_post.html.erb +1 -1
- data/app/views/themes/default/spree/products/_featured_image.html.erb +2 -10
- 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/_json_ld.html.erb +1 -1
- data/app/views/themes/default/spree/shared/_logo.html.erb +1 -1
- data/app/views/themes/default/spree/shared/_meta_tags.html.erb +1 -1
- data/app/views/themes/default/spree/shared/_order_line_item.html.erb +1 -5
- data/config/i18n-tasks.yml +1 -0
- data/config/locales/en.yml +1 -0
- data/lib/spree/storefront/engine.rb +5 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2b9329afb684cf2e9b1373c7b73b848db85f132bbaa6e5c4906a20c0a14de4c
|
4
|
+
data.tar.gz: 2afb59994771463137ee0bebefc6727d160a2701ab54d02f42de9d594bb753fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d423712701926969b368ceb927c5472f7cfafd65cf337f135031696d33e8b36c0f611373d58784df197f580009a97a2990ab321332293d71ce4a2ff1ce2d7d8
|
7
|
+
data.tar.gz: 922e2d4b3743a632c8fd049c5266258ee57e84c3953a30da93e26c913aa909263ca7b2cba4b9f0ba6962e719e9f11a97076947ba1554e6f0cc256f33d13d0bd5
|
@@ -9,7 +9,11 @@ module Spree
|
|
9
9
|
private
|
10
10
|
|
11
11
|
def default_url_options
|
12
|
-
locale =
|
12
|
+
locale = if current_store.default_locale.nil? || current_locale == current_store.default_locale
|
13
|
+
nil
|
14
|
+
else
|
15
|
+
current_locale
|
16
|
+
end
|
13
17
|
|
14
18
|
super.merge(locale: locale, currency: currency_param)
|
15
19
|
end
|
@@ -2,7 +2,16 @@ module Spree
|
|
2
2
|
class PoliciesController < StoreController
|
3
3
|
def show
|
4
4
|
if params[:id].in?(supported_policies)
|
5
|
-
@policy =
|
5
|
+
@policy = case params[:id]
|
6
|
+
when 'privacy_policy'
|
7
|
+
current_store.customer_privacy_policy
|
8
|
+
when 'terms_of_service'
|
9
|
+
current_store.customer_terms_of_service
|
10
|
+
when 'returns_policy'
|
11
|
+
current_store.customer_returns_policy
|
12
|
+
when 'shipping_policy'
|
13
|
+
current_store.customer_shipping_policy
|
14
|
+
end
|
6
15
|
else
|
7
16
|
raise ActiveRecord::RecordNotFound
|
8
17
|
end
|
@@ -29,7 +29,7 @@ module Spree
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def checkout_available_payment_methods
|
32
|
-
@checkout_available_payment_methods ||= @order.
|
32
|
+
@checkout_available_payment_methods ||= @order.collect_frontend_payment_methods.reject(&:store_credit?)
|
33
33
|
end
|
34
34
|
|
35
35
|
def checkout_started?
|
@@ -3,9 +3,9 @@ module Spree
|
|
3
3
|
include BaseHelper
|
4
4
|
include Heroicon::Engine.helpers
|
5
5
|
|
6
|
-
def render_storefront_partials(section)
|
6
|
+
def render_storefront_partials(section, options = {})
|
7
7
|
Rails.application.config.spree_storefront.send(section).map do |partial|
|
8
|
-
render partial
|
8
|
+
render partial, options
|
9
9
|
end.join.html_safe
|
10
10
|
end
|
11
11
|
|
@@ -47,21 +47,8 @@ module Spree
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def as_aspect_ratio(attachment)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
metadata = attachment.metadata
|
54
|
-
aspect_ratio = metadata['aspect_ratio'].presence
|
55
|
-
|
56
|
-
return aspect_ratio if aspect_ratio
|
57
|
-
|
58
|
-
width = metadata['width']&.to_f
|
59
|
-
return unless width
|
60
|
-
|
61
|
-
height = metadata['height']&.to_f
|
62
|
-
return unless height
|
63
|
-
|
64
|
-
width / height
|
50
|
+
Spree::Deprecation.warn('as_aspect_ratio is deprecated. Please use spree_asset_aspect_ratio instead.')
|
51
|
+
spree_asset_aspect_ratio(attachment)
|
65
52
|
end
|
66
53
|
|
67
54
|
def svg_country_icon(country_code)
|
@@ -1,20 +1,18 @@
|
|
1
|
-
<div class="flex justify-between items-center">
|
2
|
-
<div class="
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<
|
13
|
-
|
14
|
-
<p class="text-xs"><%= line_item.options_text %></p>
|
15
|
-
</div>
|
1
|
+
<div class="flex justify-between items-center pt-3">
|
2
|
+
<div class="mr-5 w-[60px] h-[60px] relative rounded bg-accent-100 shrink-0">
|
3
|
+
<span class="rounded-full text-xs text-center font-bold pl-[0.5px] py-1 w-6 text-sidebar-text bg-background absolute -right-2 -top-3">
|
4
|
+
<%= line_item.quantity %>
|
5
|
+
</span>
|
6
|
+
<% image = line_item.variant.default_image %>
|
7
|
+
<% if image.present? && image.attached? && image.variable? %>
|
8
|
+
<%= spree_image_tag(image, class: 'rounded border border-default bg-transparent object-cover object-center', loading: :lazy, width: 60, height: 60) %>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
11
|
+
<div class="flex-1 pr-3 text-sm">
|
12
|
+
<p class="font-bold word-break"><%= line_item.name %></p>
|
13
|
+
<p class="text-xs"><%= line_item.options_text %></p>
|
16
14
|
</div>
|
17
|
-
<div class="font-semibold text-sm text-right">
|
15
|
+
<div class="font-semibold text-sm text-right shrink-0">
|
18
16
|
<% if should_display_compare_at_price?(line_item.variant) %>
|
19
17
|
<span class="line-through text-red-500">
|
20
18
|
<%= Spree::Money.new(line_item.variant.compare_at_amount_in(line_item.currency) * line_item.quantity, currency: line_item.currency) %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<% cache current_store do %>
|
8
8
|
<% if current_store.favicon_image.attached? && current_store.favicon_image.variable? %>
|
9
|
-
<link rel="icon" href="<%=
|
9
|
+
<link rel="icon" href="<%= spree_image_url(current_store.favicon_image, width: 256, height: 256) %>">
|
10
10
|
<% end %>
|
11
11
|
<% end %>
|
12
12
|
|
@@ -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
|
-
<%=
|
8
|
+
<%= spree_image_tag(image, width: 128, height: 128, class: 'object-cover', loading: :lazy) %>
|
9
9
|
<% end %>
|
10
10
|
<% end %>
|
11
11
|
</div>
|
@@ -47,7 +47,7 @@
|
|
47
47
|
<% if section_with_image %>
|
48
48
|
<div class='lg:col-span-5'>
|
49
49
|
<%= link_to spree.nested_taxons_path(section.taxon), data: { turbo_frame: "_top" } do %>
|
50
|
-
<%=
|
50
|
+
<%= spree_image_tag(section.taxon.image, height: 500, width: 500, class: 'h-full w-full object-cover object-center', loading: :lazy) %>
|
51
51
|
<% end %>
|
52
52
|
</div>
|
53
53
|
<% end %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%= page_builder_link_to link, title: link.label, class: 'group block overflow-hidden', target: link.open_in_new_tab.presence && '_blank' do %>
|
15
15
|
<% if link.linkable.image&.attached? && link.linkable.image&.variable? %>
|
16
16
|
<div class="flex space-y-2 flex-col">
|
17
|
-
<%=
|
17
|
+
<%= spree_image_tag(link.linkable.image, 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) %>
|
18
18
|
<span><%= link.label %></span>
|
19
19
|
</div>
|
20
20
|
<% else %>
|
@@ -49,7 +49,7 @@
|
|
49
49
|
<%= page_builder_link_to link, title: link.label, class: 'group block overflow-hidden', target: link.open_in_new_tab.presence && '_blank' do %>
|
50
50
|
<% if link.linkable.image&.attached? && link.linkable.image&.variable? %>
|
51
51
|
<div class="flex space-y-2 flex-col">
|
52
|
-
<%=
|
52
|
+
<%= spree_image_tag(link.linkable.image, 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) %>
|
53
53
|
<span><%= link.label %></span>
|
54
54
|
</div>
|
55
55
|
<% else %>
|
@@ -3,13 +3,13 @@
|
|
3
3
|
<div class="w-full absolute left-0 image-banner--image-wrapper" style="height: <%= section.preferred_height %>px; opacity: <%= section.preferred_overlay_transparency %>%;">
|
4
4
|
<% if section.image.attached? && section.image.variable? %>
|
5
5
|
<picture>
|
6
|
-
<source media="(max-width: 640px)" srcset="<%=
|
7
|
-
<source media="(max-width: 750px)" srcset="<%=
|
8
|
-
<source media="(max-width: 828px)" srcset="<%=
|
9
|
-
<source media="(max-width: 1080px)" srcset="<%=
|
10
|
-
<source media="(max-width: 1200px)" srcset="<%=
|
11
|
-
<source media="(min-width: 1201px)" srcset="<%=
|
12
|
-
<%=
|
6
|
+
<source media="(max-width: 640px)" srcset="<%= spree_image_url(section.image, width: 320, height: nil) %>">
|
7
|
+
<source media="(max-width: 750px)" srcset="<%= spree_image_url(section.image, width: 375, height: nil) %>">
|
8
|
+
<source media="(max-width: 828px)" srcset="<%= spree_image_url(section.image, width: 414, height: nil) %>">
|
9
|
+
<source media="(max-width: 1080px)" srcset="<%= spree_image_url(section.image, width: 540, height: nil) %>">
|
10
|
+
<source media="(max-width: 1200px)" srcset="<%= spree_image_url(section.image, width: 620, height: nil) %>">
|
11
|
+
<source media="(min-width: 1201px)" srcset="<%= spree_image_url(section.image, width: 1000, height: nil) %>">
|
12
|
+
<%= spree_image_tag(section.image, width: 1000, class: "w-full h-full object-cover", loading: "lazy") %>
|
13
13
|
</picture>
|
14
14
|
<% end %>
|
15
15
|
</div>
|
@@ -5,12 +5,12 @@
|
|
5
5
|
<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">
|
6
6
|
<%= page_builder_link_to(section.link, title: section.link&.label, target: (section.link&.open_in_new_tab ? '_blank' : nil)) do %>
|
7
7
|
<% if section.image.present? %>
|
8
|
-
<%= image_tag
|
8
|
+
<%= image_tag spree_image_url(section.image, width: 1000, height: nil),
|
9
9
|
class: "w-full h-full object-cover",
|
10
10
|
loading: :lazy,
|
11
11
|
sizes: "(max-width: 1024px) 100vw, 50vw",
|
12
12
|
srcset: [640, 750, 828, 1080, 1200, 2000].map { |width|
|
13
|
-
"#{
|
13
|
+
"#{spree_image_url(section.image, width: width / 2, height: nil)} #{width}w"
|
14
14
|
}.join(', ')
|
15
15
|
%>
|
16
16
|
<% else %>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<img
|
6
6
|
class="w-full h-full absolute top-0 object-cover z-0"
|
7
7
|
style="opacity: <%= section.preferred_overlay_transparency %>%"
|
8
|
-
src="<%=
|
8
|
+
src="<%= spree_image_url(img, width: 2000, height: nil) %>" />
|
9
9
|
<% end %>
|
10
10
|
<div class="w-full page-container flex flex-col text-center py-5 px-5 z-10">
|
11
11
|
<% section.blocks.includes(:rich_text_text).each do |block| %>
|
@@ -37,8 +37,8 @@
|
|
37
37
|
<% when 'Spree::PageBlocks::Image' %>
|
38
38
|
<div <%= block_attributes(block) %> class="flex justify-center w-full">
|
39
39
|
<% if block.image.attached? && block.image.variable? %>
|
40
|
-
<% image_style = "aspect-ratio: #{
|
41
|
-
<%= image_tag
|
40
|
+
<% image_style = "aspect-ratio: #{spree_asset_aspect_ratio(block.image)}; --desktop-height: #{block.preferred_height}px; --mobile-height: #{block.preferred_mobile_height}px;" %>
|
41
|
+
<%= image_tag spree_image_url(block.image, width: 1000, height: 1000), height: block.preferred_height, width: block.preferred_width, class: "custom-desktop-height custom-mobile-height", style: image_style %>
|
42
42
|
<% end %>
|
43
43
|
</div>
|
44
44
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="page-container">
|
3
3
|
<div class="flex flex-col max-w-3xl m-auto mt-16 first:mt-0">
|
4
4
|
<% if post.image.attached? && post.image.variable? %>
|
5
|
-
<%=
|
5
|
+
<%= spree_image_tag(post.image, height: 400, class: 'h-full w-full object-cover object-center', loading: :lazy, alt: post.title) %>
|
6
6
|
<% end %>
|
7
7
|
|
8
8
|
<h1 class="uppercase text-2xl font-medium mt-4"><%= post.title %></h1>
|
@@ -7,12 +7,18 @@
|
|
7
7
|
<div class="lg:gap-6 lg:grid lg:grid-cols-12">
|
8
8
|
<% if taxon.image.present? %>
|
9
9
|
<div class="flex lg:col-span-7 lg:col-start-6 lg:order-1 lg:items-center lg:justify-end">
|
10
|
-
<% aspect_ratio_style = "aspect-ratio: #{
|
11
|
-
<%=
|
10
|
+
<% aspect_ratio_style = "aspect-ratio: #{spree_asset_aspect_ratio(taxon.image)};" %>
|
11
|
+
<%= spree_image_tag(taxon.image, width: 500, height: 280, alt: taxon.name, class: 'w-full lg:h-[280px] h-full lg:w-auto mb-6', style: aspect_ratio_style, loading: :lazy) %>
|
12
12
|
</div>
|
13
13
|
<% end %>
|
14
14
|
<div class="lg:col-span-5 flex flex-col justify-center items-start gap-1">
|
15
|
-
<div class="text-xs lg:text-sm tracking-widest" style="<%= section_heading_styles(section) %>"
|
15
|
+
<div class="text-xs lg:text-sm tracking-widest" style="<%= section_heading_styles(section) %>">
|
16
|
+
<% if taxon.root? || taxon.parent.root? %>
|
17
|
+
<%= taxon.taxonomy.name.singularize %>
|
18
|
+
<% else%>
|
19
|
+
<%= link_to taxon.parent.name, spree.nested_taxons_path(taxon.parent) %>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
16
22
|
<h1 class="self-stretch text-2xl lg:text-3xl font-medium" style="<%= section_heading_styles(section) %>"><%= taxon.name %></h1>
|
17
23
|
<% description_text = taxon.description.to_plain_text %>
|
18
24
|
<div
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<% cache spree_base_cache_scope.call(block.featured_taxon) do %>
|
29
29
|
<% if block.featured_taxon.image.attached? && block.featured_taxon.image.variable? %>
|
30
30
|
<%= link_to spree_storefront_resource_url(block.featured_taxon), class: "flex flex-col col-start-4" do %>
|
31
|
-
<%=
|
31
|
+
<%= spree_image_tag(block.featured_taxon.image, width: 360, height: 360, class: 'w-full h-auto aspect-1', loading: :lazy, alt: block.featured_taxon.name) %>
|
32
32
|
<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>
|
33
33
|
<% end %>
|
34
34
|
<% end %>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<% cache spree_base_cache_scope.call(block.featured_taxon) do %>
|
25
25
|
<% if block.featured_taxon.image.attached? && block.featured_taxon.image.variable? %>
|
26
26
|
<%= link_to spree_storefront_resource_url(block.featured_taxon), class: "flex w-full pt-4" do %>
|
27
|
-
<%=
|
27
|
+
<%= spree_image_tag(block.featured_taxon.image, width: 140, height: 140, class: 'h-auto aspect-1 w-2/5 max-w-[140px]', loading: :lazy, alt: block.featured_taxon.name) %>
|
28
28
|
<span class="bg-accent w-full flex items-center justify-center header--mega-nav-featured-taxon-title text-sm tracking-widest font-semibold uppercase">
|
29
29
|
<%= Spree.t(:explore_taxon, taxon_name: block.featured_taxon.name) %>
|
30
30
|
</span>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"@context": "https://schema.org",
|
4
4
|
"@type": "BlogPosting",
|
5
5
|
"headline": "<%= post.title %>",
|
6
|
-
"image": <%= post.image.attached? ? [
|
6
|
+
"image": <%= post.image.attached? ? [spree_image_url(post.image, width: 1200, height: 675)].to_json.html_safe : [].to_json.html_safe %>,
|
7
7
|
"datePublished": "<%= post.published_at&.iso8601 %>",
|
8
8
|
"dateModified": "<%= post.updated_at&.iso8601 %>",
|
9
9
|
"author": [
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= link_to spree.post_path(post), class: 'block hover:opacity-70 transition-opacity' do %>
|
3
3
|
<div class="h-[200px] w-full bg-gray-100">
|
4
4
|
<% if post.image.attached? && post.image.variable? %>
|
5
|
-
<%=
|
5
|
+
<%= spree_image_tag(post.image, width: 400, height: 200, class: 'h-full w-full object-cover object-center', loading: :lazy, alt: post.title) %>
|
6
6
|
<% end %>
|
7
7
|
</div>
|
8
8
|
|
@@ -12,24 +12,16 @@
|
|
12
12
|
<% object_class = 'object-contain object-top' %>
|
13
13
|
<% end %>
|
14
14
|
|
15
|
-
<% image_variant_options = spree_image_variant_options(resize_and_pad: [width * 2, height * 2, { alpha: true }]) %>
|
16
|
-
|
17
15
|
<% image_hover_class = object.secondary_image.present? && object.secondary_image.attached? ?
|
18
16
|
"w-full group-hover:opacity-0 transition-opacity duration-500 z-10 relative h-full bg-background product-card !max-h-full #{object_class}" :
|
19
17
|
"w-full h-full !max-h-full #{object_class}" %>
|
20
18
|
|
21
|
-
<%=
|
22
|
-
loading: :lazy,
|
23
|
-
alt: object.default_image.alt,
|
24
|
-
class: image_hover_class %>
|
19
|
+
<%= spree_image_tag(object.default_image, width: width, height: height, loading: :lazy, alt: object.default_image.alt, class: image_hover_class) %>
|
25
20
|
|
26
21
|
<% if object.secondary_image.present? && object.secondary_image.attached? %>
|
27
22
|
<% secondary_image_class = "w-full absolute top-0 left-0 opacity-100 h-full !max-h-full #{object_class}" %>
|
28
23
|
|
29
|
-
<%=
|
30
|
-
loading: :lazy,
|
31
|
-
alt: object.secondary_image.alt,
|
32
|
-
class: secondary_image_class %>
|
24
|
+
<%= spree_image_tag(object.secondary_image, width: width, height: height, loading: :lazy, alt: object.secondary_image.alt, class: secondary_image_class) %>
|
33
25
|
<% end %>
|
34
26
|
</figure>
|
35
27
|
<% else %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
"url": <%= spree.product_url(product).to_json.html_safe %>,
|
8
8
|
<% if product.featured_image %>
|
9
9
|
"image": [
|
10
|
-
<%=
|
10
|
+
<%= spree_image_url(product.featured_image, width: 630, height: 630).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
|
-
<%=
|
24
|
+
<%= spree_image_tag(image, width: 100, height: 100, 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
|
42
|
+
<%= link_to spree_image_url(image, width: 1000, height: 1000), 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
|
-
<%=
|
46
|
+
<%= spree_image_tag(image, width: 1000, height: 1000, 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
|
73
|
+
<%= link_to spree_image_url(image, width: 2000, height: 2000), 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
|
-
<%=
|
77
|
+
<%= spree_image_tag(image, width: 360, height: 360, 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>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
"url": <%= current_store.formatted_url_or_custom_domain.to_json.html_safe %>,
|
7
7
|
"sameAs": <%= current_store.social_links.to_json.html_safe %>,
|
8
8
|
<% if current_store.logo && current_store.logo&.attached? && current_store.logo&.variable? %>
|
9
|
-
"logo": <%=
|
9
|
+
"logo": <%= spree_image_url(current_store.logo, width: 250, height: 250).to_json.html_safe %>,
|
10
10
|
<% end %>
|
11
11
|
"name": <%= current_store.name.to_json.html_safe %>,
|
12
12
|
"email": <%= current_store.customer_support_email.to_json.html_safe %>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= link_to spree.root_path, id: 'site-logo' do %>
|
6
6
|
<span class='sr-only'><%= current_store.name %></span>
|
7
7
|
<% if logo.present? && logo.attached? && logo.variable? %>
|
8
|
-
<% aspect_ratio =
|
8
|
+
<% aspect_ratio = spree_asset_aspect_ratio(logo) %>
|
9
9
|
<% logo_style = "aspect-ratio: #{aspect_ratio};" %>
|
10
10
|
|
11
11
|
<% if aspect_ratio.to_f > 10 %>
|
@@ -22,7 +22,7 @@
|
|
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
|
-
<% image_url =
|
25
|
+
<% image_url = spree_image_url(page_image, width: 1200, height: 630) %>
|
26
26
|
|
27
27
|
<meta property="og:image" content="<%= image_url %>">
|
28
28
|
<meta property="og:image:secure_url" content="<%= image_url %>">
|
@@ -6,11 +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
|
-
<%=
|
10
|
-
image.variant(spree_image_variant_options(resize_to_fit: [256, 256])),
|
11
|
-
),
|
12
|
-
width: 128,
|
13
|
-
loaging: :lazy %>
|
9
|
+
<%= spree_image_tag(image, width: 128, height: 128, loading: :lazy) %>
|
14
10
|
<% end %>
|
15
11
|
<% end %>
|
16
12
|
</div>
|
data/config/i18n-tasks.yml
CHANGED
@@ -147,6 +147,7 @@ ignore_missing:
|
|
147
147
|
ignore_unused:
|
148
148
|
- 'spree.storefront.refund_action_not_required_message.*'
|
149
149
|
- 'spree.storefront.refund_action_required_message.*'
|
150
|
+
- 'spree.storefront.checkout.or_continue_below'
|
150
151
|
|
151
152
|
## Exclude these keys from the `i18n-tasks eq-base' report:
|
152
153
|
# ignore_eq_base:
|
data/config/locales/en.yml
CHANGED
@@ -30,6 +30,7 @@ en:
|
|
30
30
|
one: This item will be removed from your cart because there are no delivery methods available for your address.
|
31
31
|
other: These %{count} items will be removed from your cart because there are no delivery methods available for your address.
|
32
32
|
gift_card_amount_applied: Gift card %{code} applied %{amount} to your order.
|
33
|
+
or_continue_below: or continue below
|
33
34
|
order_already_paid: You don't need to pay anything, just click Place now button to confirm the order.
|
34
35
|
order_success: Your order is confirmed!
|
35
36
|
order_success_message: When your order is ready, you will receive an email confirmation.
|
@@ -14,12 +14,16 @@ module Spree
|
|
14
14
|
:quick_checkout_partials
|
15
15
|
)
|
16
16
|
|
17
|
+
# accessible via Rails.application.config.spree_storefront
|
18
|
+
initializer 'spree.storefront.environment', before: :load_config_initializers do |app|
|
19
|
+
app.config.spree_storefront = Environment.new
|
20
|
+
end
|
21
|
+
|
17
22
|
initializer 'spree.storefront.configuration', before: :load_config_initializers do |_app|
|
18
23
|
Spree::Storefront::Config = Spree::Storefront::Configuration.new
|
19
24
|
end
|
20
25
|
|
21
26
|
initializer 'spree.storefront.assets' do |app|
|
22
|
-
app.config.spree_storefront = Environment.new
|
23
27
|
app.config.assets.paths << root.join('app/javascript')
|
24
28
|
app.config.assets.paths << root.join('vendor/javascript')
|
25
29
|
app.config.assets.precompile += %w[spree_storefront_manifest]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_storefront
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vendo Connect Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.0.
|
19
|
+
version: 5.0.1
|
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: 5.0.
|
26
|
+
version: 5.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: active_link_to
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -542,9 +542,9 @@ licenses:
|
|
542
542
|
- AGPL-3.0-or-later
|
543
543
|
metadata:
|
544
544
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
545
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.0.
|
545
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.0.1
|
546
546
|
documentation_uri: https://docs.spreecommerce.org/
|
547
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.0.
|
547
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.0.1
|
548
548
|
post_install_message:
|
549
549
|
rdoc_options: []
|
550
550
|
require_paths:
|