spree_frontend 4.1.0 → 4.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (314) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +120 -0
  3. data/.codeclimate.yml +36 -0
  4. data/.deepsource.toml +19 -0
  5. data/.editorconfig +22 -0
  6. data/.eslintignore +7 -0
  7. data/.eslintrc +36 -0
  8. data/.gem_release.yml +7 -0
  9. data/.github/CONTRIBUTING.md +1 -0
  10. data/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
  11. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  12. data/.github/ISSUE_TEMPLATE.md +39 -0
  13. data/.github/dependabot.yml +32 -0
  14. data/.gitignore +58 -0
  15. data/.rubocop.yml +197 -0
  16. data/.solargraph.yml +20 -0
  17. data/.stylelintignore +4 -0
  18. data/.stylelintrc +6 -0
  19. data/CODE_OF_CONDUCT.md +22 -0
  20. data/Gemfile +57 -3
  21. data/LICENSE +1 -1
  22. data/README.md +89 -0
  23. data/Rakefile +1 -1
  24. data/SECURITY.md +1 -0
  25. data/app/assets/config/spree_frontend_manifest.js +5 -0
  26. data/app/assets/images/arrow-down.svg +12 -0
  27. data/app/assets/images/arrow-right-circle-fill.svg +3 -0
  28. data/app/assets/images/card-image.svg +4 -0
  29. data/app/assets/images/edit.svg +1 -1
  30. data/app/assets/images/favicon.ico +0 -0
  31. data/app/assets/images/file-image.svg +4 -0
  32. data/app/assets/images/global.svg +1 -0
  33. data/app/assets/images/image.svg +4 -0
  34. data/app/assets/images/info.svg +7 -0
  35. data/app/assets/images/logo/spree_50.png +0 -0
  36. data/app/assets/images/logo-spree.png +0 -0
  37. data/app/assets/images/logo.png +0 -0
  38. data/app/assets/images/logo.svg +10 -1
  39. data/app/assets/images/logo@2x.png +0 -0
  40. data/app/assets/images/logo@3x.png +0 -0
  41. data/app/assets/images/noimage/large.png +0 -0
  42. data/app/assets/images/noimage/mini.png +0 -0
  43. data/app/assets/images/noimage/plp.png +0 -0
  44. data/app/assets/images/noimage/plp.svg +16 -0
  45. data/app/assets/images/noimage/product.png +0 -0
  46. data/app/assets/images/noimage/small.png +0 -0
  47. data/app/assets/images/pagination-arrow-right.svg +3 -10
  48. data/app/assets/images/pagination-double-arrow-right.svg +6 -13
  49. data/app/assets/images/plus.svg +1 -1
  50. data/app/assets/images/search.svg +1 -1
  51. data/app/assets/javascripts/spree/frontend/account.js +1 -1
  52. data/app/assets/javascripts/spree/frontend/api/main.js +36 -0
  53. data/app/assets/javascripts/spree/frontend/api/storefront/cart.js +49 -0
  54. data/app/assets/javascripts/spree/frontend/cart.js +24 -2
  55. data/app/assets/javascripts/spree/frontend/checkout/address.js +78 -52
  56. data/app/assets/javascripts/spree/frontend/checkout/address_book.js +38 -40
  57. data/app/assets/javascripts/spree/frontend/checkout/payment.js +63 -23
  58. data/app/assets/javascripts/spree/frontend/checkout/shipment.js +15 -2
  59. data/app/assets/javascripts/spree/frontend/checkout.js +17 -1
  60. data/app/assets/javascripts/spree/frontend/coupon_manager.js +1 -1
  61. data/app/assets/javascripts/spree/frontend/currency.js +44 -0
  62. data/app/assets/javascripts/spree/frontend/locale.es6 +12 -0
  63. data/app/assets/javascripts/spree/frontend/login.js +5 -0
  64. data/app/assets/javascripts/spree/frontend/main.js +78 -0
  65. data/app/assets/javascripts/spree/frontend/main_nav_bar.js +86 -0
  66. data/app/assets/javascripts/spree/frontend/{turbolinks_scroll_fix.js → turbo_scroll_fix.js} +3 -3
  67. data/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js +4 -4
  68. data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +3 -3
  69. data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +67 -18
  70. data/app/assets/javascripts/spree/frontend/views/spree/products/description.js +1 -1
  71. data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +76 -15
  72. data/app/assets/javascripts/spree/frontend/views/spree/products/price_filters.es6 +46 -0
  73. data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +9 -10
  74. data/app/assets/javascripts/spree/frontend/views/spree/shared/product_added_modal.js +7 -0
  75. data/app/assets/javascripts/spree/frontend/views/spree/shared/variant_select.js +93 -0
  76. data/app/assets/javascripts/spree/frontend.js +68 -11
  77. data/app/assets/stylesheets/spree/frontend/application.scss +5 -2
  78. data/app/assets/stylesheets/spree/frontend/components-bootstrap/button.scss +8 -0
  79. data/app/assets/stylesheets/spree/frontend/components-bootstrap/carousel.scss +4 -0
  80. data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +80 -1
  81. data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-base.scss +23 -0
  82. data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-list.scss +265 -0
  83. data/app/assets/stylesheets/spree/frontend/flags/_variables.scss +2 -0
  84. data/app/assets/stylesheets/spree/frontend/flags/flag-icon.scss +3 -0
  85. data/app/assets/stylesheets/spree/frontend/functions.scss +1 -0
  86. data/app/assets/stylesheets/spree/frontend/helpers/spree/frontend_helper.scss +48 -0
  87. data/app/assets/stylesheets/spree/frontend/variables/bootstrap-overrides.scss +2 -2
  88. data/app/assets/stylesheets/spree/frontend/variables/helper-variables.scss +1 -0
  89. data/app/assets/stylesheets/spree/frontend/variables/variables.scss +54 -0
  90. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/confirm.scss +27 -26
  91. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/delivery.scss +6 -0
  92. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +24 -10
  93. data/app/assets/stylesheets/spree/frontend/views/spree/cms_sections/_index.scss +1 -0
  94. data/app/assets/stylesheets/spree/frontend/views/spree/cms_sections/product_buy_bar.scss +20 -0
  95. data/app/assets/stylesheets/spree/frontend/views/spree/home/index.scss +54 -67
  96. data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +4 -3
  97. data/app/assets/stylesheets/spree/frontend/views/spree/orders/show.scss +3 -0
  98. data/app/assets/stylesheets/spree/frontend/views/spree/products/cart_form.scss +8 -0
  99. data/app/assets/stylesheets/spree/frontend/views/spree/products/gallery_modal.scss +7 -0
  100. data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +55 -26
  101. data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +7 -0
  102. data/app/assets/stylesheets/spree/frontend/views/spree/shared/_color_select.scss +10 -9
  103. data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/single.scss +1 -1
  104. data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/thumbnails.scss +1 -0
  105. data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +9 -4
  106. data/app/assets/stylesheets/spree/frontend/views/spree/shared/category_nav_bar.scss +3 -3
  107. data/app/assets/stylesheets/spree/frontend/views/spree/shared/change_store.scss +7 -0
  108. data/app/assets/stylesheets/spree/frontend/views/spree/shared/footer.scss +4 -0
  109. data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +42 -26
  110. data/app/assets/stylesheets/spree/frontend/views/spree/shared/mobile_navigation.scss +34 -3
  111. data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +24 -7
  112. data/app/assets/stylesheets/spree/frontend/views/spree/shared/quantity_select.scss +9 -12
  113. data/app/assets/stylesheets/spree/frontend/views/spree/shared/search_form.scss +12 -0
  114. data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +7 -13
  115. data/app/assets/stylesheets/spree/frontend.css +0 -1
  116. data/app/controllers/concerns/spree/checkout/address_book.rb +9 -7
  117. data/app/controllers/concerns/spree/locale_urls.rb +21 -0
  118. data/app/controllers/spree/addresses_controller.rb +16 -33
  119. data/app/controllers/spree/checkout_controller.rb +15 -13
  120. data/app/controllers/spree/cms_pages_controller.rb +29 -0
  121. data/app/controllers/spree/content_controller.rb +0 -2
  122. data/app/controllers/spree/currency_controller.rb +17 -0
  123. data/app/controllers/spree/errors_controller.rb +11 -0
  124. data/app/controllers/spree/home_controller.rb +38 -1
  125. data/app/controllers/spree/locale_controller.rb +35 -6
  126. data/app/controllers/spree/orders_controller.rb +12 -10
  127. data/app/controllers/spree/products_controller.rb +46 -28
  128. data/app/controllers/spree/store_controller.rb +77 -12
  129. data/app/controllers/spree/taxons_controller.rb +16 -8
  130. data/app/helpers/spree/addresses_helper.rb +64 -12
  131. data/app/helpers/spree/cache_helper.rb +7 -0
  132. data/app/helpers/spree/cms_pages_helper.rb +23 -0
  133. data/app/helpers/spree/frontend_helper.rb +170 -18
  134. data/app/helpers/spree/navigation_helper.rb +81 -4
  135. data/app/helpers/spree/products_filters_helper.rb +168 -0
  136. data/app/helpers/spree/store_helper.rb +41 -0
  137. data/app/helpers/spree/structured_data_helper.rb +6 -2
  138. data/app/helpers/spree/taxons_helper.rb +2 -2
  139. data/app/services/spree/build_localized_redirect_url.rb +141 -0
  140. data/app/views/kaminari/twitter-bootstrap-4/_first_page.html.erb +3 -3
  141. data/app/views/kaminari/twitter-bootstrap-4/_gap.html.erb +2 -2
  142. data/app/views/kaminari/twitter-bootstrap-4/_last_page.html.erb +3 -3
  143. data/app/views/kaminari/twitter-bootstrap-4/_next_page.html.erb +3 -3
  144. data/app/views/kaminari/twitter-bootstrap-4/_page.html.erb +2 -2
  145. data/app/views/kaminari/twitter-bootstrap-4/_paginator.html.erb +2 -2
  146. data/app/views/kaminari/twitter-bootstrap-4/_prev_page.html.erb +3 -3
  147. data/app/views/spree/address/_form.html.erb +26 -27
  148. data/app/views/spree/addresses/_form.html.erb +15 -6
  149. data/app/views/spree/addresses/edit.html.erb +13 -8
  150. data/app/views/spree/addresses/new.html.erb +8 -4
  151. data/app/views/spree/checkout/_address.html.erb +19 -23
  152. data/app/views/spree/checkout/_confirm.html.erb +1 -75
  153. data/app/views/spree/checkout/_credit_card.html.erb +3 -2
  154. data/app/views/spree/checkout/_delivery.html.erb +11 -4
  155. data/app/views/spree/checkout/_delivery_informations.html.erb +51 -0
  156. data/app/views/spree/checkout/_payment.html.erb +5 -24
  157. data/app/views/spree/checkout/_payment_sources.html.erb +17 -0
  158. data/app/views/spree/checkout/_summary.html.erb +22 -19
  159. data/app/views/spree/checkout/edit.html.erb +22 -2
  160. data/app/views/spree/checkout/payment/_gateway.html.erb +2 -2
  161. data/app/views/spree/checkout/registration.html.erb +3 -3
  162. data/app/views/spree/cms_pages/show.html.erb +16 -0
  163. data/app/views/spree/errors/not_found.html.erb +2 -2
  164. data/app/views/spree/home/index.html.erb +17 -123
  165. data/app/views/spree/layouts/checkout.html.erb +3 -1
  166. data/app/views/spree/layouts/spree_application.html.erb +3 -2
  167. data/app/views/spree/locale/index.html.erb +1 -0
  168. data/app/views/spree/orders/_coupon_code.html.erb +3 -4
  169. data/app/views/spree/orders/_line_item.html.erb +4 -4
  170. data/app/views/spree/orders/_line_item_data.html.erb +3 -3
  171. data/app/views/spree/orders/edit.html.erb +2 -3
  172. data/app/views/spree/orders/show.html.erb +2 -72
  173. data/app/views/spree/products/_cart_form.html.erb +5 -2
  174. data/app/views/spree/products/_color_option_type.html.erb +14 -14
  175. data/app/views/spree/products/_description.html.erb +19 -14
  176. data/app/views/spree/products/_filters_desktop.html.erb +80 -40
  177. data/app/views/spree/products/_filters_mobile.html.erb +47 -15
  178. data/app/views/spree/products/_gallery.html.erb +4 -6
  179. data/app/views/spree/products/_gallery_modal.html.erb +4 -6
  180. data/app/views/spree/products/_option_type.html.erb +1 -3
  181. data/app/views/spree/products/_product.html.erb +1 -1
  182. data/app/views/spree/products/_properties.html.erb +6 -4
  183. data/app/views/spree/products/_sort_desktop.html.erb +20 -14
  184. data/app/views/spree/products/_sort_mobile.html.erb +24 -8
  185. data/app/views/spree/products/_thumbnails.html.erb +2 -2
  186. data/app/views/spree/products/index.html.erb +7 -4
  187. data/app/views/spree/products/related.html.erb +11 -5
  188. data/app/views/spree/products/show.html.erb +2 -3
  189. data/app/views/spree/shared/_breadcrumbs.html.erb +2 -2
  190. data/app/views/spree/shared/_carousel_4_products.html.erb +14 -20
  191. data/app/views/spree/shared/_cart.html.erb +1 -1
  192. data/app/views/spree/shared/_checkout_header.html.erb +22 -21
  193. data/app/views/spree/shared/_color_select.html.erb +3 -3
  194. data/app/views/spree/shared/_copyright.html.erb +1 -10
  195. data/app/views/spree/shared/_currency_dropdown.html.erb +13 -0
  196. data/app/views/spree/shared/_delete_address_popup.html.erb +1 -2
  197. data/app/views/spree/shared/_error_messages.html.erb +2 -2
  198. data/app/views/spree/shared/_footer.html.erb +31 -21
  199. data/app/views/spree/shared/_get_started.html.erb +32 -0
  200. data/app/views/spree/shared/_head.html.erb +8 -5
  201. data/app/views/spree/shared/_header.html.erb +4 -4
  202. data/app/views/spree/shared/_internationalization_options.html.erb +31 -0
  203. data/app/views/spree/shared/_line_item.html.erb +3 -3
  204. data/app/views/spree/shared/_link_to_account.html.erb +7 -4
  205. data/app/views/spree/shared/_link_to_cart.html.erb +1 -2
  206. data/app/views/spree/shared/_locale_and_currency.html.erb +6 -0
  207. data/app/views/spree/shared/_locale_dropdown.html.erb +13 -0
  208. data/app/views/spree/shared/_login.html.erb +5 -5
  209. data/app/views/spree/shared/_main_nav_bar.html.erb +69 -45
  210. data/app/views/spree/shared/_mobile_internationalization_options.html.erb +37 -0
  211. data/app/views/spree/shared/_mobile_navigation.html.erb +48 -63
  212. data/app/views/spree/shared/_nav_bar.html.erb +9 -19
  213. data/app/views/spree/shared/_no_product_available.html.erb +1 -1
  214. data/app/views/spree/shared/_option_values.html.erb +2 -21
  215. data/app/views/spree/shared/_order_details.html.erb +117 -174
  216. data/app/views/spree/shared/_paths.html.erb +8 -0
  217. data/app/views/spree/shared/_payment.html.erb +2 -2
  218. data/app/views/spree/shared/_payment_sources.html.erb +2 -2
  219. data/app/views/spree/shared/_product_added_modal.html.erb +3 -3
  220. data/app/views/spree/shared/_properties.html.erb +4 -0
  221. data/app/views/spree/shared/_quantity_select.html.erb +2 -2
  222. data/app/views/spree/shared/_search.html.erb +9 -13
  223. data/app/views/spree/shared/_translations.html.erb +8 -7
  224. data/app/views/spree/shared/carousel/_single.html.erb +9 -14
  225. data/app/views/spree/shared/carousel/_thumbnails.html.erb +35 -39
  226. data/app/views/spree/shared/cms/pages/_edit_mode.html.erb +13 -0
  227. data/app/views/spree/shared/cms/sections/_featured_article.html.erb +27 -0
  228. data/app/views/spree/shared/cms/sections/_hero_image.html.erb +60 -0
  229. data/app/views/spree/shared/cms/sections/_image_gallery.html.erb +171 -0
  230. data/app/views/spree/shared/cms/sections/_product_carousel.html.erb +5 -0
  231. data/app/views/spree/shared/cms/sections/_rich_text_content.html.erb +3 -0
  232. data/app/views/spree/shared/cms/sections/_side_by_side_images.html.erb +118 -0
  233. data/app/views/spree/taxons/_header.html.erb +7 -2
  234. data/app/views/spree/users/_address.html.erb +16 -24
  235. data/app/views/spree/users/_address_controls.html.erb +10 -0
  236. data/app/views/spree/users/show.html.erb +21 -16
  237. data/config/initializers/admin_actions.rb +18 -0
  238. data/config/initializers/assets.rb +4 -13
  239. data/config/initializers/canonical_rails.rb +1 -1
  240. data/config/routes.rb +30 -26
  241. data/lib/generators/spree/frontend/copy_storefront/copy_storefront_generator.rb +1 -7
  242. data/lib/generators/spree/frontend/install/install_generator.rb +34 -0
  243. data/lib/generators/spree/frontend/install/templates/app/assets/config/manifest.js +2 -0
  244. data/lib/generators/spree/frontend/install/templates/vendor/assets/javascripts/spree/frontend/all.js +8 -0
  245. data/lib/generators/spree/frontend/install/templates/vendor/assets/stylesheets/spree/frontend/all.css +9 -0
  246. data/lib/spree/frontend/configuration.rb +18 -0
  247. data/lib/spree/frontend/engine.rb +3 -1
  248. data/lib/spree/frontend/version.rb +9 -0
  249. data/lib/spree/frontend.rb +8 -4
  250. data/license.md +13 -0
  251. data/spec/fixtures/files/store_favicon.ico +0 -0
  252. data/spree_frontend.gemspec +26 -14
  253. data/vendor/assets/javascripts/cleave.js +8 -0
  254. data/vendor/assets/javascripts/fetch.umd.js +531 -0
  255. data/vendor/assets/javascripts/jquery.payment.js +652 -0
  256. data/vendor/assets/javascripts/jsuri.js +458 -0
  257. data/vendor/assets/javascripts/polyfill.min.js +1 -0
  258. metadata +224 -86
  259. data/app/assets/images/homepage/big_category_banner.jpg +0 -0
  260. data/app/assets/images/homepage/big_category_banner_mobile.jpg +0 -0
  261. data/app/assets/images/homepage/big_category_banner_tablet_landscape.jpg +0 -0
  262. data/app/assets/images/homepage/big_category_banner_tablet_portrait.jpg +0 -0
  263. data/app/assets/images/homepage/category_banner_lower.jpg +0 -0
  264. data/app/assets/images/homepage/category_banner_lower_mobile.jpg +0 -0
  265. data/app/assets/images/homepage/category_banner_lower_tablet_landscape.jpg +0 -0
  266. data/app/assets/images/homepage/category_banner_lower_tablet_portrait.jpg +0 -0
  267. data/app/assets/images/homepage/category_banner_upper.jpg +0 -0
  268. data/app/assets/images/homepage/category_banner_upper_mobile.jpg +0 -0
  269. data/app/assets/images/homepage/category_banner_upper_tablet_landscape.jpg +0 -0
  270. data/app/assets/images/homepage/category_banner_upper_tablet_portrait.jpg +0 -0
  271. data/app/assets/images/homepage/main_banner.jpg +0 -0
  272. data/app/assets/images/homepage/main_banner_mobile.jpg +0 -0
  273. data/app/assets/images/homepage/main_banner_tablet_landscape.jpg +0 -0
  274. data/app/assets/images/homepage/main_banner_tablet_portrait.jpg +0 -0
  275. data/app/assets/images/homepage/promo_banner_left.jpg +0 -0
  276. data/app/assets/images/homepage/promo_banner_left_mobile.jpg +0 -0
  277. data/app/assets/images/homepage/promo_banner_left_tablet_landscape.jpg +0 -0
  278. data/app/assets/images/homepage/promo_banner_left_tablet_portrait.jpg +0 -0
  279. data/app/assets/images/homepage/promo_banner_right.jpg +0 -0
  280. data/app/assets/images/homepage/promo_banner_right_mobile.jpg +0 -0
  281. data/app/assets/images/homepage/promo_banner_right_tablet_landscape.jpg +0 -0
  282. data/app/assets/images/homepage/promo_banner_right_tablet_portrait.jpg +0 -0
  283. data/app/assets/images/meganav/promo_banner_left-first-category.jpg +0 -0
  284. data/app/assets/images/meganav/promo_banner_left-second-category.jpg +0 -0
  285. data/app/assets/images/meganav/promo_banner_left-third-category.jpg +0 -0
  286. data/app/assets/images/meganav/promo_banner_right-first-category.jpg +0 -0
  287. data/app/assets/images/meganav/promo_banner_right-second-category.jpg +0 -0
  288. data/app/assets/images/meganav/promo_banner_right-third-category.jpg +0 -0
  289. data/app/assets/images/noimage/big_category_banner.jpg +0 -0
  290. data/app/assets/images/noimage/big_category_banner_mobile.jpg +0 -0
  291. data/app/assets/images/noimage/big_category_banner_tablet_landscape.jpg +0 -0
  292. data/app/assets/images/noimage/big_category_banner_tablet_portrait.jpg +0 -0
  293. data/app/assets/images/noimage/category_banner.jpg +0 -0
  294. data/app/assets/images/noimage/category_banner_mobile.jpg +0 -0
  295. data/app/assets/images/noimage/category_banner_plp.jpg +0 -0
  296. data/app/assets/images/noimage/category_banner_tablet_landscape.jpg +0 -0
  297. data/app/assets/images/noimage/category_banner_tablet_portrait.jpg +0 -0
  298. data/app/assets/images/noimage/main_banner.jpg +0 -0
  299. data/app/assets/images/noimage/main_banner_mobile.jpg +0 -0
  300. data/app/assets/images/noimage/main_banner_tablet_landscape.jpg +0 -0
  301. data/app/assets/images/noimage/main_banner_tablet_portrait.jpg +0 -0
  302. data/app/assets/images/noimage/product_photo.jpg +0 -0
  303. data/app/assets/images/noimage/promo_banner.jpg +0 -0
  304. data/app/assets/images/noimage/promo_banner_megamenu.jpg +0 -0
  305. data/app/assets/images/noimage/promo_banner_mobile.jpg +0 -0
  306. data/app/assets/images/noimage/promo_banner_tablet_landscape.jpg +0 -0
  307. data/app/assets/images/noimage/promo_banner_tablet_portrait.jpg +0 -0
  308. data/app/assets/images/spark-logo@3x.png +0 -0
  309. data/app/assets/stylesheets/spree/frontend/_glyphicons_urls_fix.scss +0 -10
  310. data/app/assets/stylesheets/spree/frontend/address_book.scss +0 -8
  311. data/app/models/spree/frontend_configuration.rb +0 -7
  312. data/app/views/spree/shared/_taxonomies.html.erb +0 -16
  313. /data/app/views/spree/{shared → errors}/forbidden.html.erb +0 -0
  314. /data/app/views/spree/{shared → errors}/unauthorized.html.erb +0 -0
@@ -1,5 +1,5 @@
1
- <% cache [common_product_cache_keys, products&.maximum(:updated_at)&.to_i, id] do %>
2
- <div id="<%= id %>-mobile" class="carousel slide d-md-none homepage-carousel" data-interval="false">
1
+ <% cache [common_product_cache_keys, products&.except(:group, :order)&.maximum(:updated_at)&.to_i, id, products&.ids&.join(',')] do %>
2
+ <div id="<%= id.parameterize %>-mobile" class="carousel slide d-md-none homepage-carousel" data-interval="false">
3
3
  <div class="carousel-inner">
4
4
  <% products.each_slice(2).with_index do |sliced_items, index| %>
5
5
  <div class="carousel-item <%= 'active' if index == 0 %>">
@@ -18,10 +18,9 @@
18
18
  </div>
19
19
  <a
20
20
  class="d-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--previous"
21
- href="#<%= id %>-mobile"
21
+ href="#<%= id.parameterize %>-mobile"
22
22
  role="button"
23
- data-slide="prev"
24
- >
23
+ data-slide="prev">
25
24
  <span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">
26
25
  <%= icon(name: 'arrow-right',
27
26
  classes: 'spree-icon-arrow spree-icon-arrow-left',
@@ -33,10 +32,9 @@
33
32
 
34
33
  <a
35
34
  class="d-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--next"
36
- href="#<%= id %>-mobile"
35
+ href="#<%= id.parameterize %>-mobile"
37
36
  role="button"
38
- data-slide="next"
39
- >
37
+ data-slide="next">
40
38
  <span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">
41
39
  <%= icon(name: 'arrow-right',
42
40
  classes: 'spree-icon-arrow spree-icon-arrow-right',
@@ -47,30 +45,28 @@
47
45
  </a>
48
46
  </div>
49
47
 
50
- <div id="<%= id %>-desktop" class="carousel slide d-none d-md-block homepage-carousel" data-interval="false">
48
+ <div id="<%= id.parameterize %>-desktop" class="carousel slide d-none d-md-block homepage-carousel" data-interval="false">
51
49
  <div class="carousel-inner carousel-inner-width">
52
50
  <% products.each_slice(4).with_index do |sliced_items, index| %>
53
51
  <div class="carousel-item <%= 'active' if index == 0 %>">
54
52
  <div class="container position-relative">
55
53
  <a
56
54
  class="d-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--previous"
57
- href="#<%= id %>-desktop"
55
+ href="#<%= id.parameterize %>-desktop"
58
56
  role="button"
59
- data-slide="prev"
60
- >
57
+ data-slide="prev">
61
58
  <span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">
62
59
  <%= icon(name: 'arrow-right',
63
60
  classes: 'spree-icon-arrow spree-icon-arrow-left',
64
61
  width: 20,
65
- height: 20)
66
- %>
62
+ height: 20) %>
67
63
  </span>
68
64
  <span class="sr-only"><%= Spree.t(:previous) %></span>
69
65
  </a>
70
66
 
71
67
  <div class="row carousel-items-container">
72
68
  <% sliced_items.each do |item| %>
73
- <div class="col-3">
69
+ <div class="col-3 carouselItem">
74
70
  <%= render 'spree/shared/product', product: item, image_class: 'w-100' %>
75
71
  </div>
76
72
  <% end %>
@@ -78,16 +74,14 @@
78
74
 
79
75
  <a
80
76
  class="d-md-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--next"
81
- href="#<%= id %>-desktop"
77
+ href="#<%= id.parameterize %>-desktop"
82
78
  role="button"
83
- data-slide="next"
84
- >
79
+ data-slide="next">
85
80
  <span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">
86
81
  <%= icon(name: 'arrow-right',
87
82
  classes: 'spree-icon-arrow spree-icon-arrow-right',
88
83
  width: 20,
89
- height: 20)
90
- %>
84
+ height: 20) %>
91
85
  </span>
92
86
  <span class="sr-only"><%= Spree.t(:next) %></span>
93
87
  </a>
@@ -5,5 +5,5 @@
5
5
  width: size,
6
6
  height: size) %>
7
7
 
8
- <div class="font-weight-medium cart-icon-count"><%= item_count %></div>
8
+ <span class="font-weight-medium cart-icon-count"><%= item_count %></span>
9
9
  <% end %>
@@ -1,27 +1,28 @@
1
1
  <div id="spree-header">
2
2
  <header id="header" class="d-flex align-items-center header-spree border-bottom">
3
- <div class="container position-relative">
4
- <div class="position-absolute checkout-header-link">
5
- <%= link_to spree.cart_path, class: "d-none d-sm-inline text-uppercase", method: :get do %>
6
- <%= icon(name: 'arrow-right',
7
- classes: 'spree-icon-arrow spree-icon-arrow-left',
8
- width: 7,
9
- height: 14) %>
10
- <span class="checkout-header-link-text"><%= Spree.t('checkout_page.back_to_cart') %></span>
11
- <% end %>
3
+ <div class="container" role="navigation" aria-label="<%= Spree.t('checkout_page.main_navigation') %>">
4
+ <div class="row">
5
+
6
+ <div class="col d-flex align-items-center truncate pr-0">
7
+ <%= link_to spree.cart_path, class: "text-uppercase truncate checkout-header-link-text", method: :get do %>
8
+ <%= icon(name: 'arrow-right',
9
+ classes: 'spree-icon-arrow spree-icon-arrow-left',
10
+ width: 14,
11
+ height: 14) %>
12
+ <%= Spree.t('checkout_page.back_to_cart') %>
13
+ <% end %>
14
+ </div>
15
+
16
+ <div class="col-auto d-flex align-items-center justify-content-end justify-content-md-center">
17
+ <figure class="logo header-spree-fluid-logo m-0 p-0">
18
+ <%= logo(nil, {method: :get}) %>
19
+ </figure>
20
+ </div>
21
+
22
+ <div class="col-0 col-md">
23
+ <!-- spacer -->
24
+ </div>
12
25
 
13
- <%= link_to spree.cart_path, class: "d-sm-none text-uppercase", method: :get do %>
14
- <%= icon(name: 'arrow-right',
15
- classes: 'spree-icon-arrow spree-icon-arrow-left',
16
- width: 7,
17
- height: 14) %>
18
- <span class="checkout-header-link-text"><%= Spree.t('back') %></span>
19
- <% end %>
20
- </div>
21
- <div class="d-flex flex-nowrap align-items-center justify-content-center">
22
- <figure class="logo flex-grow-0 flex-xl-grow-0 order-xl-0 header-spree-fluid-logo m-0">
23
- <%= logo(Spree::Config[:logo], method: :get) %>
24
- </figure>
25
26
  </div>
26
27
  </div>
27
28
  </header>
@@ -1,9 +1,9 @@
1
1
  <svg class="color-select" height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg">
2
2
  <g class="color-select-border" fill="none" fill-rule="evenodd">
3
- <circle class="<%= 'color-select-border--selected' if selected %> plp-overlay-color-item" cx="16" cy="16" r="15" stroke-width="2"/>
3
+ <circle class="<%= 'color-select-border--selected' if selected %> plp-overlay-color-item" cx="16" cy="16" r="15" stroke-width="2" />
4
4
  <g transform="translate(2 2)">
5
- <circle cx="14" cy="14" fill="<%= color %>" fill-rule="evenodd" r="12"/>
6
- <circle cx="14" cy="14" r="13" stroke="#fff" stroke-width="2"/>
5
+ <circle cx="14" cy="14" fill="<%= color %>" fill-rule="evenodd" r="12" />
6
+ <circle cx="14" cy="14" r="13" stroke="#fff" stroke-width="2" />
7
7
  </g>
8
8
  </g>
9
9
  </svg>
@@ -1,17 +1,8 @@
1
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
- <div>Designed and developed by</div>
5
- <div class="mb-1 mb-lg-0">
6
- <%= link_to 'https://sparksolutions.co/', target: :blank, 'aria-label': 'Go to Spark Solutions', rel: :follow do %>
7
- <%= image_tag 'spark-logo@3x.png', class: 'footer-spree-copyright-logo-spark mx-2', alt: 'Spree Commerce & Ruby on Rails developers', title: 'Spree Commerce & Ruby on Rails developers' %>
8
- <% end %>
9
- </div>
10
- <div class="d-none d-lg-inline-block mr-2">|</div>
11
4
  <div>
12
- © <%= Time.current.year %>
13
- <%= link_to current_store.name, "https://#{current_store.url}" %>.
14
- <%= Spree.t(:all_rights_reserved) %>.
5
+ Designed and developed by <%= link_to 'Spark Solutions', 'https://sparksolutions.co/', target: :_blank, 'aria-label': 'Go to Spark Solutions', rel: :follow %> | © <%= Time.current.year %> <%= link_to current_store.name, current_store.formatted_url %>. <%= Spree.t(:all_rights_reserved) %>.
15
6
  </div>
16
7
  </div>
17
8
  </div>
@@ -0,0 +1,13 @@
1
+ <% if defined?(should_render_currency_dropdown?) && should_render_currency_dropdown? %>
2
+ <%= form_tag spree.set_currency_path, method: :get, class: 'px-4 py-3 w-100 currency-select' do %>
3
+ <div class="form-group">
4
+ <label for="switch_to_currency" class="dropdown-header text-center">
5
+ <%= Spree.t(:choose_currency) %>
6
+ </label>
7
+ <%= select_tag(:switch_to_currency,
8
+ options_for_select(supported_currency_options, current_currency),
9
+ class: 'custom-select w-100') %>
10
+ <noscript><%= submit_tag %></noscript>
11
+ </div>
12
+ <% end %>
13
+ <% end %>
@@ -18,8 +18,7 @@
18
18
  class="btn btn-primary text-uppercase font-weight-bold delete-address-popup-button"
19
19
  data-method="delete"
20
20
  rel="nofollow"
21
- href="#"
22
- >
21
+ href="#">
23
22
  <%= Spree.t("address_action_popup.delete_button") %>
24
23
  </a>
25
24
  </div>
@@ -1,10 +1,10 @@
1
1
  <% if target && target.errors.any? %>
2
2
  <div id="errorExplanation" class="alert alert-danger d-flex justify-content-center mb-0" data-hook>
3
- <ul class="mb-0 pl-0" style="list-style-type: none;">
3
+ <ul class="mb-0 pl-0" style="list-style-type: none;">
4
4
  <% target.errors.full_messages.each do |msg| %>
5
5
  <li><%= msg %></li>
6
6
  <% end %>
7
7
  </ul>
8
- <br/>
8
+ <br>
9
9
  </div>
10
10
  <% end %>
@@ -1,14 +1,14 @@
1
- <% cache spree_nav_cache_key('footer') do %>
2
- <footer id="footer" class="pt-2 mx-auto border-top footer-spree" data-turbolinks-permanent>
1
+ <% cache spree_menu_cache_key('footer') do %>
2
+ <footer id="footer" class="pt-2 mx-auto border-top footer-spree">
3
3
  <div class="container">
4
4
  <div class="row d-xl-flex justify-content-xl-around pb-xl-5">
5
5
  <div class="d-flex d-xl-block flex-xl-grow-0 col-xl-4">
6
6
  <figure class="logo mx-auto mx-xl-0 pt-xl-2 pb-xl-1">
7
7
  <%= logo %>
8
8
  </figure>
9
- <% if current_store.meta_description %>
9
+ <% if current_store.description %>
10
10
  <div class="d-none d-xl-block pt-xl-2 footer-spree-info">
11
- <%= current_store.meta_description %>
11
+ <%= current_store.description %>
12
12
  </div>
13
13
  <% end %>
14
14
  </div>
@@ -32,39 +32,49 @@
32
32
  </div>
33
33
  <div class="d-flex flex-column align-items-center align-items-xl-start pb-3 flex-grow-2 footer-spree-contact-note">
34
34
  <div>
35
- <%= current_store.name %>,
36
- 2382 Locust Ave<br/>
37
- Long Beach, CA 90806, USA
35
+ <strong><%= current_store.name %></strong>
36
+ <br>
37
+ <% if current_store.address %>
38
+ <%= current_store.address.html_safe %>
39
+ <% end %>
38
40
  </div>
39
- <div>Call us now: 760-673-8590</div>
40
- <% if current_store.mail_from_address %>
41
- <div><%= Spree.t(:email) %>: <%= current_store.mail_from_address %></div>
41
+ <% if current_store.contact_phone&.present? %>
42
+ <div><%= Spree.t(:call_us_now) %><%= current_store.contact_phone %></div>
43
+ <% end %>
44
+ <% if current_store.customer_support_email&.present? %>
45
+ <div><%= Spree.t(:email) %>: <%= current_store.customer_support_email %></div>
42
46
  <% end %>
43
47
  </div>
44
48
  </div>
45
49
  </div>
46
- <div class="row d-none d-xl-flex border-top py-5 text-uppercase footer-spree-menu-links">
47
- <% if spree_navigation_data.any? %>
48
- <% spree_navigation_data.first(3).each do |root| %>
49
- <div class="col-3">
50
+ <div class="row d-none d-xl-flex border-top pt-5 text-uppercase footer-spree-menu-links">
51
+
52
+ <% if spree_menu('footer').present? %>
53
+ <% spree_menu('footer').children.each do |parent| %>
54
+ <div class="col-3 mb-5">
50
55
  <div class="footer-spree-label">
51
- <%= link_to root[:title], root[:url] %>
52
- </div>
53
- <% if root[:items].present? %>
54
- <% root[:items].each do |item| %>
55
- <div class="pt-2"><%= link_to item[:title], item[:url] %></div>
56
+ <% if parent.container? %>
57
+ <%= parent.name %>
58
+ <% else %>
59
+ <%= spree_nav_link_tag(parent) %>
56
60
  <% end %>
61
+ </div>
62
+ <% parent.children.each do |child| %>
63
+ <div class="pt-2">
64
+ <%= spree_nav_link_tag(child) %>
65
+ </div>
57
66
  <% end %>
58
67
  </div>
59
68
  <% end %>
60
69
  <% end %>
70
+
61
71
  <% if spree.respond_to?(:account_path) %>
62
- <div class="col-3">
72
+ <div class="col-3 mb-5">
63
73
  <div class="footer-spree-label">
64
74
  <%= Spree.t('nav_bar.my_account') %>
65
75
  </div>
66
76
  <div class="pt-2">
67
- <%= link_to Spree.t('nav_bar.my_orders'), spree.account_path(anchor: "account-my-orders") %>
77
+ <%= link_to Spree.t(:my_orders).upcase, spree.account_path(anchor: "account-my-orders") %>
68
78
  </div>
69
79
  </div>
70
80
  <% end %>
@@ -0,0 +1,32 @@
1
+ <!-- Styles And Script In A View Partial
2
+ If this view partial is removed from the spree_application.html.erb layout file, the storefront
3
+ will instantly snap back to the original look and feel with no hangover CSS or JavaScript related
4
+ to this partial.
5
+
6
+ Please do not transfer styles and JavaScript found here
7
+ into the main stylesheets or JavaScript files.
8
+ -->
9
+ <style>
10
+ #getStartedBar {
11
+ background: #33ba6f;
12
+ color: white;
13
+ z-index: 10;
14
+ }
15
+
16
+ #getStartedBar svg {
17
+ vertical-align: text-top;
18
+ }
19
+ </style>
20
+
21
+ <div id="getStartedBar" class="d-flex justify-content-center align-items-center p-1">
22
+ <div class="row">
23
+ <div class="col-12 text-center">
24
+ <h5 class="m-0">
25
+ <span style="font-weight: 200;">Create your own Spree project</span> <a href="https://spreecommerce.org/contact/" class="btn btn-outline-light btn-sm m-2" style="font-size: 1em; font-weight:800;">Get Started
26
+ <%= icon(name: 'arrow-right-circle-fill',
27
+ width: 22,
28
+ height: 22) %></a>
29
+ </h5>
30
+ </div>
31
+ </div>
32
+ </div>
@@ -1,11 +1,14 @@
1
1
  <title><%= title %></title>
2
- <meta name="viewport" content="width=device-width, initial-scale=1" />
3
- <%== meta_image_data_tag %>
2
+ <meta name="viewport" content="width=device-width, initial-scale=1">
3
+ <%== og_meta_data_tags %>
4
4
  <%== meta_data_tags %>
5
+ <%== meta_robots %>
5
6
  <%= canonical_tag(current_store.url) %>
6
- <%= favicon_link_tag 'favicon.ico' %>
7
- <%= stylesheet_link_tag 'spree/frontend/all', media: 'screen', 'data-turbolinks-track': 'reload' %>
7
+ <%= favicon_link_tag(spree_favicon_path) %>
8
+ <%= stylesheet_link_tag 'spree/frontend/all', media: 'screen', data: { turbo_track: 'reload' } %>
8
9
  <%= csrf_meta_tags %>
9
10
  <%= render 'spree/shared/paths' %>
10
- <%= javascript_include_tag 'spree/frontend/all', defer: true, 'data-turbolinks-track': 'reload' %>
11
+ <%= render 'spree/shared/locale_and_currency' %>
12
+ <%= javascript_include_tag "application", defer: true, data: { turbo_track: 'reload' } %>
13
+ <%= javascript_include_tag 'spree/frontend/all', defer: true, data: { turbo_track: 'reload' } %>
11
14
  <%= yield :head %>
@@ -1,14 +1,14 @@
1
1
  <%# leaving #spree-header div for legacy support %>
2
- <% cache spree_nav_cache_key('header') do %>
3
- <div id="spree-header" data-turbolinks-permanent>
2
+ <% cache spree_menu_cache_key('header') do %>
3
+ <div id="spree-header">
4
4
  <header id="header" class="d-flex align-items-center header-spree border-bottom">
5
5
  <div class="container-fluid h-100 header-spree-fluid">
6
- <div class="d-flex flex-nowrap align-items-center h-100">
6
+ <div class="d-flex flex-nowrap align-items-center h-100 px-2">
7
7
  <div class="d-xl-none flex-grow-1 header-spree-fluid-mobile-menu-toggler">
8
8
  <button class="navbar-toggler border-0 px-0 d-flex" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-label="<%= Spree.t('nav_bar.show_menu') %>">
9
9
  <%= icon(name: 'burger',
10
10
  width: 18.5,
11
- height: 16) %>
11
+ height: 16) %>
12
12
  </button>
13
13
  </div>
14
14
  <figure class="logo flex-grow-0 flex-xl-grow-1 order-xl-0 header-spree-fluid-logo m-0">
@@ -0,0 +1,31 @@
1
+ <% if (defined?(should_render_store_chooser?) && should_render_store_chooser?) || (defined?(should_render_internationalization_dropdown?) && should_render_internationalization_dropdown?) %>
2
+ <li class="d-none d-xl-block internationalization-options">
3
+ <div class="dropdown navbar-right-dropdown">
4
+ <button id="internationalization-button-desktop" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle" aria-label="<%= Spree.t(:internationalization) %>">
5
+ <%= icon(name: 'global',
6
+ classes: 'd-none d-xl-inline-block',
7
+ width: 41,
8
+ height: 36) %>
9
+ <%= icon(name: 'arrow-down',
10
+ classes: 'd-inline-block d-xl-none',
11
+ width: 15,
12
+ height: 15) %>
13
+ </button>
14
+
15
+ <div id="internationalization-options-desktop" class="dropdown-menu dropdown-menu-right text-left">
16
+ <% if (defined?(should_render_store_chooser?) && should_render_store_chooser?) %>
17
+ <% stores.each do |store| %>
18
+ <div class="pl-3 d-flex justify-content-between align-items-center stores-list">
19
+ <%= country_flag_icon(store_country_iso(store)) %>
20
+ <%= store_link(store, class: "dropdown-item text-uppercase #{'font-weight-bold' if current_store == store}") %>
21
+ </div>
22
+ <% end %>
23
+ <% else %>
24
+ <%= render 'spree/shared/locale_dropdown' %>
25
+ <div class="dropdown-divider"></div>
26
+ <%= render 'spree/shared/currency_dropdown' %>
27
+ <% end %>
28
+ </div>
29
+ </div>
30
+ </li>
31
+ <% end %>
@@ -1,14 +1,14 @@
1
1
  <div class="checkout-confirm-order-details-line-items-line-item w-100 d-table-row">
2
2
  <div class="checkout-confirm-order-details-line-items-line-item-name d-table-cell align-middle py-3 py-sm-4">
3
3
  <div class="d-flex align-items-lg-center">
4
- <%= link_to product_image(line_item.variant), line_item.product %>
4
+ <%= link_to product_image(line_item.variant), spree.product_path(line_item.product) %>
5
5
  <div class="d-flex flex-column mt-2 mt-lg-0">
6
- <div><%= link_to line_item.name, line_item.product %></div>
6
+ <div><%= link_to line_item.name, spree.product_path(line_item.product) %></div>
7
7
  <ul class="checkout-confirm-order-details-line-items-line-item-name-options text-uppercase list-unstyled mb-0">
8
8
  <% line_item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
9
9
  <li>
10
10
  <% # TODO: rework option values so options_text method can be used here %>
11
- <%= "#{ov.option_type.presentation}: #{ov.name.titleize}" %>
11
+ <%= "#{ov.option_type.presentation}: #{ov.presentation}" %>
12
12
  </li>
13
13
  <% end %>
14
14
  </ul>
@@ -1,7 +1,10 @@
1
1
  <% if try_spree_current_user %>
2
- <%= link_to Spree.t('nav_bar.my_account'), spree.account_path, class: 'dropdown-item' if spree.respond_to?(:account_path) %>
3
- <%= link_to Spree.t('nav_bar.log_out'), spree_logout_path, class: 'dropdown-item', method: :get if defined?(spree_logout_path) %>
2
+ <%= link_to Spree.t(:my_account).upcase, spree.account_path, class: 'dropdown-item' if spree.respond_to?(:account_path) %>
3
+ <% if spree.respond_to?(:admin_orders_path) %>
4
+ <%= link_to Spree.t('nav_bar.admin_panel'), spree.admin_orders_path(locale: nil), class: 'dropdown-item text-uppercase' if try_spree_current_user.has_spree_role?(:admin) %>
5
+ <% end %>
6
+ <%= link_to Spree.t(:logout).upcase, spree_logout_path, class: 'dropdown-item', method: :get if defined?(spree_logout_path) %>
4
7
  <% else %>
5
- <%= link_to Spree.t('nav_bar.log_in'), spree_login_path, class: 'dropdown-item' if defined?(spree_login_path) %>
6
- <%= link_to Spree.t('nav_bar.sign_up'), spree_signup_path, class: 'dropdown-item' if defined?(spree_signup_path) %>
8
+ <%= link_to Spree.t(:login).upcase, spree_login_path, class: 'dropdown-item' if defined?(spree_login_path) %>
9
+ <%= link_to Spree.t(:sign_up).upcase, spree_signup_path, class: 'dropdown-item' if defined?(spree_signup_path) %>
7
10
  <% end %>
@@ -1,5 +1,4 @@
1
1
  <% item_count = simple_current_order&.item_count || 0 %>
2
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 %>
3
+ <%= render 'spree/shared/cart', class: 'd-inline-block cart-icon', size: 36, item_count: item_count %>
5
4
  <% end %>
@@ -0,0 +1,6 @@
1
+ <script>
2
+ var SPREE_LOCALE = '<%= I18n.locale %>'
3
+ var SPREE_CURRENCY = '<%= current_currency %>'
4
+ var SPREE_DEFAULT_CURRENCY = '<%= current_store.default_currency %>'
5
+ var SPREE_DEFAULT_LOCALE = '<%= current_store.default_locale %>'
6
+ </script>
@@ -0,0 +1,13 @@
1
+ <% if should_render_locale_dropdown? %>
2
+ <%= form_tag spree.set_locale_path, method: :get, class: 'px-4 py-3 w-100 locale-select' do %>
3
+ <div class="form-group">
4
+ <label for="switch_to_locale" class="dropdown-header text-center">
5
+ <%= Spree.t('i18n.language') %>
6
+ </label>
7
+ <%= select_tag(:switch_to_locale,
8
+ options_for_select(supported_locales_options, I18n.locale),
9
+ class: 'custom-select w-100') %>
10
+ <noscript><%= submit_tag %></noscript>
11
+ </div>
12
+ <% end %>
13
+ <% end %>
@@ -1,15 +1,15 @@
1
1
  <div class="col-lg-11 mx-auto">
2
2
  <h3 class="spree-mb-large spree-mt-large spree-header"><%= Spree.t(:log_in_to_continue) %></h3>
3
- <%= form_for Spree.user_class.new, as: :spree_user, url: spree_login_path do |f| %>
3
+ <%= form_for Spree.user_class.new, as: :spree_user, url: spree_login_path, data: { turbo: false } do |f| %>
4
4
  <div id="password-credentials" class="mb-4">
5
5
  <div class="form-group mb-4">
6
6
  <p class="form-group checkout-content-inner-field">
7
- <%= f.email_field :email, class: 'spree-flat-input', placeholder: Spree.t(:email), autofocus: true %>
7
+ <%= f.email_field :email, class: 'spree-flat-input', placeholder: Spree.t(:email), value: params.dig(:spree_user, :email) %>
8
8
  </p>
9
9
  </div>
10
10
  <div class="form-group mb-4">
11
11
  <p class="form-group checkout-content-inner-field">
12
- <%= f.password_field :password, class: 'spree-flat-input', placeholder: Spree.t(:password), autofocus: true %>
12
+ <%= f.password_field :password, class: 'spree-flat-input', placeholder: Spree.t(:password) %>
13
13
  </p>
14
14
  </div>
15
15
  </div>
@@ -17,7 +17,7 @@
17
17
  <% if Spree::Frontend::Config[:remember_me_enabled] %>
18
18
  <div class="spree-checkbox-container mt-4 mt-sm-5 mt-lg-4 spree-mb-medium">
19
19
  <div class="spree-checkbox">
20
- <%= f.check_box :remember_me, tabindex: 3 %>
20
+ <%= f.check_box :remember_me %>
21
21
  <%= f.label :remember_me, '' %>
22
22
  </div>
23
23
 
@@ -25,7 +25,7 @@
25
25
  </div>
26
26
  <% end %>
27
27
 
28
- <%= f.submit Spree.t(:log_in), class: 'btn btn-primary btn-block spree-btn mt-2', tabindex: 4 %>
28
+ <%= f.submit Spree.t(:login), class: 'btn btn-primary btn-block spree-btn mt-2' %>
29
29
  <% end %>
30
30
 
31
31
  <% if spree.respond_to?(:recover_password_path) %>