diff --git a/Changelog.md b/Changelog.md index 3aef0e4..dbd9cb1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,21 @@ +## [v1.2.0] - 03-12-2021 + +## Bugfixes + +- None + +## Changed +- Changed the use of zoom in css to transform: scale() +- Changed javascript to use " instead ' consistently +- Changed all event listeners to be passive to increase performance even further + +## Added + +- Support for mouse drag option using the new swiffy-slider-extensions object +- Added swiffy-slider-extensions for adding features not needed for core releases. Can be accessed on swiffyslider.extensions.* +- Configure animation threshold for the intersection observer that sets .slide-visible when sliding. New attribute data-slider-nav-animation-threshold +- swiffyslider.setVisibleSlides can now be called with a threshold overwriting the default 0.3 + ## [v1.1.0] - 16-11-2021 ## Bugfixes diff --git a/dist/css/swiffy-slider.min.css b/dist/css/swiffy-slider.min.css index f62a3d4..eaaf983 100644 --- a/dist/css/swiffy-slider.min.css +++ b/dist/css/swiffy-slider.min.css @@ -1,2 +1,2 @@ -.swiffy-slider{position:relative;display:block;width:100%;--swiffy-slider-snap-align:center;--swiffy-slider-item-width:100%;--swiffy-slider-item-gap:1rem;--swiffy-slider-item-reveal:0rem;--swiffy-slider-item-ratio:2/1;--swiffy-slider-item-count:1;--swiffy-slider-nav-light:#fff;--swiffy-slider-nav-dark:#333;--swiffy-slider-nav-zoom:1;--swiffy-slider-track-opacity:0.1;--swiffy-slider-track-height:0;--swiffy-slider-nav-outside-size:3.5rem;--swiffy-slider-indicator-outside-size:1.5rem;--swiffy-slider-animation-duration:.75s;--swiffy-slider-animation-delay:0s;--swiffy-slider-animation-timing:ease-in-out}.swiffy-slider,.swiffy-slider::after,.swiffy-slider::before{box-sizing:border-box}.swiffy-slider ::-webkit-scrollbar{height:var(--swiffy-slider-track-height)}.swiffy-slider ::-webkit-scrollbar-track{background:rgba(0,0,0,var(--swiffy-slider-track-opacity))}.swiffy-slider ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.4);border-radius:1rem}.swiffy-slider ::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.6)}.slider-container{--swiffy-slider-item-gap-totalwidth:calc(var(--swiffy-slider-item-gap) * (var(--swiffy-slider-item-count) - 1));--swiffy-slider-item-width:calc((100% - var(--swiffy-slider-item-reveal) - var(--swiffy-slider-item-gap-totalwidth)) / var(--swiffy-slider-item-count));overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scroll-behavior:smooth;display:grid;align-items:center;height:100%;grid:auto/auto-flow -webkit-max-content;grid:auto/auto-flow max-content;grid-auto-rows:100%;grid-auto-columns:var(--swiffy-slider-item-width);grid-auto-flow:column;grid-gap:var(--swiffy-slider-item-gap);list-style:none;margin:0;padding:0;scrollbar-width:none;scrollbar-color:rgba(0,0,0,.4) rgba(0,0,0,var(--swiffy-slider-track-opacity));background-clip:padding-box}.slider-container>*{scroll-snap-align:var(--swiffy-slider-snap-align);position:relative;width:100%;height:100%}.slider-item-helper .slider-container>*{background-size:cover;background-color:#e1e1e1;background-position:50% 50%;display:flex;justify-content:center;align-items:center}.slider-item-helper:not(.slider-item-ratio) .slider-container>*{min-height:20rem}.slider-item-ratio .slider-container>*>*{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.slider-item-ratio-contain .slider-container>*>*{-o-object-fit:contain;object-fit:contain}.slider-item-ratio .slider-container>::after{display:block;padding-top:calc(100% / (var(--swiffy-slider-item-ratio)));content:""}.slider-item-ratio-32x9{--swiffy-slider-item-ratio:32/9}.slider-item-ratio-21x9{--swiffy-slider-item-ratio:21/9}.slider-item-ratio-16x9{--swiffy-slider-item-ratio:16/9}.slider-item-ratio-4x3{--swiffy-slider-item-ratio:4/3}.slider-item-ratio-2x1{--swiffy-slider-item-ratio:2/1}.slider-item-ratio-1x1{--swiffy-slider-item-ratio:1/1}.slider-item-ratio-3x4{--swiffy-slider-item-ratio:3/4}.slider-nav-scrollbar{--swiffy-slider-track-height:0.5rem}.slider-nav-scrollbar .slider-container{scrollbar-width:thin}.slider-nav-nodelay .slider-container{scroll-behavior:auto}.slider-indicators{position:absolute;right:2rem;bottom:0;left:2rem;display:flex;justify-content:center;padding:0;margin-bottom:1rem;list-style:none}.slider-nav-scrollbar .slider-indicators{margin-bottom:calc(1rem + var(--swiffy-slider-track-height))}.slider-indicators>.active{opacity:1}.swiffy-slider.slider-indicators-outside .slider-nav{margin-bottom:var(--swiffy-slider-indicator-outside-size)}.swiffy-slider.slider-indicators-outside{padding-bottom:var(--swiffy-slider-indicator-outside-size)}.swiffy-slider.slider-indicators-outside .slider-indicators,.swiffy-slider.slider-indicators-outside.slider-indicators{margin-bottom:0}.slider-indicators>*{box-sizing:content-box;flex:0 1 auto;width:2rem;height:.2rem;padding:0;border:.4rem solid transparent;cursor:pointer;background-color:#fff;background-clip:padding-box;opacity:.5;transition:opacity .4s ease}.slider-indicators-square .slider-indicators>*,.slider-indicators-square.slider-indicators>*{width:.5rem;height:.5rem;border:.4rem solid transparent}.slider-indicators-round .slider-indicators>*,.slider-indicators-round.slider-indicators>*{width:.5rem;height:.5rem;border:.4rem solid transparent;border-radius:50%}.slider-indicators-highlight .slider-indicators>.active,.slider-indicators-highlight.slider-indicators>.active{border:.33rem solid transparent;padding:.07rem}.slider-nav{position:absolute;top:0;bottom:0;border:0;background-color:transparent;cursor:pointer;padding:0;visibility:hidden;opacity:.8;transition:visibility .1s,opacity .2s linear;margin-bottom:var(--swiffy-slider-track-height);display:flex;align-items:center;padding:0 .5rem;-webkit-filter:drop-shadow(0 0 .5rem rgba(0, 0, 0, .5));filter:drop-shadow(0 0 .5rem rgba(0, 0, 0, .5));transform:scale(var(--swiffy-slider-nav-zoom))}.slider-nav::before{position:absolute;content:"";padding:.5rem;width:3rem;height:3rem}.slider-nav::after{content:"";-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,");-webkit-mask-size:cover;mask-size:cover;background-color:var(--swiffy-slider-nav-light);background-origin:content-box;width:3rem;height:3rem}.slider-nav-arrow .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-chevron .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-caret .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-caretfill .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.swiffy-slider:hover .slider-nav{visibility:visible}.slider-nav-outside .slider-container{margin:0 var(--swiffy-slider-nav-outside-size)}.slider-nav-outside .slider-nav{padding:0}.swiffy-slider .slider-nav:hover{opacity:1}.slider-nav-square .slider-nav{padding:0}.slider-nav-round .slider-nav::before,.slider-nav-square .slider-nav::before{background-color:var(--swiffy-slider-nav-light)}.slider-nav-round .slider-nav::after,.slider-nav-square .slider-nav::after{background-color:var(--swiffy-slider-nav-dark);width:2rem;height:2rem;margin:.5rem}.slider-nav-round .slider-nav::before{border-radius:50%}.slider-nav-round .slider-nav::after{-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' %3E%3Cpath fill-rule='evenodd' d='M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z'%3E%3C/path%3E%3C/svg%3E");mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' %3E%3Cpath fill-rule='evenodd' d='M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z'%3E%3C/path%3E%3C/svg%3E")}.slider-nav-dark .slider-nav::after{background-color:var(--swiffy-slider-nav-dark)}.slider-nav-dark.slider-nav-round .slider-nav::before,.slider-nav-dark.slider-nav-square .slider-nav::before{background-color:var(--swiffy-slider-nav-dark)}.slider-nav-dark.slider-nav-round .slider-nav::after,.slider-nav-dark.slider-nav-square .slider-nav::after{background-color:var(--swiffy-slider-nav-light)}.slider-nav-sm{--swiffy-slider-nav-zoom:.75;--swiffy-slider-nav-outside-size:2.5rem}.slider-nav.slider-nav-next::after{transform:rotate(180deg)}.slider-nav.slider-nav-next{right:0}.slider-nav-visible .slider-nav{visibility:visible}.slider-nav-dark .slider-nav{opacity:.6}.slider-indicators-dark .slider-indicators>*,.slider-indicators-dark.slider-indicators>*{-webkit-filter:invert(1);filter:invert(1)}.slider-item-snapstart{--swiffy-slider-snap-align:start}.slider-item-nosnap{--swiffy-slider-snap-align:unset}.slider-item-nogap{--swiffy-slider-item-gap:0rem}.slider-item-reveal{--swiffy-slider-item-reveal:8rem}.slider-item-snapstart.slider-item-reveal{--swiffy-slider-item-reveal:4rem}.slider-item-show2{--swiffy-slider-item-count:2}.slider-item-show3{--swiffy-slider-item-count:3}.slider-item-show4{--swiffy-slider-item-count:4}.slider-item-show5{--swiffy-slider-item-count:5}.slider-item-show6{--swiffy-slider-item-count:6}@media (prefers-reduced-motion:no-preference){.slider-nav-animation.slider-nav-animation-fast{--swiffy-slider-animation-duration:.25s}.slider-nav-animation.slider-nav-animation-slow{--swiffy-slider-animation-duration:1.25s}.slider-nav-animation .slider-container>*>*{transition:opacity var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing),transform var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing);transition-delay:var(--swiffy-slider-animation-delay)}.slider-nav-animation .slider-container .slide-visible>*{transition:opacity var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing),transform var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing);transition-delay:var(--swiffy-slider-animation-delay)}.slider-nav-animation.slider-nav-animation-fadein .slider-container>*>*{opacity:.5}.slider-nav-animation.slider-nav-animation-scale .slider-container>*>*{transform:scale(.9)}.slider-nav-animation.slider-nav-animation-appear .slider-container>*>*{opacity:.3;transform:scale(.9)}.slider-nav-animation.slider-nav-animation-scaleup .slider-container>*>*{transform:scale(.25)}.slider-nav-animation.slider-nav-animation-turn .slider-container>*>*{transform:rotateY(70deg)}.slider-nav-animation.slider-nav-animation-slideup .slider-container>*>*{transform:translateY(60%) scale(.99)}.slider-nav-animation.slider-nav-animation-slideup .slider-container{overflow-y:hidden}.slider-nav-animation .slider-container>.slide-visible>*{opacity:1;transform:none}}@media (min-width:992px){.slider-item-show2:not(.slider-item-snapstart) .slider-container>*,.slider-item-show4:not(.slider-item-snapstart) .slider-container>*,.slider-item-show6:not(.slider-item-snapstart) .slider-container>*{scroll-snap-align:unset}.slider-item-show2:not(.slider-item-snapstart) .slider-container>::before,.slider-item-show4:not(.slider-item-snapstart) .slider-container>::before,.slider-item-show6:not(.slider-item-snapstart) .slider-container>::before{content:" ";display:block;position:absolute;left:calc((var(--swiffy-slider-item-gap)/2)*-1);top:0;width:1px;height:1px;scroll-snap-align:var(--swiffy-slider-snap-align)}.slider-nav-outside-expand .slider-nav{margin-left:-5rem}.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-5rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav{margin-left:-4rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-4rem}.slider-indicators-sm.slider-indicators{display:none}}@media (max-width:992px){.swiffy-slider{--swiffy-slider-track-height:0rem;--swiffy-slider-item-reveal:0rem;--swiffy-slider-item-count:1;--swiffy-slider-nav-zoom:.75}.slider-item-reveal{--swiffy-slider-item-reveal:4rem}.slider-item-snapstart.slider-item-reveal{--swiffy-slider-item-reveal:2rem}.slider-item-show6 .slider-container{grid-auto-columns:calc(25% - (var(--swiffy-slider-item-gap)/ 4*3))}.slider-item-show6.slider-item-reveal .slider-container{grid-auto-columns:calc(25% - (var(--swiffy-slider-item-gap)/ 4*3) - .5rem)}.slider-item-show6.slider-item-reveal .slider-container>*{scroll-snap-align:unset}.slider-item-show6.slider-item-reveal .slider-container>::before{content:" ";display:block;position:absolute;left:calc((var(--swiffy-slider-item-gap)/2)*-1);top:0;width:1px;height:1px;scroll-snap-align:center}.slider-nav::after{width:2rem!important;height:2rem!important;padding:.3rem!important}.slider-nav-outside .slider-container{margin:0 2rem}.slider-nav-outside-expand .slider-nav{padding:0;margin-left:-2rem}.slider-nav-outside-expand .slider-nav.slider-nav-next{padding:0;margin-right:-2rem}.slider-indicators-round .slider-indicators>*,.slider-indicators-round.slider-indicators>*,.slider-indicators-square .slider-indicators>*,.slider-indicators-square.slider-indicators>*{width:.3rem;height:.3rem}.slider-indicators{margin-bottom:.5rem;display:none}.slider-nav-scrollbar .slider-indicators{margin-bottom:0}.slider-indicators>*{width:1rem;height:.125rem;border-width:.25rem}.slider-indicators-sm .slider-indicators,.slider-indicators-sm.slider-indicators{display:flex}}@media (max-width:768px){.slider-item-show6 .slider-container{grid-auto-columns:calc(50% - (var(--swiffy-slider-item-gap)/ 2))}.slider-item-show6.slider-item-reveal .slider-container{grid-auto-columns:calc(50% - (var(--swiffy-slider-item-gap)/ 2) - 1.5rem)}}@media (hover:none){.swiffy-slider:not(.slider-nav-touch) .slider-nav{display:none}.swiffy-slider:not(.slider-nav-touch).slider-nav-outside .slider-container,.swiffy-slider:not(.slider-nav-touch).slider-nav-outside-expand .slider-container{margin:0 0}.slider-item-nosnap-touch{--swiffy-slider-snap-align:unset}} +.swiffy-slider{position:relative;display:block;width:100%;--swiffy-slider-snap-align:center;--swiffy-slider-item-width:100%;--swiffy-slider-item-gap:1rem;--swiffy-slider-item-reveal:0rem;--swiffy-slider-item-ratio:2/1;--swiffy-slider-item-count:1;--swiffy-slider-nav-light:#fff;--swiffy-slider-nav-dark:#333;--swiffy-slider-nav-zoom:1;--swiffy-slider-track-opacity:0.1;--swiffy-slider-track-height:0;--swiffy-slider-nav-outside-size:3.5rem;--swiffy-slider-indicator-outside-size:1.5rem;--swiffy-slider-animation-duration:.75s;--swiffy-slider-animation-delay:0s;--swiffy-slider-animation-timing:ease-in-out}.swiffy-slider,.swiffy-slider::after,.swiffy-slider::before{box-sizing:border-box}.swiffy-slider ::-webkit-scrollbar{height:var(--swiffy-slider-track-height)}.swiffy-slider ::-webkit-scrollbar-track{background:rgba(0,0,0,var(--swiffy-slider-track-opacity))}.swiffy-slider ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.4);border-radius:1rem}.swiffy-slider ::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.6)}.slider-container{--swiffy-slider-item-gap-totalwidth:calc(var(--swiffy-slider-item-gap) * (var(--swiffy-slider-item-count) - 1));--swiffy-slider-item-width:calc((100% - var(--swiffy-slider-item-reveal) - var(--swiffy-slider-item-gap-totalwidth)) / var(--swiffy-slider-item-count));overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scroll-behavior:smooth;display:grid;align-items:center;height:100%;grid:auto/auto-flow -webkit-max-content;grid:auto/auto-flow max-content;grid-auto-rows:100%;grid-auto-columns:var(--swiffy-slider-item-width);grid-auto-flow:column;grid-gap:var(--swiffy-slider-item-gap);list-style:none;margin:0;padding:0;scrollbar-width:none;scrollbar-color:rgba(0,0,0,.4) rgba(0,0,0,var(--swiffy-slider-track-opacity));background-clip:padding-box}.slider-container>*{scroll-snap-align:var(--swiffy-slider-snap-align);position:relative;width:100%;height:100%}.slider-item-helper .slider-container>*{background-size:cover;background-color:#e1e1e1;background-position:50% 50%;display:flex;justify-content:center;align-items:center}.slider-item-helper:not(.slider-item-ratio) .slider-container>*{min-height:20rem}.slider-item-ratio .slider-container>*>*{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.slider-item-ratio-contain .slider-container>*>*{-o-object-fit:contain;object-fit:contain}.slider-item-ratio .slider-container>::after{display:block;padding-top:calc(100% / (var(--swiffy-slider-item-ratio)));content:""}.slider-item-ratio-32x9{--swiffy-slider-item-ratio:32/9}.slider-item-ratio-21x9{--swiffy-slider-item-ratio:21/9}.slider-item-ratio-16x9{--swiffy-slider-item-ratio:16/9}.slider-item-ratio-4x3{--swiffy-slider-item-ratio:4/3}.slider-item-ratio-2x1{--swiffy-slider-item-ratio:2/1}.slider-item-ratio-1x1{--swiffy-slider-item-ratio:1/1}.slider-item-ratio-3x4{--swiffy-slider-item-ratio:3/4}.slider-nav-scrollbar{--swiffy-slider-track-height:0.5rem}.slider-nav-scrollbar .slider-container{scrollbar-width:thin}.slider-nav-nodelay .slider-container{scroll-behavior:auto}.slider-indicators{position:absolute;right:2rem;bottom:0;left:2rem;display:flex;justify-content:center;padding:0;margin-bottom:1rem;list-style:none}.slider-nav-scrollbar .slider-indicators{margin-bottom:calc(1rem + var(--swiffy-slider-track-height))}.slider-indicators>.active{opacity:1}.swiffy-slider.slider-indicators-outside .slider-nav{margin-bottom:var(--swiffy-slider-indicator-outside-size)}.swiffy-slider.slider-indicators-outside{padding-bottom:var(--swiffy-slider-indicator-outside-size)}.swiffy-slider.slider-indicators-outside .slider-indicators,.swiffy-slider.slider-indicators-outside.slider-indicators{margin-bottom:0}.slider-indicators>*{box-sizing:content-box;flex:0 1 auto;width:2rem;height:.2rem;padding:0;border:.4rem solid transparent;cursor:pointer;background-color:#fff;background-clip:padding-box;opacity:.5;transition:opacity .4s ease}.slider-indicators-square .slider-indicators>*,.slider-indicators-square.slider-indicators>*{width:.5rem;height:.5rem;border:.4rem solid transparent}.slider-indicators-round .slider-indicators>*,.slider-indicators-round.slider-indicators>*{width:.5rem;height:.5rem;border:.4rem solid transparent;border-radius:50%}.slider-indicators-highlight .slider-indicators>.active,.slider-indicators-highlight.slider-indicators>.active{border:.33rem solid transparent;padding:.07rem}.slider-nav{position:absolute;top:0;bottom:0;border:0;background-color:transparent;cursor:pointer;padding:0;visibility:hidden;opacity:.8;transition:visibility .1s,opacity .2s linear;margin-bottom:var(--swiffy-slider-track-height);display:flex;align-items:center;padding:0 .5rem;-webkit-filter:drop-shadow(0 0 .5rem rgba(0, 0, 0, .5));filter:drop-shadow(0 0 .5rem rgba(0, 0, 0, .5));transform:scale(var(--swiffy-slider-nav-zoom))}.slider-nav::before{position:absolute;content:"";padding:.5rem;width:3rem;height:3rem}.slider-nav::after{content:"";-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,");-webkit-mask-size:cover;mask-size:cover;background-color:var(--swiffy-slider-nav-light);background-origin:content-box;width:3rem;height:3rem}.slider-nav-arrow .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-chevron .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-caret .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-caretfill .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.swiffy-slider:hover .slider-nav{visibility:visible}.slider-nav-outside .slider-container{margin:0 var(--swiffy-slider-nav-outside-size)}.slider-nav-outside .slider-nav{padding:0}.swiffy-slider .slider-nav:hover{opacity:1}.slider-nav-square .slider-nav{padding:0}.slider-nav-round .slider-nav::before,.slider-nav-square .slider-nav::before{background-color:var(--swiffy-slider-nav-light)}.slider-nav-round .slider-nav::after,.slider-nav-square .slider-nav::after{background-color:var(--swiffy-slider-nav-dark);width:2rem;height:2rem;margin:.5rem}.slider-nav-round .slider-nav::before{border-radius:50%}.slider-nav-round .slider-nav::after{-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' %3E%3Cpath fill-rule='evenodd' d='M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z'%3E%3C/path%3E%3C/svg%3E");mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' %3E%3Cpath fill-rule='evenodd' d='M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z'%3E%3C/path%3E%3C/svg%3E")}.slider-nav-dark .slider-nav::after{background-color:var(--swiffy-slider-nav-dark)}.slider-nav-dark.slider-nav-round .slider-nav::before,.slider-nav-dark.slider-nav-square .slider-nav::before{background-color:var(--swiffy-slider-nav-dark)}.slider-nav-dark.slider-nav-round .slider-nav::after,.slider-nav-dark.slider-nav-square .slider-nav::after{background-color:var(--swiffy-slider-nav-light)}.slider-nav-sm{--swiffy-slider-nav-zoom:.75;--swiffy-slider-nav-outside-size:2.5rem}.slider-nav.slider-nav-next::after{transform:rotate(180deg)}.slider-nav.slider-nav-next{right:0}.slider-nav-visible .slider-nav{visibility:visible}.slider-nav-dark .slider-nav{opacity:.6}.slider-indicators-dark .slider-indicators>*,.slider-indicators-dark.slider-indicators>*{-webkit-filter:invert(1);filter:invert(1)}.slider-item-snapstart{--swiffy-slider-snap-align:start}.slider-item-nosnap{--swiffy-slider-snap-align:unset}.slider-item-nogap{--swiffy-slider-item-gap:0rem}.slider-item-reveal{--swiffy-slider-item-reveal:8rem}.slider-item-snapstart.slider-item-reveal{--swiffy-slider-item-reveal:4rem}.slider-item-show2{--swiffy-slider-item-count:2}.slider-item-show3{--swiffy-slider-item-count:3}.slider-item-show4{--swiffy-slider-item-count:4}.slider-item-show5{--swiffy-slider-item-count:5}.slider-item-show6{--swiffy-slider-item-count:6}.slider-nav-mousedrag .slider-container{cursor:-webkit-grab;cursor:grab}.slider-nav-mousedrag .slider-container.dragging{-ms-scroll-snap-type:unset;scroll-snap-type:unset;scroll-behavior:unset;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.slider-nav-mousedrag .slider-container::after{content:"";position:absolute;width:100%;height:100%}@media (prefers-reduced-motion:no-preference){.slider-nav-animation.slider-nav-animation-fast{--swiffy-slider-animation-duration:.25s}.slider-nav-animation.slider-nav-animation-slow{--swiffy-slider-animation-duration:1.25s}.slider-nav-animation .slider-container>*>*{transition:opacity var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing),transform var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing);transition-delay:var(--swiffy-slider-animation-delay)}.slider-nav-animation .slider-container .slide-visible>*{transition:opacity var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing),transform var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing);transition-delay:var(--swiffy-slider-animation-delay)}.slider-nav-animation.slider-nav-animation-fadein .slider-container>*>*{opacity:.5}.slider-nav-animation.slider-nav-animation-scale .slider-container>*>*{transform:scale(.9)}.slider-nav-animation.slider-nav-animation-appear .slider-container>*>*{opacity:.3;transform:scale(.9)}.slider-nav-animation.slider-nav-animation-scaleup .slider-container>*>*{transform:scale(.25)}.slider-nav-animation.slider-nav-animation-turn .slider-container>*>*{transform:rotateY(70deg)}.slider-nav-animation.slider-nav-animation-slideup .slider-container>*>*{transform:translateY(60%) scale(.99)}.slider-nav-animation.slider-nav-animation-slideup .slider-container{overflow-y:hidden}.slider-nav-animation .slider-container>.slide-visible>*{opacity:1;transform:none}}@media (min-width:992px){.slider-item-show2:not(.slider-item-snapstart) .slider-container>*,.slider-item-show4:not(.slider-item-snapstart) .slider-container>*,.slider-item-show6:not(.slider-item-snapstart) .slider-container>*{scroll-snap-align:unset}.slider-item-show2:not(.slider-item-snapstart) .slider-container>::before,.slider-item-show4:not(.slider-item-snapstart) .slider-container>::before,.slider-item-show6:not(.slider-item-snapstart) .slider-container>::before{content:" ";display:block;position:absolute;left:calc((var(--swiffy-slider-item-gap)/2)*-1);top:0;width:1px;height:1px;scroll-snap-align:var(--swiffy-slider-snap-align)}.slider-nav-outside-expand .slider-nav{margin-left:-5rem}.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-5rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav{margin-left:-4rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-4rem}.slider-indicators-sm.slider-indicators{display:none}}@media (max-width:992px){.swiffy-slider{--swiffy-slider-track-height:0rem;--swiffy-slider-item-reveal:0rem;--swiffy-slider-item-count:1;--swiffy-slider-nav-zoom:.75}.slider-item-reveal{--swiffy-slider-item-reveal:4rem}.slider-item-snapstart.slider-item-reveal{--swiffy-slider-item-reveal:2rem}.slider-item-show6 .slider-container{grid-auto-columns:calc(25% - (var(--swiffy-slider-item-gap)/ 4*3))}.slider-item-show6.slider-item-reveal .slider-container{grid-auto-columns:calc(25% - (var(--swiffy-slider-item-gap)/ 4*3) - .5rem)}.slider-item-show6.slider-item-reveal .slider-container>*{scroll-snap-align:unset}.slider-item-show6.slider-item-reveal .slider-container>::before{content:" ";display:block;position:absolute;left:calc((var(--swiffy-slider-item-gap)/2)*-1);top:0;width:1px;height:1px;scroll-snap-align:center}.slider-nav::after{width:2rem!important;height:2rem!important;padding:.3rem!important}.slider-nav-outside .slider-container{margin:0 2rem}.slider-nav-outside-expand .slider-nav{padding:0;margin-left:-2rem}.slider-nav-outside-expand .slider-nav.slider-nav-next{padding:0;margin-right:-2rem}.slider-indicators-round .slider-indicators>*,.slider-indicators-round.slider-indicators>*,.slider-indicators-square .slider-indicators>*,.slider-indicators-square.slider-indicators>*{width:.3rem;height:.3rem}.slider-indicators{margin-bottom:.5rem;display:none}.slider-nav-scrollbar .slider-indicators{margin-bottom:0}.slider-indicators>*{width:1rem;height:.125rem;border-width:.25rem}.slider-indicators-sm .slider-indicators,.slider-indicators-sm.slider-indicators{display:flex}}@media (max-width:768px){.slider-item-show6 .slider-container{grid-auto-columns:calc(50% - (var(--swiffy-slider-item-gap)/ 2))}.slider-item-show6.slider-item-reveal .slider-container{grid-auto-columns:calc(50% - (var(--swiffy-slider-item-gap)/ 2) - 1.5rem)}}@media (hover:none){.swiffy-slider:not(.slider-nav-touch) .slider-nav{display:none}.swiffy-slider:not(.slider-nav-touch).slider-nav-outside .slider-container,.swiffy-slider:not(.slider-nav-touch).slider-nav-outside-expand .slider-container{margin:0 0}.slider-item-nosnap-touch{--swiffy-slider-snap-align:unset}} /*# sourceMappingURL=swiffy-slider.min.css.map */ diff --git a/dist/css/swiffy-slider.min.css.map b/dist/css/swiffy-slider.min.css.map index aa3bfda..e439f60 100644 --- a/dist/css/swiffy-slider.min.css.map +++ b/dist/css/swiffy-slider.min.css.map @@ -4,5 +4,5 @@ "swiffy-slider.css" ], "names": [], - "mappings": "AAAA,eACI,SAAU,SACV,QAAS,MACT,MAAO,KACP,2BAA4B,OAC5B,2BAA4B,KAC5B,yBAA0B,KAC1B,4BAA6B,KAC7B,2BAA4B,CAAC,CAAC,EAC9B,2BAA4B,EAC5B,0BAA2B,KAC3B,yBAA0B,KAC1B,yBAA0B,EAC1B,8BAA+B,IAC/B,6BAA8B,EAC9B,iCAAkC,OAClC,uCAAwC,OACxC,mCAAoC,KACpC,gCAAiC,GACjC,iCAAkC,YAGtC,eACA,sBACA,uBACI,WAAY,WAGhB,mCACI,OAAQ,kCAGZ,yCACI,WAAY,+CAGhB,yCACI,WAAY,eACZ,cAAe,KAGnB,+CACI,WAAY,eAGhB,kBACI,oCAAqC,4EACrC,2BAA4B,6HAC5B,WAAY,KACZ,2BAA4B,MAC5B,qBAAsB,EAAE,UACpB,iBAAkB,EAAE,UACxB,gBAAiB,OACjB,QAAS,KACT,YAAa,OACb,OAAQ,KACR,KAAM,IAAK,CAAE,UAAU,oBACvB,KAAM,IAAK,CAAE,UAAU,YACvB,eAAgB,KAChB,kBAAmB,gCACnB,eAAgB,OAChB,SAAU,8BACV,WAAY,KACZ,OAAQ,EACR,QAAS,EACT,gBAAiB,KACjB,gBAAiB,eAAmB,+CACpC,gBAAiB,YAGrB,oBAEI,kBAAmB,gCACnB,SAAU,SACV,MAAO,KACP,OAAQ,KAGZ,wCACI,gBAAiB,MACjB,iBAAkB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Eb,uEACI,UAAW,UAEf,wEACI,QAAS,GACT,UAAW,UAEf,yEACI,UAAW,WAEf,sEACI,UAAW,eAEf,yEACI,UAAW,gBAAgB,WAE/B,qEACI,WAAY,OAEhB,yDACI,QAAS,EACT,UAAW,MAInB,yBAGI,mEADA,mEADA,mEAGI,kBAAmB,MAIvB,0EADA,0EADA,0EAGI,QAAS,IACT,QAAS,MACT,SAAU,SACV,KAAM,2CACN,IAAK,EAEL,MAAO,IACP,OAAQ,IACR,kBAAmB,gCAEvB,uCACI,YAAa,MAEjB,uDACI,aAAc,MAElB,qDACI,YAAa,MAEjB,qEACI,aAAc,MAElB,wCACI,QAAS,MAIjB,yBACI,eACI,6BAA8B,KAC9B,4BAA6B,KAC7B,2BAA4B,EAC5B,yBAA0B,IAE9B,oBACI,4BAA6B,KAEjC,0CACI,4BAA6B,KAEjC,qCACI,kBAAmB,iDAEvB,wDACI,kBAAmB,yDAEvB,0DACI,kBAAmB,MAEvB,iEACI,QAAS,IACT,QAAS,MACT,SAAU,SACV,KAAM,2CACN,IAAK,EAEL,MAAO,IACP,OAAQ,IACR,kBAAmB,OAEvB,mBACI,MAAO,eACP,OAAQ,eACR,QAAS,gBAEb,sCACI,OAAQ,EAAE,KAEd,uCACI,QAAS,EACT,YAAa,MAEjB,uDACI,QAAS,EACT,aAAc,MAKlB,8CADA,6CADA,+CADA,8CAII,MAAO,MACP,OAAQ,MAEZ,mBACI,cAAe,MACf,QAAS,KAEb,yCACI,cAAe,EAEnB,qBACI,MAAO,KACP,OAAQ,QACR,aAAc,OAElB,yCACA,wCACI,QAAS,MAIjB,yBACI,qCACI,kBAAmB,+CAEvB,wDACI,kBAAmB,yDAI3B,oBACI,kDACI,QAAS,KAGb,2EADA,kFAEI,OAAQ,EAAE,EAEd,0BACI,2BAA4B" } \ No newline at end of file diff --git a/dist/js/swiffy-slider-extensions.min.js b/dist/js/swiffy-slider-extensions.min.js new file mode 100644 index 0000000..5628f67 --- /dev/null +++ b/dist/js/swiffy-slider-extensions.min.js @@ -0,0 +1,2 @@ +const swiffysliderextensions=function(){"use strict";return{version:"1.2.0",draggingtimer:null,init(e=document.body){for(const s of e.querySelectorAll(".swiffy-slider"))this.initSlider(s)},initSlider(e){e.classList.contains("slider-nav-mousedrag")&&e.addEventListener("mousedown",s=>this.handleMouseDrag(s,e),{passive:!0})},handleMouseDrag(e,s){const t=s.querySelector(".slider-container");t.classList.contains("dragging")&&clearTimeout(this.draggingtimer),t.style.cursor="grabbing",t.classList.add("dragging");const i=t.scrollLeft,n=e.clientX,r=t.children[0].offsetWidth+parseInt(window.getComputedStyle(t).columnGap);let o=0;const l=e=>{const s=e.clientX-n;t.scrollLeft=i-1.8*s,o=s<0?t.scrollLeft+(r+1.8*s):t.scrollLeft-(r-1.8*s)};t.addEventListener("mousemove",l,{passive:!0}),document.addEventListener("mouseup",()=>{t.removeEventListener("mousemove",l),t.style.cursor=null,0!=o&&t.scroll({left:o,behavior:"smooth"}),this.draggingtimer=setTimeout(()=>{t.classList.remove("dragging")},550)},{once:!0,passive:!0})}}}();window.swiffyslider.extensions=swiffysliderextensions,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{"use strict";swiffyslider.extensions.init()}); +//# sourceMappingURL=swiffy-slider-extensions.min.js.map \ No newline at end of file diff --git a/dist/js/swiffy-slider-extensions.min.js.map b/dist/js/swiffy-slider-extensions.min.js.map new file mode 100644 index 0000000..1b049ea --- /dev/null +++ b/dist/js/swiffy-slider-extensions.min.js.map @@ -0,0 +1,59 @@ +{ + "version": 3, + "sources": [ + "swiffy-slider-extensions.js" + ], + "names": [ + "swiffysliderextensions", + "version", + "draggingtimer", + "[object Object]", + "rootElement", + "document", + "body", + "sliderElement", + "querySelectorAll", + "this", + "initSlider", + "classList", + "contains", + "addEventListener", + "e", + "handleMouseDrag", + "passive", + "container", + "querySelector", + "clearTimeout", + "style", + "cursor", + "add", + "startingLeftPos", + "scrollLeft", + "mouseDownStartingXPos", + "clientX", + "slideWidth", + "children", + "offsetWidth", + "parseInt", + "window", + "getComputedStyle", + "columnGap", + "nextSlideLeftPos", + "moveDelegate", + "mouseMovedXpos", + "removeEventListener", + "scroll", + "left", + "behavior", + "setTimeout", + "remove", + "once", + "swiffyslider", + "extensions", + "currentScript", + "hasAttribute", + "init" + ], + "mappings": "AAAA,MAAMA,uBAAyB,WAC3B,aACA,MAAO,CACHC,QAAS,QACTC,cAAe,KACfC,KAAKC,EAAcC,SAASC,MACxB,IAAK,MAAMC,KAAiBH,EAAYI,iBAAiB,kBACrDC,KAAKC,WAAWH,IAIxBJ,WAAWI,GACHA,EAAcI,UAAUC,SAAS,yBACjCL,EAAcM,iBAAiB,YAAcC,GAAML,KAAKM,gBAAgBD,EAAGP,GAAgB,CAAES,SAAS,KAG9Gb,gBAAgBW,EAAGP,GACf,MAAMU,EAAYV,EAAcW,cAAc,qBAC1CD,EAAUN,UAAUC,SAAS,aAC7BO,aAAaV,KAAKP,eAEtBe,EAAUG,MAAMC,OAAS,WACzBJ,EAAUN,UAAUW,IAAI,YAExB,MAAMC,EAAkBN,EAAUO,WAC5BC,EAAwBX,EAAEY,QAC1BC,EAAaV,EAAUW,SAAS,GAAGC,YAAcC,SAASC,OAAOC,iBAAiBf,GAAWgB,WACnG,IAAIC,EAAmB,EAEvB,MAAMC,EAAgBrB,IAClB,MAAMsB,EAAiBtB,EAAEY,QAAUD,EACnCR,EAAUO,WAAaD,EAAoC,IAAjBa,EAEtCF,EADAE,EAAiB,EACEnB,EAAUO,YAAcG,EAA+B,IAAjBS,GAEtCnB,EAAUO,YAAcG,EAA+B,IAAjBS,IAIjEnB,EAAUJ,iBAAiB,YAAasB,EAAc,CAAEnB,SAAS,IACjEX,SAASQ,iBAAiB,UAAW,KACjCI,EAAUoB,oBAAoB,YAAaF,GAC3ClB,EAAUG,MAAMC,OAAS,KACD,GAApBa,GACAjB,EAAUqB,OAAO,CACbC,KAAML,EACNM,SAAU,WAElB/B,KAAKP,cAAgBuC,WAAW,KAAQxB,EAAUN,UAAU+B,OAAO,aAAgB,MACpF,CAAEC,MAAM,EAAM3B,SAAS,MAjDP,GAsD/Be,OAAOa,aAAaC,WAAa7C,uBAC5BK,SAASyC,cAAcC,aAAa,gBACrChB,OAAOlB,iBAAiB,OAAQ,KAC5B,aACA+B,aAAaC,WAAWG", + "file": "swiffy-slider-extensions.js" +} \ No newline at end of file diff --git a/dist/js/swiffy-slider.ESM.min.js b/dist/js/swiffy-slider.ESM.min.js index 87d9c46..e52de29 100644 --- a/dist/js/swiffy-slider.ESM.min.js +++ b/dist/js/swiffy-slider.ESM.min.js @@ -1,2 +1,2 @@ -export const swiffyslider=function(){"use strict";return{version:"1.1.0",init(e=document.body){for(const t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(const t of e.querySelectorAll(".slider-nav")){const s=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,s))}for(const t of e.querySelectorAll(".slider-indicators"))t.addEventListener("click",()=>this.slideToByIndicator()),this.onSlideEnd(e,()=>this.handleIndicators(e),60);if(e.classList.contains("slider-nav-autoplay")){const t=e.getAttribute("data-slider-nav-autoplay-interval")?e.getAttribute("data-slider-nav-autoplay-interval"):2500;this.autoPlay(e,t,e.classList.contains("slider-nav-autopause"))}e.classList.contains("slider-nav-animation")&&this.setVisibleSlides(e)},setVisibleSlides(e){const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?e.target.parentElement.classList.add("slide-visible"):e.target.parentElement.classList.remove("slide-visible")})},{root:e.querySelector(".slider-container"),threshold:.3});for(const s of e.querySelectorAll(".slider-container>*>*"))t.observe(s)},slide(e,t=!0){const s=e.querySelector(".slider-container"),i=e.classList.contains("slider-nav-page"),o=e.classList.contains("slider-nav-noloop"),n=e.classList.contains("slider-nav-nodelay"),l=s.children,r=parseInt(window.getComputedStyle(s).columnGap),a=l[0].offsetWidth-r;let c=t?s.scrollLeft+a:s.scrollLeft-a;if(i&&(c=t?s.scrollLeft+s.offsetWidth:s.scrollLeft-s.offsetWidth),s.scrollLeft+s.offsetWidth>s.scrollWidth-(r/2+1)&&t){if(o)return;c=0}s.scroll({left:c,behavior:n?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),s=e.parentElement.children.length,i=e.closest(".swiffy-slider"),o=i.querySelector(".slider-container").children.length/s*t;this.slideTo(i,o)},slideTo(e,t){const s=e.querySelector(".slider-container"),i=parseInt(window.getComputedStyle(s).columnGap),o=s.children[0].offsetWidth+i,n=e.classList.contains("slider-nav-nodelay");s.scroll({left:o*t,behavior:n?"auto":"smooth"})},onSlideEnd(e,t,s=125){let i;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(i),i=setTimeout(t,s)}),{capture:!1,passive:!0})},autoPlay(e,t,s){t=t<750?750:t;let i=setInterval(()=>this.slide(e),t);const o=()=>this.autoPlay(e,t,s);return s&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(i)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){o()}),{once:!0})),i},handleIndicators(e){const t=e.querySelector(".slider-container"),s=t.scrollWidth-t.offsetWidth,i=t.scrollLeft/s;for(const t of e.querySelectorAll(".slider-indicators")){const e=t.children,s=Math.round((e.length-1)*i);for(const t of e)t.removeAttribute("class");e[s].classList.add("active")}}}}(); +export const swiffyslider=function(){"use strict";return{version:"1.2.0",init(e=document.body){for(const t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(const t of e.querySelectorAll(".slider-nav")){const s=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,s),{passive:!0})}for(const t of e.querySelectorAll(".slider-indicators"))t.addEventListener("click",()=>this.slideToByIndicator()),this.onSlideEnd(e,()=>this.handleIndicators(e),60);if(e.classList.contains("slider-nav-autoplay")){const t=e.getAttribute("data-slider-nav-autoplay-interval")?e.getAttribute("data-slider-nav-autoplay-interval"):2500;this.autoPlay(e,t,e.classList.contains("slider-nav-autopause"))}if(e.classList.contains("slider-nav-animation")){const t=e.getAttribute("data-slider-nav-animation-threshold")?e.getAttribute("data-slider-nav-animation-threshold"):.3;this.setVisibleSlides(e,t)}},setVisibleSlides(e,t=.3){const s=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?e.target.parentElement.classList.add("slide-visible"):e.target.parentElement.classList.remove("slide-visible")})},{root:e.querySelector(".slider-container"),threshold:t});for(const t of e.querySelectorAll(".slider-container>*>*"))s.observe(t)},slide(e,t=!0){const s=e.querySelector(".slider-container"),i=e.classList.contains("slider-nav-page"),n=e.classList.contains("slider-nav-noloop"),o=e.classList.contains("slider-nav-nodelay"),l=s.children,r=parseInt(window.getComputedStyle(s).columnGap),a=l[0].offsetWidth+r;let c=t?s.scrollLeft+a:s.scrollLeft-a;if(i&&(c=t?s.scrollLeft+s.offsetWidth:s.scrollLeft-s.offsetWidth),s.scrollLeft+s.offsetWidth>s.scrollWidth-(r/2+1)&&t){if(n)return;c=0}s.scroll({left:c,behavior:o?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),s=e.parentElement.children.length,i=e.closest(".swiffy-slider"),n=i.querySelector(".slider-container").children.length/s*t;this.slideTo(i,n)},slideTo(e,t){const s=e.querySelector(".slider-container"),i=parseInt(window.getComputedStyle(s).columnGap),n=s.children[0].offsetWidth+i,o=e.classList.contains("slider-nav-nodelay");s.scroll({left:n*t,behavior:o?"auto":"smooth"})},onSlideEnd(e,t,s=125){let i;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(i),i=setTimeout(t,s)}),{capture:!1,passive:!0})},autoPlay(e,t,s){t=t<750?750:t;let i=setInterval(()=>this.slide(e),t);const n=()=>this.autoPlay(e,t,s);return s&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(i)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){n()}),{once:!0,passive:!0})),i},handleIndicators(e){const t=e.querySelector(".slider-container"),s=t.scrollWidth-t.offsetWidth,i=t.scrollLeft/s;for(const t of e.querySelectorAll(".slider-indicators")){const e=t.children,s=Math.round((e.length-1)*i);for(const t of e)t.removeAttribute("class");e[s].classList.add("active")}}}}(); //# sourceMappingURL=swiffy-slider.ESM.min.js.map \ No newline at end of file diff --git a/dist/js/swiffy-slider.ESM.min.js.map b/dist/js/swiffy-slider.ESM.min.js.map index 7b8a4d2..8d3ab1e 100644 --- a/dist/js/swiffy-slider.ESM.min.js.map +++ b/dist/js/swiffy-slider.ESM.min.js.map @@ -20,6 +20,7 @@ "contains", "addEventListener", "slide", + "passive", "indicatorElement", "slideToByIndicator", "onSlideEnd", @@ -27,6 +28,7 @@ "timeout", "getAttribute", "autoPlay", + "threshold", "setVisibleSlides", "observer", "IntersectionObserver", @@ -39,7 +41,6 @@ "remove", "root", "querySelector", - "threshold", "observe", "container", "fullpage", @@ -76,7 +77,6 @@ "clearTimeout", "setTimeout", "capture", - "passive", "autopause", "autoplayTimer", "setInterval", @@ -92,6 +92,6 @@ "element", "removeAttribute" ], - "mappings": "OAAO,MAAMA,aAAe,WACxB,aACA,MAAO,CACHC,QAAS,QACTC,KAAKC,EAAcC,SAASC,MACxB,IAAK,MAAMC,KAAiBH,EAAYI,iBAAiB,kBACrDC,KAAKC,WAAWH,IAIxBJ,WAAWI,GACP,IAAK,MAAMI,KAAcJ,EAAcC,iBAAiB,eAAgB,CACpE,MAAMI,EAAOD,EAAWE,UAAUC,SAAS,mBAC3CH,EAAWI,iBAAiB,QAAS,IAAMN,KAAKO,MAAMT,EAAeK,IAEzE,IAAK,MAAMK,KAAoBV,EAAcC,iBAAiB,sBAC1DS,EAAiBF,iBAAiB,QAAS,IAAMN,KAAKS,sBACtDT,KAAKU,WAAWZ,EAAe,IAAME,KAAKW,iBAAiBb,GAAgB,IAE/E,GAAIA,EAAcM,UAAUC,SAAS,uBAAwB,CACzD,MAAMO,EAAUd,EAAce,aAAa,qCAAuCf,EAAce,aAAa,q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aAAaD,GACpBA,EAAcE,WAAWH,EAAU/C,KACpC,CAAEmD,SAAS,EAAOxD,SAAS,KAGlCd,SAASI,EAAee,EAASoD,GAC7BpD,EAAUA,EAAU,IAAM,IAAMA,EAChC,IAAIqD,EAAgBC,YAAY,IAAMnE,KAAKO,MAAMT,GAAgBe,GACjE,MAAMuD,EAAa,IAAMpE,KAAKe,SAASjB,EAAee,EAASoD,GAW/D,OAVIA,IACA,CAAC,YAAa,cAAc5C,SAAQ,SAAS4B,GACzCnD,EAAcQ,iBAAiB2C,GAAO,WAClCZ,OAAOyB,aAAaI,KACrB,CAAEG,MAAM,EAAM7D,SAAS,OAE9BV,EAAcQ,iBAAiB,YAAY,WACvC8D,MACD,CAAEC,MAAM,EAAM7D,SAAS,KAEvB0D,GAGXxE,iBAAiBI,GACb,MAAMgC,EAAYhC,EAAc8B,cAAc,qBACxC0C,EAAmBxC,EAAUc,YAAcd,EAAUW,YACrD8B,EAAgBzC,EAAUa,WAAa2B,EAC7C,IAAK,MAAME,KAA6B1E,EAAcC,iBAAiB,sBAAuB,CAC1F,MAAM0E,EAAmBD,EAA0BtC,SAC7CwC,EAAkBC,KAAKC,OAAOH,EAAiBlB,OAAS,GAAKgB,GACnE,IAAK,MAAMM,KAAWJ,EAClBI,EAAQC,gBAAgB,SAC5BL,EAAiBC,GAAiBtE,UAAUqB,IAAI,aA3HpC", "file": "swiffy-slider.ESM.js" } \ No newline at end of file diff --git a/dist/js/swiffy-slider.min.js b/dist/js/swiffy-slider.min.js index fcb4beb..e4a94bc 100644 --- a/dist/js/swiffy-slider.min.js +++ b/dist/js/swiffy-slider.min.js @@ -1,2 +1,2 @@ -const swiffyslider=function(){"use strict";return{version:"1.1.0",init(e=document.body){for(const t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(const t of e.querySelectorAll(".slider-nav")){const s=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,s))}for(const t of e.querySelectorAll(".slider-indicators"))t.addEventListener("click",()=>this.slideToByIndicator()),this.onSlideEnd(e,()=>this.handleIndicators(e),60);if(e.classList.contains("slider-nav-autoplay")){const t=e.getAttribute("data-slider-nav-autoplay-interval")?e.getAttribute("data-slider-nav-autoplay-interval"):2500;this.autoPlay(e,t,e.classList.contains("slider-nav-autopause"))}e.classList.contains("slider-nav-animation")&&this.setVisibleSlides(e)},setVisibleSlides(e){const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?e.target.parentElement.classList.add("slide-visible"):e.target.parentElement.classList.remove("slide-visible")})},{root:e.querySelector(".slider-container"),threshold:.3});for(const s of e.querySelectorAll(".slider-container>*>*"))t.observe(s)},slide(e,t=!0){const s=e.querySelector(".slider-container"),i=e.classList.contains("slider-nav-page"),n=e.classList.contains("slider-nav-noloop"),o=e.classList.contains("slider-nav-nodelay"),l=s.children,r=parseInt(window.getComputedStyle(s).columnGap),a=l[0].offsetWidth+r;let c=t?s.scrollLeft+a:s.scrollLeft-a;if(i&&(c=t?s.scrollLeft+s.offsetWidth:s.scrollLeft-s.offsetWidth),s.scrollLeft+s.offsetWidth>s.scrollWidth-(r/2+1)&&t){if(n)return;c=0}s.scroll({left:c,behavior:o?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),s=e.parentElement.children.length,i=e.closest(".swiffy-slider"),n=i.querySelector(".slider-container").children.length/s*t;this.slideTo(i,n)},slideTo(e,t){const s=e.querySelector(".slider-container"),i=parseInt(window.getComputedStyle(s).columnGap),n=s.children[0].offsetWidth+i,o=e.classList.contains("slider-nav-nodelay");s.scroll({left:n*t,behavior:o?"auto":"smooth"})},onSlideEnd(e,t,s=125){let i;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(i),i=setTimeout(t,s)}),{capture:!1,passive:!0})},autoPlay(e,t,s){t=t<750?750:t;let i=setInterval(()=>this.slide(e),t);const n=()=>this.autoPlay(e,t,s);return s&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(i)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){n()}),{once:!0})),i},handleIndicators(e){const t=e.querySelector(".slider-container"),s=t.scrollWidth-t.offsetWidth,i=t.scrollLeft/s;for(const t of e.querySelectorAll(".slider-indicators")){const e=t.children,s=Math.round((e.length-1)*i);for(const t of e)t.removeAttribute("class");e[s].classList.add("active")}}}}();window.swiffyslider=swiffyslider,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{"use strict";swiffyslider.init()}); +const swiffyslider=function(){"use strict";return{version:"1.2.0",init(e=document.body){for(const t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(const t of e.querySelectorAll(".slider-nav")){const s=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,s),{passive:!0})}for(const t of e.querySelectorAll(".slider-indicators"))t.addEventListener("click",()=>this.slideToByIndicator()),this.onSlideEnd(e,()=>this.handleIndicators(e),60);if(e.classList.contains("slider-nav-autoplay")){const t=e.getAttribute("data-slider-nav-autoplay-interval")?e.getAttribute("data-slider-nav-autoplay-interval"):2500;this.autoPlay(e,t,e.classList.contains("slider-nav-autopause"))}if(e.classList.contains("slider-nav-animation")){const t=e.getAttribute("data-slider-nav-animation-threshold")?e.getAttribute("data-slider-nav-animation-threshold"):.3;this.setVisibleSlides(e,t)}},setVisibleSlides(e,t=.3){const s=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?e.target.parentElement.classList.add("slide-visible"):e.target.parentElement.classList.remove("slide-visible")})},{root:e.querySelector(".slider-container"),threshold:t});for(const t of e.querySelectorAll(".slider-container>*>*"))s.observe(t)},slide(e,t=!0){const s=e.querySelector(".slider-container"),i=e.classList.contains("slider-nav-page"),n=e.classList.contains("slider-nav-noloop"),o=e.classList.contains("slider-nav-nodelay"),r=s.children,l=parseInt(window.getComputedStyle(s).columnGap),a=r[0].offsetWidth+l;let d=t?s.scrollLeft+a:s.scrollLeft-a;if(i&&(d=t?s.scrollLeft+s.offsetWidth:s.scrollLeft-s.offsetWidth),s.scrollLeft+s.offsetWidth>s.scrollWidth-(l/2+1)&&t){if(n)return;d=0}s.scroll({left:d,behavior:o?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),s=e.parentElement.children.length,i=e.closest(".swiffy-slider"),n=i.querySelector(".slider-container").children.length/s*t;this.slideTo(i,n)},slideTo(e,t){const s=e.querySelector(".slider-container"),i=parseInt(window.getComputedStyle(s).columnGap),n=s.children[0].offsetWidth+i,o=e.classList.contains("slider-nav-nodelay");s.scroll({left:n*t,behavior:o?"auto":"smooth"})},onSlideEnd(e,t,s=125){let i;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(i),i=setTimeout(t,s)}),{capture:!1,passive:!0})},autoPlay(e,t,s){t=t<750?750:t;let i=setInterval(()=>this.slide(e),t);const n=()=>this.autoPlay(e,t,s);return s&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(i)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){n()}),{once:!0,passive:!0})),i},handleIndicators(e){const t=e.querySelector(".slider-container"),s=t.scrollWidth-t.offsetWidth,i=t.scrollLeft/s;for(const t of e.querySelectorAll(".slider-indicators")){const e=t.children,s=Math.round((e.length-1)*i);for(const t of e)t.removeAttribute("class");e[s].classList.add("active")}}}}();window.swiffyslider=swiffyslider,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{"use strict";swiffyslider.init()}); //# sourceMappingURL=swiffy-slider.min.js.map \ No newline at end of file diff --git a/dist/js/swiffy-slider.min.js.map b/dist/js/swiffy-slider.min.js.map index 63a464d..598ced7 100644 --- a/dist/js/swiffy-slider.min.js.map +++ b/dist/js/swiffy-slider.min.js.map @@ -20,6 +20,7 @@ "contains", "addEventListener", "slide", + "passive", "indicatorElement", "slideToByIndicator", "onSlideEnd", @@ -27,6 +28,7 @@ "timeout", "getAttribute", "autoPlay", + "threshold", "setVisibleSlides", "observer", "IntersectionObserver", @@ -39,7 +41,6 @@ "remove", "root", "querySelector", - "threshold", "observe", "container", "fullpage", @@ -76,7 +77,6 @@ "clearTimeout", "setTimeout", "capture", - "passive", "autopause", "autoplayTimer", "setInterval", @@ -95,6 +95,6 @@ "hasAttribute", "init" ], - "mappings": "AAAA,MAAMA,aAAe,WACjB,aACA,MAAO,CACHC,QAAS,QACTC,KAAKC,EAAcC,SAASC,MACxB,IAAK,MAAMC,KAAiBH,EAAYI,iBAAiB,kBACrDC,KAAKC,WAAWH,IAIxBJ,WAAWI,GACP,IAAK,MAAMI,KAAcJ,EAAcC,iBAAiB,eAAgB,CACpE,MAAMI,EAAOD,EAAWE,UAAUC,SAAS,mBAC3CH,EAAWI,iBAAiB,QAAS,IAAMN,KAAKO,MAAMT,EAAeK,IAEzE,IAAK,MAAMK,KAAoBV,EAAcC,iBAAiB,sBAC1DS,EAAiBF,iBAAiB,QAAS,IAAMN,KAAKS,sBACtDT,KAAKU,WAAWZ,EAAe,IAAME,KAAKW,iBAAiBb,GAAgB,IAE/E,GAAIA,EAAcM,UAAUC,SAAS,uBAAwB,CACzD,MAAMO,EAAUd,EAAce,aAAa,qCAAuCf,EAAce,aAAa,qCAAuC,KACpJb,KAAKc,SAAShB,EAAec,EAASd,EAAcM,UAAUC,SAAS,yBAEvEP,EAAcM,UAAUC,SAAS,yBACjCL,KAAKe,iBAAiBjB,IAG9BJ,iBAAiBI,GACb,MAAMkB,EAAW,IAAIC,qBAAqBC,IACtCA,EAAOC,QAAQZ,IACXA,EAAMa,eAAiBb,EAAMc,OAAOC,cAAclB,UAAUmB,IAAI,iBAAmBhB,EAAMc,OAAOC,cAAclB,UAAUoB,OAAO,oBAEpI,CACCC,KAAM3B,EAAc4B,cAAc,qBAClCC,UAAW,KAEf,IAAK,MAAMpB,KAAST,EAAcC,iBAAiB,yBAC/CiB,EAASY,QAAQrB,IAGzBb,MAAMI,EAAeK,GAAO,GACxB,MAAM0B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yB,aAAaI,KACrB,CAAEG,MAAM,EAAM7D,SAAS,OAE9BV,EAAcQ,iBAAiB,YAAY,WACvC8D,MACD,CAAEC,MAAM,EAAM7D,SAAS,KAEvB0D,GAGXxE,iBAAiBI,GACb,MAAMgC,EAAYhC,EAAc8B,cAAc,qBACxC0C,EAAmBxC,EAAUc,YAAcd,EAAUW,YACrD8B,EAAgBzC,EAAUa,WAAa2B,EAC7C,IAAK,MAAME,KAA6B1E,EAAcC,iBAAiB,sBAAuB,CAC1F,MAAM0E,EAAmBD,EAA0BtC,SAC7CwC,EAAkBC,KAAKC,OAAOH,EAAiBlB,OAAS,GAAKgB,GACnE,IAAK,MAAMM,KAAWJ,EAClBI,EAAQC,gBAAgB,SAC5BL,EAAiBC,GAAiBtE,UAAUqB,IAAI,aA3H3C,GAiIrBY,OAAO7C,aAAeA,aACjBI,SAASmF,cAAcC,aAAa,gBACrC3C,OAAO/B,iBAAiB,OAAQ,KAC5B,aACAd,aAAayF", "file": "swiffy-slider.js" } \ No newline at end of file diff --git a/docs/assets/css/swiffy-slider.min.css b/docs/assets/css/swiffy-slider.min.css index f62a3d4..eaaf983 100644 --- a/docs/assets/css/swiffy-slider.min.css +++ b/docs/assets/css/swiffy-slider.min.css @@ -1,2 +1,2 @@ -.swiffy-slider{position:relative;display:block;width:100%;--swiffy-slider-snap-align:center;--swiffy-slider-item-width:100%;--swiffy-slider-item-gap:1rem;--swiffy-slider-item-reveal:0rem;--swiffy-slider-item-ratio:2/1;--swiffy-slider-item-count:1;--swiffy-slider-nav-light:#fff;--swiffy-slider-nav-dark:#333;--swiffy-slider-nav-zoom:1;--swiffy-slider-track-opacity:0.1;--swiffy-slider-track-height:0;--swiffy-slider-nav-outside-size:3.5rem;--swiffy-slider-indicator-outside-size:1.5rem;--swiffy-slider-animation-duration:.75s;--swiffy-slider-animation-delay:0s;--swiffy-slider-animation-timing:ease-in-out}.swiffy-slider,.swiffy-slider::after,.swiffy-slider::before{box-sizing:border-box}.swiffy-slider ::-webkit-scrollbar{height:var(--swiffy-slider-track-height)}.swiffy-slider ::-webkit-scrollbar-track{background:rgba(0,0,0,var(--swiffy-slider-track-opacity))}.swiffy-slider ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.4);border-radius:1rem}.swiffy-slider ::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.6)}.slider-container{--swiffy-slider-item-gap-totalwidth:calc(var(--swiffy-slider-item-gap) * (var(--swiffy-slider-item-count) - 1));--swiffy-slider-item-width:calc((100% - var(--swiffy-slider-item-reveal) - var(--swiffy-slider-item-gap-totalwidth)) / var(--swiffy-slider-item-count));overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scroll-behavior:smooth;display:grid;align-items:center;height:100%;grid:auto/auto-flow -webkit-max-content;grid:auto/auto-flow max-content;grid-auto-rows:100%;grid-auto-columns:var(--swiffy-slider-item-width);grid-auto-flow:column;grid-gap:var(--swiffy-slider-item-gap);list-style:none;margin:0;padding:0;scrollbar-width:none;scrollbar-color:rgba(0,0,0,.4) rgba(0,0,0,var(--swiffy-slider-track-opacity));background-clip:padding-box}.slider-container>*{scroll-snap-align:var(--swiffy-slider-snap-align);position:relative;width:100%;height:100%}.slider-item-helper .slider-container>*{background-size:cover;background-color:#e1e1e1;background-position:50% 50%;display:flex;justify-content:center;align-items:center}.slider-item-helper:not(.slider-item-ratio) .slider-container>*{min-height:20rem}.slider-item-ratio .slider-container>*>*{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.slider-item-ratio-contain .slider-container>*>*{-o-object-fit:contain;object-fit:contain}.slider-item-ratio .slider-container>::after{display:block;padding-top:calc(100% / (var(--swiffy-slider-item-ratio)));content:""}.slider-item-ratio-32x9{--swiffy-slider-item-ratio:32/9}.slider-item-ratio-21x9{--swiffy-slider-item-ratio:21/9}.slider-item-ratio-16x9{--swiffy-slider-item-ratio:16/9}.slider-item-ratio-4x3{--swiffy-slider-item-ratio:4/3}.slider-item-ratio-2x1{--swiffy-slider-item-ratio:2/1}.slider-item-ratio-1x1{--swiffy-slider-item-ratio:1/1}.slider-item-ratio-3x4{--swiffy-slider-item-ratio:3/4}.slider-nav-scrollbar{--swiffy-slider-track-height:0.5rem}.slider-nav-scrollbar .slider-container{scrollbar-width:thin}.slider-nav-nodelay .slider-container{scroll-behavior:auto}.slider-indicators{position:absolute;right:2rem;bottom:0;left:2rem;display:flex;justify-content:center;padding:0;margin-bottom:1rem;list-style:none}.slider-nav-scrollbar .slider-indicators{margin-bottom:calc(1rem + var(--swiffy-slider-track-height))}.slider-indicators>.active{opacity:1}.swiffy-slider.slider-indicators-outside .slider-nav{margin-bottom:var(--swiffy-slider-indicator-outside-size)}.swiffy-slider.slider-indicators-outside{padding-bottom:var(--swiffy-slider-indicator-outside-size)}.swiffy-slider.slider-indicators-outside .slider-indicators,.swiffy-slider.slider-indicators-outside.slider-indicators{margin-bottom:0}.slider-indicators>*{box-sizing:content-box;flex:0 1 auto;width:2rem;height:.2rem;padding:0;border:.4rem solid transparent;cursor:pointer;background-color:#fff;background-clip:padding-box;opacity:.5;transition:opacity .4s ease}.slider-indicators-square .slider-indicators>*,.slider-indicators-square.slider-indicators>*{width:.5rem;height:.5rem;border:.4rem solid transparent}.slider-indicators-round .slider-indicators>*,.slider-indicators-round.slider-indicators>*{width:.5rem;height:.5rem;border:.4rem solid transparent;border-radius:50%}.slider-indicators-highlight .slider-indicators>.active,.slider-indicators-highlight.slider-indicators>.active{border:.33rem solid transparent;padding:.07rem}.slider-nav{position:absolute;top:0;bottom:0;border:0;background-color:transparent;cursor:pointer;padding:0;visibility:hidden;opacity:.8;transition:visibility .1s,opacity .2s linear;margin-bottom:var(--swiffy-slider-track-height);display:flex;align-items:center;padding:0 .5rem;-webkit-filter:drop-shadow(0 0 .5rem rgba(0, 0, 0, .5));filter:drop-shadow(0 0 .5rem rgba(0, 0, 0, .5));transform:scale(var(--swiffy-slider-nav-zoom))}.slider-nav::before{position:absolute;content:"";padding:.5rem;width:3rem;height:3rem}.slider-nav::after{content:"";-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,");-webkit-mask-size:cover;mask-size:cover;background-color:var(--swiffy-slider-nav-light);background-origin:content-box;width:3rem;height:3rem}.slider-nav-arrow .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-chevron .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-caret .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-caretfill .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.swiffy-slider:hover .slider-nav{visibility:visible}.slider-nav-outside .slider-container{margin:0 var(--swiffy-slider-nav-outside-size)}.slider-nav-outside .slider-nav{padding:0}.swiffy-slider .slider-nav:hover{opacity:1}.slider-nav-square .slider-nav{padding:0}.slider-nav-round .slider-nav::before,.slider-nav-square .slider-nav::before{background-color:var(--swiffy-slider-nav-light)}.slider-nav-round .slider-nav::after,.slider-nav-square .slider-nav::after{background-color:var(--swiffy-slider-nav-dark);width:2rem;height:2rem;margin:.5rem}.slider-nav-round .slider-nav::before{border-radius:50%}.slider-nav-round .slider-nav::after{-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' %3E%3Cpath fill-rule='evenodd' d='M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z'%3E%3C/path%3E%3C/svg%3E");mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' %3E%3Cpath fill-rule='evenodd' d='M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z'%3E%3C/path%3E%3C/svg%3E")}.slider-nav-dark .slider-nav::after{background-color:var(--swiffy-slider-nav-dark)}.slider-nav-dark.slider-nav-round .slider-nav::before,.slider-nav-dark.slider-nav-square .slider-nav::before{background-color:var(--swiffy-slider-nav-dark)}.slider-nav-dark.slider-nav-round .slider-nav::after,.slider-nav-dark.slider-nav-square .slider-nav::after{background-color:var(--swiffy-slider-nav-light)}.slider-nav-sm{--swiffy-slider-nav-zoom:.75;--swiffy-slider-nav-outside-size:2.5rem}.slider-nav.slider-nav-next::after{transform:rotate(180deg)}.slider-nav.slider-nav-next{right:0}.slider-nav-visible .slider-nav{visibility:visible}.slider-nav-dark .slider-nav{opacity:.6}.slider-indicators-dark .slider-indicators>*,.slider-indicators-dark.slider-indicators>*{-webkit-filter:invert(1);filter:invert(1)}.slider-item-snapstart{--swiffy-slider-snap-align:start}.slider-item-nosnap{--swiffy-slider-snap-align:unset}.slider-item-nogap{--swiffy-slider-item-gap:0rem}.slider-item-reveal{--swiffy-slider-item-reveal:8rem}.slider-item-snapstart.slider-item-reveal{--swiffy-slider-item-reveal:4rem}.slider-item-show2{--swiffy-slider-item-count:2}.slider-item-show3{--swiffy-slider-item-count:3}.slider-item-show4{--swiffy-slider-item-count:4}.slider-item-show5{--swiffy-slider-item-count:5}.slider-item-show6{--swiffy-slider-item-count:6}@media (prefers-reduced-motion:no-preference){.slider-nav-animation.slider-nav-animation-fast{--swiffy-slider-animation-duration:.25s}.slider-nav-animation.slider-nav-animation-slow{--swiffy-slider-animation-duration:1.25s}.slider-nav-animation .slider-container>*>*{transition:opacity var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing),transform var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing);transition-delay:var(--swiffy-slider-animation-delay)}.slider-nav-animation .slider-container .slide-visible>*{transition:opacity var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing),transform var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing);transition-delay:var(--swiffy-slider-animation-delay)}.slider-nav-animation.slider-nav-animation-fadein .slider-container>*>*{opacity:.5}.slider-nav-animation.slider-nav-animation-scale .slider-container>*>*{transform:scale(.9)}.slider-nav-animation.slider-nav-animation-appear .slider-container>*>*{opacity:.3;transform:scale(.9)}.slider-nav-animation.slider-nav-animation-scaleup .slider-container>*>*{transform:scale(.25)}.slider-nav-animation.slider-nav-animation-turn .slider-container>*>*{transform:rotateY(70deg)}.slider-nav-animation.slider-nav-animation-slideup .slider-container>*>*{transform:translateY(60%) scale(.99)}.slider-nav-animation.slider-nav-animation-slideup .slider-container{overflow-y:hidden}.slider-nav-animation .slider-container>.slide-visible>*{opacity:1;transform:none}}@media (min-width:992px){.slider-item-show2:not(.slider-item-snapstart) .slider-container>*,.slider-item-show4:not(.slider-item-snapstart) .slider-container>*,.slider-item-show6:not(.slider-item-snapstart) .slider-container>*{scroll-snap-align:unset}.slider-item-show2:not(.slider-item-snapstart) .slider-container>::before,.slider-item-show4:not(.slider-item-snapstart) .slider-container>::before,.slider-item-show6:not(.slider-item-snapstart) .slider-container>::before{content:" ";display:block;position:absolute;left:calc((var(--swiffy-slider-item-gap)/2)*-1);top:0;width:1px;height:1px;scroll-snap-align:var(--swiffy-slider-snap-align)}.slider-nav-outside-expand .slider-nav{margin-left:-5rem}.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-5rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav{margin-left:-4rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-4rem}.slider-indicators-sm.slider-indicators{display:none}}@media (max-width:992px){.swiffy-slider{--swiffy-slider-track-height:0rem;--swiffy-slider-item-reveal:0rem;--swiffy-slider-item-count:1;--swiffy-slider-nav-zoom:.75}.slider-item-reveal{--swiffy-slider-item-reveal:4rem}.slider-item-snapstart.slider-item-reveal{--swiffy-slider-item-reveal:2rem}.slider-item-show6 .slider-container{grid-auto-columns:calc(25% - (var(--swiffy-slider-item-gap)/ 4*3))}.slider-item-show6.slider-item-reveal .slider-container{grid-auto-columns:calc(25% - (var(--swiffy-slider-item-gap)/ 4*3) - .5rem)}.slider-item-show6.slider-item-reveal .slider-container>*{scroll-snap-align:unset}.slider-item-show6.slider-item-reveal .slider-container>::before{content:" ";display:block;position:absolute;left:calc((var(--swiffy-slider-item-gap)/2)*-1);top:0;width:1px;height:1px;scroll-snap-align:center}.slider-nav::after{width:2rem!important;height:2rem!important;padding:.3rem!important}.slider-nav-outside .slider-container{margin:0 2rem}.slider-nav-outside-expand .slider-nav{padding:0;margin-left:-2rem}.slider-nav-outside-expand .slider-nav.slider-nav-next{padding:0;margin-right:-2rem}.slider-indicators-round .slider-indicators>*,.slider-indicators-round.slider-indicators>*,.slider-indicators-square .slider-indicators>*,.slider-indicators-square.slider-indicators>*{width:.3rem;height:.3rem}.slider-indicators{margin-bottom:.5rem;display:none}.slider-nav-scrollbar .slider-indicators{margin-bottom:0}.slider-indicators>*{width:1rem;height:.125rem;border-width:.25rem}.slider-indicators-sm .slider-indicators,.slider-indicators-sm.slider-indicators{display:flex}}@media (max-width:768px){.slider-item-show6 .slider-container{grid-auto-columns:calc(50% - (var(--swiffy-slider-item-gap)/ 2))}.slider-item-show6.slider-item-reveal .slider-container{grid-auto-columns:calc(50% - (var(--swiffy-slider-item-gap)/ 2) - 1.5rem)}}@media (hover:none){.swiffy-slider:not(.slider-nav-touch) .slider-nav{display:none}.swiffy-slider:not(.slider-nav-touch).slider-nav-outside .slider-container,.swiffy-slider:not(.slider-nav-touch).slider-nav-outside-expand .slider-container{margin:0 0}.slider-item-nosnap-touch{--swiffy-slider-snap-align:unset}} +.swiffy-slider{position:relative;display:block;width:100%;--swiffy-slider-snap-align:center;--swiffy-slider-item-width:100%;--swiffy-slider-item-gap:1rem;--swiffy-slider-item-reveal:0rem;--swiffy-slider-item-ratio:2/1;--swiffy-slider-item-count:1;--swiffy-slider-nav-light:#fff;--swiffy-slider-nav-dark:#333;--swiffy-slider-nav-zoom:1;--swiffy-slider-track-opacity:0.1;--swiffy-slider-track-height:0;--swiffy-slider-nav-outside-size:3.5rem;--swiffy-slider-indicator-outside-size:1.5rem;--swiffy-slider-animation-duration:.75s;--swiffy-slider-animation-delay:0s;--swiffy-slider-animation-timing:ease-in-out}.swiffy-slider,.swiffy-slider::after,.swiffy-slider::before{box-sizing:border-box}.swiffy-slider ::-webkit-scrollbar{height:var(--swiffy-slider-track-height)}.swiffy-slider ::-webkit-scrollbar-track{background:rgba(0,0,0,var(--swiffy-slider-track-opacity))}.swiffy-slider ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.4);border-radius:1rem}.swiffy-slider ::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.6)}.slider-container{--swiffy-slider-item-gap-totalwidth:calc(var(--swiffy-slider-item-gap) * (var(--swiffy-slider-item-count) - 1));--swiffy-slider-item-width:calc((100% - var(--swiffy-slider-item-reveal) - var(--swiffy-slider-item-gap-totalwidth)) / var(--swiffy-slider-item-count));overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scroll-behavior:smooth;display:grid;align-items:center;height:100%;grid:auto/auto-flow -webkit-max-content;grid:auto/auto-flow max-content;grid-auto-rows:100%;grid-auto-columns:var(--swiffy-slider-item-width);grid-auto-flow:column;grid-gap:var(--swiffy-slider-item-gap);list-style:none;margin:0;padding:0;scrollbar-width:none;scrollbar-color:rgba(0,0,0,.4) rgba(0,0,0,var(--swiffy-slider-track-opacity));background-clip:padding-box}.slider-container>*{scroll-snap-align:var(--swiffy-slider-snap-align);position:relative;width:100%;height:100%}.slider-item-helper .slider-container>*{background-size:cover;background-color:#e1e1e1;background-position:50% 50%;display:flex;justify-content:center;align-items:center}.slider-item-helper:not(.slider-item-ratio) .slider-container>*{min-height:20rem}.slider-item-ratio .slider-container>*>*{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.slider-item-ratio-contain .slider-container>*>*{-o-object-fit:contain;object-fit:contain}.slider-item-ratio .slider-container>::after{display:block;padding-top:calc(100% / (var(--swiffy-slider-item-ratio)));content:""}.slider-item-ratio-32x9{--swiffy-slider-item-ratio:32/9}.slider-item-ratio-21x9{--swiffy-slider-item-ratio:21/9}.slider-item-ratio-16x9{--swiffy-slider-item-ratio:16/9}.slider-item-ratio-4x3{--swiffy-slider-item-ratio:4/3}.slider-item-ratio-2x1{--swiffy-slider-item-ratio:2/1}.slider-item-ratio-1x1{--swiffy-slider-item-ratio:1/1}.slider-item-ratio-3x4{--swiffy-slider-item-ratio:3/4}.slider-nav-scrollbar{--swiffy-slider-track-height:0.5rem}.slider-nav-scrollbar .slider-container{scrollbar-width:thin}.slider-nav-nodelay .slider-container{scroll-behavior:auto}.slider-indicators{position:absolute;right:2rem;bottom:0;left:2rem;display:flex;justify-content:center;padding:0;margin-bottom:1rem;list-style:none}.slider-nav-scrollbar .slider-indicators{margin-bottom:calc(1rem + var(--swiffy-slider-track-height))}.slider-indicators>.active{opacity:1}.swiffy-slider.slider-indicators-outside .slider-nav{margin-bottom:var(--swiffy-slider-indicator-outside-size)}.swiffy-slider.slider-indicators-outside{padding-bottom:var(--swiffy-slider-indicator-outside-size)}.swiffy-slider.slider-indicators-outside .slider-indicators,.swiffy-slider.slider-indicators-outside.slider-indicators{margin-bottom:0}.slider-indicators>*{box-sizing:content-box;flex:0 1 auto;width:2rem;height:.2rem;padding:0;border:.4rem solid transparent;cursor:pointer;background-color:#fff;background-clip:padding-box;opacity:.5;transition:opacity .4s ease}.slider-indicators-square .slider-indicators>*,.slider-indicators-square.slider-indicators>*{width:.5rem;height:.5rem;border:.4rem solid transparent}.slider-indicators-round .slider-indicators>*,.slider-indicators-round.slider-indicators>*{width:.5rem;height:.5rem;border:.4rem solid transparent;border-radius:50%}.slider-indicators-highlight .slider-indicators>.active,.slider-indicators-highlight.slider-indicators>.active{border:.33rem solid transparent;padding:.07rem}.slider-nav{position:absolute;top:0;bottom:0;border:0;background-color:transparent;cursor:pointer;padding:0;visibility:hidden;opacity:.8;transition:visibility .1s,opacity .2s linear;margin-bottom:var(--swiffy-slider-track-height);display:flex;align-items:center;padding:0 .5rem;-webkit-filter:drop-shadow(0 0 .5rem rgba(0, 0, 0, .5));filter:drop-shadow(0 0 .5rem rgba(0, 0, 0, .5));transform:scale(var(--swiffy-slider-nav-zoom))}.slider-nav::before{position:absolute;content:"";padding:.5rem;width:3rem;height:3rem}.slider-nav::after{content:"";-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,");-webkit-mask-size:cover;mask-size:cover;background-color:var(--swiffy-slider-nav-light);background-origin:content-box;width:3rem;height:3rem}.slider-nav-arrow .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-chevron .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-caret .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.slider-nav-caretfill .slider-nav::after{-webkit-mask:url("data:image/svg+xml,");mask:url("data:image/svg+xml,")}.swiffy-slider:hover .slider-nav{visibility:visible}.slider-nav-outside .slider-container{margin:0 var(--swiffy-slider-nav-outside-size)}.slider-nav-outside .slider-nav{padding:0}.swiffy-slider .slider-nav:hover{opacity:1}.slider-nav-square .slider-nav{padding:0}.slider-nav-round .slider-nav::before,.slider-nav-square .slider-nav::before{background-color:var(--swiffy-slider-nav-light)}.slider-nav-round .slider-nav::after,.slider-nav-square .slider-nav::after{background-color:var(--swiffy-slider-nav-dark);width:2rem;height:2rem;margin:.5rem}.slider-nav-round .slider-nav::before{border-radius:50%}.slider-nav-round .slider-nav::after{-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' %3E%3Cpath fill-rule='evenodd' d='M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z'%3E%3C/path%3E%3C/svg%3E");mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' %3E%3Cpath fill-rule='evenodd' d='M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z'%3E%3C/path%3E%3C/svg%3E")}.slider-nav-dark .slider-nav::after{background-color:var(--swiffy-slider-nav-dark)}.slider-nav-dark.slider-nav-round .slider-nav::before,.slider-nav-dark.slider-nav-square .slider-nav::before{background-color:var(--swiffy-slider-nav-dark)}.slider-nav-dark.slider-nav-round .slider-nav::after,.slider-nav-dark.slider-nav-square .slider-nav::after{background-color:var(--swiffy-slider-nav-light)}.slider-nav-sm{--swiffy-slider-nav-zoom:.75;--swiffy-slider-nav-outside-size:2.5rem}.slider-nav.slider-nav-next::after{transform:rotate(180deg)}.slider-nav.slider-nav-next{right:0}.slider-nav-visible .slider-nav{visibility:visible}.slider-nav-dark .slider-nav{opacity:.6}.slider-indicators-dark .slider-indicators>*,.slider-indicators-dark.slider-indicators>*{-webkit-filter:invert(1);filter:invert(1)}.slider-item-snapstart{--swiffy-slider-snap-align:start}.slider-item-nosnap{--swiffy-slider-snap-align:unset}.slider-item-nogap{--swiffy-slider-item-gap:0rem}.slider-item-reveal{--swiffy-slider-item-reveal:8rem}.slider-item-snapstart.slider-item-reveal{--swiffy-slider-item-reveal:4rem}.slider-item-show2{--swiffy-slider-item-count:2}.slider-item-show3{--swiffy-slider-item-count:3}.slider-item-show4{--swiffy-slider-item-count:4}.slider-item-show5{--swiffy-slider-item-count:5}.slider-item-show6{--swiffy-slider-item-count:6}.slider-nav-mousedrag .slider-container{cursor:-webkit-grab;cursor:grab}.slider-nav-mousedrag .slider-container.dragging{-ms-scroll-snap-type:unset;scroll-snap-type:unset;scroll-behavior:unset;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.slider-nav-mousedrag .slider-container::after{content:"";position:absolute;width:100%;height:100%}@media (prefers-reduced-motion:no-preference){.slider-nav-animation.slider-nav-animation-fast{--swiffy-slider-animation-duration:.25s}.slider-nav-animation.slider-nav-animation-slow{--swiffy-slider-animation-duration:1.25s}.slider-nav-animation .slider-container>*>*{transition:opacity var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing),transform var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing);transition-delay:var(--swiffy-slider-animation-delay)}.slider-nav-animation .slider-container .slide-visible>*{transition:opacity var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing),transform var(--swiffy-slider-animation-duration) var(--swiffy-slider-animation-timing);transition-delay:var(--swiffy-slider-animation-delay)}.slider-nav-animation.slider-nav-animation-fadein .slider-container>*>*{opacity:.5}.slider-nav-animation.slider-nav-animation-scale .slider-container>*>*{transform:scale(.9)}.slider-nav-animation.slider-nav-animation-appear .slider-container>*>*{opacity:.3;transform:scale(.9)}.slider-nav-animation.slider-nav-animation-scaleup .slider-container>*>*{transform:scale(.25)}.slider-nav-animation.slider-nav-animation-turn .slider-container>*>*{transform:rotateY(70deg)}.slider-nav-animation.slider-nav-animation-slideup .slider-container>*>*{transform:translateY(60%) scale(.99)}.slider-nav-animation.slider-nav-animation-slideup .slider-container{overflow-y:hidden}.slider-nav-animation .slider-container>.slide-visible>*{opacity:1;transform:none}}@media (min-width:992px){.slider-item-show2:not(.slider-item-snapstart) .slider-container>*,.slider-item-show4:not(.slider-item-snapstart) .slider-container>*,.slider-item-show6:not(.slider-item-snapstart) .slider-container>*{scroll-snap-align:unset}.slider-item-show2:not(.slider-item-snapstart) .slider-container>::before,.slider-item-show4:not(.slider-item-snapstart) .slider-container>::before,.slider-item-show6:not(.slider-item-snapstart) .slider-container>::before{content:" ";display:block;position:absolute;left:calc((var(--swiffy-slider-item-gap)/2)*-1);top:0;width:1px;height:1px;scroll-snap-align:var(--swiffy-slider-snap-align)}.slider-nav-outside-expand .slider-nav{margin-left:-5rem}.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-5rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav{margin-left:-4rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-4rem}.slider-indicators-sm.slider-indicators{display:none}}@media (max-width:992px){.swiffy-slider{--swiffy-slider-track-height:0rem;--swiffy-slider-item-reveal:0rem;--swiffy-slider-item-count:1;--swiffy-slider-nav-zoom:.75}.slider-item-reveal{--swiffy-slider-item-reveal:4rem}.slider-item-snapstart.slider-item-reveal{--swiffy-slider-item-reveal:2rem}.slider-item-show6 .slider-container{grid-auto-columns:calc(25% - (var(--swiffy-slider-item-gap)/ 4*3))}.slider-item-show6.slider-item-reveal .slider-container{grid-auto-columns:calc(25% - (var(--swiffy-slider-item-gap)/ 4*3) - .5rem)}.slider-item-show6.slider-item-reveal .slider-container>*{scroll-snap-align:unset}.slider-item-show6.slider-item-reveal .slider-container>::before{content:" ";display:block;position:absolute;left:calc((var(--swiffy-slider-item-gap)/2)*-1);top:0;width:1px;height:1px;scroll-snap-align:center}.slider-nav::after{width:2rem!important;height:2rem!important;padding:.3rem!important}.slider-nav-outside .slider-container{margin:0 2rem}.slider-nav-outside-expand .slider-nav{padding:0;margin-left:-2rem}.slider-nav-outside-expand .slider-nav.slider-nav-next{padding:0;margin-right:-2rem}.slider-indicators-round .slider-indicators>*,.slider-indicators-round.slider-indicators>*,.slider-indicators-square .slider-indicators>*,.slider-indicators-square.slider-indicators>*{width:.3rem;height:.3rem}.slider-indicators{margin-bottom:.5rem;display:none}.slider-nav-scrollbar .slider-indicators{margin-bottom:0}.slider-indicators>*{width:1rem;height:.125rem;border-width:.25rem}.slider-indicators-sm .slider-indicators,.slider-indicators-sm.slider-indicators{display:flex}}@media (max-width:768px){.slider-item-show6 .slider-container{grid-auto-columns:calc(50% - (var(--swiffy-slider-item-gap)/ 2))}.slider-item-show6.slider-item-reveal .slider-container{grid-auto-columns:calc(50% - (var(--swiffy-slider-item-gap)/ 2) - 1.5rem)}}@media (hover:none){.swiffy-slider:not(.slider-nav-touch) .slider-nav{display:none}.swiffy-slider:not(.slider-nav-touch).slider-nav-outside .slider-container,.swiffy-slider:not(.slider-nav-touch).slider-nav-outside-expand .slider-container{margin:0 0}.slider-item-nosnap-touch{--swiffy-slider-snap-align:unset}} /*# sourceMappingURL=swiffy-slider.min.css.map */ diff --git a/docs/assets/css/swiffy-slider.min.css.map b/docs/assets/css/swiffy-slider.min.css.map index aa3bfda..e439f60 100644 --- a/docs/assets/css/swiffy-slider.min.css.map +++ b/docs/assets/css/swiffy-slider.min.css.map @@ -4,5 +4,5 @@ "swiffy-slider.css" ], "names": [], - "mappings": "AAAA,eACI,SAAU,SACV,QAAS,MACT,MAAO,KACP,2BAA4B,OAC5B,2BAA4B,KAC5B,yBAA0B,KAC1B,4BAA6B,KAC7B,2BAA4B,CAAC,CAAC,EAC9B,2BAA4B,EAC5B,0BAA2B,KAC3B,yBAA0B,KAC1B,yBAA0B,EAC1B,8BAA+B,IAC/B,6BAA8B,EAC9B,iCAAkC,OAClC,uCAAwC,OACxC,mCAAoC,KACpC,gCAAiC,GACjC,iCAAkC,YAGtC,eACA,sBACA,uBACI,WAAY,WAGhB,mCACI,OAAQ,kCAGZ,yCACI,WAAY,+CAGhB,yCACI,WAAY,eACZ,cAAe,KAGnB,+CACI,WAAY,eAGhB,kBACI,oCAAqC,4EACrC,2BAA4B,6HAC5B,WAAY,KACZ,2BAA4B,MAC5B,qBAAsB,EAAE,UACpB,iBAAkB,EAAE,UACxB,gBAAiB,OACjB,QAAS,KACT,YAAa,OACb,OAAQ,KACR,KAAM,IAAK,CAAE,UAAU,oBACvB,KAAM,IAAK,CAAE,UAAU,YACvB,eAAgB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,+CAEvB,wDACI,kBAAmB,yDAI3B,oBACI,kDACI,QAAS,KAGb,2EADA,kFAEI,OAAQ,EAAE,EAEd,0BACI,2BAA4B" } \ No newline at end of file diff --git a/docs/assets/js/swiffy-slider-extensions.min.js b/docs/assets/js/swiffy-slider-extensions.min.js new file mode 100644 index 0000000..5628f67 --- /dev/null +++ b/docs/assets/js/swiffy-slider-extensions.min.js @@ -0,0 +1,2 @@ +const swiffysliderextensions=function(){"use strict";return{version:"1.2.0",draggingtimer:null,init(e=document.body){for(const s of e.querySelectorAll(".swiffy-slider"))this.initSlider(s)},initSlider(e){e.classList.contains("slider-nav-mousedrag")&&e.addEventListener("mousedown",s=>this.handleMouseDrag(s,e),{passive:!0})},handleMouseDrag(e,s){const t=s.querySelector(".slider-container");t.classList.contains("dragging")&&clearTimeout(this.draggingtimer),t.style.cursor="grabbing",t.classList.add("dragging");const i=t.scrollLeft,n=e.clientX,r=t.children[0].offsetWidth+parseInt(window.getComputedStyle(t).columnGap);let o=0;const l=e=>{const s=e.clientX-n;t.scrollLeft=i-1.8*s,o=s<0?t.scrollLeft+(r+1.8*s):t.scrollLeft-(r-1.8*s)};t.addEventListener("mousemove",l,{passive:!0}),document.addEventListener("mouseup",()=>{t.removeEventListener("mousemove",l),t.style.cursor=null,0!=o&&t.scroll({left:o,behavior:"smooth"}),this.draggingtimer=setTimeout(()=>{t.classList.remove("dragging")},550)},{once:!0,passive:!0})}}}();window.swiffyslider.extensions=swiffysliderextensions,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{"use strict";swiffyslider.extensions.init()}); +//# sourceMappingURL=swiffy-slider-extensions.min.js.map \ No newline at end of file diff --git a/docs/assets/js/swiffy-slider-extensions.min.js.map b/docs/assets/js/swiffy-slider-extensions.min.js.map new file mode 100644 index 0000000..1b049ea --- /dev/null +++ b/docs/assets/js/swiffy-slider-extensions.min.js.map @@ -0,0 +1,59 @@ +{ + "version": 3, + "sources": [ + "swiffy-slider-extensions.js" + ], + "names": [ + "swiffysliderextensions", + "version", + "draggingtimer", + "[object Object]", + "rootElement", + "document", + "body", + "sliderElement", + "querySelectorAll", + "this", + "initSlider", + "classList", + "contains", + "addEventListener", + "e", + "handleMouseDrag", + "passive", + "container", + "querySelector", + "clearTimeout", + "style", + "cursor", + "add", + "startingLeftPos", + "scrollLeft", + "mouseDownStartingXPos", + "clientX", + "slideWidth", + "children", + "offsetWidth", + "parseInt", + "window", + "getComputedStyle", + "columnGap", + "nextSlideLeftPos", + "moveDelegate", + "mouseMovedXpos", + "removeEventListener", + "scroll", + "left", + "behavior", + "setTimeout", + "remove", + "once", + "swiffyslider", + "extensions", + "currentScript", + "hasAttribute", + "init" + ], + "mappings": "AAAA,MAAMA,uBAAyB,WAC3B,aACA,MAAO,CACHC,QAAS,QACTC,cAAe,KACfC,KAAKC,EAAcC,SAASC,MACxB,IAAK,MAAMC,KAAiBH,EAAYI,iBAAiB,kBACrDC,KAAKC,WAAWH,IAIxBJ,WAAWI,GACHA,EAAcI,UAAUC,SAAS,yBACjCL,EAAcM,iBAAiB,YAAcC,GAAML,KAAKM,gBAAgBD,EAAGP,GAAgB,CAAES,SAAS,KAG9Gb,gBAAgBW,EAAGP,GACf,MAAMU,EAAYV,EAAcW,cAAc,qBAC1CD,EAAUN,UAAUC,SAAS,aAC7BO,aAAaV,KAAKP,eAEtBe,EAAUG,MAAMC,OAAS,WACzBJ,EAAUN,UAAUW,IAAI,YAExB,MAAMC,EAAkBN,EAAUO,WAC5BC,EAAwBX,EAAEY,QAC1BC,EAAaV,EAAUW,SAAS,GAAGC,YAAcC,SAASC,OAAOC,iBAAiBf,GAAWgB,WACnG,IAAIC,EAAmB,EAEvB,MAAMC,EAAgBrB,IAClB,MAAMsB,EAAiBtB,EAAEY,QAAUD,EACnCR,EAAUO,WAAaD,EAAoC,IAAjBa,EAEtCF,EADAE,EAAiB,EACEnB,EAAUO,YAAcG,EAA+B,IAAjBS,GAEtCnB,EAAUO,YAAcG,EAA+B,IAAjBS,IAIjEnB,EAAUJ,iBAAiB,YAAasB,EAAc,CAAEnB,SAAS,IACjEX,SAASQ,iBAAiB,UAAW,KACjCI,EAAUoB,oBAAoB,YAAaF,GAC3ClB,EAAUG,MAAMC,OAAS,KACD,GAApBa,GACAjB,EAAUqB,OAAO,CACbC,KAAML,EACNM,SAAU,WAElB/B,KAAKP,cAAgBuC,WAAW,KAAQxB,EAAUN,UAAU+B,OAAO,aAAgB,MACpF,CAAEC,MAAM,EAAM3B,SAAS,MAjDP,GAsD/Be,OAAOa,aAAaC,WAAa7C,uBAC5BK,SAASyC,cAAcC,aAAa,gBACrChB,OAAOlB,iBAAiB,OAAQ,KAC5B,aACA+B,aAAaC,WAAWG", + "file": "swiffy-slider-extensions.js" +} \ No newline at end of file diff --git a/docs/assets/js/swiffy-slider.ESM.min.js b/docs/assets/js/swiffy-slider.ESM.min.js index 87d9c46..e52de29 100644 --- a/docs/assets/js/swiffy-slider.ESM.min.js +++ b/docs/assets/js/swiffy-slider.ESM.min.js @@ -1,2 +1,2 @@ -export const swiffyslider=function(){"use strict";return{version:"1.1.0",init(e=document.body){for(const t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(const t of e.querySelectorAll(".slider-nav")){const s=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,s))}for(const t of e.querySelectorAll(".slider-indicators"))t.addEventListener("click",()=>this.slideToByIndicator()),this.onSlideEnd(e,()=>this.handleIndicators(e),60);if(e.classList.contains("slider-nav-autoplay")){const t=e.getAttribute("data-slider-nav-autoplay-interval")?e.getAttribute("data-slider-nav-autoplay-interval"):2500;this.autoPlay(e,t,e.classList.contains("slider-nav-autopause"))}e.classList.contains("slider-nav-animation")&&this.setVisibleSlides(e)},setVisibleSlides(e){const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?e.target.parentElement.classList.add("slide-visible"):e.target.parentElement.classList.remove("slide-visible")})},{root:e.querySelector(".slider-container"),threshold:.3});for(const s of e.querySelectorAll(".slider-container>*>*"))t.observe(s)},slide(e,t=!0){const s=e.querySelector(".slider-container"),i=e.classList.contains("slider-nav-page"),o=e.classList.contains("slider-nav-noloop"),n=e.classList.contains("slider-nav-nodelay"),l=s.children,r=parseInt(window.getComputedStyle(s).columnGap),a=l[0].offsetWidth-r;let c=t?s.scrollLeft+a:s.scrollLeft-a;if(i&&(c=t?s.scrollLeft+s.offsetWidth:s.scrollLeft-s.offsetWidth),s.scrollLeft+s.offsetWidth>s.scrollWidth-(r/2+1)&&t){if(o)return;c=0}s.scroll({left:c,behavior:n?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),s=e.parentElement.children.length,i=e.closest(".swiffy-slider"),o=i.querySelector(".slider-container").children.length/s*t;this.slideTo(i,o)},slideTo(e,t){const s=e.querySelector(".slider-container"),i=parseInt(window.getComputedStyle(s).columnGap),o=s.children[0].offsetWidth+i,n=e.classList.contains("slider-nav-nodelay");s.scroll({left:o*t,behavior:n?"auto":"smooth"})},onSlideEnd(e,t,s=125){let i;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(i),i=setTimeout(t,s)}),{capture:!1,passive:!0})},autoPlay(e,t,s){t=t<750?750:t;let i=setInterval(()=>this.slide(e),t);const o=()=>this.autoPlay(e,t,s);return s&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(i)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){o()}),{once:!0})),i},handleIndicators(e){const t=e.querySelector(".slider-container"),s=t.scrollWidth-t.offsetWidth,i=t.scrollLeft/s;for(const t of e.querySelectorAll(".slider-indicators")){const e=t.children,s=Math.round((e.length-1)*i);for(const t of e)t.removeAttribute("class");e[s].classList.add("active")}}}}(); +export const swiffyslider=function(){"use strict";return{version:"1.2.0",init(e=document.body){for(const t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(const t of e.querySelectorAll(".slider-nav")){const s=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,s),{passive:!0})}for(const t of e.querySelectorAll(".slider-indicators"))t.addEventListener("click",()=>this.slideToByIndicator()),this.onSlideEnd(e,()=>this.handleIndicators(e),60);if(e.classList.contains("slider-nav-autoplay")){const t=e.getAttribute("data-slider-nav-autoplay-interval")?e.getAttribute("data-slider-nav-autoplay-interval"):2500;this.autoPlay(e,t,e.classList.contains("slider-nav-autopause"))}if(e.classList.contains("slider-nav-animation")){const t=e.getAttribute("data-slider-nav-animation-threshold")?e.getAttribute("data-slider-nav-animation-threshold"):.3;this.setVisibleSlides(e,t)}},setVisibleSlides(e,t=.3){const s=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?e.target.parentElement.classList.add("slide-visible"):e.target.parentElement.classList.remove("slide-visible")})},{root:e.querySelector(".slider-container"),threshold:t});for(const t of e.querySelectorAll(".slider-container>*>*"))s.observe(t)},slide(e,t=!0){const s=e.querySelector(".slider-container"),i=e.classList.contains("slider-nav-page"),n=e.classList.contains("slider-nav-noloop"),o=e.classList.contains("slider-nav-nodelay"),l=s.children,r=parseInt(window.getComputedStyle(s).columnGap),a=l[0].offsetWidth+r;let c=t?s.scrollLeft+a:s.scrollLeft-a;if(i&&(c=t?s.scrollLeft+s.offsetWidth:s.scrollLeft-s.offsetWidth),s.scrollLeft+s.offsetWidth>s.scrollWidth-(r/2+1)&&t){if(n)return;c=0}s.scroll({left:c,behavior:o?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),s=e.parentElement.children.length,i=e.closest(".swiffy-slider"),n=i.querySelector(".slider-container").children.length/s*t;this.slideTo(i,n)},slideTo(e,t){const s=e.querySelector(".slider-container"),i=parseInt(window.getComputedStyle(s).columnGap),n=s.children[0].offsetWidth+i,o=e.classList.contains("slider-nav-nodelay");s.scroll({left:n*t,behavior:o?"auto":"smooth"})},onSlideEnd(e,t,s=125){let i;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(i),i=setTimeout(t,s)}),{capture:!1,passive:!0})},autoPlay(e,t,s){t=t<750?750:t;let i=setInterval(()=>this.slide(e),t);const n=()=>this.autoPlay(e,t,s);return s&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(i)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){n()}),{once:!0,passive:!0})),i},handleIndicators(e){const t=e.querySelector(".slider-container"),s=t.scrollWidth-t.offsetWidth,i=t.scrollLeft/s;for(const t of e.querySelectorAll(".slider-indicators")){const e=t.children,s=Math.round((e.length-1)*i);for(const t of e)t.removeAttribute("class");e[s].classList.add("active")}}}}(); //# sourceMappingURL=swiffy-slider.ESM.min.js.map \ No newline at end of file diff --git a/docs/assets/js/swiffy-slider.ESM.min.js.map b/docs/assets/js/swiffy-slider.ESM.min.js.map index 7b8a4d2..8d3ab1e 100644 --- a/docs/assets/js/swiffy-slider.ESM.min.js.map +++ b/docs/assets/js/swiffy-slider.ESM.min.js.map @@ -20,6 +20,7 @@ "contains", "addEventListener", "slide", + "passive", "indicatorElement", "slideToByIndicator", "onSlideEnd", @@ -27,6 +28,7 @@ "timeout", "getAttribute", "autoPlay", + "threshold", "setVisibleSlides", "observer", "IntersectionObserver", @@ -39,7 +41,6 @@ "remove", "root", "querySelector", - "threshold", "observe", "container", "fullpage", @@ -76,7 +77,6 @@ "clearTimeout", "setTimeout", "capture", - "passive", "autopause", "autoplayTimer", "setInterval", @@ -92,6 +92,6 @@ "element", "removeAttribute" ], - "mappings": "OAAO,MAAMA,aAAe,WACxB,aACA,MAAO,CACHC,QAAS,QACTC,KAAKC,EAAcC,SAASC,MACxB,IAAK,MAAMC,KAAiBH,EAAYI,iBAAiB,kBACrDC,KAAKC,WAAWH,IAIxBJ,WAAWI,GACP,IAAK,MAAMI,KAAcJ,EAAcC,iBAAiB,eAAgB,CACpE,MAAMI,EAAOD,EAAWE,UAAUC,SAAS,mBAC3CH,EAAWI,iBAAiB,QAAS,IAAMN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AWS,WACvDC,EAAaV,EAAUI,SAAS,GAAGO,YAAcN,EACjDF,EAAUnC,EAAcM,UAAUC,SAAS,sBACjDyB,EAAUe,OAAO,CACbC,KAAON,EAAamB,EACpBZ,SAAUd,EAAU,OAAS,YAIrCvC,WAAWI,EAAe8D,EAAU/C,EAAU,KAC1C,IAAIgD,EACJ/D,EAAc8B,cAAc,qBAAqBtB,iBAAiB,UAAU,WACxE+B,OAAOyB,aAAaD,GACpBA,EAAcE,WAAWH,EAAU/C,KACpC,CAAEmD,SAAS,EAAOxD,SAAS,KAGlCd,SAASI,EAAee,EAASoD,GAC7BpD,EAAUA,EAAU,IAAM,IAAMA,EAChC,IAAIqD,EAAgBC,YAAY,IAAMnE,KAAKO,MAAMT,GAAgBe,GACjE,MAAMuD,EAAa,IAAMpE,KAAKe,SAASjB,EAAee,EAASoD,GAW/D,OAVIA,IACA,CAAC,YAAa,cAAc5C,SAAQ,SAAS4B,GACzCnD,EAAcQ,iBAAiB2C,GAAO,WAClCZ,OAAOyB,aAAaI,KACrB,CAAEG,MAAM,EAAM7D,SAAS,OAE9BV,EAAcQ,iBAAiB,YAAY,WACvC8D,MACD,CAAEC,MAAM,EAAM7D,SAAS,KAEvB0D,GAGXxE,iBAAiBI,GACb,MAAMgC,EAAYhC,EAAc8B,cAAc,qBACxC0C,EAAmBxC,EAAUc,YAAcd,EAAUW,YACrD8B,EAAgBzC,EAAUa,WAAa2B,EAC7C,IAAK,MAAME,KAA6B1E,EAAcC,iBAAiB,sBAAuB,CAC1F,MAAM0E,EAAmBD,EAA0BtC,SAC7CwC,EAAkBC,KAAKC,OAAOH,EAAiBlB,OAAS,GAAKgB,GACnE,IAAK,MAAMM,KAAWJ,EAClBI,EAAQC,gBAAgB,SAC5BL,EAAiBC,GAAiBtE,UAAUqB,IAAI,aA3HpC", "file": "swiffy-slider.ESM.js" } \ No newline at end of file diff --git a/docs/assets/js/swiffy-slider.min.js b/docs/assets/js/swiffy-slider.min.js index fcb4beb..e4a94bc 100644 --- a/docs/assets/js/swiffy-slider.min.js +++ b/docs/assets/js/swiffy-slider.min.js @@ -1,2 +1,2 @@ -const swiffyslider=function(){"use strict";return{version:"1.1.0",init(e=document.body){for(const t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(const t of e.querySelectorAll(".slider-nav")){const s=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,s))}for(const t of e.querySelectorAll(".slider-indicators"))t.addEventListener("click",()=>this.slideToByIndicator()),this.onSlideEnd(e,()=>this.handleIndicators(e),60);if(e.classList.contains("slider-nav-autoplay")){const t=e.getAttribute("data-slider-nav-autoplay-interval")?e.getAttribute("data-slider-nav-autoplay-interval"):2500;this.autoPlay(e,t,e.classList.contains("slider-nav-autopause"))}e.classList.contains("slider-nav-animation")&&this.setVisibleSlides(e)},setVisibleSlides(e){const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?e.target.parentElement.classList.add("slide-visible"):e.target.parentElement.classList.remove("slide-visible")})},{root:e.querySelector(".slider-container"),threshold:.3});for(const s of e.querySelectorAll(".slider-container>*>*"))t.observe(s)},slide(e,t=!0){const s=e.querySelector(".slider-container"),i=e.classList.contains("slider-nav-page"),n=e.classList.contains("slider-nav-noloop"),o=e.classList.contains("slider-nav-nodelay"),l=s.children,r=parseInt(window.getComputedStyle(s).columnGap),a=l[0].offsetWidth+r;let c=t?s.scrollLeft+a:s.scrollLeft-a;if(i&&(c=t?s.scrollLeft+s.offsetWidth:s.scrollLeft-s.offsetWidth),s.scrollLeft+s.offsetWidth>s.scrollWidth-(r/2+1)&&t){if(n)return;c=0}s.scroll({left:c,behavior:o?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),s=e.parentElement.children.length,i=e.closest(".swiffy-slider"),n=i.querySelector(".slider-container").children.length/s*t;this.slideTo(i,n)},slideTo(e,t){const s=e.querySelector(".slider-container"),i=parseInt(window.getComputedStyle(s).columnGap),n=s.children[0].offsetWidth+i,o=e.classList.contains("slider-nav-nodelay");s.scroll({left:n*t,behavior:o?"auto":"smooth"})},onSlideEnd(e,t,s=125){let i;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(i),i=setTimeout(t,s)}),{capture:!1,passive:!0})},autoPlay(e,t,s){t=t<750?750:t;let i=setInterval(()=>this.slide(e),t);const n=()=>this.autoPlay(e,t,s);return s&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(i)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){n()}),{once:!0})),i},handleIndicators(e){const t=e.querySelector(".slider-container"),s=t.scrollWidth-t.offsetWidth,i=t.scrollLeft/s;for(const t of e.querySelectorAll(".slider-indicators")){const e=t.children,s=Math.round((e.length-1)*i);for(const t of e)t.removeAttribute("class");e[s].classList.add("active")}}}}();window.swiffyslider=swiffyslider,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{"use strict";swiffyslider.init()}); +const swiffyslider=function(){"use strict";return{version:"1.2.0",init(e=document.body){for(const t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(const t of e.querySelectorAll(".slider-nav")){const s=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,s),{passive:!0})}for(const t of e.querySelectorAll(".slider-indicators"))t.addEventListener("click",()=>this.slideToByIndicator()),this.onSlideEnd(e,()=>this.handleIndicators(e),60);if(e.classList.contains("slider-nav-autoplay")){const t=e.getAttribute("data-slider-nav-autoplay-interval")?e.getAttribute("data-slider-nav-autoplay-interval"):2500;this.autoPlay(e,t,e.classList.contains("slider-nav-autopause"))}if(e.classList.contains("slider-nav-animation")){const t=e.getAttribute("data-slider-nav-animation-threshold")?e.getAttribute("data-slider-nav-animation-threshold"):.3;this.setVisibleSlides(e,t)}},setVisibleSlides(e,t=.3){const s=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?e.target.parentElement.classList.add("slide-visible"):e.target.parentElement.classList.remove("slide-visible")})},{root:e.querySelector(".slider-container"),threshold:t});for(const t of e.querySelectorAll(".slider-container>*>*"))s.observe(t)},slide(e,t=!0){const s=e.querySelector(".slider-container"),i=e.classList.contains("slider-nav-page"),n=e.classList.contains("slider-nav-noloop"),o=e.classList.contains("slider-nav-nodelay"),r=s.children,l=parseInt(window.getComputedStyle(s).columnGap),a=r[0].offsetWidth+l;let d=t?s.scrollLeft+a:s.scrollLeft-a;if(i&&(d=t?s.scrollLeft+s.offsetWidth:s.scrollLeft-s.offsetWidth),s.scrollLeft+s.offsetWidth>s.scrollWidth-(l/2+1)&&t){if(n)return;d=0}s.scroll({left:d,behavior:o?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),s=e.parentElement.children.length,i=e.closest(".swiffy-slider"),n=i.querySelector(".slider-container").children.length/s*t;this.slideTo(i,n)},slideTo(e,t){const s=e.querySelector(".slider-container"),i=parseInt(window.getComputedStyle(s).columnGap),n=s.children[0].offsetWidth+i,o=e.classList.contains("slider-nav-nodelay");s.scroll({left:n*t,behavior:o?"auto":"smooth"})},onSlideEnd(e,t,s=125){let i;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(i),i=setTimeout(t,s)}),{capture:!1,passive:!0})},autoPlay(e,t,s){t=t<750?750:t;let i=setInterval(()=>this.slide(e),t);const n=()=>this.autoPlay(e,t,s);return s&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(i)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){n()}),{once:!0,passive:!0})),i},handleIndicators(e){const t=e.querySelector(".slider-container"),s=t.scrollWidth-t.offsetWidth,i=t.scrollLeft/s;for(const t of e.querySelectorAll(".slider-indicators")){const e=t.children,s=Math.round((e.length-1)*i);for(const t of e)t.removeAttribute("class");e[s].classList.add("active")}}}}();window.swiffyslider=swiffyslider,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{"use strict";swiffyslider.init()}); //# sourceMappingURL=swiffy-slider.min.js.map \ No newline at end of file diff --git a/docs/assets/js/swiffy-slider.min.js.map b/docs/assets/js/swiffy-slider.min.js.map index 63a464d..598ced7 100644 --- a/docs/assets/js/swiffy-slider.min.js.map +++ b/docs/assets/js/swiffy-slider.min.js.map @@ -20,6 +20,7 @@ "contains", "addEventListener", "slide", + "passive", "indicatorElement", "slideToByIndicator", "onSlideEnd", @@ -27,6 +28,7 @@ "timeout", "getAttribute", "autoPlay", + "threshold", "setVisibleSlides", "observer", "IntersectionObserver", @@ -39,7 +41,6 @@ "remove", "root", "querySelector", - "threshold", "observe", "container", "fullpage", @@ -76,7 +77,6 @@ "clearTimeout", "setTimeout", "capture", - "passive", "autopause", "autoplayTimer", "setInterval", @@ -95,6 +95,6 @@ "hasAttribute", "init" ], - "mappings": "AAAA,MAAMA,aAAe,WACjB,aACA,MAAO,CACHC,QAAS,QACTC,KAAKC,EAAcC,SAASC,MACxB,IAAK,MAAMC,KAAiBH,EAAYI,iBAAiB,kBACrDC,KAAKC,WAAWH,IAIxBJ,WAAWI,GACP,IAAK,MAAMI,KAAcJ,EAAcC,iBAAiB,eAAgB,CACpE,MAAMI,EAAOD,EAAWE,UAAUC,SAAS,mBAC3CH,EAAWI,iBAAiB,QAAS,IAAMN,KAAKO,MAAMT,EAAeK,IAEzE,IAAK,MAAMK,KAAoBV,EAAcC,iBAAiB,sBAC1DS,EAAiBF,iBAAiB,QAAS,IAAMN,KAAKS,sBACtDT,KAAKU,WAAWZ,EAAe,IAAME,KAAKW,iBAAiBb,GAAgB,IAE/E,GAAIA,EAAcM,UAAUC,SAAS,uBAAwB,CACzD,MAAMO,EAAUd,EAAce,aAAa,qCAAuCf,EAAce,aAAa,qCAAuC,KACpJb,KAAKc,SAAShB,EAAec,EAASd,EAAcM,UAAUC,SAAS,yBAEvEP,EAAcM,UAAUC,SAAS,yBACjCL,KAAKe,iBAAiBjB,IAG9BJ,iBAAiBI,GACb,MAAMkB,EAAW,IAA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AAS,EAAOxD,SAAS,KAGlCd,SAASI,EAAee,EAASoD,GAC7BpD,EAAUA,EAAU,IAAM,IAAMA,EAChC,IAAIqD,EAAgBC,YAAY,IAAMnE,KAAKO,MAAMT,GAAgBe,GACjE,MAAMuD,EAAa,IAAMpE,KAAKe,SAASjB,EAAee,EAASoD,GAW/D,OAVIA,IACA,CAAC,YAAa,cAAc5C,SAAQ,SAAS4B,GACzCnD,EAAcQ,iBAAiB2C,GAAO,WAClCZ,OAAOyB,aAAaI,KACrB,CAAEG,MAAM,EAAM7D,SAAS,OAE9BV,EAAcQ,iBAAiB,YAAY,WACvC8D,MACD,CAAEC,MAAM,EAAM7D,SAAS,KAEvB0D,GAGXxE,iBAAiBI,GACb,MAAMgC,EAAYhC,EAAc8B,cAAc,qBACxC0C,EAAmBxC,EAAUc,YAAcd,EAAUW,YACrD8B,EAAgBzC,EAAUa,WAAa2B,EAC7C,IAAK,MAAME,KAA6B1E,EAAcC,iBAAiB,sBAAuB,CAC1F,MAAM0E,EAAmBD,EAA0BtC,SAC7CwC,EAAkBC,KAAKC,OAAOH,EAAiBlB,OAAS,GAAKgB,GACnE,IAAK,MAAMM,KAAWJ,EAClBI,EAAQC,gBAAgB,SAC5BL,EAAiBC,GAAiBtE,UAAUqB,IAAI,aA3H3C,GAiIrBY,OAAO7C,aAAeA,aACjBI,SAASmF,cAAcC,aAAa,gBACrC3C,OAAO/B,iBAAiB,OAAQ,KAC5B,aACAd,aAAayF", "file": "swiffy-slider.js" } \ No newline at end of file diff --git a/docs/configuration/index.html b/docs/configuration/index.html index ca281be..761f9d4 100644 --- a/docs/configuration/index.html +++ b/docs/configuration/index.html @@ -10,6 +10,7 @@ + @@ -90,7 +91,7 @@ if (key.startsWith("--") && value.length > 0) { cssVariables += `${key}:${value};`; } - if (value === 'slider-nav-autoplay' || value === 'slider-nav-animation') { + if (value === 'slider-nav-autoplay' || value === 'slider-nav-animation' || value === 'slider-nav-mousedrag') { reloadSlider = true; } } @@ -132,6 +133,7 @@ sliderPreview.innerHTML = ''; sliderPreview.appendChild(sliderInstance.cloneNode(true)); swiffyslider.init(); + swiffyslider.extensions.init(); } @@ -345,7 +347,7 @@ - Download + Download @@ -825,6 +827,16 @@
Configuration options
--swiffy-slider-nav-dark variable +
+ Dragging slides with mouse +

WARNINGRequires swiffy-slider-extensions.min.js to be included.

+ https://cdn.jsdelivr.net/npm/swiffy-slider@1.2.0/dist/js/swiffy-slider-extensions.min.js +
+ + +
+
+ - - + + @@ -635,7 +639,7 @@ Load as ES module on demand, here using load - could be when slider scrolls into ```html