Refactor homepage slider implementation by removing Swiper dependency and replacing it with a custom slider. Update styles and scripts accordingly, including changes to app.css and app.js for improved functionality and responsiveness. Update package.json to remove swiper dependency.

This commit is contained in:
Mekan1206
2026-08-04 06:37:25 +05:00
parent 96bc848420
commit 11e7398f29
10 changed files with 304 additions and 211 deletions

98
.cursor/debug-afcad7.log Normal file
View File

@@ -0,0 +1,98 @@
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":1,"requested":2,"index":2,"width":1920,"transform":"translateX(-3840px)"},"timestamp":1785807246670}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":2,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807246671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":2,"requested":3,"index":3,"width":1920,"transform":"translateX(-5760px)"},"timestamp":1785807250671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":3,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807250672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":3,"requested":4,"index":4,"width":1920,"transform":"translateX(-7680px)"},"timestamp":1785807254671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":4,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807254671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":4,"requested":5,"index":5,"width":1920,"transform":"translateX(-9600px)"},"timestamp":1785807258671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":5,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807258672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":5,"requested":6,"index":0,"width":1920,"transform":"translateX(0px)"},"timestamp":1785807262671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":0,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807262672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":0,"requested":1,"index":1,"width":1920,"transform":"translateX(-1920px)"},"timestamp":1785807266671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":1,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807266672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":1,"requested":2,"index":2,"width":1920,"transform":"translateX(-3840px)"},"timestamp":1785807270671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":2,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807270672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":2,"requested":3,"index":3,"width":1920,"transform":"translateX(-5760px)"},"timestamp":1785807274671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":3,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807274671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":3,"requested":4,"index":4,"width":1920,"transform":"translateX(-7680px)"},"timestamp":1785807278671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":4,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807278672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":4,"requested":5,"index":5,"width":1920,"transform":"translateX(-9600px)"},"timestamp":1785807282671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":5,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807282672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":5,"requested":6,"index":0,"width":1920,"transform":"translateX(0px)"},"timestamp":1785807286671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":0,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807286672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":0,"requested":1,"index":1,"width":1920,"transform":"translateX(-1920px)"},"timestamp":1785807290671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":1,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807290672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":1,"requested":2,"index":2,"width":1920,"transform":"translateX(-3840px)"},"timestamp":1785807294671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":2,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807294672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":2,"requested":3,"index":3,"width":1920,"transform":"translateX(-5760px)"},"timestamp":1785807298671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":3,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807298672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":3,"requested":4,"index":4,"width":1920,"transform":"translateX(-7680px)"},"timestamp":1785807302671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":4,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807302672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":4,"requested":5,"index":5,"width":1920,"transform":"translateX(-9600px)"},"timestamp":1785807306672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":5,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807306672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":5,"requested":6,"index":0,"width":1920,"transform":"translateX(0px)"},"timestamp":1785807310671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":0,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807310672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":0,"requested":1,"index":1,"width":1920,"transform":"translateX(-1920px)"},"timestamp":1785807314671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":1,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807314672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":1,"requested":2,"index":2,"width":1920,"transform":"translateX(-3840px)"},"timestamp":1785807318671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":2,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807318672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":2,"requested":3,"index":3,"width":1920,"transform":"translateX(-5760px)"},"timestamp":1785807322671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":3,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807322672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":3,"requested":4,"index":4,"width":1920,"transform":"translateX(-7680px)"},"timestamp":1785807326671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":4,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807326672}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":4,"requested":5,"index":5,"width":1920,"transform":"translateX(-9600px)"},"timestamp":1785807330671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":5,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807330671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":5,"requested":6,"index":0,"width":1920,"transform":"translateX(0px)"},"timestamp":1785807334671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":0,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807334671}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H5","location":"slider.js:mouseleave","message":"mouseleave during/after drag","data":{"dragging":false,"index":0},"timestamp":1785807336119}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H5","location":"slider.js:mouseleave","message":"mouseleave during/after drag","data":{"dragging":false,"index":0},"timestamp":1785807336620}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerDown","message":"pointerdown","data":{"pointerType":"mouse","clientX":1475.0928955078125,"targetTag":"A","width":1920,"index":0,"defaultPrevented":true},"timestamp":1785807337051}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-2.331787109375,"moveCount":1,"width":1920,"transform":"translateX(-2.33179px)","index":0},"timestamp":1785807337054}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-701.5407104492188,"moveCount":8,"width":1920,"transform":"translateX(-701.541px)","index":0},"timestamp":1785807337170}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerUp","message":"pointerup","data":{"dragDelta":-848.967529296875,"threshold":153.6,"passed":true,"direction":"next","moveCount":10,"indexBefore":0,"eventType":"pointerup"},"timestamp":1785807337201}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":0,"requested":1,"index":1,"width":1920,"transform":"translateX(-1920px)"},"timestamp":1785807337202}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":1,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807337202}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerDown","message":"pointerdown","data":{"pointerType":"mouse","clientX":1256.9200439453125,"targetTag":"A","width":1920,"index":1,"defaultPrevented":true},"timestamp":1785807338351}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-0.3525390625,"moveCount":1,"width":1920,"transform":"translateX(-1920.35px)","index":1},"timestamp":1785807338352}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-585.7520751953125,"moveCount":8,"width":1920,"transform":"translateX(-2505.75px)","index":1},"timestamp":1785807338470}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerUp","message":"pointerup","data":{"dragDelta":-752.0836791992188,"threshold":153.6,"passed":true,"direction":"next","moveCount":9,"indexBefore":1,"eventType":"pointerup"},"timestamp":1785807338485}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":1,"requested":2,"index":2,"width":1920,"transform":"translateX(-3840px)"},"timestamp":1785807338485}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":2,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807338486}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerDown","message":"pointerdown","data":{"pointerType":"mouse","clientX":1142.9139404296875,"targetTag":"A","width":1920,"index":2,"defaultPrevented":true},"timestamp":1785807339001}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-1.5576171875,"moveCount":1,"width":1920,"transform":"translateX(-3841.56px)","index":2},"timestamp":1785807339002}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-448.53369140625,"moveCount":8,"width":1920,"transform":"translateX(-4288.53px)","index":2},"timestamp":1785807339120}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerUp","message":"pointerup","data":{"dragDelta":-594.7726440429688,"threshold":153.6,"passed":true,"direction":"next","moveCount":9,"indexBefore":2,"eventType":"pointerup"},"timestamp":1785807339134}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":2,"requested":3,"index":3,"width":1920,"transform":"translateX(-5760px)"},"timestamp":1785807339135}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":3,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807339135}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerDown","message":"pointerdown","data":{"pointerType":"mouse","clientX":973.7495727539062,"targetTag":"A","width":1920,"index":3,"defaultPrevented":true},"timestamp":1785807339834}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-0.1461181640625,"moveCount":1,"width":1920,"transform":"translateX(-5760.15px)","index":3},"timestamp":1785807339870}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-519.3838806152344,"moveCount":8,"width":1920,"transform":"translateX(-6279.38px)","index":3},"timestamp":1785807339987}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerUp","message":"pointerup","data":{"dragDelta":-519.3838806152344,"threshold":153.6,"passed":true,"direction":"next","moveCount":8,"indexBefore":3,"eventType":"pointerup"},"timestamp":1785807340000}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":3,"requested":4,"index":4,"width":1920,"transform":"translateX(-7680px)"},"timestamp":1785807340001}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":4,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807340001}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerDown","message":"pointerdown","data":{"pointerType":"mouse","clientX":1261.7843017578125,"targetTag":"A","width":1920,"index":4,"defaultPrevented":true},"timestamp":1785807340951}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-8.4583740234375,"moveCount":1,"width":1920,"transform":"translateX(-7688.46px)","index":4},"timestamp":1785807340952}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-778.1910400390625,"moveCount":8,"width":1920,"transform":"translateX(-8458.19px)","index":4},"timestamp":1785807341070}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerUp","message":"pointerup","data":{"dragDelta":-852.7561950683594,"threshold":153.6,"passed":true,"direction":"next","moveCount":9,"indexBefore":4,"eventType":"pointerup"},"timestamp":1785807341085}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":4,"requested":5,"index":5,"width":1920,"transform":"translateX(-9600px)"},"timestamp":1785807341085}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":5,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807341086}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerDown","message":"pointerdown","data":{"pointerType":"mouse","clientX":1173.8970947265625,"targetTag":"A","width":1920,"index":5,"defaultPrevented":true},"timestamp":1785807341766}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-0.0526123046875,"moveCount":1,"width":1920,"transform":"translateX(-9600.05px)","index":5},"timestamp":1785807341803}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H2","location":"slider.js:onPointerMove","message":"pointermove","data":{"dragDelta":-244.54132080078125,"moveCount":8,"width":1920,"transform":"translateX(-9844.54px)","index":5},"timestamp":1785807341920}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H1","location":"slider.js:onPointerUp","message":"pointerup","data":{"dragDelta":-332.81939697265625,"threshold":153.6,"passed":true,"direction":"next","moveCount":9,"indexBefore":5,"eventType":"pointerup"},"timestamp":1785807341951}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":5,"requested":6,"index":0,"width":1920,"transform":"translateX(0px)"},"timestamp":1785807341951}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":0,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807341952}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H5","location":"slider.js:mouseleave","message":"mouseleave during/after drag","data":{"dragging":false,"index":0},"timestamp":1785807342906}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":0,"requested":1,"index":1,"width":1920,"transform":"translateX(-1920px)"},"timestamp":1785807346908}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":1,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807346908}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":1,"requested":2,"index":2,"width":1920,"transform":"translateX(-3840px)"},"timestamp":1785807350908}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":2,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807350909}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":2,"requested":3,"index":3,"width":1920,"transform":"translateX(-5760px)"},"timestamp":1785807354908}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":3,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807354909}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":3,"requested":4,"index":4,"width":1920,"transform":"translateX(-7680px)"},"timestamp":1785807358908}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":4,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807358908}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":4,"requested":5,"index":5,"width":1920,"transform":"translateX(-9600px)"},"timestamp":1785807362908}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":5,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807362908}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H3","location":"slider.js:goTo","message":"goTo applied","data":{"from":5,"requested":6,"index":0,"width":1920,"transform":"translateX(0px)"},"timestamp":1785807366908}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"after-goTo","data":{"index":0,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807366909}
{"sessionId":"afcad7","runId":"post-fix","hypothesisId":"H4","location":"slider.js:logHeights","message":"resize","data":{"index":0,"containerHeight":640,"containerStyleHeight":"","slideHeights":[640,608,608,622,608,640],"trackHeight":640,"imgNatural":[{"nw":1118,"nh":375,"h":640},{"nw":1200,"nh":380,"h":608},{"nw":1200,"nh":380,"h":608},{"nw":1078,"nh":349,"h":622},{"nw":1820,"nh":576,"h":608},{"nw":734,"nh":375,"h":640}]},"timestamp":1785807368870}

View File

@@ -168,154 +168,65 @@ blockquote {
}
/* END Basic styles */
/* CAROUSEL */
.image {
width: 100%;
height: 70%;
}
/* Main homepage slider */
.images {
overflow: hidden;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 100%;
}
.images-inner {
width: 500%;
transition: all 800ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
.custom-slider {
overflow: hidden;
width: 100%;
position: relative;
touch-action: pan-y;
cursor: grab;
max-height: 640px;
max-width: 1280px;
margin: 0 auto;
}
.image-slide {
width: 20%;
float: left;
.custom-slider:active {
cursor: grabbing;
}
.image-slide,
.fake-radio,
.radio-btn {
transition: all 0.5s ease-out;
.custom-slider .slider-track {
display: flex;
align-items: flex-start;
width: 100%;
transition: transform 0.6s ease;
will-change: transform;
}
.fake-radio {
float: right;
.custom-slider .slider-track.is-dragging {
transition: none;
}
/* Move slides overflowed container */
#slide1:checked~.images .images-inner {
margin-left: 0;
.custom-slider .slider-slide {
flex: 0 0 100%;
width: 100%;
min-width: 100%;
max-height: 640px;
user-select: none;
-webkit-user-drag: none;
}
#slide2:checked~.images .images-inner {
margin-left: -100%;
.custom-slider .slider-slide img {
display: block;
width: 100%;
max-width: 100%;
max-height: 640px;
height: auto;
object-fit: contain;
margin: 0 auto;
pointer-events: none;
-webkit-user-drag: none;
}
#slide3:checked~.images .images-inner {
margin-left: -200%;
.custom-slider .slider-slide a {
display: block;
-webkit-user-drag: none;
}
/* Color of bullets */
#slide1:checked~div .fake-radio .radio-btn:nth-child(1),
#slide2:checked~div .fake-radio .radio-btn:nth-child(2),
#slide3:checked~div .fake-radio .radio-btn:nth-child(3) {
background: red;
}
.radio-btn {
width: 9px;
height: 9px;
border-radius: 5px;
background: gray;
display: inline-block !important;
margin: 0 1px;
cursor: pointer;
}
/* Color of bullets - END */
/* Text of slides */
#slide1:checked~.labels .label:nth-child(1),
#slide2:checked~.labels .label:nth-child(2),
#slide3:checked~.labels .label:nth-child(3) {
opacity: 1;
}
.label {
opacity: 0;
position: absolute;
}
/* Text of slides - END */
#play1:checked~div .fake-radio .radio-btn:nth-child(1) {
animation: bullet 12300ms infinite -1000ms;
}
#play1:checked~div .fake-radio .radio-btn:nth-child(2) {
animation: bullet 12300ms infinite 3100ms;
}
#play1:checked~div .fake-radio .radio-btn:nth-child(3) {
animation: bullet 12300ms infinite 7200ms;
}
/* Calculate AUTOPLAY for BULLETS - END */
/* Calculate AUTOPLAY for SLIDES */
@keyframes slide {
0%,
25.203252032520325% {
margin-left: 0;
}
33.333333333333336%,
58.53658536585366% {
margin-left: -100%;
}
66.66666666666667%,
91.869918699187% {
margin-left: -200%;
}
}
.st-slider>#play1:checked~.images .images-inner {
animation: slide 12300ms infinite;
}
/* Calculate AUTOPLAY for SLIDES - END */
/* Calculate AUTOPLAY for CAPTION */
@keyframes caption {
0%,
33.32333333333334% {
opacity: 1;
}
33.333333333333336%,
100% {
opacity: 0;
}
}
#play1:checked~.labels .label:nth-child(1) {
animation: caption 12300ms infinite -1000ms;
}
#play1:checked~.labels .label:nth-child(2) {
animation: caption 12300ms infinite 3100ms;
}
#play1:checked~.labels .label:nth-child(3) {
animation: caption 12300ms infinite 7200ms;
}
/* END CAROUSEL */
/* END main homepage slider */
/* Slider */
.mySlides {

View File

@@ -2,8 +2,5 @@
"devDependencies": {
"daisyui": "^4.6.0",
"tailwindcss": "^3.4.1"
},
"dependencies": {
"swiper": "^11.1.0"
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -20,7 +20,7 @@
<title class="translate-text">TÜRKMENISTANYŇ "TÜRKMENBAŞY" PAÝDARLAR TÄJIRÇILIK BANKY</title>
<link rel="icon" type="image/x-icon" href="/images/tbb_logo.svg">
<link rel="stylesheet" href="/css/app.css?v=2">
<link rel="stylesheet" href="/css/app.css?v=5">
<script defer src="https://track.webulgam.com/script.js" data-website-id="79e22534-b5d7-4b5a-849c-c0f338c1018d"></script>
<style>
@@ -142,7 +142,7 @@
<button type="submit" class="btn btn-sm text-white" style="background:#67b03d">Iber</button>
</form>
</div>
<button type="button" id="chatbot-fab" aria-expanded="false" title="Sorag-jogap boty">Soraglar</button>
<!-- <button type="button" id="chatbot-fab" aria-expanded="false" title="Sorag-jogap boty">Soraglar</button> -->
</div>
<section class="hidden lg:block mt-2 px-6 py-4">
<header class="max-w-6xl mx-auto flex justify-between items-center">
@@ -238,27 +238,14 @@
<!-- Main slider -->
<div id="homepage-slider" class="st-slider block">
<input type="radio" class="cs_anchor radio hidden" name="slider" id="slide1" />
<input type="radio" class="cs_anchor radio hidden" name="slider" id="slide2" />
<input type="radio" class="cs_anchor radio hidden" name="slider" id="slide3" />
<input type="radio" class="cs_anchor radio hidden" name="slider" id="play1" checked="" />
<div class="images">
<div class="homepage-slider-loader p-16 w-1/full">
<div class="skeleton h-64 w-full"></div>
</div>
<swiper-container id="slider-images-container" class="mySwiper" space-between="30" autoplay-delay="4000">
</swiper-container>
<!-- <div class="images-inner" id="slider-images-container"> -->
<!-- <div class="homepage-slider-loader p-16 w-1/5">
<div class="skeleton h-64 w-full"></div>
</div> -->
<!-- </div> -->
<div id="slider-images-container" class="custom-slider">
<div class="slider-track"></div>
</div>
</div>
</div>
@@ -463,8 +450,7 @@
</footer>
</body>
<script src="/js/slider.js?v=2"></script>
<script src="/js/app.js?v=2"></script>
<script src="/js/swiper-element-bundle.min.js"></script>
<script src="/js/slider.js?v=7"></script>
<script src="/js/app.js?v=3"></script>
<script src="/js/chatbot.js?v=8"></script>
</html>

View File

@@ -180,30 +180,32 @@ async function fetchMenuItems() {
async function fetchSliders() {
const imageSliderContainer = $_ID('slider-images-container')
const track = imageSliderContainer && imageSliderContainer.querySelector('.slider-track')
if (!track) return
const response = await postData('/api/v1/main_slider/get-all')
removeByClassName('homepage-slider-loader')
response.data.forEach(slider => {
imageSliderContainer.insertAdjacentHTML('beforeend', `
<swiper-slide>
track.insertAdjacentHTML('beforeend', `
<div class="slider-slide">
<a href="${
slider.UUID
? `/banner.html?uuid=${slider.UUID}` + '&lang=' + getCurrentLang()
: ''
}">
<img
src="${baseUrl() + slider.slider}"
class="mx-auto w-fit cursor-pointer" alt="slider"
>
</a>
</swiper-slide>
slider.UUID
? `/banner.html?uuid=${slider.UUID}` + '&lang=' + getCurrentLang()
: ''
}">
<img
src="${baseUrl() + slider.slider}"
class="mx-auto w-fit cursor-pointer" alt="slider"
>
</a>
</div>
`)
})
initializeMainSlider()
}
async function fetchMiniSliders() {

View File

@@ -1,3 +1,143 @@
function initializeMainSlider() {
var container = document.getElementById('slider-images-container');
if (!container) return;
var track = container.querySelector('.slider-track');
if (!track) return;
var slides = track.querySelectorAll('.slider-slide');
if (slides.length <= 1) return;
var index = 0;
var intervalId = null;
var delay = 4000;
var dragging = false;
var dragStartX = 0;
var dragDelta = 0;
var suppressClick = false;
function slideWidth() {
return container.offsetWidth || 1;
}
function dragThreshold() {
return Math.max(40, slideWidth() * 0.08);
}
function applyTransform(withTransition) {
if (withTransition) {
track.classList.remove('is-dragging');
} else {
track.classList.add('is-dragging');
}
var offset = (-index * slideWidth()) + dragDelta;
track.style.transform = 'translateX(' + offset + 'px)';
}
function goTo(i) {
index = i;
if (index >= slides.length) index = 0;
if (index < 0) index = slides.length - 1;
dragDelta = 0;
applyTransform(true);
}
function next() {
goTo(index + 1);
}
function prev() {
goTo(index - 1);
}
function start() {
stop();
intervalId = setInterval(next, delay);
}
function stop() {
if (intervalId) {
clearInterval(intervalId);
intervalId = null;
}
}
function onPointerDown(e) {
if (e.pointerType === 'mouse' && e.button !== 0) return;
e.preventDefault();
dragging = true;
dragStartX = e.clientX;
dragDelta = 0;
stop();
track.classList.add('is-dragging');
try {
container.setPointerCapture(e.pointerId);
} catch (err) {}
}
function onPointerMove(e) {
if (!dragging) return;
dragDelta = e.clientX - dragStartX;
applyTransform(false);
}
function onPointerUp() {
if (!dragging) return;
dragging = false;
track.classList.remove('is-dragging');
if (Math.abs(dragDelta) > dragThreshold()) {
suppressClick = true;
if (dragDelta < 0) {
next();
} else {
prev();
}
} else {
dragDelta = 0;
applyTransform(true);
}
dragDelta = 0;
start();
}
Array.prototype.forEach.call(slides, function (slide) {
var link = slide.querySelector('a');
var img = slide.querySelector('img');
if (link) link.setAttribute('draggable', 'false');
if (img) img.setAttribute('draggable', 'false');
});
container.addEventListener('pointerdown', onPointerDown, { passive: false });
container.addEventListener('pointermove', onPointerMove);
container.addEventListener('pointerup', onPointerUp);
container.addEventListener('pointercancel', onPointerUp);
container.addEventListener('dragstart', function (e) {
e.preventDefault();
}, true);
container.addEventListener('click', function (e) {
if (suppressClick) {
e.preventDefault();
e.stopPropagation();
suppressClick = false;
}
}, true);
container.addEventListener('mouseenter', stop);
container.addEventListener('mouseleave', function () {
if (!dragging) start();
});
window.addEventListener('resize', function () {
applyTransform(true);
});
goTo(0);
start();
}
function initializeMiniSlider() {
var slideIndex = 1;
showSlides(slideIndex);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long