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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +120 -0
- data/.codeclimate.yml +36 -0
- data/.deepsource.toml +19 -0
- data/.editorconfig +22 -0
- data/.eslintignore +7 -0
- data/.eslintrc +36 -0
- data/.gem_release.yml +7 -0
- data/.github/CONTRIBUTING.md +1 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.github/ISSUE_TEMPLATE.md +39 -0
- data/.github/dependabot.yml +32 -0
- data/.gitignore +58 -0
- data/.rubocop.yml +197 -0
- data/.solargraph.yml +20 -0
- data/.stylelintignore +4 -0
- data/.stylelintrc +6 -0
- data/CODE_OF_CONDUCT.md +22 -0
- data/Gemfile +57 -3
- data/LICENSE +1 -1
- data/README.md +89 -0
- data/Rakefile +1 -1
- data/SECURITY.md +1 -0
- data/app/assets/config/spree_frontend_manifest.js +5 -0
- data/app/assets/images/arrow-down.svg +12 -0
- data/app/assets/images/arrow-right-circle-fill.svg +3 -0
- data/app/assets/images/card-image.svg +4 -0
- data/app/assets/images/edit.svg +1 -1
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/file-image.svg +4 -0
- data/app/assets/images/global.svg +1 -0
- data/app/assets/images/image.svg +4 -0
- data/app/assets/images/info.svg +7 -0
- data/app/assets/images/logo/spree_50.png +0 -0
- data/app/assets/images/logo-spree.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/logo.svg +10 -1
- data/app/assets/images/logo@2x.png +0 -0
- data/app/assets/images/logo@3x.png +0 -0
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/plp.png +0 -0
- data/app/assets/images/noimage/plp.svg +16 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/images/pagination-arrow-right.svg +3 -10
- data/app/assets/images/pagination-double-arrow-right.svg +6 -13
- data/app/assets/images/plus.svg +1 -1
- data/app/assets/images/search.svg +1 -1
- data/app/assets/javascripts/spree/frontend/account.js +1 -1
- data/app/assets/javascripts/spree/frontend/api/main.js +36 -0
- data/app/assets/javascripts/spree/frontend/api/storefront/cart.js +49 -0
- data/app/assets/javascripts/spree/frontend/cart.js +24 -2
- data/app/assets/javascripts/spree/frontend/checkout/address.js +78 -52
- data/app/assets/javascripts/spree/frontend/checkout/address_book.js +38 -40
- data/app/assets/javascripts/spree/frontend/checkout/payment.js +63 -23
- data/app/assets/javascripts/spree/frontend/checkout/shipment.js +15 -2
- data/app/assets/javascripts/spree/frontend/checkout.js +17 -1
- data/app/assets/javascripts/spree/frontend/coupon_manager.js +1 -1
- data/app/assets/javascripts/spree/frontend/currency.js +44 -0
- data/app/assets/javascripts/spree/frontend/locale.es6 +12 -0
- data/app/assets/javascripts/spree/frontend/login.js +5 -0
- data/app/assets/javascripts/spree/frontend/main.js +78 -0
- data/app/assets/javascripts/spree/frontend/main_nav_bar.js +86 -0
- data/app/assets/javascripts/spree/frontend/{turbolinks_scroll_fix.js → turbo_scroll_fix.js} +3 -3
- data/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js +4 -4
- data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +3 -3
- data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +67 -18
- data/app/assets/javascripts/spree/frontend/views/spree/products/description.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +76 -15
- data/app/assets/javascripts/spree/frontend/views/spree/products/price_filters.es6 +46 -0
- data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +9 -10
- data/app/assets/javascripts/spree/frontend/views/spree/shared/product_added_modal.js +7 -0
- data/app/assets/javascripts/spree/frontend/views/spree/shared/variant_select.js +93 -0
- data/app/assets/javascripts/spree/frontend.js +68 -11
- data/app/assets/stylesheets/spree/frontend/application.scss +5 -2
- data/app/assets/stylesheets/spree/frontend/components-bootstrap/button.scss +8 -0
- data/app/assets/stylesheets/spree/frontend/components-bootstrap/carousel.scss +4 -0
- data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +80 -1
- data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-base.scss +23 -0
- data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-list.scss +265 -0
- data/app/assets/stylesheets/spree/frontend/flags/_variables.scss +2 -0
- data/app/assets/stylesheets/spree/frontend/flags/flag-icon.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/functions.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/helpers/spree/frontend_helper.scss +48 -0
- data/app/assets/stylesheets/spree/frontend/variables/bootstrap-overrides.scss +2 -2
- data/app/assets/stylesheets/spree/frontend/variables/helper-variables.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/variables/variables.scss +54 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/confirm.scss +27 -26
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/delivery.scss +6 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +24 -10
- data/app/assets/stylesheets/spree/frontend/views/spree/cms_sections/_index.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/cms_sections/product_buy_bar.scss +20 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/home/index.scss +54 -67
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +4 -3
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/show.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/products/cart_form.scss +8 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/products/gallery_modal.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +55 -26
- data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/_color_select.scss +10 -9
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/single.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/thumbnails.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +9 -4
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/category_nav_bar.scss +3 -3
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/change_store.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/footer.scss +4 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +42 -26
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/mobile_navigation.scss +34 -3
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +24 -7
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/quantity_select.scss +9 -12
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/search_form.scss +12 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +7 -13
- data/app/assets/stylesheets/spree/frontend.css +0 -1
- data/app/controllers/concerns/spree/checkout/address_book.rb +9 -7
- data/app/controllers/concerns/spree/locale_urls.rb +21 -0
- data/app/controllers/spree/addresses_controller.rb +16 -33
- data/app/controllers/spree/checkout_controller.rb +15 -13
- data/app/controllers/spree/cms_pages_controller.rb +29 -0
- data/app/controllers/spree/content_controller.rb +0 -2
- data/app/controllers/spree/currency_controller.rb +17 -0
- data/app/controllers/spree/errors_controller.rb +11 -0
- data/app/controllers/spree/home_controller.rb +38 -1
- data/app/controllers/spree/locale_controller.rb +35 -6
- data/app/controllers/spree/orders_controller.rb +12 -10
- data/app/controllers/spree/products_controller.rb +46 -28
- data/app/controllers/spree/store_controller.rb +77 -12
- data/app/controllers/spree/taxons_controller.rb +16 -8
- data/app/helpers/spree/addresses_helper.rb +64 -12
- data/app/helpers/spree/cache_helper.rb +7 -0
- data/app/helpers/spree/cms_pages_helper.rb +23 -0
- data/app/helpers/spree/frontend_helper.rb +170 -18
- data/app/helpers/spree/navigation_helper.rb +81 -4
- data/app/helpers/spree/products_filters_helper.rb +168 -0
- data/app/helpers/spree/store_helper.rb +41 -0
- data/app/helpers/spree/structured_data_helper.rb +6 -2
- data/app/helpers/spree/taxons_helper.rb +2 -2
- data/app/services/spree/build_localized_redirect_url.rb +141 -0
- data/app/views/kaminari/twitter-bootstrap-4/_first_page.html.erb +3 -3
- data/app/views/kaminari/twitter-bootstrap-4/_gap.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_last_page.html.erb +3 -3
- data/app/views/kaminari/twitter-bootstrap-4/_next_page.html.erb +3 -3
- data/app/views/kaminari/twitter-bootstrap-4/_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_paginator.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_prev_page.html.erb +3 -3
- data/app/views/spree/address/_form.html.erb +26 -27
- data/app/views/spree/addresses/_form.html.erb +15 -6
- data/app/views/spree/addresses/edit.html.erb +13 -8
- data/app/views/spree/addresses/new.html.erb +8 -4
- data/app/views/spree/checkout/_address.html.erb +19 -23
- data/app/views/spree/checkout/_confirm.html.erb +1 -75
- data/app/views/spree/checkout/_credit_card.html.erb +3 -2
- data/app/views/spree/checkout/_delivery.html.erb +11 -4
- data/app/views/spree/checkout/_delivery_informations.html.erb +51 -0
- data/app/views/spree/checkout/_payment.html.erb +5 -24
- data/app/views/spree/checkout/_payment_sources.html.erb +17 -0
- data/app/views/spree/checkout/_summary.html.erb +22 -19
- data/app/views/spree/checkout/edit.html.erb +22 -2
- data/app/views/spree/checkout/payment/_gateway.html.erb +2 -2
- data/app/views/spree/checkout/registration.html.erb +3 -3
- data/app/views/spree/cms_pages/show.html.erb +16 -0
- data/app/views/spree/errors/not_found.html.erb +2 -2
- data/app/views/spree/home/index.html.erb +17 -123
- data/app/views/spree/layouts/checkout.html.erb +3 -1
- data/app/views/spree/layouts/spree_application.html.erb +3 -2
- data/app/views/spree/locale/index.html.erb +1 -0
- data/app/views/spree/orders/_coupon_code.html.erb +3 -4
- data/app/views/spree/orders/_line_item.html.erb +4 -4
- data/app/views/spree/orders/_line_item_data.html.erb +3 -3
- data/app/views/spree/orders/edit.html.erb +2 -3
- data/app/views/spree/orders/show.html.erb +2 -72
- data/app/views/spree/products/_cart_form.html.erb +5 -2
- data/app/views/spree/products/_color_option_type.html.erb +14 -14
- data/app/views/spree/products/_description.html.erb +19 -14
- data/app/views/spree/products/_filters_desktop.html.erb +80 -40
- data/app/views/spree/products/_filters_mobile.html.erb +47 -15
- data/app/views/spree/products/_gallery.html.erb +4 -6
- data/app/views/spree/products/_gallery_modal.html.erb +4 -6
- data/app/views/spree/products/_option_type.html.erb +1 -3
- data/app/views/spree/products/_product.html.erb +1 -1
- data/app/views/spree/products/_properties.html.erb +6 -4
- data/app/views/spree/products/_sort_desktop.html.erb +20 -14
- data/app/views/spree/products/_sort_mobile.html.erb +24 -8
- data/app/views/spree/products/_thumbnails.html.erb +2 -2
- data/app/views/spree/products/index.html.erb +7 -4
- data/app/views/spree/products/related.html.erb +11 -5
- data/app/views/spree/products/show.html.erb +2 -3
- data/app/views/spree/shared/_breadcrumbs.html.erb +2 -2
- data/app/views/spree/shared/_carousel_4_products.html.erb +14 -20
- data/app/views/spree/shared/_cart.html.erb +1 -1
- data/app/views/spree/shared/_checkout_header.html.erb +22 -21
- data/app/views/spree/shared/_color_select.html.erb +3 -3
- data/app/views/spree/shared/_copyright.html.erb +1 -10
- data/app/views/spree/shared/_currency_dropdown.html.erb +13 -0
- data/app/views/spree/shared/_delete_address_popup.html.erb +1 -2
- data/app/views/spree/shared/_error_messages.html.erb +2 -2
- data/app/views/spree/shared/_footer.html.erb +31 -21
- data/app/views/spree/shared/_get_started.html.erb +32 -0
- data/app/views/spree/shared/_head.html.erb +8 -5
- data/app/views/spree/shared/_header.html.erb +4 -4
- data/app/views/spree/shared/_internationalization_options.html.erb +31 -0
- data/app/views/spree/shared/_line_item.html.erb +3 -3
- data/app/views/spree/shared/_link_to_account.html.erb +7 -4
- data/app/views/spree/shared/_link_to_cart.html.erb +1 -2
- data/app/views/spree/shared/_locale_and_currency.html.erb +6 -0
- data/app/views/spree/shared/_locale_dropdown.html.erb +13 -0
- data/app/views/spree/shared/_login.html.erb +5 -5
- data/app/views/spree/shared/_main_nav_bar.html.erb +69 -45
- data/app/views/spree/shared/_mobile_internationalization_options.html.erb +37 -0
- data/app/views/spree/shared/_mobile_navigation.html.erb +48 -63
- data/app/views/spree/shared/_nav_bar.html.erb +9 -19
- data/app/views/spree/shared/_no_product_available.html.erb +1 -1
- data/app/views/spree/shared/_option_values.html.erb +2 -21
- data/app/views/spree/shared/_order_details.html.erb +117 -174
- data/app/views/spree/shared/_paths.html.erb +8 -0
- data/app/views/spree/shared/_payment.html.erb +2 -2
- data/app/views/spree/shared/_payment_sources.html.erb +2 -2
- data/app/views/spree/shared/_product_added_modal.html.erb +3 -3
- data/app/views/spree/shared/_properties.html.erb +4 -0
- data/app/views/spree/shared/_quantity_select.html.erb +2 -2
- data/app/views/spree/shared/_search.html.erb +9 -13
- data/app/views/spree/shared/_translations.html.erb +8 -7
- data/app/views/spree/shared/carousel/_single.html.erb +9 -14
- data/app/views/spree/shared/carousel/_thumbnails.html.erb +35 -39
- data/app/views/spree/shared/cms/pages/_edit_mode.html.erb +13 -0
- data/app/views/spree/shared/cms/sections/_featured_article.html.erb +27 -0
- data/app/views/spree/shared/cms/sections/_hero_image.html.erb +60 -0
- data/app/views/spree/shared/cms/sections/_image_gallery.html.erb +171 -0
- data/app/views/spree/shared/cms/sections/_product_carousel.html.erb +5 -0
- data/app/views/spree/shared/cms/sections/_rich_text_content.html.erb +3 -0
- data/app/views/spree/shared/cms/sections/_side_by_side_images.html.erb +118 -0
- data/app/views/spree/taxons/_header.html.erb +7 -2
- data/app/views/spree/users/_address.html.erb +16 -24
- data/app/views/spree/users/_address_controls.html.erb +10 -0
- data/app/views/spree/users/show.html.erb +21 -16
- data/config/initializers/admin_actions.rb +18 -0
- data/config/initializers/assets.rb +4 -13
- data/config/initializers/canonical_rails.rb +1 -1
- data/config/routes.rb +30 -26
- data/lib/generators/spree/frontend/copy_storefront/copy_storefront_generator.rb +1 -7
- data/lib/generators/spree/frontend/install/install_generator.rb +34 -0
- data/lib/generators/spree/frontend/install/templates/app/assets/config/manifest.js +2 -0
- data/lib/generators/spree/frontend/install/templates/vendor/assets/javascripts/spree/frontend/all.js +8 -0
- data/lib/generators/spree/frontend/install/templates/vendor/assets/stylesheets/spree/frontend/all.css +9 -0
- data/lib/spree/frontend/configuration.rb +18 -0
- data/lib/spree/frontend/engine.rb +3 -1
- data/lib/spree/frontend/version.rb +9 -0
- data/lib/spree/frontend.rb +8 -4
- data/license.md +13 -0
- data/spec/fixtures/files/store_favicon.ico +0 -0
- data/spree_frontend.gemspec +26 -14
- data/vendor/assets/javascripts/cleave.js +8 -0
- data/vendor/assets/javascripts/fetch.umd.js +531 -0
- data/vendor/assets/javascripts/jquery.payment.js +652 -0
- data/vendor/assets/javascripts/jsuri.js +458 -0
- data/vendor/assets/javascripts/polyfill.min.js +1 -0
- metadata +224 -86
- data/app/assets/images/homepage/big_category_banner.jpg +0 -0
- data/app/assets/images/homepage/big_category_banner_mobile.jpg +0 -0
- data/app/assets/images/homepage/big_category_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/big_category_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower_mobile.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/category_banner_lower_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper_mobile.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/category_banner_upper_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/main_banner.jpg +0 -0
- data/app/assets/images/homepage/main_banner_mobile.jpg +0 -0
- data/app/assets/images/homepage/main_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/main_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left_mobile.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_left_tablet_portrait.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right_mobile.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right_tablet_landscape.jpg +0 -0
- data/app/assets/images/homepage/promo_banner_right_tablet_portrait.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_left-first-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_left-second-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_left-third-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_right-first-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_right-second-category.jpg +0 -0
- data/app/assets/images/meganav/promo_banner_right-third-category.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/big_category_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/noimage/category_banner.jpg +0 -0
- data/app/assets/images/noimage/category_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/category_banner_plp.jpg +0 -0
- data/app/assets/images/noimage/category_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/category_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/noimage/main_banner.jpg +0 -0
- data/app/assets/images/noimage/main_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/main_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/main_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/noimage/product_photo.jpg +0 -0
- data/app/assets/images/noimage/promo_banner.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_megamenu.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_mobile.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_tablet_landscape.jpg +0 -0
- data/app/assets/images/noimage/promo_banner_tablet_portrait.jpg +0 -0
- data/app/assets/images/spark-logo@3x.png +0 -0
- data/app/assets/stylesheets/spree/frontend/_glyphicons_urls_fix.scss +0 -10
- data/app/assets/stylesheets/spree/frontend/address_book.scss +0 -8
- data/app/models/spree/frontend_configuration.rb +0 -7
- data/app/views/spree/shared/_taxonomies.html.erb +0 -16
- /data/app/views/spree/{shared → errors}/forbidden.html.erb +0 -0
- /data/app/views/spree/{shared → errors}/unauthorized.html.erb +0 -0
@@ -1,50 +1,74 @@
|
|
1
|
-
<% if
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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] %>
|
1
|
+
<% if spree_menu.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_menu.children.each do |parent| %>
|
5
|
+
<li class="p-0 nav-item main-nav-bar-category">
|
6
|
+
<% has_dropdown = parent.children.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
|
+
<% if parent.container? %>
|
11
|
+
<%= content_tag :span, parent.name, class: "nav-link main-nav-bar-item main-nav-bar-category-button #{dropdown_toggle_class}", data: data_attr, aria: aria_attr %>
|
12
|
+
<% else %>
|
13
|
+
<%= spree_nav_link_tag(parent, { class: "nav-link main-nav-bar-item main-nav-bar-category-button #{dropdown_toggle_class}", data: data_attr, aria: aria_attr }) %>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<% if has_dropdown %>
|
17
|
+
<div class="dropdown-menu w-100 shadow main-nav-bar-category-dropdown">
|
18
|
+
<div class="container p-0 d-flex justify-content-xl-around mx-auto">
|
19
|
+
<div class="row px-5">
|
20
|
+
<% parent.children.each do |child| %>
|
21
|
+
|
22
|
+
<!-- Categories -->
|
23
|
+
<% if child.container? && child.code?('category') %>
|
24
|
+
<div class="category-links my-4 mx-2">
|
25
|
+
<div class="category-links-header text-uppercase">
|
26
|
+
<%= child.name %>
|
37
27
|
</div>
|
28
|
+
<% if child.children.present? %>
|
29
|
+
<ul class="pl-0">
|
30
|
+
<% child.children.each do |category_link| %>
|
31
|
+
<li>
|
32
|
+
<%= spree_nav_link_tag(category_link, { class: "text-uppercase main-nav-bar-category-links dropdown-item truncate" }) %>
|
33
|
+
</li>
|
34
|
+
<% end %>
|
35
|
+
</ul>
|
36
|
+
<% end %>
|
38
37
|
</div>
|
39
|
-
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<!-- Promos -->
|
41
|
+
<% if child.container? && child.code?('promo') %>
|
42
|
+
<% if child.children.present? %>
|
43
|
+
<% child.children.each do |promo_banner| %>
|
44
|
+
<%= spree_nav_link_tag(promo_banner, { class: "dropdown-item" }) do %>
|
45
|
+
<div class="category-image text-center my-4 mx-3">
|
46
|
+
<% if promo_banner.icon.present? %>
|
47
|
+
<%= image_tag main_app.cdn_image_url(promo_banner.icon.attachment), alt: promo_banner.icon.alt ,title: promo_banner.subtitle %>
|
48
|
+
<% end %>
|
49
|
+
<div class="category-box">
|
50
|
+
<div class="category-box-small-text">
|
51
|
+
<%= promo_banner.subtitle %>
|
52
|
+
</div>
|
53
|
+
<div class="category-box-big-text">
|
54
|
+
<%= promo_banner.name %>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
<% end %>
|
59
|
+
<% end %>
|
60
|
+
<% end %>
|
61
|
+
<% end %>
|
62
|
+
|
40
63
|
<% end %>
|
41
|
-
|
42
|
-
|
64
|
+
</div>
|
65
|
+
</div>
|
43
66
|
</div>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
67
|
+
|
68
|
+
<% end %>
|
69
|
+
</li>
|
70
|
+
|
71
|
+
<% end %>
|
72
|
+
</ul>
|
73
|
+
</div>
|
50
74
|
<% end %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<% if (defined?(should_render_store_chooser?) && should_render_store_chooser?) || (defined?(should_render_internationalization_dropdown?) && should_render_internationalization_dropdown?) %>
|
2
|
+
<% link_title = "#{Spree.t(:choose_currency)} / #{Spree.t('i18n.language')}" %>
|
3
|
+
|
4
|
+
<li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
|
5
|
+
<span class="w-75"><%= link_title %></span>
|
6
|
+
<a class="w-25 text-right mobile-navigation-category-link" data-category="internationalization" href="#" aria-label="<%= link_title %>">
|
7
|
+
<%= icon(name: 'arrow-right',
|
8
|
+
classes: 'd-sm-none spree-icon-arrow spree-icon-arrow-right',
|
9
|
+
width: 16,
|
10
|
+
height: 16) %>
|
11
|
+
<%= icon(name: 'arrow-right',
|
12
|
+
classes: 'd-none d-sm-inline spree-icon-arrow spree-icon-arrow-right',
|
13
|
+
width: 14,
|
14
|
+
height: 27) %>
|
15
|
+
</a>
|
16
|
+
|
17
|
+
<ul class="list-unstyled position-absolute mobile-navigation-sublist" data-category="internationalization">
|
18
|
+
<li class="text-center font-weight-bold mobile-navigation-sublist-header">
|
19
|
+
<%= Spree.t(:internationalization) %>
|
20
|
+
</li>
|
21
|
+
<% if (defined?(should_render_store_chooser?) && should_render_store_chooser?) %>
|
22
|
+
<% stores.each do |store| %>
|
23
|
+
<li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
|
24
|
+
<%= country_flag_icon(store_country_iso(store)) %>
|
25
|
+
<%= store_link(store, class: "dropdown-item text-uppercase d-flex #{'font-weight-bold' if current_store == store}") %>
|
26
|
+
</li>
|
27
|
+
<% end %>
|
28
|
+
<% else %>
|
29
|
+
<div class="mt-4 pt-4">
|
30
|
+
<%= render 'spree/shared/locale_dropdown' %>
|
31
|
+
<div class="dropdown-divider mt-4 pb-4"></div>
|
32
|
+
<%= render 'spree/shared/currency_dropdown' %>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
35
|
+
</ul>
|
36
|
+
</li>
|
37
|
+
<% end %>
|
@@ -1,73 +1,58 @@
|
|
1
|
-
<% if
|
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
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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>
|
1
|
+
<% if spree_menu.present? %>
|
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
|
+
<div id="top-nav-bar-mobile" class="m-0 p-0 header-spree-fluid-secondary-navigation" data-hook>
|
11
|
+
<button id="mobile-navigation-close-button" aria-label="<%= Spree.t(:close) %>">
|
12
|
+
<%= icon(name: 'close',
|
13
|
+
classes: 'd-inline',
|
14
|
+
width: 26,
|
15
|
+
height: 26) %>
|
16
|
+
</button>
|
34
17
|
</div>
|
35
18
|
</div>
|
36
19
|
|
37
20
|
<ul class="list-unstyled position-relative h-100 mobile-navigation-list">
|
38
|
-
<%
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<%=
|
44
|
-
|
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>
|
21
|
+
<% spree_menu.children.each do |parent| %>
|
22
|
+
<li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
|
23
|
+
<% if parent.container? %>
|
24
|
+
<%= content_tag :span, parent.name %>
|
25
|
+
<% else %>
|
26
|
+
<%= spree_nav_link_tag(parent, {class: 'w-75'}) %>
|
27
|
+
<% end %>
|
52
28
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
29
|
+
<% if parent.children.present? %>
|
30
|
+
<a class="w-25 text-right mobile-navigation-category-link" data-category="<%= parent.name.parameterize %>" href="#" aria-label="<%= Spree.t('go_to_category') %>">
|
31
|
+
<%= icon(name: 'arrow-right',
|
32
|
+
classes: 'd-inline spree-icon-arrow spree-icon-arrow-right',
|
33
|
+
width: 14,
|
34
|
+
height: 27) %>
|
35
|
+
</a>
|
36
|
+
<ul class="list-unstyled position-absolute mobile-navigation-sublist" data-category="<%= parent.name.parameterize %>">
|
37
|
+
<li class="text-center font-weight-bold mobile-navigation-sublist-header">
|
38
|
+
<%= parent.name %>
|
61
39
|
</li>
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
40
|
+
|
41
|
+
<% parent.children.each do |child| %>
|
42
|
+
<% if child.container? && child.code?('category') %>
|
43
|
+
<li class="text-muted mt-2"><%= child.name %></li>
|
44
|
+
<% if child.children.present? %>
|
45
|
+
<% child.children.each do |category_link| %>
|
46
|
+
<li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
|
47
|
+
<%= spree_nav_link_tag(category_link, {class: 'w-75'}) %>
|
48
|
+
</li>
|
49
|
+
<% end %>
|
50
|
+
<% end %>
|
51
|
+
<% end %>
|
52
|
+
<% end %>
|
53
|
+
</ul>
|
67
54
|
<% end %>
|
68
|
-
</
|
69
|
-
</li>
|
55
|
+
</li>
|
70
56
|
<% end %>
|
71
57
|
</ul>
|
72
|
-
</div>
|
73
58
|
<% end %>
|
@@ -1,16 +1,11 @@
|
|
1
|
-
<ul id="nav-bar" class="nav align-items-center d-flex justify-content-end navbar-right">
|
1
|
+
<ul id="nav-bar" class="nav align-items-center d-flex flex-nowrap justify-content-end navbar-right" data-turbo-permanent data-turbo-permanent>
|
2
2
|
<li>
|
3
3
|
<div class="navbar-right-search-menu">
|
4
|
-
<button type="button" class="navbar-right-dropdown-toggle search-icons" aria-label="<%= Spree.t('nav_bar.show_search')%>">
|
4
|
+
<button type="button" class="navbar-right-dropdown-toggle search-icons" aria-label="<%= Spree.t('nav_bar.show_search') %>">
|
5
5
|
<%= icon(name: 'magnifying-glass',
|
6
|
-
classes: 'd-
|
6
|
+
classes: 'd-inline-block',
|
7
7
|
width: 36,
|
8
|
-
height: 36)
|
9
|
-
|
10
|
-
<%= icon(name: 'magnifying-glass',
|
11
|
-
classes: 'd-xl-none',
|
12
|
-
width: 24,
|
13
|
-
height: 24) %>
|
8
|
+
height: 36) %>
|
14
9
|
</button>
|
15
10
|
|
16
11
|
<div id="search-dropdown" class="p-0 px-md-4 py-md-2 w-100 shadow navbar-right-search-menu-dropdown hide-on-esc">
|
@@ -21,16 +16,11 @@
|
|
21
16
|
<% if defined?(spree.account_link_path) %>
|
22
17
|
<li>
|
23
18
|
<div class="dropdown navbar-right-dropdown">
|
24
|
-
<button id="account-button" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle" aria-label="<%= Spree.t('nav_bar.show_user_menu')%>">
|
19
|
+
<button id="account-button" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle account-icon" aria-label="<%= Spree.t('nav_bar.show_user_menu') %>">
|
25
20
|
<%= icon(name: 'person',
|
26
|
-
classes: 'd-
|
21
|
+
classes: 'd-inline-block',
|
27
22
|
width: 41.4,
|
28
|
-
height: 36)
|
29
|
-
|
30
|
-
<%= icon(name: 'person',
|
31
|
-
classes: 'd-xl-none',
|
32
|
-
width: 27.6,
|
33
|
-
height: 24) %>
|
23
|
+
height: 36) %>
|
34
24
|
</button>
|
35
25
|
|
36
26
|
<div id="link-to-account" class="dropdown-menu dropdown-menu-right text-right">
|
@@ -39,7 +29,7 @@
|
|
39
29
|
</li>
|
40
30
|
<% end %>
|
41
31
|
<li id="link-to-cart">
|
42
|
-
<%= render 'spree/shared/cart', class: 'd-
|
43
|
-
<%= render 'spree/shared/cart', class: 'd-xl-none', size: 24, item_count: 0 %>
|
32
|
+
<%= render 'spree/shared/cart', class: 'd-inline-block cart-icon', size: 36, item_count: 0 %>
|
44
33
|
</li>
|
34
|
+
<%= render partial: 'spree/shared/internationalization_options' %>
|
45
35
|
</ul>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="p-0 justify-content-around mx-auto no-product-available">
|
2
|
-
<div id=
|
2
|
+
<div id="no-product-available-close-button" class="d-flex no-product-available-icon">
|
3
3
|
<%= inline_svg_tag "close.svg", class: "w-100 h-100" %>
|
4
4
|
</div>
|
5
5
|
|
@@ -1,24 +1,5 @@
|
|
1
|
-
<% cache
|
2
|
-
<% selected_option_values = params_ot_downcase_name&.split(',')&.map(&:to_i) || [] %>
|
1
|
+
<% cache option_type_cache_key(option_type) do %>
|
3
2
|
<% option_type.option_values.each do |option_value| %>
|
4
|
-
|
5
|
-
<% name = option_value.name %>
|
6
|
-
|
7
|
-
<% option_value_param = (selected_option_values.include?(id) ? selected_option_values - [id] : selected_option_values + [id]).join(',') %>
|
8
|
-
<%= link_to permitted_params.merge(ot_downcase_name => option_value_param, menu_open: 1) do %>
|
9
|
-
<% if ot_downcase_name == 'color' %>
|
10
|
-
|
11
|
-
<span class="d-inline-block mb-1">
|
12
|
-
<%= render partial: 'spree/shared/color_select', locals: {
|
13
|
-
color: option_value.presentation,
|
14
|
-
selected: selected_option_values.include?(id)
|
15
|
-
} %>
|
16
|
-
</span>
|
17
|
-
<% else %>
|
18
|
-
<div class="d-inline-block text-uppercase py-1 px-2 m-1 plp-overlay-card-item <%= 'plp-overlay-card-item--selected' if selected_option_values.include?(id) %>">
|
19
|
-
<%= name %>
|
20
|
-
</div>
|
21
|
-
<% end %>
|
22
|
-
<% end %>
|
3
|
+
<%= option_value_filter_link(option_value, permitted_params) %>
|
23
4
|
<% end %>
|
24
5
|
<% end %>
|