spree_frontend 4.1.10 → 4.2.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (377) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/arrow-down.svg +12 -0
  3. data/app/assets/images/edit.svg +1 -1
  4. data/app/assets/images/flags/4x3/ad.svg +150 -0
  5. data/app/assets/images/flags/4x3/ae.svg +6 -0
  6. data/app/assets/images/flags/4x3/af.svg +81 -0
  7. data/app/assets/images/flags/4x3/ag.svg +14 -0
  8. data/app/assets/images/flags/4x3/ai.svg +763 -0
  9. data/app/assets/images/flags/4x3/al.svg +5 -0
  10. data/app/assets/images/flags/4x3/am.svg +5 -0
  11. data/app/assets/images/flags/4x3/ao.svg +13 -0
  12. data/app/assets/images/flags/4x3/aq.svg +5 -0
  13. data/app/assets/images/flags/4x3/ar.svg +31 -0
  14. data/app/assets/images/flags/4x3/as.svg +33 -0
  15. data/app/assets/images/flags/4x3/at.svg +6 -0
  16. data/app/assets/images/flags/4x3/au.svg +9 -0
  17. data/app/assets/images/flags/4x3/aw.svg +186 -0
  18. data/app/assets/images/flags/4x3/ax.svg +18 -0
  19. data/app/assets/images/flags/4x3/az.svg +8 -0
  20. data/app/assets/images/flags/4x3/ba.svg +12 -0
  21. data/app/assets/images/flags/4x3/bb.svg +6 -0
  22. data/app/assets/images/flags/4x3/bd.svg +4 -0
  23. data/app/assets/images/flags/4x3/be.svg +7 -0
  24. data/app/assets/images/flags/4x3/bf.svg +7 -0
  25. data/app/assets/images/flags/4x3/bg.svg +7 -0
  26. data/app/assets/images/flags/4x3/bh.svg +9 -0
  27. data/app/assets/images/flags/4x3/bi.svg +15 -0
  28. data/app/assets/images/flags/4x3/bj.svg +14 -0
  29. data/app/assets/images/flags/4x3/bl.svg +7 -0
  30. data/app/assets/images/flags/4x3/bm.svg +98 -0
  31. data/app/assets/images/flags/4x3/bn.svg +36 -0
  32. data/app/assets/images/flags/4x3/bo.svg +676 -0
  33. data/app/assets/images/flags/4x3/bq.svg +5 -0
  34. data/app/assets/images/flags/4x3/br.svg +45 -0
  35. data/app/assets/images/flags/4x3/bs.svg +13 -0
  36. data/app/assets/images/flags/4x3/bt.svg +89 -0
  37. data/app/assets/images/flags/4x3/bv.svg +13 -0
  38. data/app/assets/images/flags/4x3/bw.svg +7 -0
  39. data/app/assets/images/flags/4x3/by.svg +20 -0
  40. data/app/assets/images/flags/4x3/bz.svg +145 -0
  41. data/app/assets/images/flags/4x3/ca.svg +4 -0
  42. data/app/assets/images/flags/4x3/cc.svg +19 -0
  43. data/app/assets/images/flags/4x3/cd.svg +5 -0
  44. data/app/assets/images/flags/4x3/cf.svg +15 -0
  45. data/app/assets/images/flags/4x3/cg.svg +12 -0
  46. data/app/assets/images/flags/4x3/ch.svg +9 -0
  47. data/app/assets/images/flags/4x3/ci.svg +7 -0
  48. data/app/assets/images/flags/4x3/ck.svg +9 -0
  49. data/app/assets/images/flags/4x3/cl.svg +13 -0
  50. data/app/assets/images/flags/4x3/cm.svg +15 -0
  51. data/app/assets/images/flags/4x3/cn.svg +11 -0
  52. data/app/assets/images/flags/4x3/co.svg +7 -0
  53. data/app/assets/images/flags/4x3/cr.svg +7 -0
  54. data/app/assets/images/flags/4x3/cu.svg +13 -0
  55. data/app/assets/images/flags/4x3/cv.svg +13 -0
  56. data/app/assets/images/flags/4x3/cw.svg +14 -0
  57. data/app/assets/images/flags/4x3/cx.svg +15 -0
  58. data/app/assets/images/flags/4x3/cy.svg +6 -0
  59. data/app/assets/images/flags/4x3/cz.svg +5 -0
  60. data/app/assets/images/flags/4x3/de.svg +5 -0
  61. data/app/assets/images/flags/4x3/dj.svg +13 -0
  62. data/app/assets/images/flags/4x3/dk.svg +5 -0
  63. data/app/assets/images/flags/4x3/dm.svg +152 -0
  64. data/app/assets/images/flags/4x3/do.svg +6745 -0
  65. data/app/assets/images/flags/4x3/dz.svg +5 -0
  66. data/app/assets/images/flags/4x3/ec.svg +138 -0
  67. data/app/assets/images/flags/4x3/ee.svg +7 -0
  68. data/app/assets/images/flags/4x3/eg.svg +38 -0
  69. data/app/assets/images/flags/4x3/eh.svg +15 -0
  70. data/app/assets/images/flags/4x3/er.svg +8 -0
  71. data/app/assets/images/flags/4x3/es-ca.svg +4 -0
  72. data/app/assets/images/flags/4x3/es.svg +544 -0
  73. data/app/assets/images/flags/4x3/et.svg +14 -0
  74. data/app/assets/images/flags/4x3/eu.svg +28 -0
  75. data/app/assets/images/flags/4x3/fi.svg +5 -0
  76. data/app/assets/images/flags/4x3/fj.svg +122 -0
  77. data/app/assets/images/flags/4x3/fk.svg +90 -0
  78. data/app/assets/images/flags/4x3/fm.svg +11 -0
  79. data/app/assets/images/flags/4x3/fo.svg +12 -0
  80. data/app/assets/images/flags/4x3/fr.svg +7 -0
  81. data/app/assets/images/flags/4x3/ga.svg +7 -0
  82. data/app/assets/images/flags/4x3/gb-eng.svg +5 -0
  83. data/app/assets/images/flags/4x3/gb-nir.svg +132 -0
  84. data/app/assets/images/flags/4x3/gb-sct.svg +4 -0
  85. data/app/assets/images/flags/4x3/gb-wls.svg +9 -0
  86. data/app/assets/images/flags/4x3/gb.svg +7 -0
  87. data/app/assets/images/flags/4x3/gd.svg +27 -0
  88. data/app/assets/images/flags/4x3/ge.svg +6 -0
  89. data/app/assets/images/flags/4x3/gf.svg +7 -0
  90. data/app/assets/images/flags/4x3/gg.svg +9 -0
  91. data/app/assets/images/flags/4x3/gh.svg +6 -0
  92. data/app/assets/images/flags/4x3/gi.svg +32 -0
  93. data/app/assets/images/flags/4x3/gl.svg +4 -0
  94. data/app/assets/images/flags/4x3/gm.svg +14 -0
  95. data/app/assets/images/flags/4x3/gn.svg +7 -0
  96. data/app/assets/images/flags/4x3/gp.svg +7 -0
  97. data/app/assets/images/flags/4x3/gq.svg +23 -0
  98. data/app/assets/images/flags/4x3/gr.svg +16 -0
  99. data/app/assets/images/flags/4x3/gs.svg +201 -0
  100. data/app/assets/images/flags/4x3/gt.svg +204 -0
  101. data/app/assets/images/flags/4x3/gu.svg +39 -0
  102. data/app/assets/images/flags/4x3/gw.svg +13 -0
  103. data/app/assets/images/flags/4x3/gy.svg +9 -0
  104. data/app/assets/images/flags/4x3/hk.svg +30 -0
  105. data/app/assets/images/flags/4x3/hm.svg +9 -0
  106. data/app/assets/images/flags/4x3/hn.svg +18 -0
  107. data/app/assets/images/flags/4x3/hr.svg +58 -0
  108. data/app/assets/images/flags/4x3/ht.svg +116 -0
  109. data/app/assets/images/flags/4x3/hu.svg +7 -0
  110. data/app/assets/images/flags/4x3/id.svg +6 -0
  111. data/app/assets/images/flags/4x3/ie.svg +7 -0
  112. data/app/assets/images/flags/4x3/il.svg +14 -0
  113. data/app/assets/images/flags/4x3/im.svg +36 -0
  114. data/app/assets/images/flags/4x3/in.svg +25 -0
  115. data/app/assets/images/flags/4x3/io.svg +138 -0
  116. data/app/assets/images/flags/4x3/iq.svg +10 -0
  117. data/app/assets/images/flags/4x3/ir.svg +219 -0
  118. data/app/assets/images/flags/4x3/is.svg +12 -0
  119. data/app/assets/images/flags/4x3/it.svg +7 -0
  120. data/app/assets/images/flags/4x3/je.svg +29 -0
  121. data/app/assets/images/flags/4x3/jm.svg +8 -0
  122. data/app/assets/images/flags/4x3/jo.svg +16 -0
  123. data/app/assets/images/flags/4x3/jp.svg +11 -0
  124. data/app/assets/images/flags/4x3/ke.svg +23 -0
  125. data/app/assets/images/flags/4x3/kg.svg +15 -0
  126. data/app/assets/images/flags/4x3/kh.svg +61 -0
  127. data/app/assets/images/flags/4x3/ki.svg +36 -0
  128. data/app/assets/images/flags/4x3/km.svg +16 -0
  129. data/app/assets/images/flags/4x3/kn.svg +14 -0
  130. data/app/assets/images/flags/4x3/kp.svg +15 -0
  131. data/app/assets/images/flags/4x3/kr.svg +24 -0
  132. data/app/assets/images/flags/4x3/kw.svg +13 -0
  133. data/app/assets/images/flags/4x3/ky.svg +63 -0
  134. data/app/assets/images/flags/4x3/kz.svg +23 -0
  135. data/app/assets/images/flags/4x3/la.svg +12 -0
  136. data/app/assets/images/flags/4x3/lb.svg +15 -0
  137. data/app/assets/images/flags/4x3/lc.svg +8 -0
  138. data/app/assets/images/flags/4x3/li.svg +43 -0
  139. data/app/assets/images/flags/4x3/lk.svg +22 -0
  140. data/app/assets/images/flags/4x3/lr.svg +14 -0
  141. data/app/assets/images/flags/4x3/ls.svg +8 -0
  142. data/app/assets/images/flags/4x3/lt.svg +7 -0
  143. data/app/assets/images/flags/4x3/lu.svg +5 -0
  144. data/app/assets/images/flags/4x3/lv.svg +6 -0
  145. data/app/assets/images/flags/4x3/ly.svg +13 -0
  146. data/app/assets/images/flags/4x3/ma.svg +4 -0
  147. data/app/assets/images/flags/4x3/mc.svg +6 -0
  148. data/app/assets/images/flags/4x3/md.svg +70 -0
  149. data/app/assets/images/flags/4x3/me.svg +116 -0
  150. data/app/assets/images/flags/4x3/mf.svg +7 -0
  151. data/app/assets/images/flags/4x3/mg.svg +7 -0
  152. data/app/assets/images/flags/4x3/mh.svg +7 -0
  153. data/app/assets/images/flags/4x3/mk.svg +5 -0
  154. data/app/assets/images/flags/4x3/ml.svg +7 -0
  155. data/app/assets/images/flags/4x3/mm.svg +16 -0
  156. data/app/assets/images/flags/4x3/mn.svg +13 -0
  157. data/app/assets/images/flags/4x3/mo.svg +9 -0
  158. data/app/assets/images/flags/4x3/mp.svg +86 -0
  159. data/app/assets/images/flags/4x3/mq.svg +7 -0
  160. data/app/assets/images/flags/4x3/mr.svg +6 -0
  161. data/app/assets/images/flags/4x3/ms.svg +78 -0
  162. data/app/assets/images/flags/4x3/mt.svg +49 -0
  163. data/app/assets/images/flags/4x3/mu.svg +8 -0
  164. data/app/assets/images/flags/4x3/mv.svg +6 -0
  165. data/app/assets/images/flags/4x3/mw.svg +10 -0
  166. data/app/assets/images/flags/4x3/mx.svg +382 -0
  167. data/app/assets/images/flags/4x3/my.svg +15 -0
  168. data/app/assets/images/flags/4x3/mz.svg +21 -0
  169. data/app/assets/images/flags/4x3/na.svg +16 -0
  170. data/app/assets/images/flags/4x3/nc.svg +14 -0
  171. data/app/assets/images/flags/4x3/ne.svg +6 -0
  172. data/app/assets/images/flags/4x3/nf.svg +9 -0
  173. data/app/assets/images/flags/4x3/ng.svg +6 -0
  174. data/app/assets/images/flags/4x3/ni.svg +129 -0
  175. data/app/assets/images/flags/4x3/nl.svg +5 -0
  176. data/app/assets/images/flags/4x3/no.svg +7 -0
  177. data/app/assets/images/flags/4x3/np.svg +14 -0
  178. data/app/assets/images/flags/4x3/nr.svg +12 -0
  179. data/app/assets/images/flags/4x3/nu.svg +26 -0
  180. data/app/assets/images/flags/4x3/nz.svg +41 -0
  181. data/app/assets/images/flags/4x3/om.svg +115 -0
  182. data/app/assets/images/flags/4x3/pa.svg +14 -0
  183. data/app/assets/images/flags/4x3/pe.svg +244 -0
  184. data/app/assets/images/flags/4x3/pf.svg +19 -0
  185. data/app/assets/images/flags/4x3/pg.svg +9 -0
  186. data/app/assets/images/flags/4x3/ph.svg +9 -0
  187. data/app/assets/images/flags/4x3/pk.svg +15 -0
  188. data/app/assets/images/flags/4x3/pl.svg +6 -0
  189. data/app/assets/images/flags/4x3/pm.svg +7 -0
  190. data/app/assets/images/flags/4x3/pn.svg +62 -0
  191. data/app/assets/images/flags/4x3/pr.svg +13 -0
  192. data/app/assets/images/flags/4x3/ps.svg +15 -0
  193. data/app/assets/images/flags/4x3/pt.svg +57 -0
  194. data/app/assets/images/flags/4x3/pw.svg +11 -0
  195. data/app/assets/images/flags/4x3/py.svg +157 -0
  196. data/app/assets/images/flags/4x3/qa.svg +4 -0
  197. data/app/assets/images/flags/4x3/re.svg +7 -0
  198. data/app/assets/images/flags/4x3/ro.svg +7 -0
  199. data/app/assets/images/flags/4x3/rs.svg +292 -0
  200. data/app/assets/images/flags/4x3/ru.svg +7 -0
  201. data/app/assets/images/flags/4x3/rw.svg +13 -0
  202. data/app/assets/images/flags/4x3/sa.svg +26 -0
  203. data/app/assets/images/flags/4x3/sb.svg +13 -0
  204. data/app/assets/images/flags/4x3/sc.svg +14 -0
  205. data/app/assets/images/flags/4x3/sd.svg +13 -0
  206. data/app/assets/images/flags/4x3/se.svg +5 -0
  207. data/app/assets/images/flags/4x3/sg.svg +13 -0
  208. data/app/assets/images/flags/4x3/sh.svg +74 -0
  209. data/app/assets/images/flags/4x3/si.svg +18 -0
  210. data/app/assets/images/flags/4x3/sj.svg +7 -0
  211. data/app/assets/images/flags/4x3/sk.svg +9 -0
  212. data/app/assets/images/flags/4x3/sl.svg +7 -0
  213. data/app/assets/images/flags/4x3/sm.svg +91 -0
  214. data/app/assets/images/flags/4x3/sn.svg +8 -0
  215. data/app/assets/images/flags/4x3/so.svg +11 -0
  216. data/app/assets/images/flags/4x3/sr.svg +6 -0
  217. data/app/assets/images/flags/4x3/ss.svg +8 -0
  218. data/app/assets/images/flags/4x3/st.svg +16 -0
  219. data/app/assets/images/flags/4x3/sv.svg +594 -0
  220. data/app/assets/images/flags/4x3/sx.svg +56 -0
  221. data/app/assets/images/flags/4x3/sy.svg +6 -0
  222. data/app/assets/images/flags/4x3/sz.svg +45 -0
  223. data/app/assets/images/flags/4x3/tc.svg +67 -0
  224. data/app/assets/images/flags/4x3/td.svg +7 -0
  225. data/app/assets/images/flags/4x3/tf.svg +15 -0
  226. data/app/assets/images/flags/4x3/tg.svg +14 -0
  227. data/app/assets/images/flags/4x3/th.svg +7 -0
  228. data/app/assets/images/flags/4x3/tj.svg +22 -0
  229. data/app/assets/images/flags/4x3/tk.svg +5 -0
  230. data/app/assets/images/flags/4x3/tl.svg +13 -0
  231. data/app/assets/images/flags/4x3/tm.svg +206 -0
  232. data/app/assets/images/flags/4x3/tn.svg +13 -0
  233. data/app/assets/images/flags/4x3/to.svg +10 -0
  234. data/app/assets/images/flags/4x3/tr.svg +8 -0
  235. data/app/assets/images/flags/4x3/tt.svg +5 -0
  236. data/app/assets/images/flags/4x3/tv.svg +16 -0
  237. data/app/assets/images/flags/4x3/tw.svg +14 -0
  238. data/app/assets/images/flags/4x3/tz.svg +13 -0
  239. data/app/assets/images/flags/4x3/ua.svg +6 -0
  240. data/app/assets/images/flags/4x3/ug.svg +30 -0
  241. data/app/assets/images/flags/4x3/um.svg +15 -0
  242. data/app/assets/images/flags/4x3/un.svg +16 -0
  243. data/app/assets/images/flags/4x3/us.svg +10 -0
  244. data/app/assets/images/flags/4x3/uy.svg +28 -0
  245. data/app/assets/images/flags/4x3/uz.svg +30 -0
  246. data/app/assets/images/flags/4x3/va.svg +479 -0
  247. data/app/assets/images/flags/4x3/vc.svg +8 -0
  248. data/app/assets/images/flags/4x3/ve.svg +26 -0
  249. data/app/assets/images/flags/4x3/vg.svg +127 -0
  250. data/app/assets/images/flags/4x3/vi.svg +28 -0
  251. data/app/assets/images/flags/4x3/vn.svg +11 -0
  252. data/app/assets/images/flags/4x3/vu.svg +18 -0
  253. data/app/assets/images/flags/4x3/wf.svg +7 -0
  254. data/app/assets/images/flags/4x3/ws.svg +7 -0
  255. data/app/assets/images/flags/4x3/xk.svg +16 -0
  256. data/app/assets/images/flags/4x3/ye.svg +7 -0
  257. data/app/assets/images/flags/4x3/yt.svg +7 -0
  258. data/app/assets/images/flags/4x3/za.svg +17 -0
  259. data/app/assets/images/flags/4x3/zm.svg +27 -0
  260. data/app/assets/images/flags/4x3/zw.svg +21 -0
  261. data/app/assets/images/global.svg +1 -0
  262. data/app/assets/images/info.svg +7 -0
  263. data/app/assets/images/pagination-arrow-right.svg +3 -10
  264. data/app/assets/images/pagination-double-arrow-right.svg +6 -13
  265. data/app/assets/images/plus.svg +1 -1
  266. data/app/assets/images/search.svg +1 -1
  267. data/app/assets/javascripts/spree/frontend.js +4 -1
  268. data/app/assets/javascripts/spree/frontend/cart.js +23 -1
  269. data/app/assets/javascripts/spree/frontend/checkout.js +1 -1
  270. data/app/assets/javascripts/spree/frontend/checkout/address.js +19 -10
  271. data/app/assets/javascripts/spree/frontend/checkout/payment.js +50 -23
  272. data/app/assets/javascripts/spree/frontend/login.js +5 -0
  273. data/app/assets/javascripts/spree/frontend/main_nav_bar.js +86 -0
  274. data/app/assets/javascripts/spree/frontend/multi_currency.js +13 -0
  275. data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +2 -2
  276. data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +53 -10
  277. data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +84 -14
  278. data/app/assets/javascripts/spree/frontend/views/spree/shared/product_added_modal.js +7 -0
  279. data/app/assets/javascripts/spree/frontend/views/spree/shared/variant_select.js +93 -0
  280. data/app/assets/stylesheets/spree/frontend.css +0 -1
  281. data/app/assets/stylesheets/spree/frontend/application.scss +4 -0
  282. data/app/assets/stylesheets/spree/frontend/components-bootstrap/carousel.scss +4 -0
  283. data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +80 -1
  284. data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-base.scss +23 -0
  285. data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-list.scss +265 -0
  286. data/app/assets/stylesheets/spree/frontend/flags/_variables.scss +2 -0
  287. data/app/assets/stylesheets/spree/frontend/flags/flag-icon.scss +3 -0
  288. data/app/assets/stylesheets/spree/frontend/helpers/spree/frontend_helper.scss +7 -0
  289. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/confirm.scss +0 -4
  290. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/delivery.scss +6 -0
  291. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +6 -4
  292. data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +2 -2
  293. data/app/assets/stylesheets/spree/frontend/views/spree/products/cart_form.scss +8 -0
  294. data/app/assets/stylesheets/spree/frontend/views/spree/products/gallery_modal.scss +1 -0
  295. data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +28 -4
  296. data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +7 -0
  297. data/app/assets/stylesheets/spree/frontend/views/spree/shared/_color_select.scss +10 -9
  298. data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/single.scss +1 -1
  299. data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/thumbnails.scss +1 -0
  300. data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +9 -4
  301. data/app/assets/stylesheets/spree/frontend/views/spree/shared/change_store.scss +7 -0
  302. data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +30 -25
  303. data/app/assets/stylesheets/spree/frontend/views/spree/shared/mobile_navigation.scss +29 -3
  304. data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +24 -7
  305. data/app/assets/stylesheets/spree/frontend/views/spree/shared/quantity_select.scss +9 -12
  306. data/app/assets/stylesheets/spree/frontend/views/spree/shared/search_form.scss +12 -0
  307. data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +0 -6
  308. data/app/controllers/concerns/spree/checkout/address_book.rb +9 -7
  309. data/app/controllers/spree/addresses_controller.rb +1 -0
  310. data/app/controllers/spree/currency_controller.rb +17 -0
  311. data/app/controllers/spree/products_controller.rb +29 -13
  312. data/app/controllers/spree/store_controller.rb +4 -0
  313. data/app/helpers/spree/addresses_helper.rb +37 -7
  314. data/app/helpers/spree/frontend_helper.rb +35 -5
  315. data/app/helpers/spree/navigation_helper.rb +4 -1
  316. data/app/views/kaminari/twitter-bootstrap-4/_first_page.html.erb +1 -1
  317. data/app/views/kaminari/twitter-bootstrap-4/_last_page.html.erb +1 -1
  318. data/app/views/kaminari/twitter-bootstrap-4/_next_page.html.erb +1 -1
  319. data/app/views/kaminari/twitter-bootstrap-4/_prev_page.html.erb +1 -1
  320. data/app/views/spree/address/_form.html.erb +22 -22
  321. data/app/views/spree/addresses/_form.html.erb +15 -6
  322. data/app/views/spree/addresses/edit.html.erb +13 -8
  323. data/app/views/spree/addresses/new.html.erb +5 -1
  324. data/app/views/spree/checkout/_address.html.erb +16 -18
  325. data/app/views/spree/checkout/_confirm.html.erb +5 -47
  326. data/app/views/spree/checkout/_delivery.html.erb +10 -3
  327. data/app/views/spree/checkout/_delivery_informations.html.erb +44 -0
  328. data/app/views/spree/checkout/_payment.html.erb +5 -24
  329. data/app/views/spree/checkout/_payment_sources.html.erb +17 -0
  330. data/app/views/spree/checkout/_summary.html.erb +22 -17
  331. data/app/views/spree/checkout/edit.html.erb +1 -1
  332. data/app/views/spree/checkout/payment/_gateway.html.erb +1 -1
  333. data/app/views/spree/checkout/registration.html.erb +2 -2
  334. data/app/views/spree/errors/not_found.html.erb +2 -2
  335. data/app/views/spree/home/index.html.erb +29 -35
  336. data/app/views/spree/layouts/checkout.html.erb +3 -1
  337. data/app/views/spree/orders/_coupon_code.html.erb +1 -1
  338. data/app/views/spree/orders/_line_item.html.erb +1 -1
  339. data/app/views/spree/orders/_line_item_data.html.erb +2 -2
  340. data/app/views/spree/orders/show.html.erb +1 -1
  341. data/app/views/spree/products/_cart_form.html.erb +8 -2
  342. data/app/views/spree/products/_color_option_type.html.erb +15 -14
  343. data/app/views/spree/products/_description.html.erb +10 -2
  344. data/app/views/spree/products/_filters_desktop.html.erb +43 -41
  345. data/app/views/spree/products/_filters_mobile.html.erb +6 -6
  346. data/app/views/spree/products/_gallery_modal.html.erb +1 -1
  347. data/app/views/spree/products/_option_type.html.erb +0 -1
  348. data/app/views/spree/products/_properties.html.erb +6 -4
  349. data/app/views/spree/products/_sort_desktop.html.erb +6 -6
  350. data/app/views/spree/products/_sort_mobile.html.erb +8 -8
  351. data/app/views/spree/shared/_breadcrumbs.html.erb +2 -2
  352. data/app/views/spree/shared/_carousel_4_products.html.erb +1 -1
  353. data/app/views/spree/shared/_cart.html.erb +1 -1
  354. data/app/views/spree/shared/_change_store.html.erb +25 -0
  355. data/app/views/spree/shared/_checkout_header.html.erb +2 -2
  356. data/app/views/spree/shared/_footer.html.erb +12 -8
  357. data/app/views/spree/shared/_head.html.erb +2 -1
  358. data/app/views/spree/shared/_link_to_account.html.erb +1 -0
  359. data/app/views/spree/shared/_link_to_cart.html.erb +1 -2
  360. data/app/views/spree/shared/_login.html.erb +4 -4
  361. data/app/views/spree/shared/_main_nav_bar.html.erb +46 -40
  362. data/app/views/spree/shared/_mobile_change_store.html.erb +30 -0
  363. data/app/views/spree/shared/_mobile_navigation.html.erb +29 -52
  364. data/app/views/spree/shared/_nav_bar.html.erb +6 -16
  365. data/app/views/spree/shared/_option_values.html.erb +2 -2
  366. data/app/views/spree/shared/_quantity_select.html.erb +1 -1
  367. data/app/views/spree/shared/_search.html.erb +8 -11
  368. data/app/views/spree/shared/_taxonomies.html.erb +1 -1
  369. data/app/views/spree/shared/carousel/_thumbnails.html.erb +32 -30
  370. data/app/views/spree/users/_address.html.erb +16 -24
  371. data/app/views/spree/users/_address_controls.html.erb +11 -0
  372. data/app/views/spree/users/show.html.erb +14 -12
  373. data/config/routes.rb +2 -0
  374. data/spree_frontend.gemspec +4 -4
  375. metadata +301 -19
  376. data/app/assets/stylesheets/spree/frontend/_glyphicons_urls_fix.scss +0 -10
  377. data/app/assets/stylesheets/spree/frontend/address_book.scss +0 -8
@@ -11,18 +11,18 @@
11
11
  </div>
12
12
  <div id="filters-accordion">
13
13
  <% available_option_types.each do |option_type| %>
14
- <% option_type_name = option_type.presentation.titleize.gsub(' ', '') %>
14
+ <% option_type_name = option_type.filter_param %>
15
15
  <% ot_downcase_name = option_type_name.downcase %>
16
16
 
17
17
  <div class="card plp-overlay-card">
18
- <div class="card-header text-uppercase <%= 'collapsed' if params[ot_downcase_name].blank? %> plp-overlay-card-header" data-toggle="collapse" data-target="#collapseFilterMobile<%= option_type_name %>" aria-expanded="true" aria-controls="collapseFilterMobile<%= option_type_name %>" role="heading" aria-level="3">
18
+ <div class="card-header text-uppercase <%= 'collapsed' if params[ot_downcase_name].blank? %> plp-overlay-card-header" data-toggle="collapse" id="filtersMobile<%= option_type_name %>" data-target="#collapseFilterMobile<%= option_type_name %>" aria-expanded="true" aria-controls="collapseFilterMobile<%= option_type_name %>" role="heading" aria-level="3">
19
19
  <%= option_type_name %>
20
20
  <%= icon(name: 'arrow-right',
21
21
  classes: 'spree-icon-arrow spree-icon-arrow-right mt-1 float-right arrow plp-overlay-card-header-arrow',
22
22
  width: 16,
23
23
  height: 16) %>
24
24
  </div>
25
- <div id="collapseFilterMobile<%= option_type_name %>" class="collapse <%= 'show' unless params[ot_downcase_name].blank? %>" aria-labelledby="collapseFilterMobile<%= option_type_name %>" data-parent="#filters-accordion">
25
+ <div id="collapseFilterMobile<%= option_type_name %>" class="collapse <%= 'show' unless params[ot_downcase_name].blank? %>" aria-labelledby="filtersMobile<%= option_type_name %>" data-parent="#filters-accordion">
26
26
  <div class="card-body pt-1">
27
27
  <%= render 'spree/shared/option_values', params_ot_downcase_name: params[ot_downcase_name], option_type: option_type, permitted_params: permitted_params, ot_downcase_name: ot_downcase_name %>
28
28
  </div>
@@ -42,7 +42,7 @@
42
42
  <div class="card-body pt-1">
43
43
  <% price_filter_values.each do |name| %>
44
44
  <% price_param = params[:price] == name ? '' : name %>
45
- <%= link_to permitted_params.merge(price: price_param, menu_open: 1) do %>
45
+ <%= link_to permitted_params.merge(price: price_param, menu_open: 1), data: { params: permitted_params.merge(price: price_param, menu_open: 1), filter_name: 'price' } do %>
46
46
  <div class="d-inline-block py-1 px-2 m-1 text-uppercase plp-overlay-card-item <%= 'plp-overlay-card-item--selected' if params[:price] == name %>">
47
47
  <%= name %>
48
48
  </div>
@@ -60,7 +60,7 @@
60
60
  <% end %>
61
61
 
62
62
  <div class="container position-absolute text-center plp-overlay-buttons pt-3">
63
- <%= link_to Spree.t('plp.clear_all'), permitted_params.select { |key, value| key == "sort_by"}, class: 'btn spree-btn btn-outline-primary w-100 mb-4' %>
64
- <%= link_to Spree.t('plp.done'), permitted_params, class: 'btn btn-primary spree-btn w-100' %>
63
+ <%= link_to Spree.t('plp.clear_all'), permitted_params.select { |key, value| key == "sort_by"}, class: 'btn spree-btn btn-outline-primary w-100 mb-4', data: { params: permitted_params.select { |key, value| key == "sort_by"} } %>
64
+ <%= link_to Spree.t('plp.done'), permitted_params, class: 'btn btn-primary spree-btn w-100 done-btn', data: { params: permitted_params } %>
65
65
  </div>
66
66
  </div>
@@ -3,7 +3,7 @@
3
3
  <div class="modal-dialog--zoom modal-dialog mw-100 vh-100 mt-0 mb-0" role="document">
4
4
  <div class="modal-content h-100">
5
5
  <div class="modal-body h-100">
6
- <button type="button" class="close position-absolute" data-dismiss="modal" aria-label="Close">
6
+ <button type="button" class="close position-absolute mr-3" data-dismiss="modal" aria-label="Close">
7
7
  <span aria-hidden="true">
8
8
  <%= icon(name: 'close',
9
9
  classes: 'd-block d-lg-none',
@@ -20,7 +20,6 @@
20
20
 
21
21
  <%= label_tag "variant_option_value_id_#{option_type[:id]}_#{option_value[:id]}",
22
22
  class: "m-1 select-label",
23
- tabindex: 0,
24
23
  "aria-label" => option_value[:presentation] do %>
25
24
 
26
25
  <span><%= option_value[:presentation] %></span>
@@ -2,10 +2,12 @@
2
2
  <h3 class="pt-4 font-weight-bold text-uppercase product-details-subtitle"><%= Spree.t(:details) %></h3>
3
3
  <ul id="product-properties" class="m-0 list-unstyled product-properies" data-hook>
4
4
  <% @product_properties.each do |product_property| %>
5
- <li>
6
- <span class="font-weight-bold text-break"><%= product_property.property.presentation %>:</span>
7
- <span class="text-break"><%= product_property.value %></span>
8
- </li>
5
+ <% if product_property.show_property? %>
6
+ <li>
7
+ <span class="font-weight-bold text-break"><%= product_property.property.presentation %>:</span>
8
+ <span class="text-break"><%= product_property.value %></span>
9
+ </li>
10
+ <% end %>
9
11
  <% end %>
10
12
  </ul>
11
13
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <div class="container dropdown d-none d-lg-flex justify-content-end mt-5 pr-4 pb-3 plp-sort">
2
- <div data-toggle="dropdown" class="plp-sort-header">
2
+ <a data-toggle="dropdown" class="plp-sort-header" href="#" role="button" aria-haspopup="true" aria-expanded="false">
3
3
  <%= Spree.t("plp.#{ params[:sort_by].blank? ? 'sort_by': params[:sort_by].gsub('-', '_') }") %>
4
4
  <%= icon(name: 'arrow-right',
5
5
  classes: 'spree-icon-arrow spree-icon-arrow-up ml-3 plp-sort-header-arrow--up',
@@ -9,21 +9,21 @@
9
9
  classes: 'spree-icon-arrow spree-icon-arrow-down ml-3 plp-sort-header-arrow--down',
10
10
  width: 18,
11
11
  height: 18) %>
12
- </div>
12
+ </a>
13
13
 
14
14
  <div class="dropdown-menu text-right plp-sort-dropdown">
15
15
  <ul class="pt-1 plp-sort-dropdown-ul">
16
16
  <li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by].blank? %>">
17
- <%= link_to Spree.t('plp.default'), url_for(permitted_params.merge(sort_by: nil)) %>
17
+ <%= link_to Spree.t('plp.default'), url_for(permitted_params.merge(sort_by: nil)), class: 'dropdown-item' %>
18
18
  </li>
19
19
  <li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'newest-first' %>">
20
- <%= link_to Spree.t('plp.newest_first'), url_for(permitted_params.merge(sort_by: 'newest-first')) %>
20
+ <%= link_to Spree.t('plp.newest_first'), url_for(permitted_params.merge(sort_by: 'newest-first')), class: 'dropdown-item' %>
21
21
  </li>
22
22
  <li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'price-high-to-low' %>">
23
- <%= link_to Spree.t('plp.price_high_to_low'), url_for(permitted_params.merge(sort_by: 'price-high-to-low')) %>
23
+ <%= link_to Spree.t('plp.price_high_to_low'), url_for(permitted_params.merge(sort_by: 'price-high-to-low')), class: 'dropdown-item' %>
24
24
  </li>
25
25
  <li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'price-low-to-high' %>">
26
- <%= link_to Spree.t('plp.price_low_to_high'), url_for(permitted_params.merge(sort_by: 'price-low-to-high')) %>
26
+ <%= link_to Spree.t('plp.price_low_to_high'), url_for(permitted_params.merge(sort_by: 'price-low-to-high')), class: 'dropdown-item' %>
27
27
  </li>
28
28
  </ul>
29
29
  </div>
@@ -7,32 +7,32 @@
7
7
  </div>
8
8
  <div class="plp-overlay-header-border"></div>
9
9
  <ul class="pt-1 plp-overlay-ul">
10
- <li class="p-3 plp-overlay-ul-li<%= '--active' if params[:sort_by].blank? %>">
11
- <a href="<%= url_for(permitted_params.merge(sort_by: nil)) %>" >
10
+ <li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by].blank? %>">
11
+ <a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: nil)) %>" >
12
12
  <div class="plp-empty-dot">
13
13
  <div class="filled-dot"></div>
14
14
  </div>
15
15
  <%= Spree.t('plp.default') %>
16
16
  </a>
17
17
  </li>
18
- <li class="p-3 plp-overlay-ul-li<%= '--active' if params[:sort_by] == 'newest-first' %>">
19
- <a href="<%= url_for(permitted_params.merge(sort_by: 'newest-first')) %>" >
18
+ <li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'newest-first' %>">
19
+ <a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'newest-first')) %>" >
20
20
  <div class="plp-empty-dot">
21
21
  <div class="filled-dot"></div>
22
22
  </div>
23
23
  <%= Spree.t('plp.newest_first') %>
24
24
  </a>
25
25
  </li>
26
- <li class="p-3 plp-overlay-ul-li<%= '--active' if params[:sort_by] == 'price-high-to-low' %>">
27
- <a href="<%= url_for(permitted_params.merge(sort_by: 'price-high-to-low')) %>" >
26
+ <li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'price-high-to-low' %>">
27
+ <a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-high-to-low')) %>" >
28
28
  <div class="plp-empty-dot">
29
29
  <div class="filled-dot"></div>
30
30
  </div>
31
31
  <%= Spree.t('plp.price_high_to_low') %>
32
32
  </a>
33
33
  </li>
34
- <li class="p-3 plp-overlay-ul-li<%= '--active' if params[:sort_by] == 'price-low-to-high' %>">
35
- <a href="<%= url_for(permitted_params.merge(sort_by: 'price-low-to-high')) %>" >
34
+ <li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'price-low-to-high' %>">
35
+ <a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-low-to-high')) %>" >
36
36
  <div class="plp-empty-dot">
37
37
  <div class="filled-dot"></div>
38
38
  </div>
@@ -1,8 +1,8 @@
1
- <nav id="breadcrumbs" class="col-12 mt-1 mt-sm-3 mt-lg-4">
1
+ <nav id="breadcrumbs" class="col-12 mt-1 mt-sm-3 mt-lg-4" aria-label="breadcrumbs">
2
2
  <ol class="breadcrumb">
3
3
  <li class="breadcrumb-item">
4
4
  <span>
5
- <%= link_to Spree.t('plp.home'), spree.root_path %>
5
+ <%= link_to Spree.t(:home), spree.root_path %>
6
6
  </span>
7
7
  </li>
8
8
  <% if @taxon %>
@@ -1,4 +1,4 @@
1
- <% cache [common_product_cache_keys, products&.maximum(:updated_at)&.to_i, id] do %>
1
+ <% cache [common_product_cache_keys, products&.maximum(:updated_at)&.to_i, id, products&.ids&.join(',')] do %>
2
2
  <div id="<%= id %>-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 +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 %>
@@ -0,0 +1,25 @@
1
+ <% if Spree::Config.show_store_currency_selector && stores.size > 1 %>
2
+ <li class="change-store">
3
+ <div class="dropdown navbar-right-dropdown">
4
+ <button id="stores-button" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle" aria-label="<%= Spree.t('nav_bar.change_country')%>">
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="stores_list" class="dropdown-menu dropdown-menu-right text-right">
16
+ <% stores.each do |store| %>
17
+ <div class="pl-3 d-flex justify-content-between align-items-center <%= 'active' if store.id == current_store.id %>">
18
+ <span class="flag-icon flag-icon-<%= store_country_iso(store) %>"></span>
19
+ <%= link_to "#{store.default_country&.name} (#{store_currency_symbol(store)})", "//#{store.url}", class: 'dropdown-item text-uppercase' %>
20
+ </div>
21
+ <% end %>
22
+ </div>
23
+ </div>
24
+ </li>
25
+ <% end %>
@@ -1,6 +1,6 @@
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">
3
+ <div class="container position-relative" role="navigation" aria-label="<%= Spree.t('checkout_page.main_navigation') %>">
4
4
  <div class="position-absolute checkout-header-link">
5
5
  <%= link_to spree.cart_path, class: "d-none d-sm-inline text-uppercase", method: :get do %>
6
6
  <%= icon(name: 'arrow-right',
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  <div class="d-flex flex-nowrap align-items-center justify-content-center">
22
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) %>
23
+ <%= logo(nil, {method: :get}) %>
24
24
  </figure>
25
25
  </div>
26
26
  </div>
@@ -6,9 +6,9 @@
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,13 +32,17 @@
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.contact_email&.present? %>
45
+ <div><%= Spree.t(:email) %>: <%= current_store.contact_email %></div>
42
46
  <% end %>
43
47
  </div>
44
48
  </div>
@@ -1,7 +1,8 @@
1
1
  <title><%= title %></title>
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1" />
3
- <%== meta_image_data_tag %>
3
+ <%== og_meta_data_tags %>
4
4
  <%== meta_data_tags %>
5
+ <%== meta_robots %>
5
6
  <%= canonical_tag(current_store.url) %>
6
7
  <%= favicon_link_tag 'favicon.ico' %>
7
8
  <%= stylesheet_link_tag 'spree/frontend/all', media: 'screen', 'data-turbolinks-track': 'reload' %>
@@ -1,5 +1,6 @@
1
1
  <% if try_spree_current_user %>
2
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.admin_panel'), spree.admin_orders_path, class: 'dropdown-item text-uppercase' if try_spree_current_user.has_spree_role?(:admin) %>
3
4
  <%= link_to Spree.t('nav_bar.log_out'), spree_logout_path, class: 'dropdown-item', method: :get if defined?(spree_logout_path) %>
4
5
  <% else %>
5
6
  <%= link_to Spree.t('nav_bar.log_in'), spree_login_path, class: 'dropdown-item' if defined?(spree_login_path) %>
@@ -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 %>
@@ -4,12 +4,12 @@
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(:log_in), class: 'btn btn-primary btn-block spree-btn mt-2' %>
29
29
  <% end %>
30
30
 
31
31
  <% if spree.respond_to?(:recover_password_path) %>
@@ -1,50 +1,56 @@
1
1
  <% if spree_navigation_data.any? %>
2
- <ul class="nav h-100 main-nav-bar">
3
- <% spree_navigation_data.each do |root| %>
4
- <li class="navbar main-nav-bar-dropdown main-nav-bar-category">
5
- <%= link_to root[:title], root[:url], class: "p-2 main-nav-bar-item main-nav-bar-category-button" %>
6
- <% if root[:items].present? || root[:promo_banners].present? %>
7
- <div class="w-100 shadow main-nav-bar-category-dropdown">
8
- <div class="container p-0 d-flex justify-content-xl-around mx-auto">
9
- <% if root[:items].present? %>
2
+ <div class="h-100" role="navigation" aria-label="<%= Spree.t('nav_bar.desktop') %>">
3
+ <ul class="nav h-100 main-nav-bar">
4
+ <% spree_navigation_data.each do |root| %>
5
+ <li class="p-0 nav-item main-nav-bar-category">
6
+ <% has_dropdown = root[:items].present? || root[:promo_banners].present? %>
7
+ <% dropdown_toggle_class = has_dropdown ? "dropdown-toggle" : "" %>
8
+ <% data_attr = has_dropdown ? { toggle: "dropdown" } : {} %>
9
+ <% aria_attr = has_dropdown ? { haspopup: true, expanded: false } : {} %>
10
+ <%= link_to root[:title], root[:url], class: "nav-link main-nav-bar-item main-nav-bar-category-button #{dropdown_toggle_class}", data: data_attr, aria: aria_attr %>
11
+ <% if has_dropdown %>
12
+ <div class="dropdown-menu w-100 shadow main-nav-bar-category-dropdown">
13
+ <div class="container p-0 d-flex justify-content-xl-around mx-auto">
10
14
  <div class="row">
11
- <div class="category-links">
12
- <% if root[:subtitle].present? %>
13
- <div class="category-links-header text-uppercase">
14
- <%= root[:subtitle] %>
15
- </div>
16
- <% end %>
17
- <ul class="pl-0">
18
- <% root[:items].each do |item| %>
19
- <li>
20
- <%= link_to item[:title], item[:url], class: "text-uppercase main-nav-bar-category-links" %>
21
- </li>
15
+ <% if root[:items].present? %>
16
+ <div class="category-links">
17
+ <% if root[:subtitle].present? %>
18
+ <div class="category-links-header text-uppercase">
19
+ <%= root[:subtitle] %>
20
+ </div>
22
21
  <% end %>
23
- </ul>
24
- </div>
25
- <% end %>
26
- <% if root[:promo_banners].present? %>
27
- <% root[:promo_banners].each do |promo_banner| %>
28
- <%= link_to promo_banner[:url] do %>
29
- <div class="category-image text-center mx-3">
30
- <%= main_nav_image(promo_banner[:image], promo_banner[:title]) %>
31
- <div class="category-box">
32
- <div class="category-box-small-text">
33
- <%= promo_banner[:subtitle] %>
34
- </div>
35
- <div class="category-box-big-text">
36
- <%= promo_banner[:title] %>
22
+ <ul class="pl-0">
23
+ <% root[:items].each do |item| %>
24
+ <li>
25
+ <%= link_to item[:title], item[:url], class: "text-uppercase main-nav-bar-category-links dropdown-item" %>
26
+ </li>
27
+ <% end %>
28
+ </ul>
29
+ </div>
30
+ <% end %>
31
+ <% if root[:promo_banners].present? %>
32
+ <% root[:promo_banners].each do |promo_banner| %>
33
+ <%= link_to promo_banner[:url], class: "dropdown-item" do %>
34
+ <div class="category-image text-center mx-3">
35
+ <%= main_nav_image(promo_banner[:image], promo_banner[:title]) %>
36
+ <div class="category-box">
37
+ <div class="category-box-small-text">
38
+ <%= promo_banner[:subtitle] %>
39
+ </div>
40
+ <div class="category-box-big-text">
41
+ <%= promo_banner[:title] %>
42
+ </div>
37
43
  </div>
38
44
  </div>
39
- </div>
45
+ <% end %>
40
46
  <% end %>
41
47
  <% end %>
42
- <% end %>
48
+ </div>
43
49
  </div>
44
50
  </div>
45
- </div>
46
- <%end %>
47
- </li>
48
- <% end %>
49
- </ul>
51
+ <%end %>
52
+ </li>
53
+ <% end %>
54
+ </ul>
55
+ </div>
50
56
  <% end %>
@@ -0,0 +1,30 @@
1
+ <% if stores.size > 1 %>
2
+ <li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
3
+ <span class="w-75"><%= Spree.t('nav_bar.change_country')%></span>
4
+ <a class="w-25 text-right mobile-navigation-category-link" data-category="countries" href="#" aria-label="<%= Spree.t('nav_bar.change_country')%>">
5
+ <%= icon(name: 'arrow-right',
6
+ classes: 'd-sm-none spree-icon-arrow spree-icon-arrow-right',
7
+ width: 16,
8
+ height: 16) %>
9
+ <%= icon(name: 'arrow-right',
10
+ classes: 'd-none d-sm-inline spree-icon-arrow spree-icon-arrow-right',
11
+ width: 14,
12
+ height: 27) %>
13
+ </a>
14
+
15
+ <ul class="list-unstyled position-absolute mobile-navigation-sublist" data-category="countries">
16
+ <li class="text-center font-weight-bold mobile-navigation-sublist-header">
17
+ <%= Spree.t('nav_bar.change_country')%>
18
+ </li>
19
+ <% stores.each do |store| %>
20
+ <li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
21
+ <span class="flag-icon flag-icon-<%= store_country_iso(store) %>"></span>
22
+ <%= link_to "//#{store.url}", class: 'dropdown-item text-uppercase d-flex' do %>
23
+ <span><%= store.default_country&.name %></span>
24
+ <span class="text-right w-100"><%= store_currency_symbol(store) %></span>
25
+ <% end %>
26
+ </li>
27
+ <% end %>
28
+ </ul>
29
+ </li>
30
+ <% end %>
@@ -1,36 +1,22 @@
1
1
  <% if spree_navigation_data.any? %>
2
- <div class="position-fixed text-uppercase d-xl-none mobile-navigation">
3
- <div class="d-flex align-items-center header-spree" data-hook>
4
- <div class="container-fluid header-spree-fluid">
5
- <div class="d-flex flex-nowrap align-items-center">
6
- <div class="d-xl-none flex-grow-1">
7
- <button id="mobile-navigation-back-button" aria-label="<%= Spree.t('nav_bar.go_to_previous_menu') %>">
8
- <%= icon(name: 'arrow-right',
9
- classes: 'd-sm-none spree-icon-arrow spree-icon-arrow-left',
10
- width: 18,
11
- height: 18) %>
12
- <%= icon(name: 'arrow-right',
13
- classes: 'd-none d-sm-inline spree-icon-arrow spree-icon-arrow-left',
14
- width: 17,
15
- height: 28) %>
16
- </button>
17
- </div>
18
- <figure class="logo flex-grow-0 flex-xl-grow-1 order-xl-0 header-spree-fluid-logo" data-hook>
19
- <%= logo %>
20
- </figure>
21
- <div id="top-nav-bar-mobile" class="text-right flex-grow-1 header-spree-fluid-secondary-navigation" data-hook>
22
- <button id="mobile-navigation-close-button" aria-label="<%= Spree.t('nav_bar.close_menu') %>">
23
- <%= icon(name: 'close',
24
- classes: 'd-sm-none',
25
- width: 17,
26
- height: 17) %>
27
- <%= icon(name: 'close',
28
- classes: 'd-none d-sm-inline',
29
- width: 26,
30
- height: 26) %>
31
- </button>
32
- </div>
33
- </div>
2
+ <div class="position-fixed text-uppercase d-xl-none mobile-navigation" role="navigation" aria-label="<%= Spree.t('nav_bar.mobile') %>">
3
+ <div class="container d-flex align-items-center justify-content-between header-spree" data-hook>
4
+ <button class="m-0 p-0" id="mobile-navigation-back-button" aria-label="<%= Spree.t('nav_bar.go_to_previous_menu') %>">
5
+ <%= icon(name: 'arrow-right',
6
+ classes: 'd-inline spree-icon-arrow spree-icon-arrow-left',
7
+ width: 26,
8
+ height: 26) %>
9
+ </button>
10
+ <figure class="logo header-spree-fluid-logo" data-hook>
11
+ <%= logo %>
12
+ </figure>
13
+ <div id="top-nav-bar-mobile" class="m-0 p-0 header-spree-fluid-secondary-navigation" data-hook>
14
+ <button id="mobile-navigation-close-button" aria-label="<%= Spree.t('nav_bar.close_menu') %>">
15
+ <%= icon(name: 'close',
16
+ classes: 'd-inline',
17
+ width: 26,
18
+ height: 26) %>
19
+ </button>
34
20
  </div>
35
21
  </div>
36
22
 
@@ -38,20 +24,14 @@
38
24
  <% spree_navigation_data.each do |root| %>
39
25
  <li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
40
26
  <%= link_to root[:title], root[:url], class: 'w-75' %>
41
-
42
- <a class="w-25 text-right mobile-navigation-category-link" data-category="<%= root[:title].parameterize %>" href="#" aria-label="<%= Spree.t('go_to_category')%>">
43
- <%= icon(name: 'arrow-right',
44
- classes: 'd-sm-none spree-icon-arrow spree-icon-arrow-right',
45
- width: 16,
46
- height: 16) %>
47
- <%= icon(name: 'arrow-right',
48
- classes: 'd-none d-sm-inline spree-icon-arrow spree-icon-arrow-right',
49
- width: 14,
50
- height: 27) %>
51
- </a>
52
-
53
- <ul class="list-unstyled position-absolute mobile-navigation-sublist" data-category="<%= root[:title].parameterize %>">
54
- <% if root[:items].present? %>
27
+ <% if root[:items].present? %>
28
+ <a class="w-25 text-right mobile-navigation-category-link" data-category="<%= root[:title].parameterize %>" href="#" aria-label="<%= Spree.t('go_to_category')%>">
29
+ <%= icon(name: 'arrow-right',
30
+ classes: 'd-inline spree-icon-arrow spree-icon-arrow-right',
31
+ width: 14,
32
+ height: 27) %>
33
+ </a>
34
+ <ul class="list-unstyled position-absolute mobile-navigation-sublist" data-category="<%= root[:title].parameterize %>">
55
35
  <li class="text-center font-weight-bold mobile-navigation-sublist-header">
56
36
  <%= root[:title] %>
57
37
  </li>
@@ -60,14 +40,11 @@
60
40
  <%= link_to item[:title], item[:url], class: 'w-75' %>
61
41
  </li>
62
42
  <% end %>
63
- <% else %>
64
- <li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
65
- <%= link_to root[:title], root[:url], class: 'w-75' %>
66
- </li>
67
- <% end %>
68
- </ul>
43
+ </ul>
44
+ <% end %>
69
45
  </li>
70
46
  <% end %>
47
+ <%= render partial: 'spree/shared/mobile_change_store' %>
71
48
  </ul>
72
49
  </div>
73
50
  <% end %>