Skip to content

Commit

Permalink
TH-211: Aura > Fix product & featured products sliders direction not …
Browse files Browse the repository at this point in the history
…same as document direction (#85)
  • Loading branch information
eihabkhan authored Nov 8, 2024
1 parent 7b0ec92 commit ffa71db
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions themes/aura/sections/featured-product-slider.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
snap: true,
gap: '20px',
focus: 'center',
direction: '{{ settings.theme_direction }}'
});
const mobileBlocksPerPage = {{ section.settings.slider_mobile_per_page }};
Expand All @@ -105,6 +106,7 @@
perMove: 1,
gap: '12px',
snap: true,
direction: '{{ settings.theme_direction }}'
});
mountSlider(isMobile, mobileSlider, desktopSlider);
Expand Down
2 changes: 2 additions & 0 deletions themes/aura/sections/related-products.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
snap: true,
gap: '20px',
focus: 'center',
direction: '{{ settings.theme_direction }}'
});
const mobileBlocksPerPage = 2;
Expand All @@ -66,6 +67,7 @@
perMove: 1,
gap: '12px',
snap: true,
direction: '{{ settings.theme_direction }}'
});
mountSlider(isMobile, mobileSlider, desktopSlider);
Expand Down
9 changes: 9 additions & 0 deletions themes/aura/snippets/product-slider.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@
}
}

[dir=rtl] #yc_slider_{{ id }} .splide__arrows--rtl .splide__arrow--next {
border-radius: 8px 0 0 8px;
left: -26rem;
}

[dir=rtl] #yc_slider_{{ id }} .splide__arrows--rtl .splide__arrow--prev {
border-radius: 0 8px 8px 0;
right: -26rem;
}
{% endstyle %}

{% assign products_exist = false %}
Expand Down
10 changes: 10 additions & 0 deletions themes/aura/snippets/related-products-slider.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@
width: 16px;
fill: #000;
}

[dir=rtl] #yc_slider_{{ id }} .splide__arrows--rtl .splide__arrow--next {
border-radius: 8px 0 0 8px;
left: -26rem;
}

[dir=rtl] #yc_slider_{{ id }} .splide__arrows--rtl .splide__arrow--prev {
border-radius: 0 8px 8px 0;
right: -26rem;
}
{% endstyle %}
<div
class='splide yc-slider__{{ view }}'
Expand Down

0 comments on commit ffa71db

Please sign in to comment.