spree_frontend 4.2.3.1 → 4.3.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/app/assets/config/spree_frontend_manifest.js +4 -0
- data/app/assets/images/card-image.svg +4 -0
- data/app/assets/images/file-image.svg +4 -0
- data/app/assets/images/image.svg +4 -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.svg +23 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/javascripts/spree/api/main.js +36 -0
- data/app/assets/javascripts/spree/api/storefront/cart.js +49 -0
- data/app/assets/javascripts/spree/frontend/checkout/payment.js +18 -5
- data/app/assets/javascripts/spree/frontend/checkout.js +16 -0
- data/app/assets/javascripts/spree/frontend/currency.js +11 -9
- data/app/assets/javascripts/spree/frontend/locale.es6 +13 -0
- data/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js +3 -3
- data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +0 -9
- data/app/assets/javascripts/spree/frontend/views/spree/products/price_filters.es6 +46 -0
- data/app/assets/javascripts/spree/frontend.js +3 -0
- data/app/assets/javascripts/spree.js +78 -0
- data/app/assets/stylesheets/spree/frontend/application.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/components-bootstrap/button.scss +8 -0
- data/app/assets/stylesheets/spree/frontend/helpers/spree/frontend_helper.scss +41 -0
- data/app/assets/stylesheets/spree/frontend/variables/variables.scss +2 -2
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +17 -5
- 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/shared/category_nav_bar.scss +3 -3
- 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 +12 -1
- data/app/controllers/spree/addresses_controller.rb +14 -19
- data/app/controllers/spree/checkout_controller.rb +5 -3
- data/app/controllers/spree/cms_pages_controller.rb +29 -0
- data/app/controllers/spree/content_controller.rb +0 -2
- data/app/controllers/spree/errors_controller.rb +11 -0
- data/app/controllers/spree/home_controller.rb +34 -1
- data/app/controllers/spree/locale_controller.rb +7 -1
- data/app/controllers/spree/orders_controller.rb +9 -7
- data/app/controllers/spree/products_controller.rb +14 -13
- data/app/controllers/spree/store_controller.rb +25 -1
- data/app/controllers/spree/taxons_controller.rb +12 -5
- data/app/helpers/spree/addresses_helper.rb +9 -4
- data/app/helpers/spree/cms_pages_helper.rb +23 -0
- data/app/helpers/spree/frontend_helper.rb +109 -10
- data/app/helpers/spree/navigation_helper.rb +73 -4
- data/app/helpers/spree/products_filters_helper.rb +168 -0
- data/app/helpers/spree/store_helper.rb +3 -1
- data/app/views/spree/checkout/_address.html.erb +1 -1
- data/app/views/spree/checkout/_credit_card.html.erb +1 -0
- data/app/views/spree/cms_pages/show.html.erb +16 -0
- data/app/views/spree/errors/forbidden.html.erb +0 -0
- data/app/views/spree/errors/unauthorized.html.erb +0 -0
- data/app/views/spree/home/index.html.erb +19 -118
- data/app/views/spree/layouts/spree_application.html.erb +2 -2
- data/app/views/spree/products/_description.html.erb +16 -19
- data/app/views/spree/products/_filters_desktop.html.erb +50 -15
- data/app/views/spree/products/_filters_mobile.html.erb +38 -10
- data/app/views/spree/products/_sort_desktop.html.erb +17 -11
- data/app/views/spree/products/_sort_mobile.html.erb +16 -0
- data/app/views/spree/products/index.html.erb +1 -1
- data/app/views/spree/shared/_carousel_4_products.html.erb +8 -8
- data/app/views/spree/shared/_checkout_header.html.erb +22 -21
- data/app/views/spree/shared/_copyright.html.erb +1 -1
- data/app/views/spree/shared/_footer.html.erb +18 -12
- data/app/views/spree/shared/_head.html.erb +1 -1
- data/app/views/spree/shared/_header.html.erb +3 -3
- data/app/views/spree/shared/_main_nav_bar.html.erb +61 -43
- data/app/views/spree/shared/_mobile_navigation.html.erb +30 -19
- data/app/views/spree/shared/_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_option_values.html.erb +2 -21
- data/app/views/spree/shared/_order_details.html.erb +1 -1
- data/app/views/spree/shared/_paths.html.erb +8 -0
- data/app/views/spree/shared/_properties.html.erb +4 -0
- data/app/views/spree/shared/_translations.html.erb +2 -1
- data/app/views/spree/shared/carousel/_single.html.erb +1 -1
- data/app/views/spree/shared/carousel/_thumbnails.html.erb +1 -1
- 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 +6 -1
- data/app/views/spree/users/show.html.erb +4 -1
- data/config/initializers/assets.rb +4 -13
- data/config/routes.rb +9 -3
- data/lib/generators/spree/frontend/install/install_generator.rb +5 -5
- 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/engine.rb +6 -0
- data/lib/spree/frontend.rb +6 -3
- data/spec/fixtures/files/store_favicon.ico +0 -0
- data/spree_frontend.gemspec +13 -9
- 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 +132 -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/javascripts/spree/frontend/locale.js +0 -13
- data/app/assets/javascripts/spree/frontend/multi_currency.js +0 -13
- data/lib/generators/spree/frontend/install/templates/config/initializers/spree_storefront.rb +0 -1
- data/lib/generators/spree/frontend/install/templates/config/spree_storefront.yml +0 -99
@@ -4,7 +4,8 @@
|
|
4
4
|
{
|
5
5
|
coupon_code_applied: Spree.t(:coupon_code_applied),
|
6
6
|
coupon_code_removed: Spree.t(:coupon_code_removed),
|
7
|
-
coupon_code_error_icon: image_path('error.svg')
|
7
|
+
coupon_code_error_icon: image_path('error.svg'),
|
8
|
+
credit_card_remove_confirmation: Spree.t(:credit_card_remove_confirmation)
|
8
9
|
}.to_json
|
9
10
|
%>
|
10
11
|
});
|
@@ -43,7 +43,7 @@
|
|
43
43
|
<% images.each_with_index do |image, imageIndex| %>
|
44
44
|
<div
|
45
45
|
class="carousel-item product-carousel-item<%= ' active' if imageIndex == 0 %>"
|
46
|
-
data-variant-is-master="<%= image.viewable_id == @product.
|
46
|
+
data-variant-is-master="<%= image.viewable_id == @product.master.id %>"
|
47
47
|
data-variant-id="<%= image.viewable_id %>">
|
48
48
|
<div class="product-carousel-item-squared <%= 'product-carousel-item-squared-only' if images.length == 1 %>">
|
49
49
|
<% image_attrs = {
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<div
|
18
18
|
class="product-thumbnails-carousel-item-single product-thumbnails-carousel-item-single--visible"
|
19
19
|
data-product-carousel-to-slide="<%= image_index %>"
|
20
|
-
data-variant-is-master="<%= image.viewable_id == @product.
|
20
|
+
data-variant-is-master="<%= image.viewable_id == @product.master.id %>"
|
21
21
|
data-variant-id="<%= image.viewable_id %>">
|
22
22
|
<%= lazy_image(
|
23
23
|
src: main_app.url_for(image.url(:pdp_thumbnail)),
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% if edit_mode %>
|
2
|
+
<div class="fixed-bottom text-center">
|
3
|
+
<div class="row">
|
4
|
+
<div id="draftNotice" class="col-12 d-flex w-100 p-4 justify-content-center align-items-center bg-dark">
|
5
|
+
<span class="text-white">
|
6
|
+
<h5 class="mb-0">
|
7
|
+
<%= Spree.t('draft_mode') %>
|
8
|
+
</h5>
|
9
|
+
</span>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<% if section.gutters? %>
|
2
|
+
<% section_padding = 'px-3' %>
|
3
|
+
<% else %>
|
4
|
+
<% section_padding = 'px-0' %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<div class="col-12 <%= section_padding %>">
|
8
|
+
<div class="text-center homepage-fashion-trends-box">
|
9
|
+
<% if section.title.present? %>
|
10
|
+
<div class="homepage-fashion-trends-box-summer-text mb-1"><%= section.title %></div>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<% if section.subtitle.present? %>
|
14
|
+
<div class="homepage-fashion-trends-box-fashion-trends-text mb-2"><%= section.subtitle %></div>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<div class="homepage-fashion-trends-box-description-text text-center mb-3">
|
18
|
+
<div class="mb-3">
|
19
|
+
<%= raw section.rte_content %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<% if section.button_text.present? && section.link.present? %>
|
23
|
+
<%= link_to section.button_text, spree_localized_link(section), class: 'btn text-center spree-btn btn-outline-primary w-75' %>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<% if section.fullscreen? %>
|
2
|
+
<% if section.gutters? %>
|
3
|
+
<% section_padding = 'px-3' %>
|
4
|
+
<% else %>
|
5
|
+
<% section_padding = 'px-0' %>
|
6
|
+
<% end %>
|
7
|
+
<% else %>
|
8
|
+
<% section_padding = 'px-2' %>
|
9
|
+
<% end %>
|
10
|
+
<div class="col-12 homepage-hero-image position-relative p-0 <%= section_padding %>">
|
11
|
+
|
12
|
+
<div class="bg-light" style="--aspect-ratio:12/5;">
|
13
|
+
<% if section.image_one.attached? %>
|
14
|
+
|
15
|
+
<!-- SM to MD -->
|
16
|
+
<img class="d-block d-md-none lazyload"
|
17
|
+
data-src="<%= main_app.url_for(section.img_one_sm) %>"
|
18
|
+
data-srcset="<%= main_app.url_for(section.img_one_sm) %>"
|
19
|
+
alt="<%= section&.title %>">
|
20
|
+
|
21
|
+
<!-- MD to LG -->
|
22
|
+
<img class="d-none d-md-block d-lg-none lazyload"
|
23
|
+
data-src="<%= main_app.url_for(section.img_one_md) %>"
|
24
|
+
data-srcset="<%= main_app.url_for(section.img_one_md) %>"
|
25
|
+
alt="<%= section&.title %>">
|
26
|
+
|
27
|
+
<!-- LG to XL -->
|
28
|
+
<img class="d-none d-lg-block d-xl-none lazyload"
|
29
|
+
data-src="<%= main_app.url_for(section.img_one_lg) %>"
|
30
|
+
data-srcset="<%= main_app.url_for(section.img_one_lg) %>"
|
31
|
+
alt="<%= section&.title %>">
|
32
|
+
|
33
|
+
<!-- XL UP -->
|
34
|
+
<img class="d-none d-xl-block lazyload"
|
35
|
+
data-src="<%= main_app.url_for(section.img_one_xl) %>"
|
36
|
+
data-srcset="<%= main_app.url_for(section.img_one_xl) %>"
|
37
|
+
alt="<%= section&.title %>">
|
38
|
+
|
39
|
+
<% else %>
|
40
|
+
<%= icon( name: 'card-image',
|
41
|
+
classes: 'text-black-50',
|
42
|
+
width: 26,
|
43
|
+
height: 26) %>
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
<div class="hero-content position-absolute-y-center">
|
47
|
+
<% if section.title.present? %>
|
48
|
+
<div class="homepage-hero-image-text mx-auto pb-0 pb-sm-2 pb-md-3">
|
49
|
+
<%= section.title %>
|
50
|
+
</div>
|
51
|
+
<% end %>
|
52
|
+
|
53
|
+
<% if section.link.present? && section.button_text.present? %>
|
54
|
+
<div>
|
55
|
+
<%= link_to section.button_text, spree_localized_link(section), class: 'btn btn-primary spree-btn px-5' %>
|
56
|
+
</div>
|
57
|
+
<% end %>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</div>
|
@@ -0,0 +1,171 @@
|
|
1
|
+
<% if section.fullscreen? %>
|
2
|
+
<% if section.default_layout? %>
|
3
|
+
<% section_one_padding = 'pl-3' %>
|
4
|
+
<% section_two_padding = 'pr-3' %>
|
5
|
+
<% else %>
|
6
|
+
<% section_one_padding = 'pr-3 order-2' %>
|
7
|
+
<% section_two_padding = 'pl-3 order-1' %>
|
8
|
+
<% end %>
|
9
|
+
<% else %>
|
10
|
+
<% if section.default_layout? %>
|
11
|
+
<% section_one_padding = '' %>
|
12
|
+
<% section_two_padding = '' %>
|
13
|
+
<% else %>
|
14
|
+
<% section_one_padding = 'order-2' %>
|
15
|
+
<% section_two_padding = 'order-1' %>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
18
|
+
|
19
|
+
<% if section.show_labels? %>
|
20
|
+
<% labels_class = 'homepage-taxon-box-text' %>
|
21
|
+
<% else %>
|
22
|
+
<% labels_class = 'd-none' %>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<% if section.link_one.present? && section.link_type_one == 'Spree::Taxon' %>
|
26
|
+
<% link_one = spree.nested_taxons_path(section.link_one) %>
|
27
|
+
<% link_one_classes = 'homepage-taxon-box bg-light' %>
|
28
|
+
<% elsif section.link_one.present? && section.link_type_one == 'Spree::Product' %>
|
29
|
+
<% link_one = spree.product_path(section.link_one) %>
|
30
|
+
<% link_one_classes = 'homepage-taxon-box bg-light' %>
|
31
|
+
<% else %>
|
32
|
+
<% link_one = nil %>
|
33
|
+
<% link_one_classes = 'homepage-taxon-box bg-light pointer-events-none cursor-default' %>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<% if section.link_two.present? && section.link_type_two == 'Spree::Taxon' %>
|
37
|
+
<% link_two = spree.nested_taxons_path(section.link_two) %>
|
38
|
+
<% link_two_classes = 'homepage-taxon-box bg-light' %>
|
39
|
+
<% elsif section.link_two.present? && section.link_type_two == 'Spree::Product' %>
|
40
|
+
<% link_two = spree.product_path(section.link_two) %>
|
41
|
+
<% link_two_classes = 'homepage-taxon-box bg-light' %>
|
42
|
+
<% else %>
|
43
|
+
<% link_two = nil %>
|
44
|
+
<% link_two_classes = 'homepage-taxon-box bg-light pointer-events-none cursor-default' %>
|
45
|
+
<% end %>
|
46
|
+
|
47
|
+
<% if section.link_three.present? && section.link_type_three == 'Spree::Taxon' %>
|
48
|
+
<% link_three = spree.nested_taxons_path(section.link_three) %>
|
49
|
+
<% link_three_classes = 'homepage-taxon-box bg-light' %>
|
50
|
+
<% elsif section.link_three.present? && section.link_type_three == 'Spree::Product' %>
|
51
|
+
<% link_three = spree.product_path(section.link_three) %>
|
52
|
+
<% link_three_classes = 'homepage-taxon-box bg-light' %>
|
53
|
+
<% else %>
|
54
|
+
<% link_three = nil %>
|
55
|
+
<% link_three_classes = 'homepage-taxon-box bg-light pointer-events-none cursor-default' %>
|
56
|
+
<% end %>
|
57
|
+
|
58
|
+
<!-- Left Block -->
|
59
|
+
<div class="col-6 <%= section_one_padding %>">
|
60
|
+
|
61
|
+
<!-- Top Left Block SQUARE -->
|
62
|
+
<!-- margin-bottom: 3.7% is important for keeping the bottom of the sections aligned -->
|
63
|
+
<div class="row" style="margin-bottom: 3.7%;">
|
64
|
+
<div class="col-12">
|
65
|
+
|
66
|
+
<%= link_to link_one, class: link_one_classes, style: '--aspect-ratio:18/13;' do %>
|
67
|
+
<% if section.image_one.attached? && section.image_one.variable? %>
|
68
|
+
|
69
|
+
<!-- XS to MD -->
|
70
|
+
<img class="d-md-none lazyload"
|
71
|
+
data-src="<%= main_app.url_for(section.img_one_md) %>"
|
72
|
+
data-srcset="<%= main_app.url_for(section.img_one_md) %>"
|
73
|
+
alt="<%= section&.title_one %>">
|
74
|
+
|
75
|
+
<!-- MD to XL -->
|
76
|
+
<img class="d-none d-md-block d-xl-none lazyload"
|
77
|
+
data-src="<%= main_app.url_for(section.img_one_lg) %>"
|
78
|
+
data-srcset="<%= main_app.url_for(section.img_one_lg) %>"
|
79
|
+
alt="<%= section&.title_one %>">
|
80
|
+
|
81
|
+
<!-- XL UP -->
|
82
|
+
<img class="d-none d-xl-block lazyload"
|
83
|
+
data-src="<%= main_app.url_for(section.img_one_xl) %>"
|
84
|
+
data-srcset="<%= main_app.url_for(section.img_one_xl) %>"
|
85
|
+
alt="<%= section&.title_one %>">
|
86
|
+
<% else %>
|
87
|
+
<%= icon( name: 'card-image',
|
88
|
+
classes: 'homepage-taxon-box text-black-50',
|
89
|
+
width: 26,
|
90
|
+
height: 26) %>
|
91
|
+
<% end %>
|
92
|
+
<div class="<%= labels_class %>" aria-label="<%= section&.title_one %>">
|
93
|
+
<h3 class="homepage-hpb"><%= section&.title_one %></h3>
|
94
|
+
</div>
|
95
|
+
<% end %>
|
96
|
+
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
<!-- Bottom Left Block SQUARE -->
|
101
|
+
<div class="row">
|
102
|
+
<div class="col-12">
|
103
|
+
|
104
|
+
<%= link_to link_three, class: link_three_classes, style: '--aspect-ratio:18/13;' do %>
|
105
|
+
<% if section.image_three.attached? && section.image_three.variable? %>
|
106
|
+
|
107
|
+
<!-- XS to MD -->
|
108
|
+
<img class="d-md-none lazyload"
|
109
|
+
data-src="<%= main_app.url_for(section.img_three_md) %>"
|
110
|
+
data-srcset="<%= main_app.url_for(section.img_three_md) %>"
|
111
|
+
alt="<%= section&.title_three %>">
|
112
|
+
|
113
|
+
<!-- MD to XL -->
|
114
|
+
<img class="d-none d-md-block d-xl-none lazyload"
|
115
|
+
data-src="<%= main_app.url_for(section.img_three_lg) %>"
|
116
|
+
data-srcset="<%= main_app.url_for(section.img_three_lg) %>"
|
117
|
+
alt="<%= section&.title_three %>">
|
118
|
+
|
119
|
+
<!-- XL UP -->
|
120
|
+
<img class="d-none d-xl-block lazyload"
|
121
|
+
data-src="<%= main_app.url_for(section.img_three_xl) %>"
|
122
|
+
data-srcset="<%= main_app.url_for(section.img_three_xl) %>"
|
123
|
+
alt="<%= section&.title_three %>">
|
124
|
+
<% else %>
|
125
|
+
<%= icon( name: 'card-image',
|
126
|
+
classes: 'homepage-taxon-box text-black-50',
|
127
|
+
width: 26,
|
128
|
+
height: 26) %>
|
129
|
+
<% end %>
|
130
|
+
<div class="<%= labels_class %>" aria-label="<%= section&.title_three %>">
|
131
|
+
<h3 class="homepage-hpb"><%= section&.title_three %></h3>
|
132
|
+
</div>
|
133
|
+
<% end %>
|
134
|
+
|
135
|
+
</div>
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
<!-- Right Block TALL -->
|
140
|
+
<div class="col-6 <%= section_two_padding %>">
|
141
|
+
<%= link_to link_two, class: link_two_classes, style: '--aspect-ratio:27/40;' do %>
|
142
|
+
<% if section.image_two.attached? && section.image_two.variable? %>
|
143
|
+
|
144
|
+
<!-- XS to MD -->
|
145
|
+
<img class="d-md-none lazyload"
|
146
|
+
data-src="<%= main_app.url_for(section.img_two_md) %>"
|
147
|
+
data-srcset="<%= main_app.url_for(section.img_two_md) %>"
|
148
|
+
alt="<%= section&.title_two %>">
|
149
|
+
|
150
|
+
<!-- MD to XL -->
|
151
|
+
<img class="d-none d-md-block d-xl-none lazyload"
|
152
|
+
data-src="<%= main_app.url_for(section.img_two_lg) %>"
|
153
|
+
data-srcset="<%= main_app.url_for(section.img_two_lg) %>"
|
154
|
+
alt="<%= section&.title_two %>">
|
155
|
+
|
156
|
+
<!-- XL UP -->
|
157
|
+
<img class="d-none d-xl-block lazyload"
|
158
|
+
data-src="<%= main_app.url_for(section.img_two_xl) %>"
|
159
|
+
data-srcset="<%= main_app.url_for(section.img_two_xl) %>"
|
160
|
+
alt="<%= section&.title_two %>">
|
161
|
+
<% else %>
|
162
|
+
<%= icon( name: 'file-image',
|
163
|
+
classes: 'homepage-taxon-box text-black-50',
|
164
|
+
width: 26,
|
165
|
+
height: 26) %>
|
166
|
+
<% end %>
|
167
|
+
<div class="<%= labels_class %>" aria-label="<%= section&.title_two %>">
|
168
|
+
<h3 class="homepage-hpb"><%= section&.title_two %></h3>
|
169
|
+
</div>
|
170
|
+
<% end %>
|
171
|
+
</div>
|
@@ -0,0 +1,118 @@
|
|
1
|
+
<% if section.gutters? %>
|
2
|
+
<% section_one_padding = 'pr-md-2' %>
|
3
|
+
<% section_two_padding = 'pl-md-2' %>
|
4
|
+
<% if section.fullscreen? %>
|
5
|
+
<% section_one_padding = 'px-3 pr-md-2' %>
|
6
|
+
<% section_two_padding = 'px-3 pl-md-2' %>
|
7
|
+
<% end %>
|
8
|
+
<% else %>
|
9
|
+
<% if section.fullscreen? %>
|
10
|
+
<% section_one_padding = 'px-0' %>
|
11
|
+
<% section_two_padding = 'px-0' %>
|
12
|
+
<% else %>
|
13
|
+
<% section_one_padding = 'pr-md-0' %>
|
14
|
+
<% section_two_padding = 'pl-md-0' %>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<% if section.link_one.present? && section.link_type_one == 'Spree::Taxon' %>
|
19
|
+
<% link_one = spree.nested_taxons_path(section.link_one) %>
|
20
|
+
<% elsif section.link_one.present? && section.link_type_one == 'Spree::Product' %>
|
21
|
+
<% link_one = spree.product_path(section.link_one) %>
|
22
|
+
<% else %>
|
23
|
+
<% link_one = nil %>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<% if section.link_two.present? && section.link_type_two == 'Spree::Taxon' %>
|
27
|
+
<% link_two = spree.nested_taxons_path(section.link_two) %>
|
28
|
+
<% elsif section.link_two.present? && section.link_type_two == 'Spree::Product' %>
|
29
|
+
<% link_two = spree.product_path(section.link_two) %>
|
30
|
+
<% else %>
|
31
|
+
<% link_two = nil %>
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
<div class="col-12 col-md-6 mb-3 mb-md-0 <%= section_one_padding %>">
|
35
|
+
<%= link_to link_one,
|
36
|
+
class: "d-flex align-items-end justify-content-center bg-light text-center overflow-hidden homepage-bottom-box #{'pointer-events-none cursor-default' unless link_one}",
|
37
|
+
style: '--aspect-ratio:54/35;' do %>
|
38
|
+
|
39
|
+
<% if section.image_one.attached? %>
|
40
|
+
<!-- XS to MD -->
|
41
|
+
<img class="d-md-none lazyload"
|
42
|
+
data-src="<%= main_app.url_for(section.img_one_md) %>"
|
43
|
+
data-srcset="<%= main_app.url_for(section.img_one_md) %>"
|
44
|
+
alt="<%= section&.title_one %>">
|
45
|
+
|
46
|
+
<!-- MD to XL -->
|
47
|
+
<img class="d-none d-md-block d-xl-none lazyload"
|
48
|
+
data-src="<%= main_app.url_for(section.img_one_lg) %>"
|
49
|
+
data-srcset="<%= main_app.url_for(section.img_one_lg) %>"
|
50
|
+
alt="<%= section&.title_one %>">
|
51
|
+
|
52
|
+
<!-- XL UP -->
|
53
|
+
<img class="d-none d-xl-block lazyload"
|
54
|
+
data-src="<%= main_app.url_for(section.img_one_xl) %>"
|
55
|
+
data-srcset="<%= main_app.url_for(section.img_one_xl) %>"
|
56
|
+
alt="<%= section&.title_one %>">
|
57
|
+
<% else %>
|
58
|
+
<%= icon( name: 'card-image',
|
59
|
+
classes: 'text-black-50',
|
60
|
+
width: 26,
|
61
|
+
height: 26) %>
|
62
|
+
<% end %>
|
63
|
+
|
64
|
+
<% if section.title_one.present? || section.subtitle_one.present? %>
|
65
|
+
<div class="homepage-bottom-box-inner p-1 p-sm-2 p-md-4 homepage-hpb" role="img" aria-label="New Collection">
|
66
|
+
<div class="homepage-bottom-box-inner-small-text">
|
67
|
+
<%= section&.title_one %>
|
68
|
+
</div>
|
69
|
+
<div class="homepage-bottom-box-inner-big-text">
|
70
|
+
<%= section.subtitle_one %>
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
<% end %>
|
74
|
+
<% end %>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<div class="col-12 col-md-6 <%= section_two_padding %>">
|
78
|
+
<%= link_to link_two,
|
79
|
+
class: "d-flex align-items-end justify-content-center bg-light text-center overflow-hidden homepage-bottom-box #{'pointer-events-none cursor-default' unless link_two}",
|
80
|
+
style: '--aspect-ratio:54/35;' do %>
|
81
|
+
|
82
|
+
<% if section.image_two.attached? %>
|
83
|
+
<!-- XS to MD -->
|
84
|
+
<img class="d-md-none lazyload"
|
85
|
+
data-src="<%= main_app.url_for(section.img_two_md) %>"
|
86
|
+
data-srcset="<%= main_app.url_for(section.img_two_md) %>"
|
87
|
+
alt="<%= section&.title_two %>">
|
88
|
+
|
89
|
+
<!-- MD to XL -->
|
90
|
+
<img class="d-none d-md-block d-xl-none lazyload"
|
91
|
+
data-src="<%= main_app.url_for(section.img_two_lg) %>"
|
92
|
+
data-srcset="<%= main_app.url_for(section.img_two_lg) %>"
|
93
|
+
alt="<%= section&.title_two %>">
|
94
|
+
|
95
|
+
<!-- XL UP -->
|
96
|
+
<img class="d-none d-xl-block lazyload"
|
97
|
+
data-src="<%= main_app.url_for(section.img_two_xl) %>"
|
98
|
+
data-srcset="<%= main_app.url_for(section.img_two_xl) %>"
|
99
|
+
alt="<%= section&.title_two %>">
|
100
|
+
<% else %>
|
101
|
+
<%= icon( name: 'card-image',
|
102
|
+
classes: 'text-black-50',
|
103
|
+
width: 26,
|
104
|
+
height: 26) %>
|
105
|
+
<% end %>
|
106
|
+
|
107
|
+
<% if section.title_two.present? || section.subtitle_two.present? %>
|
108
|
+
<div class="homepage-bottom-box-inner p-1 p-sm-2 p-md-4 homepage-hpb" role="img" aria-label="New Collection">
|
109
|
+
<div class="homepage-bottom-box-inner-small-text">
|
110
|
+
<%= section&.title_two %>
|
111
|
+
</div>
|
112
|
+
<div class="homepage-bottom-box-inner-big-text">
|
113
|
+
<%= section.subtitle_two %>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
<% end %>
|
117
|
+
<% end %>
|
118
|
+
</div>
|