diff --git a/.vscode/settings.json b/.vscode/settings.json index b404be5..84ce16d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -61,5 +61,6 @@ "cmd": "powershell -command \"& {&'Start-Sleep' -s 0.3}\"; \"& {&'copy' dist/js/*.min.* docs/assets/js/}\" " }, ] - } + }, + "liveServer.settings.port": 5501 } \ No newline at end of file diff --git a/Changelog.md b/Changelog.md index bb83e4a..04ce1a9 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,9 +1,22 @@ -## [v1.3.0] - 18-01-2021 +# [v1.4.0] - 02-02-2022 + +## Bugfixes + +- Bone ## Changed + +- CSS changed for nav arrows for better LTR support - specifically added left rules for .slider-nav +- Changed loop of slides to also include go to end when on first slide [[#16](https://github.com/dynamicweb/swiffy-slider/issues/16)] +- Update doc and configuration for noloop that it covers the new behavior above + +# [v1.3.1] - 18-01-2022 + +## Changed + - renamed ´slide-visible-first´ to ´.slider-item-first-visible´ that was added in 1.3.0 due to naming error. -## [v1.3.0] - 18-01-2021 +# [v1.3.0] - 18-01-2022 ## Bugfixes @@ -19,13 +32,14 @@ - Added support for .slider-nav-autohide to support hiding previous and next navigation arrows when first or last slide is visible [#8](https://github.com/dynamicweb/swiffy-slider/issues/8) -## [v1.2.0] - 03-12-2021 +# [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 @@ -37,7 +51,7 @@ - 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 +# [v1.1.0] - 16-11-2021 ## Bugfixes @@ -54,11 +68,11 @@ - BREAKING slider-item-shadow has been removed since it uses ::after which disables touch sliding on mobile devices -## [v1.0.2] - 08-11-2021 +# [v1.0.2] - 08-11-2021 - Fix z-index issue with nav and indicators (#1) -## [v1.0.1] - 08-11-2021 +# [v1.0.1] - 08-11-2021 Welcome to the first release of Swiffy Slider. diff --git a/dist/css/swiffy-slider.css b/dist/css/swiffy-slider.css index 98a1b45..14ba0bd 100644 --- a/dist/css/swiffy-slider.css +++ b/dist/css/swiffy-slider.css @@ -217,6 +217,7 @@ .slider-nav { position: absolute; top: 0; + left: 0; bottom: 0; border: 0; background-color: transparent; @@ -341,6 +342,7 @@ .slider-nav.slider-nav-next { right: 0; + left: unset; } .slider-nav-visible .slider-nav { @@ -476,16 +478,16 @@ scroll-snap-align: var(--swiffy-slider-snap-align); } .slider-nav-outside-expand .slider-nav { - margin-left: -5rem; + margin-left: -4rem; } .slider-nav-outside-expand .slider-nav.slider-nav-next { - margin-right: -5rem; + margin-right: -4rem; } .slider-nav-sm.slider-nav-outside-expand .slider-nav { - margin-left: -4rem; + margin-left: -3.5rem; } .slider-nav-sm.slider-nav-outside-expand .slider-nav.slider-nav-next { - margin-right: -4rem; + margin-right: -3.5rem; } .slider-indicators-sm.slider-indicators { display: none; diff --git a/dist/css/swiffy-slider.min.css b/dist/css/swiffy-slider.min.css index 197be80..15d62fb 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}.swiffy-slider.slider-nav-autohide.slider-item-first-visible .slider-nav:not(.slider-nav-next){visibility:hidden}.swiffy-slider.slider-nav-autohide.slider-item-last-visible .slider-nav.slider-nav-next{visibility:hidden}.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:62rem){.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:62rem){.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,.slider-nav::before{width:2rem!important;height:2rem!important;padding:.3rem!important}.slider-nav-outside .slider-container,.slider-nav-outside-expand .slider-container{margin:0 2rem}.slider-nav-outside-expand .slider-container{margin:0 var(--swiffy-slider-nav-outside-size)}.slider-nav-outside-expand .slider-nav{padding:0}.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:48rem){.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.slider-nav-touch .slider-nav{visibility:visible}.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;left: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}.swiffy-slider.slider-nav-autohide.slider-item-first-visible .slider-nav:not(.slider-nav-next){visibility:hidden}.swiffy-slider.slider-nav-autohide.slider-item-last-visible .slider-nav.slider-nav-next{visibility:hidden}.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;left:unset}.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:62rem){.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:-4rem}.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-4rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav{margin-left:-3.5rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-3.5rem}.slider-indicators-sm.slider-indicators{display:none}}@media (max-width:62rem){.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,.slider-nav::before{width:2rem!important;height:2rem!important;padding:.3rem!important}.slider-nav-outside .slider-container,.slider-nav-outside-expand .slider-container{margin:0 2rem}.slider-nav-outside-expand .slider-container{margin:0 var(--swiffy-slider-nav-outside-size)}.slider-nav-outside-expand .slider-nav{padding:0}.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:48rem){.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.slider-nav-touch .slider-nav{visibility:visible}.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 30444e8..26411dd 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,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,MACT,SAAU,SACV,KAAM,2CACN,IAAK,EAEL,MAAO,IACP,OAAQ,IACR,kBAAmB,gCAEvB,uCACI,YAAa,MAEjB,uDACI,aAAc,MAElB,qDACI,YAAa,QAEjB,qEACI,aAAc,QAElB,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,OAGvB,mBADA,oBAEI,MAAO,eACP,OAAQ,eACR,QAAS,gBAGb,sCADA,6CAEI,OAAQ,EAAE,KAEd,6CACI,OAAQ,EAAE,sCAEd,uCACI,QAAS,EAKb,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,4CACI,WAAY,QAGhB,2EADA,kFAEI,OAAQ,EAAE,EAEd,0BACI,2BAA4B" } \ No newline at end of file diff --git a/dist/js/swiffy-slider-extensions.js b/dist/js/swiffy-slider-extensions.js index 8aad653..04f1925 100644 --- a/dist/js/swiffy-slider-extensions.js +++ b/dist/js/swiffy-slider-extensions.js @@ -1,6 +1,6 @@ const swiffysliderextensions = function() { return { - version: "1.3.1", + version: "1.4.0", draggingtimer: null, init(rootElement = document.body) { for (const sliderElement of rootElement.querySelectorAll(".swiffy-slider")) { diff --git a/dist/js/swiffy-slider-extensions.min.js b/dist/js/swiffy-slider-extensions.min.js index 8b1afa2..1826e94 100644 --- a/dist/js/swiffy-slider-extensions.min.js +++ b/dist/js/swiffy-slider-extensions.min.js @@ -1,2 +1,2 @@ -const swiffysliderextensions={version:"1.3.1",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 i=s.querySelector(".slider-container");i.classList.contains("dragging")&&clearTimeout(this.draggingtimer),i.style.cursor="grabbing",i.classList.add("dragging");const t=i.scrollLeft,n=e.clientX,o=i.children[0].offsetWidth+parseInt(window.getComputedStyle(i).columnGap);let r=0;const l=e=>{const s=e.clientX-n;i.scrollLeft=t-1.8*s,r=s<0?i.scrollLeft+(o+1.8*s):i.scrollLeft-(o-1.8*s)};i.addEventListener("mousemove",l,{passive:!0}),document.addEventListener("mouseup",()=>{i.removeEventListener("mousemove",l),i.style.cursor=null,0!=r&&i.scroll({left:r,behavior:"smooth"}),this.draggingtimer=setTimeout(()=>{i.classList.remove("dragging")},550)},{once:!0,passive:!0})}};window.swiffyslider.extensions=swiffysliderextensions,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{swiffyslider.extensions.init()}); +const swiffysliderextensions={version:"1.4.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 i=s.querySelector(".slider-container");i.classList.contains("dragging")&&clearTimeout(this.draggingtimer),i.style.cursor="grabbing",i.classList.add("dragging");const t=i.scrollLeft,n=e.clientX,o=i.children[0].offsetWidth+parseInt(window.getComputedStyle(i).columnGap);let r=0;const l=e=>{const s=e.clientX-n;i.scrollLeft=t-1.8*s,r=s<0?i.scrollLeft+(o+1.8*s):i.scrollLeft-(o-1.8*s)};i.addEventListener("mousemove",l,{passive:!0}),document.addEventListener("mouseup",()=>{i.removeEventListener("mousemove",l),i.style.cursor=null,0!=r&&i.scroll({left:r,behavior:"smooth"}),this.draggingtimer=setTimeout(()=>{i.classList.remove("dragging")},550)},{once:!0,passive:!0})}};window.swiffyslider.extensions=swiffysliderextensions,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{swiffyslider.extensions.init()}); //# sourceMappingURL=swiffy-slider-extensions.min.js.map \ No newline at end of file diff --git a/dist/js/swiffy-slider.esm.js b/dist/js/swiffy-slider.esm.js index 3614ca3..741efdd 100644 --- a/dist/js/swiffy-slider.esm.js +++ b/dist/js/swiffy-slider.esm.js @@ -1,6 +1,6 @@ export const swiffyslider = function() { return { - version: "1.3.1", + version: "1.4.0", init(rootElement = document.body) { for (let sliderElement of rootElement.querySelectorAll(".swiffy-slider")) { this.initSlider(sliderElement); @@ -57,8 +57,10 @@ export const swiffyslider = function() { container.scrollLeft + container.offsetWidth : container.scrollLeft - container.offsetWidth; } - if ((container.scrollLeft + container.offsetWidth) > (container.scrollWidth - ((gapWidth / 2) + 1)) && next) { - if (noloop) return; + if (container.scrollLeft < 1 && !next && !noloop) { + scrollLeftPosition = (container.scrollWidth - container.offsetWidth); + } + if (container.scrollLeft >= (container.scrollWidth - container.offsetWidth) && next && !noloop) { scrollLeftPosition = 0; } container.scroll({ @@ -119,7 +121,7 @@ export const swiffyslider = function() { const percentSlide = (container.scrollLeft / slidingAreaWidth); for (let scrollIndicatorContainers of sliderElement.querySelectorAll(".slider-indicators")) { let scrollIndicators = scrollIndicatorContainers.children; - let activeIndicator = Math.round((scrollIndicators.length - 1) * percentSlide); + let activeIndicator = Math.abs(Math.round((scrollIndicators.length - 1) * percentSlide)); for (let element of scrollIndicators) element.classList.remove("active"); scrollIndicators[activeIndicator].classList.add("active"); diff --git a/dist/js/swiffy-slider.esm.min.js b/dist/js/swiffy-slider.esm.min.js index 57aac2c..0da9b1a 100644 --- a/dist/js/swiffy-slider.esm.min.js +++ b/dist/js/swiffy-slider.esm.min.js @@ -1,2 +1,2 @@ -export const swiffyslider={version:"1.3.1",init(e=document.body){for(let t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(let t of e.querySelectorAll(".slider-nav")){let i=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,i),{passive:!0})}for(let 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(["slider-nav-autohide","slider-nav-animation"].some(t=>e.classList.contains(t))){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){let i=new IntersectionObserver(t=>{t.forEach(e=>{e.isIntersecting?e.target.classList.add("slide-visible"):e.target.classList.remove("slide-visible")}),e.querySelector(".slider-container>*:first-child").classList.contains("slide-visible")?e.classList.add("slider-item-first-visible"):e.classList.remove("slider-item-first-visible"),e.querySelector(".slider-container>*:last-child").classList.contains("slide-visible")?e.classList.add("slider-item-last-visible"):e.classList.remove("slider-item-last-visible")},{root:e.querySelector(".slider-container"),threshold:t});for(let t of e.querySelectorAll(".slider-container>*"))i.observe(t)},slide(e,t=!0){const i=e.querySelector(".slider-container"),s=e.classList.contains("slider-nav-page"),l=e.classList.contains("slider-nav-noloop"),r=e.classList.contains("slider-nav-nodelay"),o=i.children,n=parseInt(window.getComputedStyle(i).columnGap),a=o[0].offsetWidth+n;let d=t?i.scrollLeft+a:i.scrollLeft-a;if(s&&(d=t?i.scrollLeft+i.offsetWidth:i.scrollLeft-i.offsetWidth),i.scrollLeft+i.offsetWidth>i.scrollWidth-(n/2+1)&&t){if(l)return;d=0}i.scroll({left:d,behavior:r?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),i=e.parentElement.children.length,s=e.closest(".swiffy-slider"),l=s.querySelector(".slider-container").children.length/i*t;this.slideTo(s,l)},slideTo(e,t){const i=e.querySelector(".slider-container"),s=parseInt(window.getComputedStyle(i).columnGap),l=i.children[0].offsetWidth+s,r=e.classList.contains("slider-nav-nodelay");i.scroll({left:l*t,behavior:r?"auto":"smooth"})},onSlideEnd(e,t,i=125){let s;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(s),s=setTimeout(t,i)}),{capture:!1,passive:!0})},autoPlay(e,t,i){t=t<750?750:t;let s=setInterval(()=>this.slide(e),t);const l=()=>this.autoPlay(e,t,i);return i&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(s)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){l()}),{once:!0,passive:!0})),s},handleIndicators(e){const t=e.querySelector(".slider-container"),i=t.scrollWidth-t.offsetWidth,s=t.scrollLeft/i;for(let t of e.querySelectorAll(".slider-indicators")){let e=t.children,i=Math.round((e.length-1)*s);for(let t of e)t.classList.remove("active");e[i].classList.add("active")}}}; -//# sourceMappingURL=swiffy-slider.ESM.min.js.map \ No newline at end of file +export const swiffyslider={version:"1.4.0",init(e=document.body){for(let t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(let t of e.querySelectorAll(".slider-nav")){let s=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,s),{passive:!0})}for(let 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(["slider-nav-autohide","slider-nav-animation"].some(t=>e.classList.contains(t))){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){let s=new IntersectionObserver(t=>{t.forEach(e=>{e.isIntersecting?e.target.classList.add("slide-visible"):e.target.classList.remove("slide-visible")}),e.querySelector(".slider-container>*:first-child").classList.contains("slide-visible")?e.classList.add("slider-item-first-visible"):e.classList.remove("slider-item-first-visible"),e.querySelector(".slider-container>*:last-child").classList.contains("slide-visible")?e.classList.add("slider-item-last-visible"):e.classList.remove("slider-item-last-visible")},{root:e.querySelector(".slider-container"),threshold:t});for(let 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"),l=e.classList.contains("slider-nav-noloop"),o=e.classList.contains("slider-nav-nodelay"),r=s.children,n=parseInt(window.getComputedStyle(s).columnGap),a=r[0].offsetWidth+n;let d=t?s.scrollLeft+a:s.scrollLeft-a;i&&(d=t?s.scrollLeft+s.offsetWidth:s.scrollLeft-s.offsetWidth),s.scrollLeft<1&&!t&&!l&&(d=s.scrollWidth-s.offsetWidth),s.scrollLeft>=s.scrollWidth-s.offsetWidth&&t&&!l&&(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"),l=i.querySelector(".slider-container").children.length/s*t;this.slideTo(i,l)},slideTo(e,t){const s=e.querySelector(".slider-container"),i=parseInt(window.getComputedStyle(s).columnGap),l=s.children[0].offsetWidth+i,o=e.classList.contains("slider-nav-nodelay");s.scroll({left:l*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 l=()=>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(){l()}),{once:!0,passive:!0})),i},handleIndicators(e){const t=e.querySelector(".slider-container"),s=t.scrollWidth-t.offsetWidth,i=t.scrollLeft/s;for(let t of e.querySelectorAll(".slider-indicators")){let e=t.children,s=Math.abs(Math.round((e.length-1)*i));for(let t of e)t.classList.remove("active");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 d7d3dad..c3dacdd 100644 --- a/dist/js/swiffy-slider.esm.min.js.map +++ b/dist/js/swiffy-slider.esm.min.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": [ - "swiffy-slider.ESM.js" + "swiffy-slider.esm.js" ], "names": [ "swiffyslider", @@ -90,9 +90,10 @@ "scrollIndicators", "activeIndicator", "Math", + "abs", "round", "element" ], - "mappings": "OAAO,MAAMA,aACF,CACHC,QAAS,QACTC,KAAKC,EAAcC,SAASC,MACxB,IAAK,IAAIC,KAAiBH,EAAYI,iBAAiB,kBACnDC,KAAKC,WAAWH,IAIxBJ,WAAWI,GACP,IAAK,IAAII,KAAcJ,EAAcC,iBAAiB,eAAgB,CAClE,IAAII,EAAOD,EAAWE,UAAUC,SAAS,mBACzCH,EAAWI,iBAAiB,QAAS,IAAMN,KAAKO,MAAMT,EAAeK,GAAO,CAAEK,SAAS,IAE3F,IAAK,IAAIC,KAAoBX,EAAcC,iBAAiB,sBACxDU,EAAiBH,iBAAiB,QAAS,IAAMN,KAAKU,sBACtDV,KAAKW,WAAWb,EAAe,IAAME,KAAKY,iBAAiBd,GAAgB,IAE/E,GAAIA,EAAcM,UAAUC,SAAS,uBAAwB,CACzD,MAAMQ,EAAUf,EAAcgB,aAAa,qCAAuChB,EAAcgB,aAAa,qCAAuC,KACpJd,KAAKe,SAASjB,EAA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4B,EAC7C,IAAK,IAAIE,KAA6B5E,EAAcC,iBAAiB,sBAAuB,CACxF,IAAI4E,EAAmBD,EAA0BvC,SAC7CyC,EAAkBC,KAAKC,IAAID,KAAKE,OAAOJ,EAAiBlB,OAAS,GAAKgB,IAC1E,IAAK,IAAIO,KAAWL,EAChBK,EAAQ5E,UAAUuB,OAAO,UAC7BgD,EAAiBC,GAAiBxE,UAAUsB,IAAI", + "file": "swiffy-slider.esm.js" } \ No newline at end of file diff --git a/dist/js/swiffy-slider.js b/dist/js/swiffy-slider.js index 5b99d9c..372fff5 100644 --- a/dist/js/swiffy-slider.js +++ b/dist/js/swiffy-slider.js @@ -1,6 +1,6 @@ const swiffyslider = function() { return { - version: "1.3.1", + version: "1.4.0", init(rootElement = document.body) { for (let sliderElement of rootElement.querySelectorAll(".swiffy-slider")) { this.initSlider(sliderElement); @@ -57,8 +57,10 @@ const swiffyslider = function() { container.scrollLeft + container.offsetWidth : container.scrollLeft - container.offsetWidth; } - if ((container.scrollLeft + container.offsetWidth) > (container.scrollWidth - ((gapWidth / 2) + 1)) && next) { - if (noloop) return; + if (container.scrollLeft < 1 && !next && !noloop) { + scrollLeftPosition = (container.scrollWidth - container.offsetWidth); + } + if (container.scrollLeft >= (container.scrollWidth - container.offsetWidth) && next && !noloop) { scrollLeftPosition = 0; } container.scroll({ @@ -119,7 +121,7 @@ const swiffyslider = function() { const percentSlide = (container.scrollLeft / slidingAreaWidth); for (let scrollIndicatorContainers of sliderElement.querySelectorAll(".slider-indicators")) { let scrollIndicators = scrollIndicatorContainers.children; - let activeIndicator = Math.round((scrollIndicators.length - 1) * percentSlide); + let activeIndicator = Math.abs(Math.round((scrollIndicators.length - 1) * percentSlide)); for (let element of scrollIndicators) element.classList.remove("active"); scrollIndicators[activeIndicator].classList.add("active"); diff --git a/dist/js/swiffy-slider.min.js b/dist/js/swiffy-slider.min.js index 7b70286..15b172e 100644 --- a/dist/js/swiffy-slider.min.js +++ b/dist/js/swiffy-slider.min.js @@ -1,2 +1,2 @@ -const swiffyslider={version:"1.3.1",init(e=document.body){for(let t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(let t of e.querySelectorAll(".slider-nav")){let i=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,i),{passive:!0})}for(let 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(["slider-nav-autohide","slider-nav-animation"].some(t=>e.classList.contains(t))){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){let i=new IntersectionObserver(t=>{t.forEach(e=>{e.isIntersecting?e.target.classList.add("slide-visible"):e.target.classList.remove("slide-visible")}),e.querySelector(".slider-container>*:first-child").classList.contains("slide-visible")?e.classList.add("slider-item-first-visible"):e.classList.remove("slider-item-first-visible"),e.querySelector(".slider-container>*:last-child").classList.contains("slide-visible")?e.classList.add("slider-item-last-visible"):e.classList.remove("slider-item-last-visible")},{root:e.querySelector(".slider-container"),threshold:t});for(let t of e.querySelectorAll(".slider-container>*"))i.observe(t)},slide(e,t=!0){const i=e.querySelector(".slider-container"),s=e.classList.contains("slider-nav-page"),l=e.classList.contains("slider-nav-noloop"),r=e.classList.contains("slider-nav-nodelay"),o=i.children,n=parseInt(window.getComputedStyle(i).columnGap),a=o[0].offsetWidth+n;let d=t?i.scrollLeft+a:i.scrollLeft-a;if(s&&(d=t?i.scrollLeft+i.offsetWidth:i.scrollLeft-i.offsetWidth),i.scrollLeft+i.offsetWidth>i.scrollWidth-(n/2+1)&&t){if(l)return;d=0}i.scroll({left:d,behavior:r?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),i=e.parentElement.children.length,s=e.closest(".swiffy-slider"),l=s.querySelector(".slider-container").children.length/i*t;this.slideTo(s,l)},slideTo(e,t){const i=e.querySelector(".slider-container"),s=parseInt(window.getComputedStyle(i).columnGap),l=i.children[0].offsetWidth+s,r=e.classList.contains("slider-nav-nodelay");i.scroll({left:l*t,behavior:r?"auto":"smooth"})},onSlideEnd(e,t,i=125){let s;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(s),s=setTimeout(t,i)}),{capture:!1,passive:!0})},autoPlay(e,t,i){t=t<750?750:t;let s=setInterval(()=>this.slide(e),t);const l=()=>this.autoPlay(e,t,i);return i&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(s)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){l()}),{once:!0,passive:!0})),s},handleIndicators(e){const t=e.querySelector(".slider-container"),i=t.scrollWidth-t.offsetWidth,s=t.scrollLeft/i;for(let t of e.querySelectorAll(".slider-indicators")){let e=t.children,i=Math.round((e.length-1)*s);for(let t of e)t.classList.remove("active");e[i].classList.add("active")}}};window.swiffyslider=swiffyslider,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{swiffyslider.init()}); +const swiffyslider={version:"1.4.0",init(e=document.body){for(let t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(let t of e.querySelectorAll(".slider-nav")){let i=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,i),{passive:!0})}for(let 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(["slider-nav-autohide","slider-nav-animation"].some(t=>e.classList.contains(t))){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){let i=new IntersectionObserver(t=>{t.forEach(e=>{e.isIntersecting?e.target.classList.add("slide-visible"):e.target.classList.remove("slide-visible")}),e.querySelector(".slider-container>*:first-child").classList.contains("slide-visible")?e.classList.add("slider-item-first-visible"):e.classList.remove("slider-item-first-visible"),e.querySelector(".slider-container>*:last-child").classList.contains("slide-visible")?e.classList.add("slider-item-last-visible"):e.classList.remove("slider-item-last-visible")},{root:e.querySelector(".slider-container"),threshold:t});for(let t of e.querySelectorAll(".slider-container>*"))i.observe(t)},slide(e,t=!0){const i=e.querySelector(".slider-container"),s=e.classList.contains("slider-nav-page"),l=e.classList.contains("slider-nav-noloop"),r=e.classList.contains("slider-nav-nodelay"),o=i.children,n=parseInt(window.getComputedStyle(i).columnGap),a=o[0].offsetWidth+n;let d=t?i.scrollLeft+a:i.scrollLeft-a;s&&(d=t?i.scrollLeft+i.offsetWidth:i.scrollLeft-i.offsetWidth),i.scrollLeft<1&&!t&&!l&&(d=i.scrollWidth-i.offsetWidth),i.scrollLeft>=i.scrollWidth-i.offsetWidth&&t&&!l&&(d=0),i.scroll({left:d,behavior:r?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),i=e.parentElement.children.length,s=e.closest(".swiffy-slider"),l=s.querySelector(".slider-container").children.length/i*t;this.slideTo(s,l)},slideTo(e,t){const i=e.querySelector(".slider-container"),s=parseInt(window.getComputedStyle(i).columnGap),l=i.children[0].offsetWidth+s,r=e.classList.contains("slider-nav-nodelay");i.scroll({left:l*t,behavior:r?"auto":"smooth"})},onSlideEnd(e,t,i=125){let s;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(s),s=setTimeout(t,i)}),{capture:!1,passive:!0})},autoPlay(e,t,i){t=t<750?750:t;let s=setInterval(()=>this.slide(e),t);const l=()=>this.autoPlay(e,t,i);return i&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(s)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){l()}),{once:!0,passive:!0})),s},handleIndicators(e){const t=e.querySelector(".slider-container"),i=t.scrollWidth-t.offsetWidth,s=t.scrollLeft/i;for(let t of e.querySelectorAll(".slider-indicators")){let e=t.children,i=Math.abs(Math.round((e.length-1)*s));for(let t of e)t.classList.remove("active");e[i].classList.add("active")}}};window.swiffyslider=swiffyslider,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{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 d7d8910..a3e43ee 100644 --- a/dist/js/swiffy-slider.min.js.map +++ b/dist/js/swiffy-slider.min.js.map @@ -90,12 +90,13 @@ "scrollIndicators", "activeIndicator", "Math", + "abs", "round", "element", "currentScript", "hasAttribute", "init" ], - "mappings": "AAAA,MAAMA,aACK,CACHC,QAAS,QACTC,KAAKC,EAAcC,SAASC,MACxB,IAAK,IAAIC,KAAiBH,EAAYI,iBAAiB,kBACnDC,KAAKC,WAAWH,IAIxBJ,WAAWI,GACP,IAAK,IAAII,KAAcJ,EAAcC,iBAAiB,eAAgB,CAClE,IAAII,EAAOD,EAAWE,UAAUC,SAAS,mBACzCH,EAAWI,iBAAiB,QAAS,IAAMN,KAAKO,MAAMT,EAAeK,GAAO,CAAEK,SAAS,IAE3F,IAAK,IAAIC,KAAoBX,EAAcC,iBAAiB,sBACxDU,EAAiBH,iBAAiB,QAAS,IAAMN,KAAKU,sBACtDV,KAAKW,WAAWb,EAAe,IAAME,KAAKY,iBAAiBd,GAAgB,IAE/E,GAAIA,EAAcM,UAAUC,SAAS,uBAAwB,CACzD,MAAMQ,EAAUf,EAAcgB,aAAa,qCAAuChB,EAAcgB,aAAa,qCAAuC,KACpJd,KAAKe,SAASjB,EA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c8B,cAAc,qBACxC4C,EAAmBzC,EAAUc,YAAcd,EAAUW,YACrD+B,EAAgB1C,EAAUa,WAAa4B,EAC7C,IAAK,IAAIE,KAA6B5E,EAAcC,iBAAiB,sBAAuB,CACxF,IAAI4E,EAAmBD,EAA0BvC,SAC7CyC,EAAkBC,KAAKC,IAAID,KAAKE,OAAOJ,EAAiBlB,OAAS,GAAKgB,IAC1E,IAAK,IAAIO,KAAWL,EAChBK,EAAQ5E,UAAUuB,OAAO,UAC7BgD,EAAiBC,GAAiBxE,UAAUsB,IAAI,aAMhEY,OAAO9C,aAAeA,aACjBI,SAASqF,cAAcC,aAAa,gBACrC5C,OAAOhC,iBAAiB,OAAQ,KAC5Bd,aAAa2F", "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 197be80..15d62fb 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}.swiffy-slider.slider-nav-autohide.slider-item-first-visible .slider-nav:not(.slider-nav-next){visibility:hidden}.swiffy-slider.slider-nav-autohide.slider-item-last-visible .slider-nav.slider-nav-next{visibility:hidden}.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:62rem){.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:62rem){.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,.slider-nav::before{width:2rem!important;height:2rem!important;padding:.3rem!important}.slider-nav-outside .slider-container,.slider-nav-outside-expand .slider-container{margin:0 2rem}.slider-nav-outside-expand .slider-container{margin:0 var(--swiffy-slider-nav-outside-size)}.slider-nav-outside-expand .slider-nav{padding:0}.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:48rem){.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.slider-nav-touch .slider-nav{visibility:visible}.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;left: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}.swiffy-slider.slider-nav-autohide.slider-item-first-visible .slider-nav:not(.slider-nav-next){visibility:hidden}.swiffy-slider.slider-nav-autohide.slider-item-last-visible .slider-nav.slider-nav-next{visibility:hidden}.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;left:unset}.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:62rem){.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:-4rem}.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-4rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav{margin-left:-3.5rem}.slider-nav-sm.slider-nav-outside-expand .slider-nav.slider-nav-next{margin-right:-3.5rem}.slider-indicators-sm.slider-indicators{display:none}}@media (max-width:62rem){.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,.slider-nav::before{width:2rem!important;height:2rem!important;padding:.3rem!important}.slider-nav-outside .slider-container,.slider-nav-outside-expand .slider-container{margin:0 2rem}.slider-nav-outside-expand .slider-container{margin:0 var(--swiffy-slider-nav-outside-size)}.slider-nav-outside-expand .slider-nav{padding:0}.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:48rem){.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.slider-nav-touch .slider-nav{visibility:visible}.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 30444e8..26411dd 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,G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B,qDACI,YAAa,QAEjB,qEACI,aAAc,QAElB,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,OAGvB,mBADA,oBAEI,MAAO,eACP,OAAQ,eACR,QAAS,gBAGb,sCADA,6CAEI,OAAQ,EAAE,KAEd,6CACI,OAAQ,EAAE,sCAEd,uCACI,QAAS,EAKb,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,4CACI,WAAY,QAGhB,2EADA,kFAEI,OAAQ,EAAE,EAEd,0BACI,2BAA4B" } \ No newline at end of file diff --git a/docs/assets/img/brandlogos/grunt-1.svg b/docs/assets/img/brandlogos/grunt-1.svg index 1f5ce93..1b1b1cf 100644 --- a/docs/assets/img/brandlogos/grunt-1.svg +++ b/docs/assets/img/brandlogos/grunt-1.svg @@ -1 +1 @@ - \ No newline at end of file + \ 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 index 8b1afa2..1826e94 100644 --- a/docs/assets/js/swiffy-slider-extensions.min.js +++ b/docs/assets/js/swiffy-slider-extensions.min.js @@ -1,2 +1,2 @@ -const swiffysliderextensions={version:"1.3.1",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 i=s.querySelector(".slider-container");i.classList.contains("dragging")&&clearTimeout(this.draggingtimer),i.style.cursor="grabbing",i.classList.add("dragging");const t=i.scrollLeft,n=e.clientX,o=i.children[0].offsetWidth+parseInt(window.getComputedStyle(i).columnGap);let r=0;const l=e=>{const s=e.clientX-n;i.scrollLeft=t-1.8*s,r=s<0?i.scrollLeft+(o+1.8*s):i.scrollLeft-(o-1.8*s)};i.addEventListener("mousemove",l,{passive:!0}),document.addEventListener("mouseup",()=>{i.removeEventListener("mousemove",l),i.style.cursor=null,0!=r&&i.scroll({left:r,behavior:"smooth"}),this.draggingtimer=setTimeout(()=>{i.classList.remove("dragging")},550)},{once:!0,passive:!0})}};window.swiffyslider.extensions=swiffysliderextensions,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{swiffyslider.extensions.init()}); +const swiffysliderextensions={version:"1.4.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 i=s.querySelector(".slider-container");i.classList.contains("dragging")&&clearTimeout(this.draggingtimer),i.style.cursor="grabbing",i.classList.add("dragging");const t=i.scrollLeft,n=e.clientX,o=i.children[0].offsetWidth+parseInt(window.getComputedStyle(i).columnGap);let r=0;const l=e=>{const s=e.clientX-n;i.scrollLeft=t-1.8*s,r=s<0?i.scrollLeft+(o+1.8*s):i.scrollLeft-(o-1.8*s)};i.addEventListener("mousemove",l,{passive:!0}),document.addEventListener("mouseup",()=>{i.removeEventListener("mousemove",l),i.style.cursor=null,0!=r&&i.scroll({left:r,behavior:"smooth"}),this.draggingtimer=setTimeout(()=>{i.classList.remove("dragging")},550)},{once:!0,passive:!0})}};window.swiffyslider.extensions=swiffysliderextensions,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{swiffyslider.extensions.init()}); //# sourceMappingURL=swiffy-slider-extensions.min.js.map \ 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 57aac2c..0da9b1a 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={version:"1.3.1",init(e=document.body){for(let t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(let t of e.querySelectorAll(".slider-nav")){let i=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,i),{passive:!0})}for(let 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(["slider-nav-autohide","slider-nav-animation"].some(t=>e.classList.contains(t))){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){let i=new IntersectionObserver(t=>{t.forEach(e=>{e.isIntersecting?e.target.classList.add("slide-visible"):e.target.classList.remove("slide-visible")}),e.querySelector(".slider-container>*:first-child").classList.contains("slide-visible")?e.classList.add("slider-item-first-visible"):e.classList.remove("slider-item-first-visible"),e.querySelector(".slider-container>*:last-child").classList.contains("slide-visible")?e.classList.add("slider-item-last-visible"):e.classList.remove("slider-item-last-visible")},{root:e.querySelector(".slider-container"),threshold:t});for(let t of e.querySelectorAll(".slider-container>*"))i.observe(t)},slide(e,t=!0){const i=e.querySelector(".slider-container"),s=e.classList.contains("slider-nav-page"),l=e.classList.contains("slider-nav-noloop"),r=e.classList.contains("slider-nav-nodelay"),o=i.children,n=parseInt(window.getComputedStyle(i).columnGap),a=o[0].offsetWidth+n;let d=t?i.scrollLeft+a:i.scrollLeft-a;if(s&&(d=t?i.scrollLeft+i.offsetWidth:i.scrollLeft-i.offsetWidth),i.scrollLeft+i.offsetWidth>i.scrollWidth-(n/2+1)&&t){if(l)return;d=0}i.scroll({left:d,behavior:r?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),i=e.parentElement.children.length,s=e.closest(".swiffy-slider"),l=s.querySelector(".slider-container").children.length/i*t;this.slideTo(s,l)},slideTo(e,t){const i=e.querySelector(".slider-container"),s=parseInt(window.getComputedStyle(i).columnGap),l=i.children[0].offsetWidth+s,r=e.classList.contains("slider-nav-nodelay");i.scroll({left:l*t,behavior:r?"auto":"smooth"})},onSlideEnd(e,t,i=125){let s;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(s),s=setTimeout(t,i)}),{capture:!1,passive:!0})},autoPlay(e,t,i){t=t<750?750:t;let s=setInterval(()=>this.slide(e),t);const l=()=>this.autoPlay(e,t,i);return i&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(s)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){l()}),{once:!0,passive:!0})),s},handleIndicators(e){const t=e.querySelector(".slider-container"),i=t.scrollWidth-t.offsetWidth,s=t.scrollLeft/i;for(let t of e.querySelectorAll(".slider-indicators")){let e=t.children,i=Math.round((e.length-1)*s);for(let t of e)t.classList.remove("active");e[i].classList.add("active")}}}; -//# sourceMappingURL=swiffy-slider.ESM.min.js.map \ No newline at end of file +export const swiffyslider={version:"1.4.0",init(e=document.body){for(let t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(let t of e.querySelectorAll(".slider-nav")){let s=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,s),{passive:!0})}for(let 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(["slider-nav-autohide","slider-nav-animation"].some(t=>e.classList.contains(t))){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){let s=new IntersectionObserver(t=>{t.forEach(e=>{e.isIntersecting?e.target.classList.add("slide-visible"):e.target.classList.remove("slide-visible")}),e.querySelector(".slider-container>*:first-child").classList.contains("slide-visible")?e.classList.add("slider-item-first-visible"):e.classList.remove("slider-item-first-visible"),e.querySelector(".slider-container>*:last-child").classList.contains("slide-visible")?e.classList.add("slider-item-last-visible"):e.classList.remove("slider-item-last-visible")},{root:e.querySelector(".slider-container"),threshold:t});for(let 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"),l=e.classList.contains("slider-nav-noloop"),o=e.classList.contains("slider-nav-nodelay"),r=s.children,n=parseInt(window.getComputedStyle(s).columnGap),a=r[0].offsetWidth+n;let d=t?s.scrollLeft+a:s.scrollLeft-a;i&&(d=t?s.scrollLeft+s.offsetWidth:s.scrollLeft-s.offsetWidth),s.scrollLeft<1&&!t&&!l&&(d=s.scrollWidth-s.offsetWidth),s.scrollLeft>=s.scrollWidth-s.offsetWidth&&t&&!l&&(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"),l=i.querySelector(".slider-container").children.length/s*t;this.slideTo(i,l)},slideTo(e,t){const s=e.querySelector(".slider-container"),i=parseInt(window.getComputedStyle(s).columnGap),l=s.children[0].offsetWidth+i,o=e.classList.contains("slider-nav-nodelay");s.scroll({left:l*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 l=()=>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(){l()}),{once:!0,passive:!0})),i},handleIndicators(e){const t=e.querySelector(".slider-container"),s=t.scrollWidth-t.offsetWidth,i=t.scrollLeft/s;for(let t of e.querySelectorAll(".slider-indicators")){let e=t.children,s=Math.abs(Math.round((e.length-1)*i));for(let t of e)t.classList.remove("active");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 d7d3dad..c3dacdd 100644 --- a/docs/assets/js/swiffy-slider.esm.min.js.map +++ b/docs/assets/js/swiffy-slider.esm.min.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": [ - "swiffy-slider.ESM.js" + "swiffy-slider.esm.js" ], "names": [ "swiffyslider", @@ -90,9 +90,10 @@ "scrollIndicators", "activeIndicator", "Math", + "abs", "round", "element" ], - "mappings": "OAAO,MAAMA,aACF,CACHC,QAAS,QACTC,KAAKC,EAAcC,SAASC,MACxB,IAAK,IAAIC,KAAiBH,EAAYI,iBAAiB,kBACnDC,KAAKC,WAAWH,IAIxBJ,WAAWI,GACP,IAAK,IAAII,KAAcJ,EAAcC,iBAAiB,eAAgB,CAClE,IAAII,EAAOD,EAAWE,UAAUC,SAAS,mBACzCH,EAAWI,iBAAiB,QAAS,IAAMN,KAAKO,MAAMT,EAAeK,GAAO,CAAEK,SAAS,IAE3F,IAAK,IAAIC,KAAo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CZ,OAAO0B,aAAaI,KACrB,CAAEG,MAAM,EAAM/D,SAAS,OAE9BV,EAAcQ,iBAAiB,YAAY,WACvCgE,MACD,CAAEC,MAAM,EAAM/D,SAAS,KAEvB4D,GAGX1E,iBAAiBI,GACb,MAAMiC,EAAYjC,EAAc8B,cAAc,qBACxC4C,EAAmBzC,EAAUc,YAAcd,EAAUW,YACrD+B,EAAgB1C,EAAUa,WAAa4B,EAC7C,IAAK,IAAIE,KAA6B5E,EAAcC,iBAAiB,sBAAuB,CACxF,IAAI4E,EAAmBD,EAA0BvC,SAC7CyC,EAAkBC,KAAKC,IAAID,KAAKE,OAAOJ,EAAiBlB,OAAS,GAAKgB,IAC1E,IAAK,IAAIO,KAAWL,EAChBK,EAAQ5E,UAAUuB,OAAO,UAC7BgD,EAAiBC,GAAiBxE,UAAUsB,IAAI", + "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 7b70286..15b172e 100644 --- a/docs/assets/js/swiffy-slider.min.js +++ b/docs/assets/js/swiffy-slider.min.js @@ -1,2 +1,2 @@ -const swiffyslider={version:"1.3.1",init(e=document.body){for(let t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(let t of e.querySelectorAll(".slider-nav")){let i=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,i),{passive:!0})}for(let 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(["slider-nav-autohide","slider-nav-animation"].some(t=>e.classList.contains(t))){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){let i=new IntersectionObserver(t=>{t.forEach(e=>{e.isIntersecting?e.target.classList.add("slide-visible"):e.target.classList.remove("slide-visible")}),e.querySelector(".slider-container>*:first-child").classList.contains("slide-visible")?e.classList.add("slider-item-first-visible"):e.classList.remove("slider-item-first-visible"),e.querySelector(".slider-container>*:last-child").classList.contains("slide-visible")?e.classList.add("slider-item-last-visible"):e.classList.remove("slider-item-last-visible")},{root:e.querySelector(".slider-container"),threshold:t});for(let t of e.querySelectorAll(".slider-container>*"))i.observe(t)},slide(e,t=!0){const i=e.querySelector(".slider-container"),s=e.classList.contains("slider-nav-page"),l=e.classList.contains("slider-nav-noloop"),r=e.classList.contains("slider-nav-nodelay"),o=i.children,n=parseInt(window.getComputedStyle(i).columnGap),a=o[0].offsetWidth+n;let d=t?i.scrollLeft+a:i.scrollLeft-a;if(s&&(d=t?i.scrollLeft+i.offsetWidth:i.scrollLeft-i.offsetWidth),i.scrollLeft+i.offsetWidth>i.scrollWidth-(n/2+1)&&t){if(l)return;d=0}i.scroll({left:d,behavior:r?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),i=e.parentElement.children.length,s=e.closest(".swiffy-slider"),l=s.querySelector(".slider-container").children.length/i*t;this.slideTo(s,l)},slideTo(e,t){const i=e.querySelector(".slider-container"),s=parseInt(window.getComputedStyle(i).columnGap),l=i.children[0].offsetWidth+s,r=e.classList.contains("slider-nav-nodelay");i.scroll({left:l*t,behavior:r?"auto":"smooth"})},onSlideEnd(e,t,i=125){let s;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(s),s=setTimeout(t,i)}),{capture:!1,passive:!0})},autoPlay(e,t,i){t=t<750?750:t;let s=setInterval(()=>this.slide(e),t);const l=()=>this.autoPlay(e,t,i);return i&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(s)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){l()}),{once:!0,passive:!0})),s},handleIndicators(e){const t=e.querySelector(".slider-container"),i=t.scrollWidth-t.offsetWidth,s=t.scrollLeft/i;for(let t of e.querySelectorAll(".slider-indicators")){let e=t.children,i=Math.round((e.length-1)*s);for(let t of e)t.classList.remove("active");e[i].classList.add("active")}}};window.swiffyslider=swiffyslider,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{swiffyslider.init()}); +const swiffyslider={version:"1.4.0",init(e=document.body){for(let t of e.querySelectorAll(".swiffy-slider"))this.initSlider(t)},initSlider(e){for(let t of e.querySelectorAll(".slider-nav")){let i=t.classList.contains("slider-nav-next");t.addEventListener("click",()=>this.slide(e,i),{passive:!0})}for(let 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(["slider-nav-autohide","slider-nav-animation"].some(t=>e.classList.contains(t))){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){let i=new IntersectionObserver(t=>{t.forEach(e=>{e.isIntersecting?e.target.classList.add("slide-visible"):e.target.classList.remove("slide-visible")}),e.querySelector(".slider-container>*:first-child").classList.contains("slide-visible")?e.classList.add("slider-item-first-visible"):e.classList.remove("slider-item-first-visible"),e.querySelector(".slider-container>*:last-child").classList.contains("slide-visible")?e.classList.add("slider-item-last-visible"):e.classList.remove("slider-item-last-visible")},{root:e.querySelector(".slider-container"),threshold:t});for(let t of e.querySelectorAll(".slider-container>*"))i.observe(t)},slide(e,t=!0){const i=e.querySelector(".slider-container"),s=e.classList.contains("slider-nav-page"),l=e.classList.contains("slider-nav-noloop"),r=e.classList.contains("slider-nav-nodelay"),o=i.children,n=parseInt(window.getComputedStyle(i).columnGap),a=o[0].offsetWidth+n;let d=t?i.scrollLeft+a:i.scrollLeft-a;s&&(d=t?i.scrollLeft+i.offsetWidth:i.scrollLeft-i.offsetWidth),i.scrollLeft<1&&!t&&!l&&(d=i.scrollWidth-i.offsetWidth),i.scrollLeft>=i.scrollWidth-i.offsetWidth&&t&&!l&&(d=0),i.scroll({left:d,behavior:r?"auto":"smooth"})},slideToByIndicator(){const e=window.event.target,t=Array.from(e.parentElement.children).indexOf(e),i=e.parentElement.children.length,s=e.closest(".swiffy-slider"),l=s.querySelector(".slider-container").children.length/i*t;this.slideTo(s,l)},slideTo(e,t){const i=e.querySelector(".slider-container"),s=parseInt(window.getComputedStyle(i).columnGap),l=i.children[0].offsetWidth+s,r=e.classList.contains("slider-nav-nodelay");i.scroll({left:l*t,behavior:r?"auto":"smooth"})},onSlideEnd(e,t,i=125){let s;e.querySelector(".slider-container").addEventListener("scroll",(function(){window.clearTimeout(s),s=setTimeout(t,i)}),{capture:!1,passive:!0})},autoPlay(e,t,i){t=t<750?750:t;let s=setInterval(()=>this.slide(e),t);const l=()=>this.autoPlay(e,t,i);return i&&(["mouseover","touchstart"].forEach((function(t){e.addEventListener(t,(function(){window.clearTimeout(s)}),{once:!0,passive:!0})})),e.addEventListener("mouseout",(function(){l()}),{once:!0,passive:!0})),s},handleIndicators(e){const t=e.querySelector(".slider-container"),i=t.scrollWidth-t.offsetWidth,s=t.scrollLeft/i;for(let t of e.querySelectorAll(".slider-indicators")){let e=t.children,i=Math.abs(Math.round((e.length-1)*s));for(let t of e)t.classList.remove("active");e[i].classList.add("active")}}};window.swiffyslider=swiffyslider,document.currentScript.hasAttribute("data-noinit")||window.addEventListener("load",()=>{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 d7d8910..a3e43ee 100644 --- a/docs/assets/js/swiffy-slider.min.js.map +++ b/docs/assets/js/swiffy-slider.min.js.map @@ -90,12 +90,13 @@ "scrollIndicators", "activeIndicator", "Math", + "abs", "round", "element", "currentScript", "hasAttribute", "init" ], - "mappings": "AAAA,MAAMA,aACK,CACHC,QAAS,QACTC,KAAKC,EAAcC,SAASC,MACxB,IAAK,IAAIC,KAAiBH,EAAYI,iBAAiB,kBACnDC,KAAKC,WAAWH,IAIxBJ,WAAWI,GACP,IAAK,IAAII,KAAcJ,EAAcC,iBAAiB,eAAgB,CAClE,IAAII,EAAOD,EAAWE,UAAUC,SAAS,mBACzCH,EAAWI,iBAAiB,QAAS,IAAMN,KAAKO,MAAMT,EAAeK,GAAO,CAAEK,SAAS,IAE3F,IAAK,IAAIC,KAAoBX,EAAcC,iBAAiB,sBACxDU,EAAiBH,iBAAiB,QAAS,IAAMN,KAAKU,sBACtDV,KAAKW,WAAWb,EAAe,IAAME,KAAKY,iBAAiBd,GAAgB,IAE/E,GAAIA,EAAcM,UAAUC,SAAS,uBAAwB,CACzD,MAAMQ,EAAUf,EAAcgB,aAAa,qCAAuChB,EAAcgB,aAAa,qCAAuC,KACpJd,KAAKe,SAASjB,EAAee,EAASf,EAAcM,UAAUC,SAAS,yBAE3E,GAAI,CAAC,sBAAuB,wBAAwBW,KAAKC,GAAanB,EAAcM,UAAUC,SAASY,IAAa,CAChH,MAAMC,EAAYpB,EAAcgB,aAAa,uCAAyChB,EAAcgB,aAAa,uCAAyC,GAC1Jd,KAAKmB,iBAAiBrB,EAAeoB,KAI7CxB,iBAAiBI,EAAeoB,EAAY,IACxC,IAAIE,EAAW,IAAIC,qBAAqBC,IACpCA,EAAOC,QAAQhB,IACXA,EAAMiB,eAAiBjB,EAAMkB,OAAOrB,UAAUsB,IAAI,iBAAmBnB,EAAMkB,OAAOrB,UAAUuB,OAAO,mBAEvG7B,EAAc8B,cAAc,mCAAmCxB,UAAUC,SAAS,iBAAmBP,EAAcM,UAAUsB,IAAI,6BAA+B5B,EAAcM,UAAUuB,OAAO,6BAC/L7B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,EAAUe,OAAO,CACbC,KAAON,EAAaoB,EACpBb,SAAUd,EAAU,OAAS,YAIrCxC,WAAWI,EAAegE,EAAUjD,EAAU,KAC1C,IAAIkD,EACJjE,EAAc8B,cAAc,qBAAqBtB,iBAAiB,UAAU,WACxEgC,OAAO0B,aAAaD,GACpBA,EAAcE,WAAWH,EAAUjD,KACpC,CAAEqD,SAAS,EAAO1D,SAAS,KAGlCd,SAASI,EAAee,EAASsD,GAC7BtD,EAAUA,EAAU,IAAM,IAAMA,EAChC,IAAIuD,EAAgBC,YAAY,IAAMrE,KAAKO,MAAMT,GAAgBe,GACjE,MAAMyD,EAAa,IAAMtE,KAAKe,SAASjB,EAAee,EAASsD,GAW/D,OAVIA,IACA,CAAC,YAAa,cAAc5C,SAAQ,SAAS2B,GACzCpD,EAAcQ,iBAAiB4C,GAAO,WAClCZ,OAAO0B,aAAaI,KACrB,CAAEG,MAAM,EAAM/D,SAAS,OAE9BV,EAAcQ,iBAAiB,YAAY,WACvCgE,MACD,CAAEC,MAAM,EAAM/D,SAAS,KAEvB4D,GAGX1E,iBAAiBI,GACb,MAAMiC,EAAYjC,EAAc8B,cAAc,qBACxC4C,EAAmBzC,EAAUc,YAAcd,EAAUW,YACrD+B,EAAgB1C,EAAUa,WAAa4B,EAC7C,IAAK,IAAIE,KAA6B5E,EAAcC,iBAAiB,sBAAuB,CACxF,IAAI4E,EAAmBD,EAA0BvC,SAC7CyC,EAAkBC,KAAKC,IAAID,KAAKE,OAAOJ,EAAiBlB,OAAS,GAAKgB,IAC1E,IAAK,IAAIO,KAAWL,EAChBK,EAAQ5E,UAAUuB,OAAO,UAC7BgD,EAAiBC,GAAiBxE,UAAUsB,IAAI,aAMhEY,OAAO9C,aAAeA,aACjBI,SAASqF,cAAcC,aAAa,gBACrC5C,OAAOhC,iBAAiB,OAAQ,KAC5Bd,aAAa2F", "file": "swiffy-slider.js" } \ No newline at end of file diff --git a/docs/configuration/index.html b/docs/configuration/index.html index 95d4e75..d050ee8 100644 --- a/docs/configuration/index.html +++ b/docs/configuration/index.html @@ -347,7 +347,7 @@ - Download + Download @@ -684,7 +684,7 @@
Configuration options
- +
@@ -841,7 +841,7 @@
Configuration options
Dragging slides with mouse

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

- https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/js/swiffy-slider-extensions.min.js + https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/js/swiffy-slider-extensions.min.js
diff --git a/docs/docs/index.html b/docs/docs/index.html index dc415be..0f730cd 100644 --- a/docs/docs/index.html +++ b/docs/docs/index.html @@ -111,7 +111,7 @@ - Download + Download
@@ -158,8 +158,8 @@

Quick start

Installation options, configuration options and scripting of the Swiffy Slider

CSS and Javascript

Copy-paste the stylesheet <link> and javascript <script> into your <head> section.

-
<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/js/swiffy-slider.min.js" crossorigin="anonymous" defer></script>
-<link href="https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/css/swiffy-slider.min.css" rel="stylesheet" crossorigin="anonymous">
+                                
<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/js/swiffy-slider.min.js" crossorigin="anonymous" defer></script>
+<link href="https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/css/swiffy-slider.min.css" rel="stylesheet" crossorigin="anonymous">
 

HTML

@@ -196,7 +196,7 @@

Safari smooth scrolling polyfill

Additional installation options

- Download the latest release + Download the latest release

Clone the repo:

git clone https://github.com/dynamicweb/swiffy-slider.git
@@ -365,7 +365,7 @@

Navigation options

slider-nav-noloop - Disables slider loop - so when on last slide navigate next does not take the user to the first slide + Disables slider loop - so when on first/last slide navigate previous/next does not take the user to the last/first slide slider-nav-nodelay @@ -646,7 +646,7 @@

Javascript API

Javascript loading and binding

Avoid autobinding by adding data-noinit attribute on the script tag and then attach the slider manually

-
<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/js/swiffy-slider.min.js" data-noinit defer>
+                                
<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/js/swiffy-slider.min.js" data-noinit defer>
 <script>
     window.addEventListener('load', () => {
         //Use only one of the loading options below!
@@ -664,7 +664,7 @@ 

Javascript loading and binding

</div>
-
<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/js/swiffy-slider.min.js" data-noinit defer>
+                                
<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/js/swiffy-slider.min.js" data-noinit defer>
     <script>
         window.addEventListener('load', () => {
             //loads all sliders in main and skip header and footer search for increased init performance.
@@ -684,7 +684,7 @@ 

Javascript loading and binding

Load as module using ES version of the script

<script type="module">
-    import {swiffyslider} from 'https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/js/swiffy-slider.esm.min.js'; 
+    import {swiffyslider} from 'https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/js/swiffy-slider.esm.min.js'; 
     window.swiffyslider = swiffyslider; 
     window.swiffyslider.init(); 
 </script>
@@ -692,7 +692,7 @@ 

Javascript loading and binding

Load as ES module on demand, here using load - could be when slider scrolls into view or navigation arrow is clicked the first time. Load module and initialize sliders.

<script>
 window.addEventListener("load", () => {
-    import ('https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/js/swiffy-slider.esm.min.js').then((swiffysliderModule) => {
+    import ('https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/js/swiffy-slider.esm.min.js').then((swiffysliderModule) => {
         swiffysliderModule.swiffyslider.init();
     });
 });
@@ -701,7 +701,7 @@ 

Javascript loading and binding

Load as ES module on demand. Load module and assign to window for later script manipulation of slides

<script>
 window.addEventListener("load", () => {
-    import ('https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/js/swiffy-slider.esm.min.js').then((swiffysliderModule) => {
+    import ('https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/js/swiffy-slider.esm.min.js').then((swiffysliderModule) => {
         window.swiffyslider = swiffysliderModule.swiffyslider;
         window.swiffyslider.init();
     });
@@ -742,9 +742,9 @@ 

Javascript extensions

Load Swiffy slider main script, css and extensions script -
<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/js/swiffy-slider.min.js" crossorigin="anonymous" defer></script>
-<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/js/swiffy-slider-extensions.min.js" crossorigin="anonymous" defer></script>
-<link href="https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/css/swiffy-slider.min.css" rel="stylesheet" crossorigin="anonymous">
+
<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/js/swiffy-slider.min.js" crossorigin="anonymous" defer></script>
+<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/js/swiffy-slider-extensions.min.js" crossorigin="anonymous" defer></script>
+<link href="https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/css/swiffy-slider.min.css" rel="stylesheet" crossorigin="anonymous">
diff --git a/docs/docs/slider-animation/index.html b/docs/docs/slider-animation/index.html index 01e36f4..b644289 100644 --- a/docs/docs/slider-animation/index.html +++ b/docs/docs/slider-animation/index.html @@ -111,7 +111,7 @@ - Download + Download diff --git a/docs/docs/slider-indicators/index.html b/docs/docs/slider-indicators/index.html index fca36d0..67e586c 100644 --- a/docs/docs/slider-indicators/index.html +++ b/docs/docs/slider-indicators/index.html @@ -147,7 +147,7 @@ - Download + Download diff --git a/docs/docs/slider-navigation/index.html b/docs/docs/slider-navigation/index.html index 1a02ab7..64255a9 100644 --- a/docs/docs/slider-navigation/index.html +++ b/docs/docs/slider-navigation/index.html @@ -147,7 +147,7 @@ - Download + Download diff --git a/docs/docs/slider-options/index.html b/docs/docs/slider-options/index.html index 04aa958..832e42b 100644 --- a/docs/docs/slider-options/index.html +++ b/docs/docs/slider-options/index.html @@ -147,7 +147,7 @@ - Download + Download diff --git a/docs/docs/slider-sizes/index.html b/docs/docs/slider-sizes/index.html index 2c9b768..b4a4900 100644 --- a/docs/docs/slider-sizes/index.html +++ b/docs/docs/slider-sizes/index.html @@ -162,7 +162,7 @@ - Download + Download diff --git a/docs/examples/index.html b/docs/examples/index.html index 5a84d44..4abd23c 100644 --- a/docs/examples/index.html +++ b/docs/examples/index.html @@ -187,7 +187,7 @@ - Download + Download diff --git a/docs/index.html b/docs/index.html index 20d9fa2..9262fa2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -129,7 +129,7 @@ @@ -276,8 +276,8 @@

Visual configurator

Quick start

CSS and Javascript

Copy-paste the stylesheet <link> and javascript <script> into your <head> section.

-
<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/js/swiffy-slider.min.js" crossorigin="anonymous" defer></script>
-<link href="https://cdn.jsdelivr.net/npm/swiffy-slider@1.3.1/dist/css/swiffy-slider.min.css" rel="stylesheet" crossorigin="anonymous">
+                        
<script src="https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/js/swiffy-slider.min.js" crossorigin="anonymous" defer></script>
+<link href="https://cdn.jsdelivr.net/npm/swiffy-slider@1.4.0/dist/css/swiffy-slider.min.css" rel="stylesheet" crossorigin="anonymous">
 

HTML

diff --git a/package-lock.json b/package-lock.json index e01ec71..47b15a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { "name": "swiffy-slider", - "version": "1.3.1", + "version": "1.4.0", "lockfileVersion": 1 } \ No newline at end of file diff --git a/package.json b/package.json index b27af12..48c88c5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "swiffy-slider", "description": "Swiffy slider is a touch enabled super lightweight html slider and carousel using browser scroll, css grid and scroll snap align and less than 1.5 kb javascript. Comes in css mode only version", - "version": "1.3.1", + "version": "1.4.0", "config": { "version_short": "1.3" }, diff --git a/readme.md b/readme.md index 970f4bc..a41b77c 100644 --- a/readme.md +++ b/readme.md @@ -18,7 +18,7 @@

[![](https://data.jsdelivr.com/v1/package/npm/swiffy-slider/badge?style=rounded)](https://www.jsdelivr.com/package/npm/swiffy-slider) -![version](https://img.shields.io/badge/Version-1.3.1-green.svg) +![version](https://img.shields.io/badge/Version-1.4.0-green.svg) [![npm version](https://img.shields.io/npm/v/swiffy-slider)](https://www.npmjs.com/package/swiffy-slider) [![CSS gzip size](https://img.badgesize.io/dynamicweb/swiffy-slider/main/dist/css/swiffy-slider.min.css?compression=gzip&label=CSS%20gzip%20size)](https://github.com/dynamicweb/swiffy-slider/blob/main/dist/css/swiffy-slider.min.css) [![CSS Brotli size](https://img.badgesize.io/dynamicweb/swiffy-slider/main/dist/css/swiffy-slider.min.css?compression=brotli&label=CSS%20Brotli%20size)](https://github.com/dynamicweb/swiffy-slider/blob/main/dist/css/swiffy-slider.min.css) @@ -79,8 +79,8 @@ This project utilizes what is available in modern browsers resulting in a super #### 1. Add CSS and JS to website head section ```html - @@ -662,7 +662,7 @@ Load as ES module on demand, here using load - could be when slider scrolls into ```html