spree_storefront 5.0.0.rc1

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.
Files changed (341) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.md +13 -0
  3. data/Rakefile +15 -0
  4. data/app/assets/config/spree_storefront_manifest.js +6 -0
  5. data/app/assets/stylesheets/storefront_page_builder.css +51 -0
  6. data/app/controllers/concerns/spree/cart_methods.rb +40 -0
  7. data/app/controllers/concerns/spree/locale_urls.rb +23 -0
  8. data/app/controllers/concerns/spree/password_protected.rb +17 -0
  9. data/app/controllers/concerns/spree/theme_concern.rb +29 -0
  10. data/app/controllers/spree/account/addresses_controller.rb +16 -0
  11. data/app/controllers/spree/account/base_controller.rb +20 -0
  12. data/app/controllers/spree/account/newsletter_controller.rb +34 -0
  13. data/app/controllers/spree/account/orders_controller.rb +34 -0
  14. data/app/controllers/spree/account/profile_controller.rb +23 -0
  15. data/app/controllers/spree/account/store_credits_controller.rb +23 -0
  16. data/app/controllers/spree/account/wished_items_controller.rb +45 -0
  17. data/app/controllers/spree/addresses_controller.rb +101 -0
  18. data/app/controllers/spree/checkout_controller.rb +365 -0
  19. data/app/controllers/spree/contacts_controller.rb +46 -0
  20. data/app/controllers/spree/digital_links_controller.rb +48 -0
  21. data/app/controllers/spree/home_controller.rb +5 -0
  22. data/app/controllers/spree/line_items_controller.rb +96 -0
  23. data/app/controllers/spree/newsletter_subscribers_controller.rb +43 -0
  24. data/app/controllers/spree/order_status_controller.rb +32 -0
  25. data/app/controllers/spree/orders_controller.rb +104 -0
  26. data/app/controllers/spree/page_sections_controller.rb +17 -0
  27. data/app/controllers/spree/pages_controller.rb +13 -0
  28. data/app/controllers/spree/password_controller.rb +21 -0
  29. data/app/controllers/spree/policies_controller.rb +17 -0
  30. data/app/controllers/spree/posts_controller.rb +76 -0
  31. data/app/controllers/spree/products_controller.rb +99 -0
  32. data/app/controllers/spree/search_controller.rb +39 -0
  33. data/app/controllers/spree/seo_controller.rb +25 -0
  34. data/app/controllers/spree/settings_controller.rb +68 -0
  35. data/app/controllers/spree/store_controller.rb +247 -0
  36. data/app/controllers/spree/taxonomies_controller.rb +30 -0
  37. data/app/controllers/spree/taxons_controller.rb +46 -0
  38. data/app/controllers/spree/wishlists_controller.rb +19 -0
  39. data/app/finders/spree/storefront/variant_finder.rb +80 -0
  40. data/app/helpers/spree/analytics_helper.rb +28 -0
  41. data/app/helpers/spree/cart_helper.rb +48 -0
  42. data/app/helpers/spree/checkout_analytics_helper.rb +77 -0
  43. data/app/helpers/spree/checkout_helper.rb +58 -0
  44. data/app/helpers/spree/filters_helper.rb +180 -0
  45. data/app/helpers/spree/fonts_helper.rb +58 -0
  46. data/app/helpers/spree/orders_helper.rb +7 -0
  47. data/app/helpers/spree/page_helper.rb +67 -0
  48. data/app/helpers/spree/posts_helper.rb +42 -0
  49. data/app/helpers/spree/products_helper.rb +205 -0
  50. data/app/helpers/spree/storefront_helper.rb +86 -0
  51. data/app/helpers/spree/storefront_locale_helper.rb +42 -0
  52. data/app/helpers/spree/theme_helper.rb +244 -0
  53. data/app/helpers/spree/turbo_helper.rb +13 -0
  54. data/app/helpers/spree/turbo_stream_actions_helper.rb +13 -0
  55. data/app/helpers/spree/wishlist_helper.rb +7 -0
  56. data/app/javascript/spree/storefront/application.js +156 -0
  57. data/app/javascript/spree/storefront/controllers/accordion_controller.js +25 -0
  58. data/app/javascript/spree/storefront/controllers/account_nav_controller.js +10 -0
  59. data/app/javascript/spree/storefront/controllers/card_validation_controller.js +103 -0
  60. data/app/javascript/spree/storefront/controllers/carousel_controller.js +44 -0
  61. data/app/javascript/spree/storefront/controllers/cart_controller.js +10 -0
  62. data/app/javascript/spree/storefront/controllers/checkout_address_book_controller.js +28 -0
  63. data/app/javascript/spree/storefront/controllers/checkout_delivery_controller.js +39 -0
  64. data/app/javascript/spree/storefront/controllers/checkout_promotions_controller.js +28 -0
  65. data/app/javascript/spree/storefront/controllers/checkout_summary_controller.js +46 -0
  66. data/app/javascript/spree/storefront/controllers/clear_input_controller.js +23 -0
  67. data/app/javascript/spree/storefront/controllers/copy_input_controller.js +19 -0
  68. data/app/javascript/spree/storefront/controllers/dropdown_controller.js +14 -0
  69. data/app/javascript/spree/storefront/controllers/header_controller.js +33 -0
  70. data/app/javascript/spree/storefront/controllers/infinite_scroll_controller.js +31 -0
  71. data/app/javascript/spree/storefront/controllers/lightbox_controller.js +138 -0
  72. data/app/javascript/spree/storefront/controllers/mobile_nav_controller.js +17 -0
  73. data/app/javascript/spree/storefront/controllers/modal_controller.js +15 -0
  74. data/app/javascript/spree/storefront/controllers/no_ui_slider_controller.js +55 -0
  75. data/app/javascript/spree/storefront/controllers/pdp_desktop_gallery_controller.js +28 -0
  76. data/app/javascript/spree/storefront/controllers/plp_variant_picker_controller.js +151 -0
  77. data/app/javascript/spree/storefront/controllers/product_form_controller.js +136 -0
  78. data/app/javascript/spree/storefront/controllers/quantity_picker_controller.js +43 -0
  79. data/app/javascript/spree/storefront/controllers/search_suggestions_controller.js +61 -0
  80. data/app/javascript/spree/storefront/controllers/searchable_list_controller.js +25 -0
  81. data/app/javascript/spree/storefront/controllers/slideover_controller.js +40 -0
  82. data/app/javascript/spree/storefront/controllers/sticky_button_controller.js +32 -0
  83. data/app/javascript/spree/storefront/controllers/toggle_menu_controller.js +32 -0
  84. data/app/javascript/spree/storefront/controllers/turbo_stream_form_controller.js +51 -0
  85. data/app/javascript/spree/storefront/controllers/wished_item_controller.js +69 -0
  86. data/app/javascript/spree/storefront/helpers/lazy_load_controllers_with_manifest.js +78 -0
  87. data/app/javascript/spree/storefront/helpers/show_flash_message.js +25 -0
  88. data/app/models/spree/color_names.rb +35 -0
  89. data/app/models/spree/contact.rb +24 -0
  90. data/app/presenters/spree/colors_preview_styles_presenter.rb +84 -0
  91. data/app/presenters/spree/featured_product_presenter.rb +42 -0
  92. data/app/presenters/spree/mega_nav_presenter.rb +55 -0
  93. data/app/views/devise/passwords/edit.html.erb +22 -0
  94. data/app/views/devise/passwords/new.html.erb +16 -0
  95. data/app/views/devise/registrations/_form.html.erb +21 -0
  96. data/app/views/devise/registrations/edit.html.erb +24 -0
  97. data/app/views/devise/registrations/new.html.erb +27 -0
  98. data/app/views/devise/sessions/new.html.erb +25 -0
  99. data/app/views/devise/shared/_links.html.erb +22 -0
  100. data/app/views/layouts/spree/checkout.html.erb +58 -0
  101. data/app/views/layouts/spree/password.html.erb +34 -0
  102. data/app/views/layouts/spree/storefront.html.erb +38 -0
  103. data/app/views/spree/account/wished_items/create.turbo_stream.erb +8 -0
  104. data/app/views/spree/account/wished_items/destroy.turbo_stream.erb +20 -0
  105. data/app/views/spree/addresses/destroy.turbo_stream.erb +1 -0
  106. data/app/views/spree/addresses/edit.html.erb +57 -0
  107. data/app/views/spree/addresses/new.html.erb +71 -0
  108. data/app/views/spree/checkout/_address.html.erb +153 -0
  109. data/app/views/spree/checkout/_button_processing.html.erb +7 -0
  110. data/app/views/spree/checkout/_coupon_code.html.erb +55 -0
  111. data/app/views/spree/checkout/_credit_card.html.erb +12 -0
  112. data/app/views/spree/checkout/_delivery.html.erb +70 -0
  113. data/app/views/spree/checkout/_line_item.html.erb +26 -0
  114. data/app/views/spree/checkout/_line_items.html.erb +7 -0
  115. data/app/views/spree/checkout/_missing_all_line_items.html.erb +17 -0
  116. data/app/views/spree/checkout/_missing_line_items.html.erb +28 -0
  117. data/app/views/spree/checkout/_payment.html.erb +35 -0
  118. data/app/views/spree/checkout/_payment_methods.html.erb +72 -0
  119. data/app/views/spree/checkout/_payment_sources.html.erb +24 -0
  120. data/app/views/spree/checkout/_quick_checkout.html.erb +1 -0
  121. data/app/views/spree/checkout/_sidebar.html.erb +34 -0
  122. data/app/views/spree/checkout/_store_credit.html.erb +21 -0
  123. data/app/views/spree/checkout/_summary.html.erb +116 -0
  124. data/app/views/spree/checkout/_user_account.html.erb +9 -0
  125. data/app/views/spree/checkout/apply_coupon_code.turbo_stream.erb +45 -0
  126. data/app/views/spree/checkout/apply_store_credit.turbo_stream.erb +19 -0
  127. data/app/views/spree/checkout/edit.html.erb +98 -0
  128. data/app/views/spree/checkout/payment/_check.html.erb +0 -0
  129. data/app/views/spree/checkout/payment/_gateway.html.erb +74 -0
  130. data/app/views/spree/checkout/payment/_store_credit.html.erb +13 -0
  131. data/app/views/spree/checkout/remove_coupon_code.turbo_stream.erb +34 -0
  132. data/app/views/spree/checkout/remove_store_credit.turbo_stream.erb +19 -0
  133. data/app/views/spree/checkout/update.turbo_stream.erb +25 -0
  134. data/app/views/spree/home/index.html.erb +1 -0
  135. data/app/views/spree/line_items/create.turbo_stream.erb +13 -0
  136. data/app/views/spree/line_items/destroy.turbo_stream.erb +11 -0
  137. data/app/views/spree/line_items/update.turbo_stream.erb +10 -0
  138. data/app/views/spree/newsletter_subscribers/create.turbo_stream.erb +7 -0
  139. data/app/views/spree/order_status/new.html.erb +16 -0
  140. data/app/views/spree/page_sections/show.html.erb +3 -0
  141. data/app/views/spree/pages/show.html.erb +1 -0
  142. data/app/views/spree/password/show.html.erb +1 -0
  143. data/app/views/spree/posts/index.html.erb +1 -0
  144. data/app/views/spree/posts/related_products.html.erb +7 -0
  145. data/app/views/spree/posts/show.html.erb +1 -0
  146. data/app/views/spree/products/index.html.erb +1 -0
  147. data/app/views/spree/products/index.turbo_stream.erb +1 -0
  148. data/app/views/spree/products/related.html.erb +3 -0
  149. data/app/views/spree/products/show.html.erb +1 -0
  150. data/app/views/spree/search/show.html.erb +6 -0
  151. data/app/views/spree/search/show.turbo_stream.erb +1 -0
  152. data/app/views/spree/search/suggestions.turbo_stream.erb +8 -0
  153. data/app/views/spree/seo/robots.text.erb +31 -0
  154. data/app/views/spree/seo/sitemap.xml.erb +25 -0
  155. data/app/views/spree/shared/_fonts.html.erb +14 -0
  156. data/app/views/spree/shared/_head.html.erb +36 -0
  157. data/app/views/spree/shared/_load_more_products.turbo_stream.erb +7 -0
  158. data/app/views/spree/shared/_product_listing_page.html.erb +11 -0
  159. data/app/views/spree/shared/_products.html.erb +1 -0
  160. data/app/views/spree/taxonomies/show.html.erb +1 -0
  161. data/app/views/spree/taxons/show.html.erb +1 -0
  162. data/app/views/spree/taxons/show.turbo_stream.erb +1 -0
  163. data/app/views/spree/waitlists/create.turbo_stream.erb +9 -0
  164. data/app/views/themes/default/kaminari/storefront/_first_page.html.erb +8 -0
  165. data/app/views/themes/default/kaminari/storefront/_gap.html.erb +8 -0
  166. data/app/views/themes/default/kaminari/storefront/_last_page.html.erb +8 -0
  167. data/app/views/themes/default/kaminari/storefront/_next_page.html.erb +13 -0
  168. data/app/views/themes/default/kaminari/storefront/_page.html.erb +10 -0
  169. data/app/views/themes/default/kaminari/storefront/_paginator.html.erb +27 -0
  170. data/app/views/themes/default/kaminari/storefront/_prev_page.html.erb +13 -0
  171. data/app/views/themes/default/spree/account/_account_nav.html.erb +46 -0
  172. data/app/views/themes/default/spree/account/_order.html.erb +39 -0
  173. data/app/views/themes/default/spree/account/_orders.html.erb +16 -0
  174. data/app/views/themes/default/spree/account/addresses/_address.html.erb +42 -0
  175. data/app/views/themes/default/spree/account/addresses/index.html.erb +28 -0
  176. data/app/views/themes/default/spree/account/newsletter/_newsletter_settings.html.erb +13 -0
  177. data/app/views/themes/default/spree/account/newsletter/edit.html.erb +16 -0
  178. data/app/views/themes/default/spree/account/newsletter/update.html.erb +1 -0
  179. data/app/views/themes/default/spree/account/orders/index.html.erb +24 -0
  180. data/app/views/themes/default/spree/account/orders/show.html.erb +22 -0
  181. data/app/views/themes/default/spree/account/profile/edit.html.erb +36 -0
  182. data/app/views/themes/default/spree/account/store_credits/_store_credit_event.html.erb +29 -0
  183. data/app/views/themes/default/spree/account/store_credits/index.html.erb +31 -0
  184. data/app/views/themes/default/spree/checkout/_footer.html.erb +10 -0
  185. data/app/views/themes/default/spree/checkout/complete.html.erb +84 -0
  186. data/app/views/themes/default/spree/contacts/new.html.erb +23 -0
  187. data/app/views/themes/default/spree/orders/_cart.html.erb +14 -0
  188. data/app/views/themes/default/spree/orders/_empty.html.erb +11 -0
  189. data/app/views/themes/default/spree/orders/_line_item.html.erb +47 -0
  190. data/app/views/themes/default/spree/orders/_line_item_quantity.html.erb +11 -0
  191. data/app/views/themes/default/spree/orders/_summary.html.erb +41 -0
  192. data/app/views/themes/default/spree/orders/edit.html.erb +18 -0
  193. data/app/views/themes/default/spree/orders/show.html.erb +6 -0
  194. data/app/views/themes/default/spree/page_sections/_announcement_bar.html.erb +10 -0
  195. data/app/views/themes/default/spree/page_sections/_custom_code.html.erb +5 -0
  196. data/app/views/themes/default/spree/page_sections/_featured_product.html.erb +136 -0
  197. data/app/views/themes/default/spree/page_sections/_featured_taxon.html.erb +116 -0
  198. data/app/views/themes/default/spree/page_sections/_featured_taxons.html.erb +71 -0
  199. data/app/views/themes/default/spree/page_sections/_footer.html.erb +62 -0
  200. data/app/views/themes/default/spree/page_sections/_header.html.erb +166 -0
  201. data/app/views/themes/default/spree/page_sections/_image_banner.html.erb +57 -0
  202. data/app/views/themes/default/spree/page_sections/_image_with_text.html.erb +66 -0
  203. data/app/views/themes/default/spree/page_sections/_main_password_footer.html.erb +64 -0
  204. data/app/views/themes/default/spree/page_sections/_main_password_header.html.erb +54 -0
  205. data/app/views/themes/default/spree/page_sections/_newsletter.html.erb +47 -0
  206. data/app/views/themes/default/spree/page_sections/_page_title.html.erb +7 -0
  207. data/app/views/themes/default/spree/page_sections/_post_details.html.erb +19 -0
  208. data/app/views/themes/default/spree/page_sections/_post_grid.html.erb +11 -0
  209. data/app/views/themes/default/spree/page_sections/_product_details.html.erb +102 -0
  210. data/app/views/themes/default/spree/page_sections/_product_grid.html.erb +52 -0
  211. data/app/views/themes/default/spree/page_sections/_related_products.html.erb +15 -0
  212. data/app/views/themes/default/spree/page_sections/_rich_text.html.erb +18 -0
  213. data/app/views/themes/default/spree/page_sections/_taxon_banner.html.erb +37 -0
  214. data/app/views/themes/default/spree/page_sections/_taxon_grid.html.erb +103 -0
  215. data/app/views/themes/default/spree/page_sections/_video.html.erb +27 -0
  216. data/app/views/themes/default/spree/page_sections/nav/_desktop.html.erb +49 -0
  217. data/app/views/themes/default/spree/page_sections/nav/_mobile.html.erb +136 -0
  218. data/app/views/themes/default/spree/policies/show.html.erb +11 -0
  219. data/app/views/themes/default/spree/posts/_json_ld.html.erb +20 -0
  220. data/app/views/themes/default/spree/posts/_pagination.html.erb +1 -0
  221. data/app/views/themes/default/spree/posts/_post.html.erb +13 -0
  222. data/app/views/themes/default/spree/products/_add_to_cart_button.html.erb +58 -0
  223. data/app/views/themes/default/spree/products/_add_to_waitlist.html.erb +36 -0
  224. data/app/views/themes/default/spree/products/_add_to_wishlist.html.erb +33 -0
  225. data/app/views/themes/default/spree/products/_breadcrumbs.html.erb +23 -0
  226. data/app/views/themes/default/spree/products/_color_picker.html.erb +19 -0
  227. data/app/views/themes/default/spree/products/_color_swatches.html.erb +61 -0
  228. data/app/views/themes/default/spree/products/_details.html.erb +55 -0
  229. data/app/views/themes/default/spree/products/_featured_image.html.erb +37 -0
  230. data/app/views/themes/default/spree/products/_filters.html.erb +45 -0
  231. data/app/views/themes/default/spree/products/_json_ld.html.erb +38 -0
  232. data/app/views/themes/default/spree/products/_json_ld_list.html.erb +9 -0
  233. data/app/views/themes/default/spree/products/_json_ld_variant.html.erb +10 -0
  234. data/app/views/themes/default/spree/products/_label.html.erb +26 -0
  235. data/app/views/themes/default/spree/products/_media_gallery.html.erb +94 -0
  236. data/app/views/themes/default/spree/products/_price.html.erb +59 -0
  237. data/app/views/themes/default/spree/products/_product.html.erb +62 -0
  238. data/app/views/themes/default/spree/products/_quantity_selector.html.erb +32 -0
  239. data/app/views/themes/default/spree/products/_returns_policy_modal.html.erb +22 -0
  240. data/app/views/themes/default/spree/products/_show_more_button.html.erb +8 -0
  241. data/app/views/themes/default/spree/products/_sort.html.erb +45 -0
  242. data/app/views/themes/default/spree/products/_swiper.html.erb +85 -0
  243. data/app/views/themes/default/spree/products/_tags.html.erb +0 -0
  244. data/app/views/themes/default/spree/products/_variant_options.html.erb +71 -0
  245. data/app/views/themes/default/spree/products/_variant_picker.html.erb +50 -0
  246. data/app/views/themes/default/spree/products/filters/_availability.html.erb +32 -0
  247. data/app/views/themes/default/spree/products/filters/_colors.html.erb +23 -0
  248. data/app/views/themes/default/spree/products/filters/_generic.html.erb +75 -0
  249. data/app/views/themes/default/spree/products/filters/_price.html.erb +35 -0
  250. data/app/views/themes/default/spree/products/filters/_taxons.erb +78 -0
  251. data/app/views/themes/default/spree/search/_suggestions.html.erb +92 -0
  252. data/app/views/themes/default/spree/settings/show.html.erb +32 -0
  253. data/app/views/themes/default/spree/shared/_account_pane.html.erb +28 -0
  254. data/app/views/themes/default/spree/shared/_address.html.erb +35 -0
  255. data/app/views/themes/default/spree/shared/_cart_icon.html.erb +13 -0
  256. data/app/views/themes/default/spree/shared/_cart_pane.html.erb +38 -0
  257. data/app/views/themes/default/spree/shared/_css_variables.html.erb +54 -0
  258. data/app/views/themes/default/spree/shared/_custom_head.html.erb +0 -0
  259. data/app/views/themes/default/spree/shared/_error_messages.html.erb +9 -0
  260. data/app/views/themes/default/spree/shared/_error_messages_without_base_attribute.html.erb +15 -0
  261. data/app/views/themes/default/spree/shared/_flash.html.erb +16 -0
  262. data/app/views/themes/default/spree/shared/_flashes.html.erb +10 -0
  263. data/app/views/themes/default/spree/shared/_json_ld.html.erb +32 -0
  264. data/app/views/themes/default/spree/shared/_line_item_options.html.erb +18 -0
  265. data/app/views/themes/default/spree/shared/_logo.html.erb +42 -0
  266. data/app/views/themes/default/spree/shared/_meta_tags.html.erb +45 -0
  267. data/app/views/themes/default/spree/shared/_order_details.html.erb +106 -0
  268. data/app/views/themes/default/spree/shared/_order_line_item.html.erb +65 -0
  269. data/app/views/themes/default/spree/shared/_order_shipment.html.erb +71 -0
  270. data/app/views/themes/default/spree/shared/_search.html.erb +32 -0
  271. data/app/views/themes/default/spree/shared/_title.html.erb +3 -0
  272. data/app/views/themes/default/spree/shared/_wishlist_icon.html.erb +13 -0
  273. data/app/views/themes/default/spree/shared/icons/_account.html.erb +17 -0
  274. data/app/views/themes/default/spree/shared/icons/_arrow-left.html.erb +8 -0
  275. data/app/views/themes/default/spree/shared/icons/_arrow-right.html.erb +3 -0
  276. data/app/views/themes/default/spree/shared/icons/_bell.html.erb +9 -0
  277. data/app/views/themes/default/spree/shared/icons/_cart.html.erb +10 -0
  278. data/app/views/themes/default/spree/shared/icons/_cart_48.html.erb +6 -0
  279. data/app/views/themes/default/spree/shared/icons/_check.html.erb +4 -0
  280. data/app/views/themes/default/spree/shared/icons/_chevron.html.erb +15 -0
  281. data/app/views/themes/default/spree/shared/icons/_chevron_down.html.erb +5 -0
  282. data/app/views/themes/default/spree/shared/icons/_chevron_right.html.erb +15 -0
  283. data/app/views/themes/default/spree/shared/icons/_chevron_up.html.erb +3 -0
  284. data/app/views/themes/default/spree/shared/icons/_close.html.erb +9 -0
  285. data/app/views/themes/default/spree/shared/icons/_cross.html.erb +16 -0
  286. data/app/views/themes/default/spree/shared/icons/_delete.html.erb +3 -0
  287. data/app/views/themes/default/spree/shared/icons/_delivery.html.erb +5 -0
  288. data/app/views/themes/default/spree/shared/icons/_disabled.html.erb +13 -0
  289. data/app/views/themes/default/spree/shared/icons/_edit.html.erb +3 -0
  290. data/app/views/themes/default/spree/shared/icons/_facebook.html.erb +16 -0
  291. data/app/views/themes/default/spree/shared/icons/_filter.html.erb +8 -0
  292. data/app/views/themes/default/spree/shared/icons/_heart.html.erb +12 -0
  293. data/app/views/themes/default/spree/shared/icons/_info.html.erb +7 -0
  294. data/app/views/themes/default/spree/shared/icons/_instagram.html.erb +18 -0
  295. data/app/views/themes/default/spree/shared/icons/_lock.html.erb +13 -0
  296. data/app/views/themes/default/spree/shared/icons/_menu.html.erb +10 -0
  297. data/app/views/themes/default/spree/shared/icons/_minus.html.erb +5 -0
  298. data/app/views/themes/default/spree/shared/icons/_pinch.html.erb +6 -0
  299. data/app/views/themes/default/spree/shared/icons/_pinterest.html.erb +8 -0
  300. data/app/views/themes/default/spree/shared/icons/_plus.html.erb +17 -0
  301. data/app/views/themes/default/spree/shared/icons/_return.html.erb +11 -0
  302. data/app/views/themes/default/spree/shared/icons/_search.html.erb +17 -0
  303. data/app/views/themes/default/spree/shared/icons/_spinner.html.erb +1 -0
  304. data/app/views/themes/default/spree/shared/icons/_spotify.html.erb +8 -0
  305. data/app/views/themes/default/spree/shared/icons/_tiktok.html.erb +9 -0
  306. data/app/views/themes/default/spree/shared/icons/_twitter.html.erb +16 -0
  307. data/app/views/themes/default/spree/shared/icons/_youtube.html.erb +9 -0
  308. data/app/views/themes/default/spree/shared/icons/_zoom.html.erb +10 -0
  309. data/app/views/themes/default/spree/wishlists/_no_wished_items.html.erb +10 -0
  310. data/app/views/themes/default/spree/wishlists/_wished_item.html.erb +38 -0
  311. data/app/views/themes/default/spree/wishlists/show.html.erb +17 -0
  312. data/config/i18n-tasks.yml +176 -0
  313. data/config/importmap.rb +22 -0
  314. data/config/initializers/assets.rb +1 -0
  315. data/config/initializers/heroicon.rb +10 -0
  316. data/config/locales/en.yml +76 -0
  317. data/config/routes.rb +88 -0
  318. data/lib/generators/spree/storefront/install/install_generator.rb +45 -0
  319. data/lib/generators/spree/storefront/install/templates/application.tailwind.css +1760 -0
  320. data/lib/generators/spree/storefront/install/templates/dev +16 -0
  321. data/lib/generators/spree/storefront/install/templates/tailwind.config.js +128 -0
  322. data/lib/generators/spree/storefront/theme/templates/model.rb.tt +12 -0
  323. data/lib/generators/spree/storefront/theme/theme_generator.rb +41 -0
  324. data/lib/spree/storefront/configuration.rb +11 -0
  325. data/lib/spree/storefront/engine.rb +51 -0
  326. data/lib/spree/storefront/testing_support/capybara_utils.rb +13 -0
  327. data/lib/spree/storefront.rb +16 -0
  328. data/lib/spree_storefront.rb +1 -0
  329. data/vendor/colornames.json +1 -0
  330. data/vendor/javascript/@kanety--stimulus-accordion.js +4 -0
  331. data/vendor/javascript/@stimulus-components--carousel.js +4 -0
  332. data/vendor/javascript/card-validator.js +4 -0
  333. data/vendor/javascript/credit-card-type.js +4 -0
  334. data/vendor/javascript/headroom.js.js +19 -0
  335. data/vendor/javascript/nouislider.js +4 -0
  336. data/vendor/javascript/photoswipe--dist--photoswipe-lightbox.esm.js.js +667 -0
  337. data/vendor/javascript/photoswipe.js +1675 -0
  338. data/vendor/javascript/stimulus-read-more.js +4 -0
  339. data/vendor/javascript/stimulus-scroll-to.js +4 -0
  340. data/vendor/javascript/swiper--bundle.js +4 -0
  341. metadata +567 -0
@@ -0,0 +1,92 @@
1
+ <% loaded ||= false %>
2
+ <% taxons ||= [] %>
3
+ <% product_limit ||= 20 %>
4
+ <% products ||= [] %>
5
+ <% has_more ||= products.any? && products.count > product_limit %>
6
+
7
+ <div class="bg-background w-full h-full flex flex-col">
8
+ <div class="uppercase block py-4 lg:py-6 border-b border-default w-full font-semibold text-sm tracking-widest">
9
+ <h3 class="page-container"><%= Spree.t(:top_suggestions) %></h3>
10
+ </div>
11
+ <div class="flex flex-col md:grid md:grid-cols-4 grid-rows-[1fr_min-content] w-full page-container h-full">
12
+ <% if loaded %>
13
+ <div class="flex flex-col justify-between md:!border-r border-default md:h-full md:w-full animate-fadeIn relative border-b md:!border-b-0 w-auto -mx-4">
14
+ <div class="flex flex-col md:pr-6 mb-4">
15
+ <h3 class="text-sm uppercase px-4 py-6"><%= Spree.t(:categories) %></h3>
16
+ <% if taxons.any? %>
17
+ <% taxons.limit(5).each do |taxon| %>
18
+ <%= link_to spree.nested_taxons_path(taxon), class: "leading-snug flex justify-between w-full p-4 hover:bg-accent" do %>
19
+ <%= taxon.name %>
20
+ <%= render 'spree/shared/icons/chevron_right' %>
21
+ <% end %>
22
+ <% end %>
23
+ <% end %>
24
+ </div>
25
+ <% if has_more %>
26
+ <div class="fixed md:sticky py-6 px-4 bottom-0 left-0 bg-accent w-full z-[60]">
27
+ <%= link_to spree.search_path(q: query), class: "btn-primary text-center uppercase flex items-baseline justify-center" do %>
28
+ <span class="whitespace-nowrap"><%= Spree.t(:search_all) %> "</span>
29
+ <span class="whitespace-nowrap overflow-ellipsis w-min max-w-[12ch] overflow-hidden inline"><%= query %></span>
30
+ <span>"</span>
31
+ <% end %>
32
+ </div>
33
+ <% end %>
34
+ </div>
35
+ <div class="md:pl-[3.75rem] py-6 w-full h-full md:col-span-3 animate-fadeIn">
36
+ <% if products.present? %>
37
+ <div>
38
+ <%= render 'spree/products/swiper',
39
+ section: theme_layout_sections['header'],
40
+ products: products.limit(product_limit),
41
+ desktop_slides: 3,
42
+ heading: Spree.t(:products),
43
+ pagination: 'top',
44
+ heading_class: "text-sm uppercase !leading-4 -mb-4 lg:mb-0 tracking-widest" %>
45
+ </div>
46
+ <% else %>
47
+ <p class="text-center text-sm text-neutral font-bold">
48
+ <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Product)) %>.
49
+ </p>
50
+ <% end %>
51
+ </div>
52
+
53
+ <% if has_more && taxons.none? %>
54
+ <div class="fixed md:relative md:col-span-2 lg:col-span-1 py-6 px-10 bottom-0 left-0 bg-accent w-full z-[60]">
55
+ <%= link_to spree.search_path(q: query), class: "btn-primary text-center uppercase flex items-baseline justify-center" do %>
56
+ <span class="whitespace-nowrap"><%= Spree.t(:search_all) %> "</span>
57
+ <span class="whitespace-nowrap overflow-ellipsis w-min max-w-[12ch] overflow-hidden inline"><%= query %></span>
58
+ <span>"</span>
59
+ <% end %>
60
+ </div>
61
+ <% end %>
62
+
63
+ <% else %>
64
+ <div class="flex flex-col p-4 md:border-r1 border-default pl-4 gap-2 md:h-full w-full">
65
+ <% 5.times do %>
66
+ <div class="block w-full animate-pulse bg-accent h-6"></div>
67
+ <% end %>
68
+ </div>
69
+ <div class='grid grid-cols-1 lg:grid-cols-12 gap-4 lg:gap-6 px-4 md:px-[3.75rem] py-6 w-full h-full md:col-span-3 animate-pulse'>
70
+ <div class='lg:col-span-12 flex justify-between flex-col overflow-hidden'>
71
+ <div class='grid gap-4 lg:gap-6 grid-cols-8 lg:grid-cols-12'>
72
+ <div class='col-span-6 lg:col-span-4'>
73
+ <div class='aspect-1 bg-accent w-full'></div>
74
+ <div class='h-6 mt-2 w-32 bg-accent rounded'></div>
75
+ <div class='h-8 mt-2 w-16 bg-accent rounded'></div>
76
+ </div>
77
+ <div class='col-span-2 lg:col-span-4 flex flex-col h-full overflow-hidden'>
78
+ <div class='h-full lg:aspect-1 bg-accent w-full'></div>
79
+ <div class='h-6 mt-2 w-32 bg-accent rounded shrink-0'></div>
80
+ <div class='h-8 mt-2 w-16 bg-accent rounded shrink-0'></div>
81
+ </div>
82
+ <div class='hidden col-span-2 lg:col-span-4 lg:flex flex-col h-full overflow-hidden'>
83
+ <div class='h-full lg:aspect-1 bg-accent w-full'></div>
84
+ <div class='h-6 mt-2 w-32 bg-accent rounded shrink-0'></div>
85
+ <div class='h-8 mt-2 w-16 bg-accent rounded shrink-0'></div>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ <% end %>
91
+ </div>
92
+ </div>
@@ -0,0 +1,32 @@
1
+ <%= turbo_frame_tag :settings_modal do %>
2
+ <div
3
+ data-modal-target="container"
4
+ data-action="click->modal#closeBackground keyup@window->modal#closeWithKeyboard"
5
+ class="currency-and-locale-modal hidden animate-fadeIn fixed inset-0 overflow-y-auto flex items-end md:items-center justify-center z-[9999] h-dvh w-full"
6
+ style="animation-duration: 150ms;">
7
+ <div class="w-full lg:w-[600px] relative h-auto lg:max-h-screen flex justify-center flex-col gap-4 bg-background p-5 ">
8
+ <button
9
+ type="button"
10
+ data-action="modal#close"
11
+ class="absolute top-5 right-5">
12
+ <%= render 'spree/shared/icons/close' %>
13
+ </button>
14
+ <h3 class="text-lg font-bold"><%= Spree.t("i18n.localization_settings") %></h3>
15
+ <%= form_with url: spree.settings_path, method: :put, class: 'flex flex-col gap-4', data: {turbo: false} do |f| %>
16
+ <% if should_render_currency_dropdown? %>
17
+ <div class="flex flex-col gap-2">
18
+ <%= f.label :switch_to_currency, Spree.t(:currency), class: 'text-xs text-neutral-600' %>
19
+ <%= f.select :switch_to_currency, options_for_select(supported_currency_options, current_currency) %>
20
+ </div>
21
+ <% end %>
22
+ <% if should_render_locale_dropdown? %>
23
+ <div class="flex flex-col gap-2">
24
+ <%= f.label :switch_to_locale, Spree.t("i18n.language"), class: 'text-xs text-neutral-600' %>
25
+ <%= f.select :switch_to_locale, options_for_select(supported_locales_options, current_locale) %>
26
+ </div>
27
+ <% end %>
28
+ <%= f.submit Spree.t("actions.save"), class: 'btn-primary' %>
29
+ <% end %>
30
+ </div>
31
+ </div>
32
+ <% end %>
@@ -0,0 +1,28 @@
1
+ <div
2
+ id='account-pane'
3
+ data-turbo-permanent
4
+ data-slideover-account-target='overlay'
5
+ class='fixed inset-0 flex flex-row-reverse z-50 transition-opacity hidden'
6
+ >
7
+ <div class='fixed inset-0'>
8
+ <div data-action='click->slideover-account#toggle' class='absolute inset-0 bg-background opacity-75'></div>
9
+ </div>
10
+ <div
11
+ id='slideover-account'
12
+ data-slideover-account-target='menu'
13
+ class='relative sidebar-pane flex-1 !flex flex-col w-full bg-background text-text md:border-l border-default transition ease-in-out duration-300 translate-x-full'
14
+ >
15
+ <div class='p-4 gap-4 flex-shrink-0 flex items-center justify-between border-b border-default z-50'>
16
+ <button
17
+ data-action='slideover-account#toggle'
18
+ class='flex items-center justify-center rounded-full focus:outline-none focus:bg-background'
19
+ aria-label='Close account sidebar'
20
+ >
21
+ <%= render 'spree/shared/icons/cross' %>
22
+ </button>
23
+ <span class='text-xl font-medium uppercase leading-loose'><%= Spree.t(:account) %></span>
24
+ <span></span>
25
+ </div>
26
+ <%= turbo_frame_tag "login", src: spree_login_path, loading: "lazy" %>
27
+ </div>
28
+ </div>
@@ -0,0 +1,35 @@
1
+ <% cache [*spree_base_cache_scope.call(address), address.user] do %>
2
+ <div class="text-sm">
3
+ <div class="mb-1"><%= address.full_name %></div>
4
+ <% unless address.company.blank? %>
5
+ <div class="org">
6
+ <%= address.company %>
7
+ </div>
8
+ <% end %>
9
+ <div class="adr">
10
+ <div class="street-address-line">
11
+ <%= address.street %>
12
+ </div>
13
+ <div class="local">
14
+ <span class="locality"><%= address.city %></span>,
15
+ <span class="region"><%= address.state_text %></span>
16
+ <span class="postal-code"><%= address.zipcode %></span>
17
+ <span class="country-name"><%= address.country.try(:iso3) %></span>
18
+ </div>
19
+ </div>
20
+ <% if address.user %>
21
+ <div class="flex flex-wrap gap-2 mt-3">
22
+ <% if address.id == address.user.ship_address_id %>
23
+ <div class="bg-accent border border-default rounded-full px-3 py-2 text-xs">
24
+ <%= Spree.t(:default_shipping_address) %>
25
+ </div>
26
+ <% end %>
27
+ <% if address.id == address.user.bill_address_id %>
28
+ <div class="bg-accent border border-default rounded-full px-3 py-2 text-xs">
29
+ <%= Spree.t(:default_billing_address) %>
30
+ </div>
31
+ <% end %>
32
+ </div>
33
+ <% end %>
34
+ </div>
35
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <%= turbo_frame_tag "cart-icon-#{current_order&.item_count}", target: '_top' do %>
2
+ <%= link_to spree.cart_path,
3
+ class: 'relative block w-6',
4
+ id: "cart-pane-link",
5
+ data: { action: 'click->slideover#toggle click@window->slideover#hide' },
6
+ onclick: 'event.preventDefault()' do %>
7
+ <%= render 'spree/shared/icons/cart' %>
8
+ <span class='cart-counter w-full text-[8px] font-extrabold absolute top-[10px] text-center'>
9
+ <%= current_order.item_count if current_order&.item_count&.positive? %>
10
+ </span>
11
+ <span class='sr-only'><%= Spree.t('storefront.cart.items_in_cart') %>, <%= Spree.t('storefront.cart.view_bag') %></span>
12
+ <% end %>
13
+ <% end %>
@@ -0,0 +1,38 @@
1
+ <!-- begin sidebar/slideover -->
2
+ <div
3
+ id="cart-pane"
4
+ data-slideover-target='overlay'
5
+ class='fixed inset-0 flex flex-row-reverse z-50 transition-opacity hidden'
6
+ >
7
+ <div class='fixed inset-0'>
8
+ <div data-action='click->slideover#toggle' class='absolute inset-0 bg-background opacity-75'></div>
9
+ </div>
10
+ <div
11
+ id='slideover-cart'
12
+ data-slideover-target='menu'
13
+ class='relative sidebar-pane flex-1 !flex flex-col w-full bg-background text-text md:border-l border-default transition ease-in-out duration-300 translate-x-full'
14
+ >
15
+ <div class='p-4 gap-4 flex-shrink-0 flex items-center justify-between border-b border-default z-50'>
16
+ <%= button_tag(
17
+ type: 'button',
18
+ data: { action: 'slideover#toggle' },
19
+ class: 'flex items-center justify-center rounded-full focus:outline-none focus:bg-background',
20
+ aria: { label: 'Close sidebar' }
21
+ ) do %>
22
+ <%= render 'spree/shared/icons/close' %>
23
+ <% end %>
24
+ <span class='text-xl font-medium uppercase leading-loose'><%= Spree.t(:cart) %></span>
25
+ <span class='relative block w-6'>
26
+ <%= render 'spree/shared/icons/cart' %>
27
+ <span class='cart-counter w-full text-[8px] font-extrabold absolute top-[10px] text-center'>
28
+ <%= current_order.item_count if current_order.present? && current_order.item_count.to_i > 0 %>
29
+ </span>
30
+ <span class='sr-only'><%= Spree.t('storefront.cart.items_in_cart') %>, <%= Spree.t('storefront.cart.view_bag') %></span>
31
+ </span>
32
+ </div>
33
+ <div class='flex-1 h-0 overflow-y-auto'>
34
+ <%= turbo_frame_tag :cart_contents, class: 'cart-contents', src: spree.cart_path, loading: :lazy %>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ <!-- end sidebar/slideover -->
@@ -0,0 +1,54 @@
1
+ <% cache_unless page_builder_enabled?, spree_base_cache_scope.call(current_theme) do %>
2
+ <style data-turbo-track="reload">
3
+ <%= theme_setting(:custom_font_css_import) if theme_setting(:custom_font_css_import).present? %>
4
+
5
+ :root {
6
+ --primary: <%= theme_setting(:primary_color) %>;
7
+ --accent: <%= theme_setting(:accent_color) %>;
8
+ --danger: <%= theme_setting(:danger_color) %>;
9
+ --success: <%= theme_setting(:success_color) %>;
10
+ --neutral: <%= theme_setting(:neutral_color) %>;
11
+
12
+ --background: <%= theme_setting(:background_color) %>;
13
+ --text: <%= theme_setting(:text_color) %>;
14
+
15
+ --border-default-color: <%= theme_setting(:border_color) %>;
16
+ --border-default-width: <%= theme_setting(:border_width) %>px;
17
+ --border-default-radius: <%= theme_setting(:border_radius) %>px;
18
+
19
+ /* --border-default-shadow: <%= "#{theme_setting(:border_shadow_horizontal_offset)}px #{theme_setting(:border_shadow_vertical_offset)}px #{theme_setting(:border_shadow_blur)}px rgba(0, 0, 0, #{theme_setting(:border_shadow_opacity)})" %>; */
20
+ --button: <%= theme_setting(:button_background_color) || theme_setting(:primary_color) %>;
21
+ --button-rgb: <%= theme_setting_rgb_components(:button_background_color) || theme_setting_rgb_components(:primary_color) %>;
22
+ --button-text: <%= theme_setting(:button_text_color) %>;
23
+ --button-border-radius: <%= theme_setting(:button_border_radius) %>px;
24
+ --button-border-width: <%= theme_setting(:button_border_thickness) %>px;
25
+ --button-border-color: <%= theme_setting(:button_border_color).presence %>;
26
+
27
+ --button-hover: <%= theme_setting(:button_hover_background_color) || theme_setting(:button_background_color) || theme_setting(:primary_color)%>;
28
+ --button-hover-text: <%= theme_setting(:button_hover_text_color) || theme_setting(:button_text_color) || theme_setting(:background_color)%>;
29
+
30
+ --secondary-button: <%= theme_setting(:secondary_button_background_color) || theme_setting(:background_color) %>;
31
+ --secondary-button-text: <%= theme_setting(:secondary_button_text_color) || theme_setting(:button_background_color) || theme_setting(:primary_color) %>;
32
+ --secondary-button-hover: <%= theme_setting(:secondary_button_hover_background_color) || theme_setting(:button_background_color) || theme_setting(:primary_color) %>;
33
+ --secondary-button-hover-text: <%= theme_setting(:secondary_button_hover_text_color) || theme_setting(:background_color) %>;
34
+
35
+ --input: <%= theme_setting(:input_border_color) || theme_setting(:border_color) %>;
36
+ --input-bg: <%= theme_setting(:input_background_color) %>;
37
+ --input-text: <%= theme_setting(:input_text_color) %>;
38
+ --input-focus-bg: <%= theme_setting(:input_focus_background_color) || theme_setting(:input_background_color) %>;
39
+ --input-border-radius: <%= theme_setting(:input_border_radius) %>px;
40
+
41
+ --neutral-50: #F3F3F3;
42
+ --neutral-100: #EAEAEA;
43
+ --neutral-200: #D4D4D4;
44
+ --neutral-300: #B3B3B3;
45
+ --neutral-400: #999999;
46
+ --neutral-500: #808080;
47
+ --neutral-600: #666666;
48
+ --neutral-700: #4D4D4D;
49
+ --neutral-800: #333333;
50
+ --neutral-900: #1A1A1A;
51
+ --accent-100: #FBFAF8;
52
+ }
53
+ </style>
54
+ <% end %>
@@ -0,0 +1,9 @@
1
+ <% if target && target.errors.any? %>
2
+ <div id="errorExplanation" class="alert-error text-center mb-4 p-2">
3
+ <ul>
4
+ <% target.errors.full_messages.each do |msg| %>
5
+ <li><%= msg %></li>
6
+ <% end %>
7
+ </ul>
8
+ </div>
9
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <% if target && target.errors.any? %>
2
+ <div id="errorExplanation" class="alert-error text-center mb-4 p-2">
3
+ <ul>
4
+ <% target.errors.messages.each do |msg| %>
5
+ <li>
6
+ <% if msg[0] != :base && !msg[0].to_s.ends_with?(".base") %>
7
+ <%= target.errors.full_messages_for(msg[0]).to_sentence %>
8
+ <% else %>
9
+ <%= msg[1].flatten.to_sentence %>
10
+ <% end %>
11
+ </li>
12
+ <% end %>
13
+ </ul>
14
+ </div>
15
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <% if for_template || (key.present? && value.present?) %>
2
+ <div class="pointer-events-none w-full">
3
+ <div data-controller="alert" data-alert-hide-class="translate-x-[500px] opacity-0" class="ease-in-out duration-500 w-full relative pointer-events-auto <%= tailwind_classes_for(key) %>">
4
+ <div class="p-2">
5
+ <p class="text-sm lg:text-base font-medium text-center uppercase text-text flash-message">
6
+ <%= value %>
7
+ </p>
8
+ <button data-action="alert#close" class="absolute top-2 right-2 h-[22px] lg:h-6">
9
+ <svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
10
+ <path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"/>
11
+ </svg>
12
+ </button>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <template id="flashMessage">
2
+ <%= render partial: 'spree/shared/flash', locals: { key: nil, value: nil, for_template: true } %>
3
+ </template>
4
+ <div id="flashes" class="fixed z-[9999] w-full top-0">
5
+ <% if flash.any? %>
6
+ <% flash.each do |key, value| %>
7
+ <%= render partial: 'spree/shared/flash', locals: { key: key, value: value, for_template: false } %>
8
+ <% end %>
9
+ <% end %>
10
+ </div>
@@ -0,0 +1,32 @@
1
+ <% cache spree_base_cache_scope.call(current_store) do %>
2
+ <script type="application/ld+json">
3
+ {
4
+ "@context": "https://schema.org",
5
+ "@type": "Organization",
6
+ "url": <%= current_store.formatted_url_or_custom_domain.to_json.html_safe %>,
7
+ "sameAs": <%= current_store.social_links.to_json.html_safe %>,
8
+ <% if current_store.logo && current_store.logo&.attached? && current_store.logo&.variable? %>
9
+ "logo": <%= main_app.cdn_image_url(current_store.logo.variant(spree_image_variant_options(resize_to_fill: [500, 500]))).to_json.html_safe %>,
10
+ <% end %>
11
+ "name": <%= current_store.name.to_json.html_safe %>,
12
+ "email": <%= current_store.customer_support_email.to_json.html_safe %>
13
+ }
14
+ </script>
15
+ <% end %>
16
+
17
+ <% if canonical_path.include?('search') %>
18
+ <% potential_action_target = "#{canonical_href(current_store.url_or_custom_domain)}?q={search_term_string}" %>
19
+ <script type="application/ld+json">
20
+ {
21
+ "@context": "https://schema.org",
22
+ "@type": "WebSite",
23
+ "name": <%= current_store.name.to_json.html_safe %>,
24
+ "potentialAction": {
25
+ "@type": "SearchAction",
26
+ "target": <%= potential_action_target.to_json.html_safe %>,
27
+ "query-input": "required name=search_term_string"
28
+ },
29
+ "url": <%= current_store.formatted_url_or_custom_domain.to_json.html_safe %>
30
+ }
31
+ </script>
32
+ <% end %>
@@ -0,0 +1,18 @@
1
+ <% line_item.variant.option_values.select { |ov| ov.option_type.color? }.each do |option| %>
2
+ <div>
3
+ <input class="hidden color-input" value="<%= option.name %>" >
4
+ <div class="label-container h-[30px] border border-default p-0.5 inline-flex items-center hover:border-dashed hover:border-primary">
5
+ <div class="color-preview w-[24px] h-[24px]"></div>
6
+ <div class="text-sm px-2">
7
+ <%= option.presentation %>
8
+ </div>
9
+ </div>
10
+ </div>
11
+ <% end %>
12
+ <% line_item.variant.option_values.reject { |ov| ov.option_type.color? }.each do |option| %>
13
+ <div>
14
+ <div class="h-[30px] border border-default px-2 inline-flex items-center hover:border-dashed hover:border-primary text-sm">
15
+ <%= option.presentation %>
16
+ </div>
17
+ </div>
18
+ <% end %>
@@ -0,0 +1,42 @@
1
+ <% logo ||= current_store.logo %>
2
+ <% height ||= 64 %>
3
+ <% logo_css ||= '' %>
4
+
5
+ <%= link_to spree.root_path, id: 'site-logo' do %>
6
+ <span class='sr-only'><%= current_store.name %></span>
7
+ <% if logo.present? && logo.attached? && logo.variable? %>
8
+ <% aspect_ratio = as_aspect_ratio(logo) %>
9
+ <% logo_style = "aspect-ratio: #{aspect_ratio};" %>
10
+
11
+ <% if aspect_ratio.to_f > 10 %>
12
+ <% mobile_class = "h-[16px]" %>
13
+ <% desktop_class = "md:h-[32px]" %>
14
+ <% elsif aspect_ratio.to_f > 5 %>
15
+ <% mobile_class = "h-[25px]" %>
16
+ <% desktop_class = "md:h-[32px]" %>
17
+ <% elsif aspect_ratio.to_f < 3 %>
18
+ <% mobile_class = "h-[32px]" %>
19
+ <% desktop_class = "md:h-[64px]" %>
20
+ <% else %>
21
+ <% mobile_class = "h-[32px]" %>
22
+ <% end %>
23
+
24
+ <% if defined?(height) && height > 0 %>
25
+ <% logo_style += "--desktop-height: #{height}px;" %>
26
+ <% cdn_height = height %>
27
+ <% desktop_class = "custom-desktop-height" %>
28
+ <% elsif aspect_ratio.to_f < 3 %>
29
+ <% cdn_height = 64 %>
30
+ <% else %>
31
+ <% cdn_height = 32 %>
32
+ <% end %>
33
+
34
+ <% img_class = "w-auto #{mobile_class} #{desktop_class} #{logo_css}" %>
35
+
36
+ <% variant_options = spree_image_variant_options(resize_to_fit: [nil, cdn_height * 3]) %>
37
+
38
+ <%= image_tag main_app.cdn_image_url(logo.variant(variant_options)), class: img_class, alt: current_store.name, style: logo_style, height: cdn_height %>
39
+ <% else %>
40
+ <h1 class='text-lg uppercase text-center'><%= current_store.name %></h1>
41
+ <% end %>
42
+ <% end %>
@@ -0,0 +1,45 @@
1
+ <% unless current_store.prefers_index_in_search_engines? %>
2
+ <meta name="robots" content="noindex, nofollow">
3
+ <% end %>
4
+
5
+ <% og_title = title.presence || current_store.name %>
6
+ <% og_url = canonical_href(current_store.url_or_custom_domain) %>
7
+ <% og_type = 'website' %>
8
+ <% og_description = page_description.presence || current_store.description.presence || current_store.name %>
9
+
10
+ <% if @product %>
11
+ <% og_type = 'product' %>
12
+ <% elsif @article %>
13
+ <% og_type = 'article' %>
14
+ <% end %>
15
+
16
+ <meta name="description" content="<%= h(og_description) %>">
17
+
18
+ <meta property="og:site_name" content="<%= current_store.name %>">
19
+ <meta property="og:url" content="<%= og_url %>">
20
+ <meta property="og:title" content="<%= h(og_title) %>">
21
+ <meta property="og:type" content="<%= og_type %>">
22
+ <meta property="og:description" content="<%= h(og_description) %>">
23
+
24
+ <% if page_image.present? && page_image.attached? && page_image.variable? %>
25
+ <% image_url = main_app.cdn_image_url(page_image.variant(spree_image_variant_options(resize_to_fill: [1200, 630]))) %>
26
+
27
+ <meta property="og:image" content="<%= image_url %>">
28
+ <meta property="og:image:secure_url" content="<%= image_url %>">
29
+ <meta property="og:image:width" content="1200">
30
+ <meta property="og:image:height" content="630">
31
+ <meta property="og:image:alt" content="<%= title.gsub(current_store.name, '') %>">
32
+ <meta property="twitter:image" content="<%= image_url %>" />
33
+ <% end %>
34
+
35
+ <% if @product && @product.price_in(current_currency).present? %>
36
+ <meta property="og:price:amount" content="<%= @product.price_in(current_currency).amount.to_s %>">
37
+ <meta property="og:price:currency" content="<%= current_order&.currency || current_store.default_currency %>">
38
+ <% end %>
39
+
40
+ <% if current_store.twitter.present? %>
41
+ <meta name="twitter:site" content="<%= '@' + current_store.twitter.split('twitter.com/').last %>">
42
+ <% end %>
43
+ <meta name="twitter:card" content="summary_large_image">
44
+ <meta name="twitter:title" content="<%= h(og_title) %>">
45
+ <meta name="twitter:description" content="<%= h(og_description) %>">
@@ -0,0 +1,106 @@
1
+ <% shipments ||= order.shipments %>
2
+
3
+ <% if order.order_refunded? || order.partially_refunded? %>
4
+ <div class="alert-warning mb-5 py-2 px-3">
5
+ <% i18n_key_suffix = "#{shipments.shipped_but_canceled.any? ? 'refunded' : 'canceled'}.#{order.partially_refunded? ? 'partially' : 'fully'}" %>
6
+
7
+ <% if order.respond_to?(:gift_card) && order.gift_card.present? %>
8
+ <% key = "storefront.refund_action_required_message.order_#{i18n_key_suffix}" %>
9
+ <%= Spree.t(key, customer_support_email: order.store.customer_support_email ) %>
10
+ <% else %>
11
+ <% key = "storefront.refund_action_not_required_message.order_#{i18n_key_suffix}" %>
12
+ <%= Spree.t(key) %>
13
+ <% end %>
14
+ </div>
15
+ <% end %>
16
+
17
+ <p class="mb-6">
18
+ <%= I18n.t('activerecord.attributes.spree/order.completed_at') %> <%= local_time(order.completed_at) %>
19
+ </p>
20
+
21
+ <%== color_options_style_for_line_items(shipments.flat_map(&:line_items)) %>
22
+
23
+ <ul>
24
+ <%= render partial: 'spree/shared/order_shipment', collection: shipments, as: :shipment, cached: spree_base_cache_scope %>
25
+ </ul>
26
+
27
+ <div class="mt-6 bg-accent mb-24">
28
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-6 p-4 lg:p-6 text-sm bg-border bg-accent-100">
29
+ <!-- billing address -->
30
+ <div>
31
+ <div class="uppercase tracking-widest">
32
+ <%= Spree.t(:billing_address) %>
33
+ </div>
34
+ <div class="!leading-[1.375rem] text-neutral-800">
35
+ <%= render 'spree/shared/address', address: order.billing_address %>
36
+ </div>
37
+ </div>
38
+ <!-- payment into -->
39
+ <div class="mb-5 lg:mb-0">
40
+ <div class="uppercase tracking-widest">
41
+ <%= Spree.t(:payment_information) %>
42
+ </div>
43
+ <div class="!leading-[1.375rem] text-neutral-800">
44
+ <%= render collection: order.payments.valid, partial: 'spree/shared/payment', cached: spree_base_cache_scope %>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ <!-- totals/summary -->
49
+ <div class="p-4 lg:p-6 text-sm">
50
+ <div class="flex items-center justify-between py-2">
51
+ <div>
52
+ <%= Spree.t(:subtotal) %>
53
+ </div>
54
+ <div>
55
+ <%= order.display_item_total.to_html %>
56
+ </div>
57
+ </div>
58
+ <div class="flex items-center justify-between py-2">
59
+ <div>
60
+ <%= Spree.t(:shipping) %>
61
+ </div>
62
+ <div>
63
+ <%= order.display_ship_total.to_html %>
64
+ </div>
65
+ </div>
66
+ <% if order.promo_total != 0 %>
67
+ <div class="flex items-center justify-between py-2">
68
+ <div>
69
+ <%= Spree.t(:discount) %>
70
+ </div>
71
+ <div>
72
+ <%= order.display_promo_total.to_html %>
73
+ </div>
74
+ </div>
75
+ <% end %>
76
+ <div class="flex items-center justify-between py-2">
77
+ <div>
78
+ <%= Spree.t(:tax) %>
79
+ </div>
80
+ <div>
81
+ <%= order.display_tax_total.to_html %>
82
+ </div>
83
+ </div>
84
+
85
+ <% if order.respond_to?(:gift_card) && order.gift_card.present? %>
86
+ <div class="flex items-center justify-between py-2">
87
+ <div><%= Spree.t(:gift_card) %></div>
88
+ <div>-<%= order.display_gift_card_total.to_html %></div>
89
+ </div>
90
+ <% elsif order.using_store_credit? %>
91
+ <div class="flex items-center justify-between py-2">
92
+ <div><%= Spree.t(:store_credits) %></div>
93
+ <div><%= order.display_total_applied_store_credit %></div>
94
+ </div>
95
+ <% end %>
96
+
97
+ <div class="flex items-center justify-between text-lg pt-4 font-medium border-default border-t">
98
+ <div>
99
+ <%= Spree.t(:total) %>
100
+ </div>
101
+ <div>
102
+ <%= order.display_total_minus_store_credits.to_html %>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </div>