Skip to content
Snippets Groups Projects
Commit a890e299 authored by Martin Leblanc's avatar Martin Leblanc Committed by Kevin Paxman
Browse files

ISTWCMS-5650: Use flickity prev next buttons - fix all prev next challenges

parent b45a6511
No related branches found
No related tags found
No related merge requests found
...@@ -8,14 +8,16 @@ $size-medium: 4; ...@@ -8,14 +8,16 @@ $size-medium: 4;
$size-large: 4; $size-large: 4;
$size-xlarge: 7; $size-xlarge: 7;
.uw-ig { .uw-ig {
.uw-button--wrap { &[data-nav="both"] {
display:none; padding-bottom: var(--size-12);
margin-top: var(--size-6); .flickity-prev-next-button {
&.active { bottom:-7rem;
display: flex;
} }
&.hide { }
display: none; &[data-nav="navigation"] {
padding-bottom: var(--size-10);
.flickity-prev-next-button {
bottom:-5rem;
} }
} }
.flickity-page-dots { .flickity-page-dots {
...@@ -36,6 +38,20 @@ $size-xlarge: 7; ...@@ -36,6 +38,20 @@ $size-xlarge: 7;
} }
} }
} }
.flickity-prev-next-button {
top: inherit;
height: var(--size-6);
width: var(--size-6);
&.hide {
display: none;
}
&.next {
left:50%;
}
&.previous{
left: 44%;
}
}
&--slider { &--slider {
// //
} }
...@@ -250,7 +266,7 @@ $size-xlarge: 7; ...@@ -250,7 +266,7 @@ $size-xlarge: 7;
} }
&[data-images-num="4"] { &[data-images-num="4"] {
.uw-ig__item { .uw-ig__item {
max-width: 24.5%; max-width: 24.75%;
} }
} }
} }
......
...@@ -144,10 +144,4 @@ ...@@ -144,10 +144,4 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</div> </div>
{% if type == NULL or type == 'slider' %}
<div class="uw-button--wrap">
<button tabindex="0" class="uw-ig-button--previous"> < Prev</button>
<button tabindex="0" class="uw-ig-button--next">Next ></button>
</div>
{% endif %}
</div> </div>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
return imagesNum; return imagesNum;
} }
}, },
prevNextButtons: false, prevNextButtons: navStyle === 'navigation' || navStyle === 'both',
pageDots: navStyle === 'pagination' || navStyle === 'both', pageDots: navStyle === 'pagination' || navStyle === 'both',
}); });
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
// Hide the button wrapper if the number of dots equals imagesNum // Hide the button wrapper if the number of dots equals imagesNum
if (dots.length === imagesNum) { if (dots.length === imagesNum) {
$(this).find('.uw-button--wrap').addClass('hide'); $(this).find('.flickity-prev-next-button').addClass('hide');
$(this).find('.flickity-page-dots').addClass('hide'); $(this).find('.flickity-page-dots').addClass('hide');
} }
if (!dots.length) { if (!dots.length) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment