Skip to content

Commit

Permalink
TH-214: All themes > Fix related products slider perPage (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
eihabkhan authored Nov 8, 2024
1 parent 4418c1a commit f2c756c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion themes/aura/sections/related-products.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
(function() {
const isMobile = window.matchMedia("(max-width: 768px)");
const products = {{ product.related_products.size }};
const desktopBlocksPerPage = Math.max(products, 3);
const desktopBlocksPerPage = Math.min(products, 3);
const desktopSlider = new Splide(`#yc_slider_{{ id }}.yc-slider__desktop`, {
type: products < 4 ? 'slide' : '{{ section.settings.slider_transition_type }}',
Expand Down
2 changes: 1 addition & 1 deletion themes/harmony/sections/related-products.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
(function() {
const isMobile = window.matchMedia("(max-width: 768px)");
const products = {{ product.related_products.size }};
const desktopBlocksPerPage = Math.max(products, 3);
const desktopBlocksPerPage = Math.min(products, 3);
const desktopSlider = new Splide(`#yc_slider_{{ id }}.yc-slider__desktop`, {
type: products < 4 ? 'slide' : '{{ section.settings.slider_transition_type }}',
Expand Down
2 changes: 1 addition & 1 deletion themes/meraki/sections/related-products.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
(function() {
const isMobile = window.matchMedia("(max-width: 768px)");
const products = {{ product.related_products.size }};
const desktopBlocksPerPage = Math.max(products, 3);
const desktopBlocksPerPage = Math.min(products, 3);
const desktopSlider = new Splide(`#yc_slider_{{ id }}.yc-slider__desktop`, {
type: products < 4 ? 'slide' : '{{ section.settings.slider_transition_type }}',
Expand Down

0 comments on commit f2c756c

Please sign in to comment.