spree_frontend 4.2.0.rc1 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spree/frontend.js +11 -1
  3. data/app/assets/javascripts/spree/frontend/account.js +1 -1
  4. data/app/assets/javascripts/spree/frontend/cart.js +24 -2
  5. data/app/assets/javascripts/spree/frontend/checkout/address.js +60 -43
  6. data/app/assets/javascripts/spree/frontend/checkout/shipment.js +15 -2
  7. data/app/assets/javascripts/spree/frontend/coupon_manager.js +2 -2
  8. data/app/assets/javascripts/spree/frontend/currency.js +11 -0
  9. data/app/assets/javascripts/spree/frontend/locale.js +11 -0
  10. data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +2 -2
  11. data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +1 -1
  12. data/app/assets/stylesheets/spree/frontend/application.scss +0 -3
  13. data/app/assets/stylesheets/spree/frontend/functions.scss +1 -0
  14. data/app/assets/stylesheets/spree/frontend/variables/bootstrap-overrides.scss +2 -2
  15. data/app/assets/stylesheets/spree/frontend/variables/helper-variables.scss +1 -0
  16. data/app/assets/stylesheets/spree/frontend/variables/variables.scss +54 -0
  17. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/confirm.scss +27 -22
  18. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +3 -0
  19. data/app/assets/stylesheets/spree/frontend/views/spree/orders/show.scss +3 -0
  20. data/app/controllers/concerns/spree/checkout/address_book.rb +9 -7
  21. data/app/controllers/concerns/spree/locale_urls.rb +23 -0
  22. data/app/controllers/spree/addresses_controller.rb +1 -0
  23. data/app/controllers/spree/checkout_controller.rb +8 -8
  24. data/app/controllers/spree/currency_controller.rb +6 -10
  25. data/app/controllers/spree/home_controller.rb +5 -1
  26. data/app/controllers/spree/locale_controller.rb +23 -6
  27. data/app/controllers/spree/orders_controller.rb +2 -2
  28. data/app/controllers/spree/products_controller.rb +6 -5
  29. data/app/controllers/spree/store_controller.rb +7 -13
  30. data/app/controllers/spree/taxons_controller.rb +4 -3
  31. data/app/helpers/spree/addresses_helper.rb +19 -8
  32. data/app/helpers/spree/cache_helper.rb +7 -0
  33. data/app/helpers/spree/frontend_helper.rb +17 -25
  34. data/app/helpers/spree/navigation_helper.rb +6 -1
  35. data/app/helpers/spree/store_helper.rb +39 -0
  36. data/app/helpers/spree/taxons_helper.rb +1 -1
  37. data/app/models/spree/frontend_configuration.rb +2 -1
  38. data/app/views/kaminari/twitter-bootstrap-4/_first_page.html.erb +2 -2
  39. data/app/views/kaminari/twitter-bootstrap-4/_gap.html.erb +2 -2
  40. data/app/views/kaminari/twitter-bootstrap-4/_last_page.html.erb +2 -2
  41. data/app/views/kaminari/twitter-bootstrap-4/_next_page.html.erb +2 -2
  42. data/app/views/kaminari/twitter-bootstrap-4/_page.html.erb +2 -2
  43. data/app/views/kaminari/twitter-bootstrap-4/_paginator.html.erb +2 -2
  44. data/app/views/kaminari/twitter-bootstrap-4/_prev_page.html.erb +2 -2
  45. data/app/views/spree/address/_form.html.erb +15 -16
  46. data/app/views/spree/addresses/_form.html.erb +1 -1
  47. data/app/views/spree/addresses/edit.html.erb +2 -2
  48. data/app/views/spree/addresses/new.html.erb +2 -2
  49. data/app/views/spree/checkout/_address.html.erb +4 -6
  50. data/app/views/spree/checkout/_confirm.html.erb +1 -33
  51. data/app/views/spree/checkout/_credit_card.html.erb +2 -2
  52. data/app/views/spree/checkout/_delivery_informations.html.erb +43 -36
  53. data/app/views/spree/checkout/_summary.html.erb +3 -5
  54. data/app/views/spree/checkout/payment/_gateway.html.erb +1 -1
  55. data/app/views/spree/home/index.html.erb +21 -22
  56. data/app/views/spree/locale/index.html.erb +1 -0
  57. data/app/views/spree/orders/_coupon_code.html.erb +2 -3
  58. data/app/views/spree/orders/_line_item.html.erb +2 -2
  59. data/app/views/spree/orders/_line_item_data.html.erb +2 -2
  60. data/app/views/spree/orders/edit.html.erb +2 -3
  61. data/app/views/spree/orders/show.html.erb +1 -71
  62. data/app/views/spree/products/_cart_form.html.erb +4 -7
  63. data/app/views/spree/products/_color_option_type.html.erb +2 -3
  64. data/app/views/spree/products/_filters_desktop.html.erb +1 -2
  65. data/app/views/spree/products/_gallery.html.erb +4 -6
  66. data/app/views/spree/products/_gallery_modal.html.erb +3 -5
  67. data/app/views/spree/products/_option_type.html.erb +1 -2
  68. data/app/views/spree/products/_sort_mobile.html.erb +4 -4
  69. data/app/views/spree/products/related.html.erb +11 -5
  70. data/app/views/spree/products/show.html.erb +1 -5
  71. data/app/views/spree/shared/_carousel_4_products.html.erb +6 -12
  72. data/app/views/spree/shared/_color_select.html.erb +3 -3
  73. data/app/views/spree/shared/_currency_dropdown.html.erb +13 -0
  74. data/app/views/spree/shared/_delete_address_popup.html.erb +1 -2
  75. data/app/views/spree/shared/_error_messages.html.erb +2 -2
  76. data/app/views/spree/shared/_footer.html.erb +4 -4
  77. data/app/views/spree/shared/_head.html.erb +5 -1
  78. data/app/views/spree/shared/_header.html.erb +1 -1
  79. data/app/views/spree/shared/_internationalization_options.html.erb +31 -0
  80. data/app/views/spree/shared/_line_item.html.erb +2 -2
  81. data/app/views/spree/shared/_link_to_account.html.erb +5 -5
  82. data/app/views/spree/shared/_locale_dropdown.html.erb +13 -0
  83. data/app/views/spree/shared/_login.html.erb +1 -1
  84. data/app/views/spree/shared/_main_nav_bar.html.erb +1 -1
  85. data/app/views/spree/shared/_mobile_internationalization_options.html.erb +37 -0
  86. data/app/views/spree/shared/_mobile_navigation.html.erb +3 -6
  87. data/app/views/spree/shared/_nav_bar.html.erb +5 -5
  88. data/app/views/spree/shared/_no_product_available.html.erb +1 -1
  89. data/app/views/spree/shared/_option_values.html.erb +1 -1
  90. data/app/views/spree/shared/_order_details.html.erb +117 -174
  91. data/app/views/spree/shared/_payment.html.erb +2 -2
  92. data/app/views/spree/shared/_payment_sources.html.erb +2 -2
  93. data/app/views/spree/shared/_product_added_modal.html.erb +1 -1
  94. data/app/views/spree/shared/_search.html.erb +1 -2
  95. data/app/views/spree/shared/_translations.html.erb +6 -6
  96. data/app/views/spree/shared/carousel/_single.html.erb +6 -11
  97. data/app/views/spree/shared/carousel/_thumbnails.html.erb +5 -11
  98. data/app/views/spree/users/_address.html.erb +1 -1
  99. data/app/views/spree/users/_address_controls.html.erb +1 -2
  100. data/app/views/spree/users/show.html.erb +4 -4
  101. data/config/initializers/canonical_rails.rb +1 -1
  102. data/config/routes.rb +26 -30
  103. data/lib/generators/spree/frontend/copy_storefront/copy_storefront_generator.rb +1 -7
  104. data/lib/generators/spree/frontend/install/install_generator.rb +34 -0
  105. data/lib/generators/spree/frontend/install/templates/config/initializers/spree_storefront.rb +1 -0
  106. data/lib/generators/spree/frontend/install/templates/config/spree_storefront.yml +99 -0
  107. data/spree_frontend.gemspec +2 -2
  108. metadata +27 -19
  109. data/app/views/spree/products/_vendor_info.html.erb +0 -13
  110. data/app/views/spree/shared/_change_store.html.erb +0 -25
  111. data/app/views/spree/shared/_mobile_change_store.html.erb +0 -30
  112. data/app/views/spree/shared/forbidden.html.erb +0 -0
  113. data/app/views/spree/shared/unauthorized.html.erb +0 -0
@@ -1,8 +1,8 @@
1
1
  <td>
2
2
  <% payment_sources.each do |payment_source| %>
3
3
  <%= payment_source.class.to_s.underscore.split('/').second.humanize.titleize %>
4
- <br/>
4
+ <br>
5
5
  <%= payment_source.last_digits.rjust(16, '*') %>
6
- <br/>
6
+ <br>
7
7
  <% end %>
8
8
  </td>
@@ -1,5 +1,5 @@
1
1
  <div class="modal product-added-modal" tabindex="-1" role="dialog" aria-hidden="true">
2
- <div class="modal-dialog modal-lg" role="document" >
2
+ <div class="modal-dialog modal-lg" role="document">
3
3
  <div class="modal-content">
4
4
  <div class="modal-header pb-0 px-4 pt-4 border-0">
5
5
  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
@@ -5,8 +5,7 @@
5
5
  title: Spree.t(:search),
6
6
  autofocus: true,
7
7
  'aria-label': Spree.t(:search),
8
- class: " border-0 p-3"
9
- %>
8
+ class: " border-0 p-3" %>
10
9
  <button type="submit" class="btn border-0 p-0" aria-label="Submit">
11
10
  <%= icon(name: 'search',
12
11
  classes: 'd-inline',
@@ -1,11 +1,11 @@
1
1
  <script>
2
2
  window.addEventListener('turbolinks:load', function() {
3
3
  Spree.translations = <%==
4
- {
5
- coupon_code_applied: Spree.t(:coupon_code_applied),
6
- coupon_code_removed: Spree.t(:coupon_code_removed),
7
- coupon_code_error_icon: image_path('error.svg')
8
- }.to_json
9
- %>
4
+ {
5
+ coupon_code_applied: Spree.t(:coupon_code_applied),
6
+ coupon_code_removed: Spree.t(:coupon_code_removed),
7
+ coupon_code_error_icon: image_path('error.svg')
8
+ }.to_json
9
+ %>
10
10
  });
11
11
  </script>
@@ -4,15 +4,13 @@
4
4
  data-product-carousel-group-identifier="<%= group_id %>"
5
5
  data-variant-change-trigger-identifier="<%= trigger_id %>"
6
6
  data-interval="false"
7
- data-hook
8
- >
7
+ data-hook>
9
8
  <% if images.length > 1 %>
10
9
  <a
11
10
  class="d-none d-md-flex h-100 justify-content-center align-items-center product-carousel-control position-absolute product-carousel-control--previous"
12
11
  href="#<%= id %>"
13
12
  role="button"
14
- data-slide="prev"
15
- >
13
+ data-slide="prev">
16
14
  <span class="d-flex justify-content-center align-items-center product-carousel-control-rounded" aria-hidden="true">
17
15
  <%= icon(name: 'arrow-right',
18
16
  classes: 'spree-icon-arrow spree-icon-arrow-left',
@@ -26,8 +24,7 @@
26
24
  class="d-none d-md-flex h-100 justify-content-center align-items-center product-carousel-control position-absolute product-carousel-control--next"
27
25
  href="#<%= id %>"
28
26
  role="button"
29
- data-slide="next"
30
- >
27
+ data-slide="next">
31
28
  <span class="d-flex justify-content-center align-items-center product-carousel-control-rounded" aria-hidden="true">
32
29
  <%= icon(name: 'arrow-right',
33
30
  classes: 'spree-icon-arrow spree-icon-arrow-right',
@@ -47,8 +44,7 @@
47
44
  <div
48
45
  class="carousel-item product-carousel-item<%= ' active' if imageIndex == 0 %>"
49
46
  data-variant-is-master="<%= image.viewable_id == @product.master_id %>"
50
- data-variant-id="<%= image.viewable_id %>"
51
- >
47
+ data-variant-id="<%= image.viewable_id %>">
52
48
  <div class="product-carousel-item-squared <%= 'product-carousel-item-squared-only' if images.length == 1 %>">
53
49
  <% image_attrs = {
54
50
  src: main_app.url_for(image.url(zoomed ? :zoomed : :large)),
@@ -57,7 +53,7 @@
57
53
  width: zoomed ? 650 : 475,
58
54
  height: zoomed ? 870 : 594
59
55
  } %>
60
- <%= imageIndex.zero? ? image_tag(image_attrs.delete(:src), image_attrs) : lazy_image(image_attrs) %>
56
+ <%= imageIndex.zero? ? image_tag(image_attrs.delete(:src), image_attrs) : lazy_image(**image_attrs) %>
61
57
  </div>
62
58
  </div>
63
59
  <% end %>
@@ -68,8 +64,7 @@
68
64
  <li
69
65
  data-target="#<%= id %>"
70
66
  data-slide-to="<%= imageIndex %>"
71
- class="product-carousel-indicators-indicator product-carousel-indicators-indicator--visible<%= ' active' if imageIndex == 0 %>"
72
- >
67
+ class="product-carousel-indicators-indicator product-carousel-indicators-indicator--visible<%= ' active' if imageIndex == 0 %>">
73
68
  <%= lazy_image(
74
69
  src: main_app.url_for(image.url(:pdp_thumbnail)),
75
70
  class: 'd-block w-100',
@@ -6,8 +6,7 @@
6
6
  data-product-carousel-per-page="<%= per_page %>"
7
7
  data-product-carousel-is-slave="true"
8
8
  data-interval="false"
9
- data-hook
10
- >
9
+ data-hook>
11
10
  <div class="carousel-inner order-1 h-100">
12
11
  <% images.each_with_index do |image, image_index| %>
13
12
  <% if image_index % per_page == 0 %>
@@ -19,16 +18,13 @@
19
18
  class="product-thumbnails-carousel-item-single product-thumbnails-carousel-item-single--visible"
20
19
  data-product-carousel-to-slide="<%= image_index %>"
21
20
  data-variant-is-master="<%= image.viewable_id == @product.master_id %>"
22
- data-variant-id="<%= image.viewable_id %>"
23
- >
21
+ data-variant-id="<%= image.viewable_id %>">
24
22
  <%= lazy_image(
25
23
  src: main_app.url_for(image.url(:pdp_thumbnail)),
26
24
  class: 'd-block w-100',
27
25
  alt: image.alt || @product.name,
28
26
  width: 57,
29
- height: 70
30
- )
31
- %>
27
+ height: 70) %>
32
28
  </div>
33
29
  <% if (image_index + 1) % per_page == 0 || (image_index + 1) == images.length %>
34
30
  </div>
@@ -42,8 +38,7 @@
42
38
  class="d-none d-sm-flex order-0 justify-content-center w-100 product-thumbnails-carousel-previous"
43
39
  href="#<%= id %>"
44
40
  role="button"
45
- data-slide="prev"
46
- >
41
+ data-slide="prev">
47
42
  <span aria-hidden="true">
48
43
  <%= icon(name: 'arrow-right',
49
44
  classes: 'spree-icon-arrow spree-icon-arrow-up',
@@ -56,8 +51,7 @@
56
51
  class="d-none d-sm-flex order-2 justify-content-center w-100 product-thumbnails-carousel-next"
57
52
  href="#<%= id %>"
58
53
  role="button"
59
- data-slide="next"
60
- >
54
+ data-slide="next">
61
55
  <span aria-hidden="true">
62
56
  <%= icon(name: 'arrow-right',
63
57
  classes: 'spree-icon-arrow spree-icon-arrow-down',
@@ -9,7 +9,7 @@
9
9
  <%= "#{address.address1} #{address.address2}" %>,
10
10
  </div>
11
11
  <div>
12
- <%= "#{address.city}, #{address.state&.abbr} #{address.zipcode}" %>,
12
+ <%= "#{address.city}, #{address.state_text} #{address.zipcode}" %>,
13
13
  </div>
14
14
  <div>
15
15
  <%= address.country.name %>
@@ -6,6 +6,5 @@
6
6
  <%= icon(name: 'garbage_2',
7
7
  classes: '',
8
8
  width: 24,
9
- height: 24)
10
- %>
9
+ height: 24) %>
11
10
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <div class="container account-page">
2
- <h3 class="text-uppercase spree-mb-large spree-mt-large spree-header" ><%= accurate_title %></h3>
2
+ <h3 class="text-uppercase spree-mb-large spree-mt-large spree-header"><%= accurate_title %></h3>
3
3
 
4
4
  <div class="row">
5
5
  <div class="col-xs-12 col-lg-4">
@@ -41,7 +41,7 @@
41
41
  </div>
42
42
 
43
43
  <div data-hook="account_my_orders" class="account-page-orders" id="account-my-orders">
44
- <h3 class="text-uppercase spree-mb-medium spree-mt-medium spree-header" ><%= Spree.t(:my_orders) %></h3>
44
+ <h3 class="text-uppercase spree-mb-medium spree-mt-medium spree-header"><%= Spree.t(:my_orders) %></h3>
45
45
  <% if @orders.present? %>
46
46
  <table>
47
47
  <thead class="active">
@@ -57,7 +57,7 @@
57
57
  <tbody>
58
58
  <% @orders.each do |order| %>
59
59
  <tr>
60
- <td class="account-page-order-number"><%= link_to order.number, order_url(order), class: "text-primary" %></td>
60
+ <td class="account-page-order-number"><%= link_to order.number, spree.order_path(order), class: "text-primary" %></td>
61
61
  <td class="account-page-order-date"><%= l order.completed_at.to_date %></td>
62
62
  <td class="account-page-order-status"><%= Spree.t("order_state.#{order.state}").titleize %></td>
63
63
  <td class="account-page-order-payment-state"><%= Spree.t("payment_states.#{order.payment_state}").titleize if order.payment_state %></td>
@@ -73,7 +73,7 @@
73
73
  <% else %>
74
74
  <p class="text-center"><%= Spree.t(:you_have_no_orders_yet) %></p>
75
75
  <% end %>
76
- <br />
76
+ <br>
77
77
  </div>
78
78
  <div id="delete-address-popup" class="delete-address-popup-dropdown hide-on-esc">
79
79
  <%= render 'spree/shared/delete_address_popup' %>
@@ -10,5 +10,5 @@ CanonicalRails.setup do |config|
10
10
  # Parameter spamming can cause index dilution by creating seemingly different URLs with identical or near-identical content.
11
11
  # Unless whitelisted, these parameters will be omitted
12
12
 
13
- config.whitelisted_parameters = [:keywords, :page, :search, :taxon]
13
+ config.allowed_parameters = [:keywords, :page, :search, :taxon]
14
14
  end
data/config/routes.rb CHANGED
@@ -1,40 +1,36 @@
1
1
  Spree::Core::Engine.add_routes do
2
- root to: 'home#index'
2
+ scope '(:locale)', locale: /#{Spree.available_locales.join('|')}/, defaults: { locale: nil } do
3
+ root to: 'home#index'
3
4
 
4
- resources :products, only: [:index, :show]
5
+ resources :products, only: [:index, :show]
6
+ get '/products/:id/related', to: 'products#related'
7
+ # route globbing for pretty nested taxon and product paths
8
+ get '/t/*id', to: 'taxons#show', as: :nested_taxons
9
+ get '/product_carousel/:id', to: 'taxons#product_carousel'
5
10
 
6
- get '/locale/set', to: 'locale#set'
11
+ # non-restful checkout stuff
12
+ patch '/checkout/update/:state', to: 'checkout#update', as: :update_checkout
13
+ get '/checkout/:state', to: 'checkout#edit', as: :checkout_state
14
+ get '/checkout', to: 'checkout#edit', as: :checkout
7
15
 
8
- # non-restful checkout stuff
9
- patch '/checkout/update/:state', to: 'checkout#update', as: :update_checkout
10
- get '/checkout/:state', to: 'checkout#edit', as: :checkout_state
11
- get '/checkout', to: 'checkout#edit', as: :checkout
16
+ resources :orders, except: [:index, :new, :create, :destroy]
12
17
 
13
- get '/orders/populate', to: 'orders#populate_redirect'
18
+ resources :addresses, except: [:show]
14
19
 
15
- resources :orders, except: [:index, :new, :create, :destroy] do
16
- post :populate, on: :collection
17
- end
18
-
19
- resources :addresses, except: [:show]
20
-
21
- get '/cart', to: 'orders#edit', as: :cart
22
- patch '/cart', to: 'orders#update', as: :update_cart
23
- put '/cart/empty', to: 'orders#empty', as: :empty_cart
20
+ get '/cart', to: 'orders#edit', as: :cart
21
+ patch '/cart', to: 'orders#update', as: :update_cart
22
+ put '/cart/empty', to: 'orders#empty', as: :empty_cart
24
23
 
25
- # route globbing for pretty nested taxon and product paths
26
- get '/t/*id', to: 'taxons#show', as: :nested_taxons
27
- get '/product_carousel/:id', to: 'taxons#product_carousel'
24
+ get '/content/cvv', to: 'content#cvv', as: :cvv
25
+ get '/content/test', to: 'content#test'
26
+ get '/cart_link', to: 'store#cart_link', as: :cart_link
27
+ get '/account_link', to: 'store#account_link', as: :account_link
28
28
 
29
- get '/unauthorized', to: 'home#unauthorized', as: :unauthorized
30
- get '/content/cvv', to: 'content#cvv', as: :cvv
31
- get '/content/test', to: 'content#test'
32
- get '/cart_link', to: 'store#cart_link', as: :cart_link
33
- get '/account_link', to: 'store#account_link', as: :account_link
29
+ get '/locales', to: 'locale#index', as: :locales
30
+ get '/locale/set', to: 'locale#set', as: :set_locale
31
+ get '/currency/set', to: 'currency#set', as: :set_currency
34
32
 
35
- get '/api_tokens', to: 'store#api_tokens'
36
- post '/ensure_cart', to: 'store#ensure_cart'
37
- get '/products/:id/related', to: 'products#related'
38
-
39
- get '/currency/set', to: 'currency#set', defaults: { format: :json }, as: :set_currency
33
+ get '/api_tokens', to: 'store#api_tokens'
34
+ post '/ensure_cart', to: 'store#ensure_cart'
35
+ end
40
36
  end
@@ -1,24 +1,18 @@
1
1
  module Spree
2
2
  module Frontend
3
3
  class CopyStorefrontGenerator < Rails::Generators::Base
4
- desc 'Copies storefront from spree frontend to your application'
4
+ desc 'Copies all storefront views and stylesheets from spree frontend to your application'
5
5
 
6
6
  def self.source_paths
7
7
  [
8
8
  File.expand_path('../../../../../app', __dir__),
9
- File.expand_path('../../../../../app/assets/images', __dir__),
10
9
  File.expand_path('../../../../../app/assets/stylesheets/spree/frontend', __dir__),
11
- File.expand_path('../../../../../app/assets/stylesheets/spree/frontend/variables', __dir__)
12
10
  ]
13
11
  end
14
12
 
15
13
  def copy_storefront
16
14
  directory 'views', './app/views'
17
- directory 'noimage', './app/assets/images/noimage'
18
- directory 'homepage', './app/assets/images/homepage'
19
- directory 'meganav', './app/assets/images/meganav'
20
15
  template 'application.scss', './app/assets/stylesheets/spree/frontend/application.scss'
21
- template 'variables.scss', './app/assets/stylesheets/spree/frontend/variables/variables.scss'
22
16
  end
23
17
  end
24
18
  end
@@ -0,0 +1,34 @@
1
+ module Spree
2
+ module Frontend
3
+ module Generators
4
+ class InstallGenerator < Rails::Generators::Base
5
+ desc 'Copies storefront configuration files for easy customization'
6
+
7
+ def self.source_paths
8
+ [
9
+ File.expand_path('templates', __dir__),
10
+ File.expand_path('../templates', "../#{__FILE__}"),
11
+ File.expand_path('../templates', "../../#{__FILE__}"),
12
+ File.expand_path('../../../../../app/views/spree', __dir__),
13
+ File.expand_path('../../../../../app/assets/images', __dir__),
14
+ File.expand_path('../../../../../app/assets/stylesheets/spree/frontend/variables', __dir__)
15
+ ]
16
+ end
17
+
18
+ def install
19
+ # main navigation configuration
20
+ template 'config/initializers/spree_storefront.rb', 'config/initializers/spree_storefront.rb'
21
+ template 'config/spree_storefront.yml', 'config/spree_storefront.yml'
22
+ # static images
23
+ directory 'noimage', './app/assets/images/noimage'
24
+ directory 'homepage', './app/assets/images/homepage'
25
+ directory 'meganav', './app/assets/images/meganav'
26
+ # SCSS theming
27
+ template 'variables.scss', './app/assets/stylesheets/spree/frontend/variables/variables.scss'
28
+ # home page template
29
+ directory 'home', './app/views/spree/home'
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1 @@
1
+ SpreeStorefrontConfig = YAML.load_file(Rails.root.join('config', 'spree_storefront.yml')).with_indifferent_access
@@ -0,0 +1,99 @@
1
+ default:
2
+ navigation:
3
+ - title: Women
4
+ subtitle: Categories
5
+ url: /t/women
6
+ items:
7
+ - :title: Skirts
8
+ :url: /t/women/skirts
9
+ - :title: Dresses
10
+ :url: /t/women/dresses
11
+ - :title: Shirts and Blouses
12
+ :url: /t/women/shirts-and-blouses
13
+ - :title: Sweaters
14
+ :url: /t/women/sweaters
15
+ - :title: Tops and T-shirts
16
+ :url: /t/women/tops-and-t-shirts
17
+ - :title: Jackets and Coats
18
+ :url: /t/women/jackets-and-coats
19
+ promo_banners:
20
+ - subtitle: New collection
21
+ title: Summer 2021
22
+ url: /t/new-collection/summer-2021
23
+ image: 'meganav/promo_banner_left-first-category.jpg'
24
+ - subtitle: Special Offers
25
+ title: Get up to 30% off
26
+ url: /t/special-offers/30-percent-off
27
+ image: 'meganav/promo_banner_right-first-category.jpg'
28
+ - title: Men
29
+ subtitle: Categories
30
+ url: /t/men
31
+ items:
32
+ - :title: Shirts
33
+ :url: /t/men/shirts
34
+ - :title: T-shirts
35
+ :url: /t/men/t-shirts
36
+ - :title: Sweaters
37
+ :url: /t/men/sweaters
38
+ - :title: Jackets and Coats
39
+ :url: /t/men/jackets-and-coats
40
+ promo_banners:
41
+ - subtitle: New collection
42
+ title: Summer 2021
43
+ url: /t/new-collection/summer-2021
44
+ image: 'meganav/promo_banner_left-second-category.jpg'
45
+ - subtitle: Special Offers
46
+ title: Get up to 30% off
47
+ url: /t/special-offers/30-percent-off
48
+ image: 'meganav/promo_banner_right-second-category.jpg'
49
+ - title: Sportswear
50
+ subtitle: Categories
51
+ url: /t/sportswear
52
+ items:
53
+ - :title: Tops
54
+ :url: /t/sportswear/tops
55
+ - :title: Sweatshirts
56
+ :url: /t/sportswear/sweatshirts
57
+ - :title: Pants
58
+ :url: /t/sportswear/pants
59
+ promo_banners:
60
+ - subtitle: New collection
61
+ title: Summer 2021
62
+ url: /t/new-collection/summer-2021
63
+ image: 'meganav/promo_banner_left-third-category.jpg'
64
+ - subtitle: Special Offers
65
+ title: Get up to 30% off
66
+ url: /t/special-offers/30-percent-off
67
+ image: 'meganav/promo_banner_right-third-category.jpg'
68
+ fr:
69
+ navigation:
70
+ - title: Femmes
71
+ url: /fr/t/women
72
+ promo_banners:
73
+ - subtitle: Nouvelle collection
74
+ title: Été 2021
75
+ url: /fr/t/new-collection/summer-2021
76
+ image: 'meganav/promo_banner_left-first-category.jpg'
77
+ - subtitle: Offres spéciales
78
+ url: /fr/t/special-offers/30-percent-off
79
+ image: 'meganav/promo_banner_right-first-category.jpg'
80
+ - title: Hommes
81
+ url: /fr/t/men
82
+ promo_banners:
83
+ - subtitle: Nouvelle collection
84
+ title: Été 2021
85
+ url: /fr/t/new-collection/summer-2021
86
+ image: 'meganav/promo_banner_left-second-category.jpg'
87
+ - subtitle: Offres spéciales
88
+ url: /fr/t/special-offers/30-percent-off
89
+ image: 'meganav/promo_banner_right-second-category.jpg'
90
+ - title: Vêtements de sport
91
+ url: /fr/t/sportswear
92
+ promo_banners:
93
+ - subtitle: Nouvelle collection
94
+ title: Été 2021
95
+ url: /fr/t/new-collection/summer-2021
96
+ image: 'meganav/promo_banner_left-third-category.jpg'
97
+ - subtitle: Offres spéciales
98
+ url: /fr/t/special-offers/30-percent-off
99
+ image: 'meganav/promo_banner_right-third-category.jpg'