Commit c1dba53e authored by everaldomatias's avatar everaldomatias
Browse files

Remove width slider of the JS and add on CSS

parent 8c6e54c0
......@@ -7,17 +7,7 @@ let sliders = [];
let i = 1;
document.querySelectorAll( '.featured-slider .itens-wrapper' ).forEach( (element) => {
let width = element.clientWidth;
console.log( element.childElementCount )
document.head.insertAdjacentHTML('beforeend', `<style>
#tns${i} > .tns-item {
width:${width}px !important;
}
</style>` );
if( element.childElementCount >= 2 ) {
sliders[i] = tns({
container: element,
items: 1,
......@@ -26,12 +16,11 @@ document.querySelectorAll( '.featured-slider .itens-wrapper' ).forEach( (element
controlsText: ['<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="1em" height="1em" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="none" stroke="#626262" stroke-width="2" d="M15 6l-6 6l6 6"/></svg>', '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="1em" height="1em" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="none" stroke="#626262" stroke-width="2" d="M9 6l6 6l-6 6"/></svg>'],
slideBy: 'page',
mouseDrag: true,
fixedWidth: element.clientWidth,
fixedWidth: 1980,
mode:'gallery',
animateDelay: 800,
speed: 800,
});
}
i++;
})
\ No newline at end of file
......@@ -175,6 +175,10 @@
.tns-outer {
position: relative;
.tns-slider > .tns-item {
width: 100% !important;
}
.tns-controls {
position: initial;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment