diff --git a/.gitmodules b/.gitmodules index c20d57c..bae37e3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "icons/mdi-svg"] path = icons/mdi-svg url = https://github.com/Templarian/MaterialDesign-SVG.git +[submodule "venobox/v2"] + path = venobox/v2 + url = https://github.com/nicolafranchini/VenoBox.git diff --git a/venobox/v2 b/venobox/v2 new file mode 160000 index 0000000..adc7018 --- /dev/null +++ b/venobox/v2 @@ -0,0 +1 @@ +Subproject commit adc701853d325165e0b6a8f72ca6362eb81f1278 diff --git a/venobox/v2/CHANGELOG.md b/venobox/v2/CHANGELOG.md deleted file mode 100644 index 01368c7..0000000 --- a/venobox/v2/CHANGELOG.md +++ /dev/null @@ -1,110 +0,0 @@ -# Changelog - -### [2.0.4] -- New option: `customClass` -- New attribute: `data-customclass` (overrides global option `customClass`) -- New attribute: `data-border` (overrides global option `border`) -- New: option ratio: 'full' for a 100% viewport height of iFrame and video content - -### [2.0.3] -- New: ECMAScript module `import VenoBox from './src/venobox.esm.js'` - -### [2.0.2] -- New: Fast gallery navigation -- Update: default `maxWidth: 100%` -- Update: minor css fixes - -### [2.0.1] -- Update: 'share' option boolean. -- Deprecated: facebook, twitter, linkedin, pinterest share -- New share tools: Copy link, Navigator share, Download -- New: option `navKeyboard` -- New: option `navTouch` -- Update: minor fixes - -### [2.0.0] -- Dropped jQuery dependency. -- Async gallery navigation and items loading -- New: support local videos (mp4, webm, ogg) -- Update: more preload spinners - -Check [Migrating to VenoBox 2](https://github.com/nicolafranchini/VenoBox/wiki). - -### [1.9.4] -- New: navSpeed option - -### [1.9.3] -- New: noArrows option - -### [1.9.2] -- Update: Remove focus from link to avoid multiple calls with enter key - -### [1.9.1] -- Fix: Error thrown in safari #147 - -### [v1.9.0] -- Update: reset content scrollTop on change - -### [v1.8.9] -- New share buttons -available options: `['facebook', 'twitter', 'linkedin', 'pinterest', 'download']` - -### [v1.8.8] -- Hide infinigall navigation if has only 1 item -- Hide numeratio if has only 1 item -- Higher z-index for vbox-overlay - -### [v1.8.7] -- Percentual window padding -- Minified CSS - -### [v1.8.6] -- Namespaced some css classes #133 - -### [v1.8.5] -- New callback: `cb_content_loaded(obj, gallIndex, thenext, theprev)` - -### [v1.8.4] -- Scrollbar dissappears behind `.vbox-overlay` background (Chrome) #109 -- Overlay close does not work on iPad, and full overlay is not clickable #115 -- Allow autoplay in Chrome - attribute needed for iframe #121 - -### [v1.8.3] -- New spinkit preloaders #106 -- Hide spinner when popup has been loaded #101 -- Add support of customized Gallery items directly on the JavaScript init. #120 - -### [v1.8.2] -- Fix: infinigall & nextok = false #98 - -### [v1.8.1] -- update: `use strict` - thanks @shivarajnaidu -- Fix: fade in overlay - -### [v1.8.0 -- New: touch swipe support -- New methods: call close, next or previous item outside the plugin -- Update: new callbacks - -### [v1.7.3] -- Update: brought back `data-gall` instead of `data-vbgall` - -### [v1.7.2] -- Fix: gallery navigation with different title attributes -- Fix: position absolute for preloader to avoid scroll overlay -- Update: .json files - -### [v1.7.1] -- New: options for title and navigation elements: position and colors -- New: pure css3 preloaders -- New: 5 Callbacks added - thanks @garyee -- New: video autoplay as option - thanks @codibit -- Update: `data-type` changed to `data-vbtype` -- Update: css3 next - prev arrows -- Update: iframe and inline windows with default height realtive to viewport -- Update: Removed deprecated functions for jQuery 3 -- Update: new youtube parser to convert more urls -- Update: video format to 16:9 -- Update: panel shadow -- Fix: wait to loading all images inside ajax modal -- Fix: `https://` for video iframes diff --git a/venobox/v2/LICENSE b/venobox/v2/LICENSE deleted file mode 100644 index 44ad0e0..0000000 --- a/venobox/v2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 - 2020 Venobox - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/venobox/v2/README.md b/venobox/v2/README.md deleted file mode 100644 index 90a2c5a..0000000 --- a/venobox/v2/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# VenoBox - -[![venobox (latest)](https://img.shields.io/npm/v/venobox/latest.svg)](https://www.npmjs.com/package/venobox) -[![venobox (downloads)](https://img.shields.io/npm/dy/vanilla-lazyload.svg)](https://www.npmjs.com/package/venobox) -[![](https://data.jsdelivr.com/v1/package/npm/venobox/badge)](https://www.jsdelivr.com/package/npm/venobox) - -Responsive modal window javaScript plugin, touch swipe gallery - -Just another responsive lightbox plugin, suitable for images, inline contents, iFrames, videos. - -The big difference compared to many others plugins is that VenoBox calculates the max width of the image displayed and preserves its height if is taller than the window (so in small devices you can scroll down the content, avoiding vertical microscopic resized images). - -Demo: https://veno.es/venobox/ - -## Quick start - -### Install - -This package can be installed with: -- [npm](https://www.npmjs.com/package/venobox): `npm install venobox` -- [composer](https://packagist.org/packages/nicolafranchini/venobox): `composer require nicolafranchini/venobox` - -### Static HTML - -Download the [latest release](https://github.com/nicolafranchini/VenoBox/releases) -or get the sources from [jsDelivr](https://cdn.jsdelivr.net/npm/venobox@latest/dist/) - -Put the required stylesheet into your `` to load our CSS: - -```html - -``` - -Include the script near the end of your pages, right before the closing `` tag: - -```html - -``` - - -### Usage - -Insert one or more links with a custom class - -```html -image alt -``` - -Initialize the plugin and your VenoBox is ready for all the selected links. - -```javascript -new VenoBox({ - selector: '.venobox' -}); -``` - -## Documentation - -The full documentation is available at https://veno.es/venobox/ - -License: released under the MIT License diff --git a/venobox/v2/composer.json b/venobox/v2/composer.json deleted file mode 100644 index 0cac41d..0000000 --- a/venobox/v2/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "nicolafranchini/venobox", - "description": "Responsive JavaScript modal window plugin, touch swipe gallery", - "version": "2.0.4", - "keywords": [ - "lightbox", - "modal", - "responsive", - "plugin", - "popup", - "gallery", - "window", - "no-jquery", - "vanilla", - "touch", - "swipe" - ], - "license": "MIT", - "authors": [ - { - "name": "Nicola Franchini", - "role": "Developer" - } - ], - "support": { - "issues": "https://github.com/nicolafranchini/VenoBox/issues", - "source": "https://github.com/nicolafranchini/VenoBox/releases" - }, - "extra": { - "component": { - "scripts": [ - "dist/venobox.min.js" - ], - "styles": [ - "dist/venobox.min.css" - ], - "files": [ - "dist/venobox.min.js", - "dist/venobox.min.css" - ] - } - } -} diff --git a/venobox/v2/dist/venobox.css b/venobox/v2/dist/venobox.css deleted file mode 100644 index 7b4d422..0000000 --- a/venobox/v2/dist/venobox.css +++ /dev/null @@ -1,228 +0,0 @@ -.vbox-overlay{--vbox-tools-color:#fff;--vbox-title-background:#101010;--vbox-title-width:'auto';--vbox-title-radius:0;--vbox-share-background:#101010;--vbox-share-width:'auto';--vbox-share-radius:0;--vbox-padding:0} -.vbox-overlay *,.vbox-overlay :after,.vbox-overlay :before{-webkit-backface-visibility:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box} -.vbox-overlay *{-webkit-backface-visibility:visible;backface-visibility:visible} -.vbox-overlay{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;position:fixed;left:0;top:0;bottom:0;right:0;z-index:999999} -.vbox-share,.vbox-title{line-height:1;position:fixed;z-index:98;text-align:center;margin:0 auto;color:var(--vbox-tools-color)} -.vbox-title{font-size:12px;background-color:var(--vbox-title-background);width:var(--vbox-title-width);border-radius:var(--vbox-title-radius);padding:12px 54px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block} -.vbox-share{font-size:24px;padding:0 .35em;background-color:var(--vbox-share-background);width:var(--vbox-share-width);border-radius:var(--vbox-share-radius)} -.vbox-link-btn,button.vbox-link-btn,button.vbox-link-btn:active,button.vbox-link-btn:focus,button.vbox-link-btn:hover{border:none!important;background:0 0!important;box-shadow:none!important;color:inherit!important;padding:6px 12px;outline:0;display:inline-block;cursor:pointer} -.vbox-share a{color:inherit!important;padding:6px 12px;display:inline-block} -.vbox-share svg{z-index:10;vertical-align:middle} -.vbox-close{cursor:pointer;position:fixed;top:0;right:0;z-index:99;padding:6px 15px;color:#000;color:var(--vbox-tools-color);border:0;font-size:24px;display:flex;align-items:center;opacity:.8;transition:opacity .2s} -.vbox-close:hover{opacity:1} -.vbox-left-corner{cursor:pointer;position:fixed;left:0;top:0;overflow:hidden;line-height:1;font-size:12px;z-index:99;display:flex;align-items:center;color:var(--vbox-tools-color)} -.vbox-num{display:inline-block;padding:12px 15px} -.vbox-left{left:0} -.vbox-right{right:0} -.vbox-top{top:0} -.vbox-bottom{bottom:0} -.vbox-next,.vbox-prev{position:fixed;top:50%;margin-top:-15px;overflow:hidden;cursor:pointer;display:block;width:45px;height:45px;z-index:99;opacity:.8;transition:opacity .2s} -.vbox-next:hover,.vbox-prev:hover{opacity:1} -.vbox-next span,.vbox-prev span{position:relative;width:20px;height:20px;border:2px solid transparent;border-top-color:var(--vbox-tools-color);border-right-color:var(--vbox-tools-color);text-indent:-100px;position:absolute;top:8px;display:block} -.vbox-prev{left:15px} -.vbox-next{right:15px} -.vbox-prev span{left:10px;-ms-transform:rotate(-135deg);-webkit-transform:rotate(-135deg);transform:rotate(-135deg)} -.vbox-next span{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);right:10px} -.vbox-inline,.venoratio{position:relative;width:100%;margin:0 auto} -.venoratio::before{display:block;padding-top:var(--vb-aspect-ratio);content:""} -.venoratio>*{position:absolute;top:0;left:0;width:100%;height:100%;padding:var(--vbox-padding)} -.venoratio-1x1{--vb-aspect-ratio:100%} -.venoratio-4x3{--vb-aspect-ratio:calc(3 / 4 * 100%)} -.venoratio-16x9{--vb-aspect-ratio:calc(9 / 16 * 100%)} -.venoratio-21x9{--vb-aspect-ratio:calc(9 / 21 * 100%)} -.venoratio-full{--vb-aspect-ratio:calc(100vh - 100px)} -.vbox-child.vbox-inline,.vbox-child.venoratio{max-width:100%} -.vbox-open{overflow:hidden} -.vbox-container{position:absolute;left:0;right:0;top:0;bottom:0;overflow-x:hidden;overflow-y:scroll;overflow-scrolling:touch;-webkit-overflow-scrolling:touch;z-index:20;max-height:100%;padding:30px 0} -.vbox-content{opacity:0} -.vbox-content{text-align:center;width:100%;position:relative;overflow:hidden;padding:20px 4%;display:flex;align-items:center;justify-content:center;min-height:100%} -.vbox-container img{max-width:100%;height:auto} -.vbox-child{box-shadow:0 0 12px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);max-width:100%;text-align:initial;padding:var(--vbox-padding)} -.vbox-child img{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;display:block} -.vbox-grab .vbox-child img{cursor:grab} -.vbox-child>iframe{border:none!important} -.vbox-content.swipe-left{margin-left:-200px!important} -.vbox-content.swipe-right{margin-left:200px!important} -.vbox-preloader{-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-o-transform:translateZ(0);transform:translateZ(0)} -.vbox-preloader .vbox-preloader-inner{opacity:1;transition:opacity .2s} -.vbox-hidden{display:none} -.vbox-preloader.vbox-hidden .vbox-preloader-inner{opacity:0} -.vbox-backdrop{position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:translateZ(-1px);-moz-transform:translateZ(-1px);-o-transform:translateZ(-1px);transform:translateZ(-1px);z-index:0} -.vbox-tooltip{position:relative;display:inline-block} -.vbox-tooltip .vbox-tooltip-text{visibility:hidden;color:#fff;text-align:center;padding:0;position:absolute;z-index:1;bottom:100%;left:0;opacity:0;transition:opacity .3s;margin-bottom:2px;font-family:sans-serif} -.vbox-top .vbox-tooltip .vbox-tooltip-text{bottom:auto;top:100%;margin-bottom:0;margin-top:2px} -.vbox-tooltip-inner{padding:5px 10px;background-color:rgba(0,0,0,.9);border-radius:6px;font-size:10px} -.vbox-tooltip:hover .vbox-tooltip-text{visibility:visible;opacity:1} -.vbox-overlay{--sk-size:40px;--sk-color:#333} -.sk-center{margin:auto} -.sk-plane{width:var(--sk-size);height:var(--sk-size);background-color:var(--sk-color);animation:sk-plane 1.2s infinite ease-in-out} -@keyframes sk-plane{ -0%{transform:perspective(120px) rotateX(0) rotateY(0)} -50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0)} -100%{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)} -} -.sk-chase{width:var(--sk-size);height:var(--sk-size);position:relative;animation:sk-chase 2.5s infinite linear both} -.sk-chase-dot{width:100%;height:100%;position:absolute;left:0;top:0;animation:sk-chase-dot 2s infinite ease-in-out both} -.sk-chase-dot:before{content:'';display:block;width:25%;height:25%;background-color:var(--sk-color);border-radius:100%;animation:sk-chase-dot-before 2s infinite ease-in-out both} -.sk-chase-dot:nth-child(1){animation-delay:-1.1s} -.sk-chase-dot:nth-child(2){animation-delay:-1s} -.sk-chase-dot:nth-child(3){animation-delay:-.9s} -.sk-chase-dot:nth-child(4){animation-delay:-.8s} -.sk-chase-dot:nth-child(5){animation-delay:-.7s} -.sk-chase-dot:nth-child(6){animation-delay:-.6s} -.sk-chase-dot:nth-child(1):before{animation-delay:-1.1s} -.sk-chase-dot:nth-child(2):before{animation-delay:-1s} -.sk-chase-dot:nth-child(3):before{animation-delay:-.9s} -.sk-chase-dot:nth-child(4):before{animation-delay:-.8s} -.sk-chase-dot:nth-child(5):before{animation-delay:-.7s} -.sk-chase-dot:nth-child(6):before{animation-delay:-.6s} -@keyframes sk-chase{ -100%{transform:rotate(360deg)} -} -@keyframes sk-chase-dot{ -100%,80%{transform:rotate(360deg)} -} -@keyframes sk-chase-dot-before{ -50%{transform:scale(.4)} -0%,100%{transform:scale(1)} -} -.sk-bounce{width:var(--sk-size);height:var(--sk-size);position:relative} -.sk-bounce-dot{width:100%;height:100%;border-radius:50%;background-color:var(--sk-color);opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite cubic-bezier(.455,.03,.515,.955)} -.sk-bounce-dot:nth-child(2){animation-delay:-1s} -@keyframes sk-bounce{ -0%,100%{transform:scale(0)} -45%,55%{transform:scale(1)} -} -.sk-wave{width:var(--sk-size);height:var(--sk-size);display:flex;justify-content:space-between} -.sk-wave-rect{background-color:var(--sk-color);height:100%;width:15%;animation:sk-wave 1.2s infinite ease-in-out} -.sk-wave-rect:nth-child(1){animation-delay:-1.2s} -.sk-wave-rect:nth-child(2){animation-delay:-1.1s} -.sk-wave-rect:nth-child(3){animation-delay:-1s} -.sk-wave-rect:nth-child(4){animation-delay:-.9s} -.sk-wave-rect:nth-child(5){animation-delay:-.8s} -@keyframes sk-wave{ -0%,100%,40%{transform:scaleY(.4)} -20%{transform:scaleY(1)} -} -.sk-pulse{width:var(--sk-size);height:var(--sk-size);background-color:var(--sk-color);border-radius:100%;animation:sk-pulse 1.2s infinite cubic-bezier(.455,.03,.515,.955)} -@keyframes sk-pulse{ -0%{transform:scale(0)} -100%{transform:scale(1);opacity:0} -} -.sk-flow{width:calc(var(--sk-size) * 1.3);height:calc(var(--sk-size) * 1.3);display:flex;justify-content:space-between} -.sk-flow-dot{width:25%;height:25%;background-color:var(--sk-color);border-radius:50%;animation:sk-flow 1.4s cubic-bezier(.455,.03,.515,.955) 0s infinite both} -.sk-flow-dot:nth-child(1){animation-delay:-.3s} -.sk-flow-dot:nth-child(2){animation-delay:-.15s} -@keyframes sk-flow{ -0%,100%,80%{transform:scale(.3)} -40%{transform:scale(1)} -} -.sk-swing{width:var(--sk-size);height:var(--sk-size);position:relative;animation:sk-swing 1.8s infinite linear} -.sk-swing-dot{width:45%;height:45%;position:absolute;top:0;left:0;right:0;margin:auto;background-color:var(--sk-color);border-radius:100%;animation:sk-swing-dot 2s infinite ease-in-out} -.sk-swing-dot:nth-child(2){top:auto;bottom:0;animation-delay:-1s} -@keyframes sk-swing{ -100%{transform:rotate(360deg)} -} -@keyframes sk-swing-dot{ -0%,100%{transform:scale(.2)} -50%{transform:scale(1)} -} -.sk-circle{width:var(--sk-size);height:var(--sk-size);position:relative} -.sk-circle-dot{width:100%;height:100%;position:absolute;left:0;top:0} -.sk-circle-dot:before{content:'';display:block;width:15%;height:15%;background-color:var(--sk-color);border-radius:100%;animation:sk-circle 1.2s infinite ease-in-out both} -.sk-circle-dot:nth-child(1){transform:rotate(30deg)} -.sk-circle-dot:nth-child(2){transform:rotate(60deg)} -.sk-circle-dot:nth-child(3){transform:rotate(90deg)} -.sk-circle-dot:nth-child(4){transform:rotate(120deg)} -.sk-circle-dot:nth-child(5){transform:rotate(150deg)} -.sk-circle-dot:nth-child(6){transform:rotate(180deg)} -.sk-circle-dot:nth-child(7){transform:rotate(210deg)} -.sk-circle-dot:nth-child(8){transform:rotate(240deg)} -.sk-circle-dot:nth-child(9){transform:rotate(270deg)} -.sk-circle-dot:nth-child(10){transform:rotate(300deg)} -.sk-circle-dot:nth-child(11){transform:rotate(330deg)} -.sk-circle-dot:nth-child(1):before{animation-delay:-1.1s} -.sk-circle-dot:nth-child(2):before{animation-delay:-1s} -.sk-circle-dot:nth-child(3):before{animation-delay:-.9s} -.sk-circle-dot:nth-child(4):before{animation-delay:-.8s} -.sk-circle-dot:nth-child(5):before{animation-delay:-.7s} -.sk-circle-dot:nth-child(6):before{animation-delay:-.6s} -.sk-circle-dot:nth-child(7):before{animation-delay:-.5s} -.sk-circle-dot:nth-child(8):before{animation-delay:-.4s} -.sk-circle-dot:nth-child(9):before{animation-delay:-.3s} -.sk-circle-dot:nth-child(10):before{animation-delay:-.2s} -.sk-circle-dot:nth-child(11):before{animation-delay:-.1s} -@keyframes sk-circle{ -0%,100%,80%{transform:scale(0)} -40%{transform:scale(1)} -} -.sk-circle-fade{width:var(--sk-size);height:var(--sk-size);position:relative} -.sk-circle-fade-dot{width:100%;height:100%;position:absolute;left:0;top:0} -.sk-circle-fade-dot:before{content:'';display:block;width:15%;height:15%;background-color:var(--sk-color);border-radius:100%;animation:sk-circle-fade 1.2s infinite ease-in-out both} -.sk-circle-fade-dot:nth-child(1){transform:rotate(30deg)} -.sk-circle-fade-dot:nth-child(2){transform:rotate(60deg)} -.sk-circle-fade-dot:nth-child(3){transform:rotate(90deg)} -.sk-circle-fade-dot:nth-child(4){transform:rotate(120deg)} -.sk-circle-fade-dot:nth-child(5){transform:rotate(150deg)} -.sk-circle-fade-dot:nth-child(6){transform:rotate(180deg)} -.sk-circle-fade-dot:nth-child(7){transform:rotate(210deg)} -.sk-circle-fade-dot:nth-child(8){transform:rotate(240deg)} -.sk-circle-fade-dot:nth-child(9){transform:rotate(270deg)} -.sk-circle-fade-dot:nth-child(10){transform:rotate(300deg)} -.sk-circle-fade-dot:nth-child(11){transform:rotate(330deg)} -.sk-circle-fade-dot:nth-child(1):before{animation-delay:-1.1s} -.sk-circle-fade-dot:nth-child(2):before{animation-delay:-1s} -.sk-circle-fade-dot:nth-child(3):before{animation-delay:-.9s} -.sk-circle-fade-dot:nth-child(4):before{animation-delay:-.8s} -.sk-circle-fade-dot:nth-child(5):before{animation-delay:-.7s} -.sk-circle-fade-dot:nth-child(6):before{animation-delay:-.6s} -.sk-circle-fade-dot:nth-child(7):before{animation-delay:-.5s} -.sk-circle-fade-dot:nth-child(8):before{animation-delay:-.4s} -.sk-circle-fade-dot:nth-child(9):before{animation-delay:-.3s} -.sk-circle-fade-dot:nth-child(10):before{animation-delay:-.2s} -.sk-circle-fade-dot:nth-child(11):before{animation-delay:-.1s} -@keyframes sk-circle-fade{ -0%,100%,39%{opacity:0;transform:scale(.6)} -40%{opacity:1;transform:scale(1)} -} -.sk-grid{width:var(--sk-size);height:var(--sk-size)} -.sk-grid-cube{width:33.33%;height:33.33%;background-color:var(--sk-color);float:left;animation:sk-grid 1.3s infinite ease-in-out} -.sk-grid-cube:nth-child(1){animation-delay:.2s} -.sk-grid-cube:nth-child(2){animation-delay:.3s} -.sk-grid-cube:nth-child(3){animation-delay:.4s} -.sk-grid-cube:nth-child(4){animation-delay:.1s} -.sk-grid-cube:nth-child(5){animation-delay:.2s} -.sk-grid-cube:nth-child(6){animation-delay:.3s} -.sk-grid-cube:nth-child(7){animation-delay:0s} -.sk-grid-cube:nth-child(8){animation-delay:.1s} -.sk-grid-cube:nth-child(9){animation-delay:.2s} -@keyframes sk-grid{ -0%,100%,70%{transform:scale3D(1,1,1)} -35%{transform:scale3D(0,0,1)} -} -.sk-fold{width:var(--sk-size);height:var(--sk-size);position:relative;transform:rotateZ(45deg)} -.sk-fold-cube{float:left;width:50%;height:50%;position:relative;transform:scale(1.1)} -.sk-fold-cube:before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sk-color);animation:sk-fold 2.4s infinite linear both;transform-origin:100% 100%} -.sk-fold-cube:nth-child(2){transform:scale(1.1) rotateZ(90deg)} -.sk-fold-cube:nth-child(4){transform:scale(1.1) rotateZ(180deg)} -.sk-fold-cube:nth-child(3){transform:scale(1.1) rotateZ(270deg)} -.sk-fold-cube:nth-child(2):before{animation-delay:.3s} -.sk-fold-cube:nth-child(4):before{animation-delay:.6s} -.sk-fold-cube:nth-child(3):before{animation-delay:.9s} -@keyframes sk-fold{ -0%,10%{transform:perspective(140px) rotateX(-180deg);opacity:0} -25%,75%{transform:perspective(140px) rotateX(0);opacity:1} -100%,90%{transform:perspective(140px) rotateY(180deg);opacity:0} -} -.sk-wander{width:var(--sk-size);height:var(--sk-size);position:relative} -.sk-wander-cube{background-color:var(--sk-color);width:20%;height:20%;position:absolute;top:0;left:0;--sk-wander-distance:calc(var(--sk-size) * 0.75);animation:sk-wander 2s ease-in-out -2s infinite both} -.sk-wander-cube:nth-child(2){animation-delay:-.5s} -.sk-wander-cube:nth-child(3){animation-delay:-1s} -@keyframes sk-wander{ -0%{transform:rotate(0)} -25%{transform:translateX(var(--sk-wander-distance)) rotate(-90deg) scale(.6)} -50%{transform:translateX(var(--sk-wander-distance)) translateY(var(--sk-wander-distance)) rotate(-179deg)} -50.1%{transform:translateX(var(--sk-wander-distance)) translateY(var(--sk-wander-distance)) rotate(-180deg)} -75%{transform:translateX(0) translateY(var(--sk-wander-distance)) rotate(-270deg) scale(.6)} -100%{transform:rotate(-360deg)} -} \ No newline at end of file diff --git a/venobox/v2/dist/venobox.js b/venobox/v2/dist/venobox.js deleted file mode 100644 index d7eb1b8..0000000 --- a/venobox/v2/dist/venobox.js +++ /dev/null @@ -1,1013 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.VenoBox = factory()); -}(this, (function () { 'use strict'; - - /** - * VenoBox 2.0.4 - * Copyright 2013-2021 Nicola Franchini - * @license: https://github.com/nicolafranchini/VenoBox/blob/master/LICENSE - */ - let backdrop, blocknum, blockshare, blocktitle, core, container, content, current_item, current_index, diffX, diffY, endY, elPreloader, elPreloaderInner; - let gallIndex, images, infinigall, items, navigationDisabled, newcontent, numeratio, nextok, prevok, overlay; - let set_maxWidth, set_overlayColor, set_ratio, set_autoplay, set_href, set_customclass, startY, thenext, theprev, thisborder, thisgall, title, throttle; - - const svgOpen = ''; - const svgClose = ''; - const downloadIcon = svgOpen + '' + svgClose; - const shareIcon = svgOpen + '' + svgClose; - const linkIcon = svgOpen + '' + svgClose; - const imagesHolder = document.createElement('div'); - - let startX = 0; - let endX = 0; - let diff = 0; - let threshold = 50; - let startouch = false; - let imgLoader = new Image(); - - const spinners = { - 'bounce': ['sk-bounce', 'sk-bounce-dot', 2], - 'chase': ['sk-chase', 'sk-chase-dot', 6], - 'circle': ['sk-circle', 'sk-circle-dot', 12], - 'circle-fade': ['sk-circle-fade', 'sk-circle-fade-dot', 12], - 'flow': ['sk-flow', 'sk-flow-dot', 3], - 'fold': ['sk-fold', 'sk-fold-cube', 4], - 'grid': ['sk-grid', 'sk-grid-cube', 9], - 'plane': ['sk-plane', '', 0], - 'pulse': ['sk-pulse', '', 5], - 'swing': ['sk-swing', 'sk-swing-dot', 2], - 'wander': ['sk-wander', 'sk-wander-cube', 3], - 'wave': ['sk-wave', 'sk-wave-rec', 5] - }; - - // Default settings - const defaults = { - selector: '.venobox', - autoplay : false, - bgcolor: '#fff', - border: '0', - customClass: false, - infinigall: false, - maxWidth: '100%', - navigation: true, - navKeyboard: true, - navTouch: true, - navSpeed: 300, - numeration: false, - overlayClose: true, - overlayColor: 'rgba(23,23,23,0.95)', - popup: false, - ratio: '16x9', // '1x1' | '4x3' | '16x9' | '21x9' - share: false, - shareStyle: 'pill', // 'bar' | 'block' | 'pill' | 'transparent' - spinner: 'bounce', // 'plane' | 'chase' | 'bounce' | 'wave' | 'pulse' | 'flow' | 'swing' | 'circle' | 'circle-fade' | 'grid' | 'fold' | 'wander' - spinColor : '#d2d2d2', - titleattr: 'title', - titlePosition: 'top', // 'top' || 'bottom' - titleStyle: 'bar', // 'bar' | 'block' | 'pill' | 'transparent' - toolsBackground: '#1C1C1C', // 'transparent' - toolsColor: '#d2d2d2', - onPreOpen: function(){ return true; }, // Return the selected object - set return false to prevent opening - onPostOpen: function(){}, // Return: current_item, gallIndex, thenext, theprev - onPreClose: function(){ return true; }, // Return: current_item, gallIndex, thenext, theprev - set return false to prevent closing - onNavComplete: function(){}, // Return: current_item, gallIndex, thenext, theprev - onContentLoaded: function(){}, // Return: newcontent - onInit: function(){}, // Return: plugin obj - jQuerySelectors: false, - }; - - /** - * Generate spinner html - * @param {Array} spinarray Selected spinner - */ - function createspinner(spinarray){ - if (!spinarray) { - return 'Loading...'; - } - let spinner = '
'; - let i = 0; - for (i = 0; i < spinarray[2]; i++) { - spinner += '
'; - } - spinner += '
'; - return spinner; - } - - /** - * A simple forEach() implementation for Arrays, Objects and NodeLists - * @param {Array|Object|NodeList} collection Collection of items to iterate - * @param {Function} callback Callback function for each iteration - * @param {Array|Object|NodeList} scope Object/NodeList/Array that forEach is iterating over (aka `this`) - */ - function forEach(collection, callback, scope) { - if (Object.prototype.toString.call(collection) === '[object Object]') { - let prop; - for (prop in collection) { - if (Object.prototype.hasOwnProperty.call(collection, prop)) { - callback.call(scope, collection[prop], prop, collection); - } - } - } else { - let i = 0; - let len = collection.length; - for (i = 0; i < len; i++) { - callback.call(scope, collection[i], i, collection); - } - } - } - - /** - * Merge defaults with user options - * @param {Object} defaults Default settings - * @param {Object} options User options - * @returns {Object} Merged values of defaults and options - */ - function extend( defaults, options ) { - let extended = {}; - - forEach(defaults, function (value, prop) { - extended[prop] = defaults[prop]; - }); - - forEach(options, function (value, prop) { - extended[prop] = options[prop]; - }); - return extended; - } - - /** - * Linear animation timing - */ - function timingLinear(timeFraction){ - return timeFraction; - } - - /** - * Animate with callback - * https://javascript.info/js-animation - */ - function animate({timing, draw, duration}) { - let start = performance.now(); - requestAnimationFrame(function animate(time) { - // timeFraction goes from 0 to 1 - let timeFraction = (time - start) / duration; - if (timeFraction > 1) { - timeFraction = 1; - } - // calculate the current animation state - let progress = timing(timeFraction); - draw(progress); // draw it - if (timeFraction < 1) { - requestAnimationFrame(animate); - } - }); - } - - /** - * Parse Youtube or Vimeo videos and get host & ID - */ - function parseVideo(url) { - let type, match, vid; - let regYt = /(https?:\/\/)?((www\.)?(youtube(-nocookie)?|youtube.googleapis)\.com.*(v\/|v=|vi=|vi\/|e\/|embed\/|user\/.*\/u\/\d+\/)|youtu\.be\/)([_0-9a-z-]+)/i; - match = url.match(regYt); - if (match && match[7]) { - type = 'youtube'; - vid = match[7]; - } else { - let regVim = /^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/; - match = url.match(regVim); - if (match && match[5]) { - type = 'vimeo'; - vid = match[5]; - } - } - return { - type: type, - id: vid - }; - } - - /** - * Get additional url parameters - */ - function getUrlParameter(url) { - let result = ''; - let sPageURL = decodeURIComponent(url); - let firstsplit = sPageURL.split('?'); - - if (firstsplit[1] !== undefined) { - let sURLVariables = firstsplit[1].split('&'); - let sParameterName; - let i; - for (i = 0; i < sURLVariables.length; i++) { - sParameterName = sURLVariables[i].split('='); - result = result + '&'+ sParameterName[0]+'='+ sParameterName[1]; - } - } - return encodeURI(result); - } - - /** - * Get all images from string - */ - function getImages(string) { - imagesHolder.innerHTML = string; - return imagesHolder.querySelectorAll('img'); - } - - /** - * Update item settings. - */ - function updateVars(obj){ - if (!obj) { - return false; - } - navigationDisabled = true; - current_item = obj; - nextok = false; - prevok = false; - set_maxWidth = obj.getAttribute("data-maxwidth") || obj.settings.maxWidth; - set_overlayColor = obj.getAttribute("data-overlay") || obj.settings.overlayColor; - set_ratio = obj.getAttribute("data-ratio") || obj.settings.ratio; - set_autoplay = obj.getAttribute("data-autoplay") || obj.settings.autoplay; - set_href = obj.getAttribute("data-href") || obj.getAttribute('href'); - set_customclass = obj.getAttribute("data-customclass") || obj.settings.customClass; - title = obj.getAttribute(obj.settings.titleattr) || ''; - thisborder = obj.getAttribute("data-border") || obj.settings.border; - } - - /** - * Close modal. - */ - function close() { - if (!current_item || !document.body.classList.contains('vbox-open')) { - return false; - } - if (current_item.settings.onPreClose && typeof current_item.settings.onPreClose === 'function') { - current_item.settings.onPreClose(current_item, gallIndex, thenext, theprev); - if (current_item.settings.onPreClose === false) { - return false; - } - } - document.body.removeEventListener('keydown', keyboardHandler); - document.body.classList.remove('vbox-open'); - - current_item.focus(); - animate({ - duration: 200, - timing: timingLinear, - draw: function(progress) { - overlay.style.opacity = 1 - progress; - if (progress === 1){ - overlay.remove(); - } - } - }); - } - - /** - * Navigate gallery. - */ - function next() { - navigateGall(thenext); - } - function prev() { - navigateGall(theprev); - } - - /** - * Keyboard navigation. - */ - function keyboardHandler(e) { - if (e.keyCode === 27) { // esc - close(); - } - if (!throttle) { - if (e.keyCode == 37 && prevok === true) { // < - navigateGall(theprev); - } - if (e.keyCode == 39 && nextok === true) { // > - navigateGall(thenext); - } - /* prevent keyboard processing until timer completed */ - throttle = setTimeout(() => { - throttle = null; - }, 100); - } - } - - /** - * Append and fade-in new content - */ - function contentLoaded(){ - - navigationDisabled = false; - - content.style.opacity = 0; - - content.innerHTML = newcontent; - - let vboxChild = content.querySelector(":first-child"); - - vboxChild.classList.add('vbox-child'); - - vboxChild.style.backgroundColor = current_item.settings.bgcolor; - vboxChild.style.maxWidth = set_maxWidth; - vboxChild.style.transform = 'scale(0.9)'; - vboxChild.style.transition = 'transform 200ms'; - - // Fix weird drag - let childImageLock = content.querySelector('.vbox-child img'); - - if (childImageLock) { - childImageLock.addEventListener('dragstart', function(e) { - e.preventDefault(); - }); - } - - // reset content scroll - container.scrollTo(0, 0); - vboxChild.style.transform = 'scale(1)'; - - overlay.style.setProperty('--vbox-padding', thisborder); - - // Reset custom classes. - forEach(overlay.classList, function(obj){ - if (obj !== 'vbox-overlay') { - overlay.classList.remove(obj); - } - }); - - // Set custom class. - if (set_customclass){ - overlay.classList.add(set_customclass); - } - - animate({ - duration: 200, - timing: timingLinear, - draw: function(progress) { - content.style.opacity = progress; - if (progress === 1){ - elPreloader.classList.add('vbox-hidden'); - } - } - }); - if (current_item.settings.onContentLoaded && typeof current_item.settings.onContentLoaded === 'function') { - current_item.settings.onContentLoaded(newcontent); - } - } - - /** - * Check animation state - * @param {string} state 'loading' | 'animated' - */ - function checkState(state) { - if (!content.classList.contains('vbox-' + state)) { - contentLoaded(); - } - } - - /** - * Load iFrame - */ - function loadIframe(dest, ratio){ - content.classList.add("vbox-loading"); - newcontent = '
'; - content.classList.remove("vbox-loading"); - checkState('animated'); - } - - /** - * Load videos - */ - function loadVid(dest, ratio, autoplay){ - - content.classList.add("vbox-loading"); - - let stringAutoplay; - // check if it's a video file - thanks to @alexxandar - if (dest.search(/.+\.mp4|og[gv]|webm/) !== -1) { - stringAutoplay = autoplay ? " autoplay" : ""; - newcontent = '
'; - } else { - let player; - let videoObj = parseVideo(dest); - - // set rel=0 to hide related videos at the end of YT + optional autoplay - stringAutoplay = autoplay ? "?rel=0&autoplay=1" : "?rel=0"; - let queryvars = stringAutoplay + getUrlParameter(dest); - - if (videoObj.type == 'vimeo') { - player = 'https://player.vimeo.com/video/'; - } else if (videoObj.type == 'youtube') { - player = 'https://www.youtube.com/embed/'; - } - newcontent = '
'; - } - - content.classList.remove("vbox-loading"); - checkState('animated'); - } - - /** - * Load inline content - */ - function loadInline(dest){ - let inlineContent = document.querySelector(dest); - if (inlineContent) { - content.classList.add("vbox-loading"); - newcontent = '
' + inlineContent.innerHTML + '
'; - content.classList.remove("vbox-loading"); - checkState('animated'); - } - } - - /** - * Preload images from ajax call - */ - function loadAjaxImages(){ - images = getImages(newcontent); - if (images.length) { - let imgCounter = 0; - forEach(images, function(getimg){ - let srcimg = getimg.src; - imgLoader = new Image(); - imgLoader.onload = function(){ - imgCounter++; - if ( imgCounter == images.length ) { - content.classList.remove("vbox-loading"); - checkState('animated'); - } - }; - imgLoader.onerror = function(){ - imgCounter++; - if ( imgCounter == images.length ) { - content.classList.remove("vbox-loading"); - checkState('animated'); - } - }; - imgLoader.src = srcimg; - }); - } else { - content.classList.remove("vbox-loading"); - checkState('animated'); - } - } - - /** - * Load Ajax - */ - function loadAjax(dest){ - content.classList.add("vbox-loading"); - let xhr = new XMLHttpRequest(); - xhr.open("GET", dest, true); - xhr.onload = function() { - newcontent = '
'+ xhr.response +'
'; - loadAjaxImages(); - }; - xhr.onerror = function() { - newcontent = '
'; - content.classList.remove("vbox-loading"); - checkState('animated'); - }; - xhr.send(); - } - - /** - * Preload image - */ - function loadImage(dest){ - - imgLoader.onload = function(){ - // image has been loaded - newcontent = '
'; - content.classList.remove('vbox-loading'); - checkState('animated'); - }; - imgLoader.src = dest; - } - - /** - * Start Drag - */ - function dragStart(e) { - if (!navigationDisabled) { - let speed = (current_item.settings.navSpeed * 0.84); - content.style.transition = 'margin '+ speed + 'ms ease-out, opacity '+ speed + 'ms ease-out'; - startY = endY = e.pageY; - startX = endX = e.pageX; - startouch = true; - } - } - - /** - * End Drag - */ - function dragEnd(e) { - if (startouch) { - startouch = false; - let subject = current_item; - let change = false; - diff = endX - startX; - - if (diff < 0 && nextok) { - subject = thenext; - change = true; - } - if (diff > 0 && prevok) { - subject = theprev; - change = true; - } - - if (Math.abs(diff) >= threshold && change) { - navigateGall(subject); - } else { - content.style.marginLeft = 0; - content.style.opacity = 1; - } - } - } - - /** - * Drag items - */ - function drag(e) { - if (startouch && !navigationDisabled) { - endX = e.pageX; - endY = e.pageY; - diffX = endX - startX; - diffY = endY - startY; - - let absdiffX = Math.abs(diffX); - let absdiffY = Math.abs(diffY); - - if ((absdiffX > absdiffY) && (absdiffX <= 180)) { - let diffopac = (1 - absdiffX / 180) * 1.5; - e.preventDefault(); - content.style.marginLeft = diffX + 'px'; - content.style.opacity = diffopac; - } - } - } - - - function setShareButtons(href){ - // Navigator share - if (navigator.canShare) { - const shareData = { - url: href - }; - blockshare.insertAdjacentHTML('beforeend', ''); - const mobileShareBtn = blockshare.querySelector('.vbox-share-mobile'); - mobileShareBtn.addEventListener('click', function(e){ - e.preventDefault(); - navigator.share(shareData); - }); - } - - // Download - blockshare.insertAdjacentHTML('beforeend', ''+downloadIcon+''); - - // Copy link - blockshare.insertAdjacentHTML('beforeend', '
'); - const shareCopyBtn = blockshare.querySelector('.vbox-share-copy'); - shareCopyBtn.addEventListener('click', function(e){ - e.preventDefault(); - let tooltip = document.getElementById("myTooltip"); - navigator.clipboard.writeText(href).then(function() { - tooltip.innerHTML = '
Copied
'; - }, function() { - console.log('copy failed'); - }); - }); - } - - /** - * Check navigation - * @param {object} el Current item - */ - function checknav(el){ - - if (!el) { - return false; - } - - thisgall = el.dataset.gall; - numeratio = el.settings.numeration; - infinigall = el.settings.infinigall; - blockshare.innerHTML = ''; - - let vbtype = el.dataset.vbtype; - - if (el.settings.share && vbtype !== 'iframe' && vbtype !== 'inline' && vbtype !== 'ajax' ) { - setShareButtons(el.href); - } - - items = document.querySelectorAll('.vbox-item[data-gall="' + thisgall + '"]'); - - current_index = Array.prototype.indexOf.call(items, el); - - if (items.length < 2) { - infinigall = false; - numeratio = false; - } - - thenext = items[current_index + 1]; - theprev = items[current_index - 1]; - - if (!thenext && infinigall) { - thenext = items[0]; - } - - if (!theprev && infinigall) { - theprev = items[items.length - 1]; - } - - // Update gallery numeration - if (items.length >= 1) { - gallIndex = current_index + 1; - blocknum.innerHTML = gallIndex + ' / ' + items.length; - } else { - gallIndex = 1; - } - if (numeratio) { - blocknum.classList.remove('vbox-hidden'); - } else { - blocknum.classList.add('vbox-hidden'); - } - - // Update title - if (title !== '') { - blocktitle.classList.remove('vbox-hidden'); - } else { - blocktitle.classList.add('vbox-hidden'); - } - blocktitle.innerHTML = title; - - // update navigation arrows - prevok = false; - nextok = false; - - if (thenext || infinigall) { - nextok = true; - } - - if (current_index > 0 || infinigall) { - prevok = true; - } - - // activate swipe - if ((prevok || nextok) && el.settings.navTouch) { - content.classList.add('vbox-grab'); - content.addEventListener("touchstart", dragStart, false); - content.addEventListener("touchend", dragEnd, false); - content.addEventListener("touchmove", drag, false); - content.addEventListener("mousedown", dragStart, false); - content.addEventListener("mouseup", dragEnd, false); - content.addEventListener("mouseout", dragEnd, false); - content.addEventListener("mousemove", drag, false); - } else { - content.classList.remove('vbox-grab'); - content.removeEventListener("touchstart", dragStart, false); - content.removeEventListener("touchend", dragEnd, false); - content.removeEventListener("touchmove", drag, false); - content.removeEventListener("mousedown", dragStart, false); - content.removeEventListener("mouseup", dragEnd, false); - content.removeEventListener("mouseout", dragEnd, false); - content.removeEventListener("mousemove", drag, false); - } - - let vbox_next = overlay.querySelector('.vbox-next'); - let vbox_prev = overlay.querySelector('.vbox-prev'); - - if (prevok) { - vbox_prev.classList.remove('vbox-hidden'); - } else { - vbox_prev.classList.add('vbox-hidden'); - } - - if (nextok) { - vbox_next.classList.remove('vbox-hidden'); - } else { - vbox_next.classList.add('vbox-hidden'); - } - - if (!el.settings.navigation) { - vbox_next.classList.add('vbox-hidden'); - vbox_prev.classList.add('vbox-hidden'); - } - } // Checknav - - /** - * Update overlay and tools style. - */ - function updateOverlay(destination){ - - if (!destination) { - return false; - } - - backdrop.style.backgroundColor = set_overlayColor; - - // Custom preloader color. - elPreloaderInner.innerHTML = createspinner(spinners[destination.settings.spinner]); - - overlay.style.setProperty('--sk-color', destination.settings.spinColor); - - elPreloader.classList.remove('vbox-hidden'); - - blockshare.classList.remove('vbox-top', 'vbox-bottom'); - blocktitle.classList.remove('vbox-top', 'vbox-bottom'); - - if (destination.settings.titlePosition == 'top') { - blocktitle.classList.add('vbox-top'); - blockshare.classList.add('vbox-bottom'); - } else { - blocktitle.classList.add('vbox-bottom'); - blockshare.classList.add('vbox-top'); - } - - let titleWidth = destination.settings.titleStyle === 'bar' ? '100%' : 'auto'; - let titleRadius = destination.settings.titleStyle === 'pill' ? '5em' : '0'; - let shareWidth = destination.settings.shareStyle === 'bar' ? '100%' : 'auto'; - let shareRadius = destination.settings.shareStyle === 'pill' ? '5em' : '0'; - let titlebg = destination.settings.titleStyle === 'transparent' ? 'transparent' : destination.settings.toolsBackground; - let sharebg = destination.settings.shareStyle === 'transparent' ? 'transparent' : destination.settings.toolsBackground; - - overlay.style.setProperty('--vbox-title-width', titleWidth); - overlay.style.setProperty('--vbox-title-radius', titleRadius); - overlay.style.setProperty('--vbox-share-width', shareWidth); - overlay.style.setProperty('--vbox-share-radius', shareRadius); - overlay.style.setProperty('--vbox-tools-color', destination.settings.toolsColor); - overlay.style.setProperty('--vbox-title-background', titlebg); - overlay.style.setProperty('--vbox-share-background', sharebg); - } - - /** - * Load content - */ - function loadContent(){ - if (!current_item) { - return false; - } - let vbtype = current_item.dataset.vbtype; - - switch (vbtype) { - case 'iframe': - loadIframe(set_href, set_ratio); - break; - case 'inline': - loadInline(set_href); - break; - case 'ajax': - loadAjax(set_href); - break; - case 'video': - loadVid(set_href, set_ratio, set_autoplay); - break; - default: - loadImage(set_href); - } - } - - /** - * Gallery navigation. - */ - function navigateGall(destination) { - - if (!destination || navigationDisabled || !document.body.classList.contains('vbox-open')) { - return false; - } - - updateVars(destination); - updateOverlay(destination); - - // swipe out item - let speed = (current_item.settings.navSpeed * 0.84); - content.style.transition = 'margin '+ speed + 'ms ease-out, opacity '+ speed + 'ms ease-out'; - - if (destination === theprev) { - content.classList.add("swipe-right"); - } - if (destination === thenext) { - content.classList.add("swipe-left"); - } - - elPreloader.classList.remove('vbox-hidden'); - - let startopacity = content.style.opacity; - - content.classList.add("vbox-animated", "vbox-loading"); - - checknav(destination); - - animate({ - duration: current_item.settings.navSpeed, - timing: timingLinear, - draw: function(progress) { - - content.style.opacity = startopacity - progress/startopacity; - - if (progress === 1){ - content.classList.remove("swipe-left", "swipe-right", "vbox-animated"); - content.style.marginLeft = 0; - content.style.transition = ''; - - checkState('loading'); - - navigationDisabled = false; - - if (current_item.settings.onNavComplete && typeof current_item.settings.onNavComplete === 'function') { - current_item.settings.onNavComplete(current_item, gallIndex, thenext, theprev); - } - } - } - }); - loadContent(); - } - - /** - * Open item. - */ - function open(obj) { - - if (document.body.classList.contains('vbox-open') || !obj) { - return false; - } - - if (obj.settings.onPreOpen && typeof obj.settings.onPreOpen === 'function') { - obj.settings.onPreOpen(obj); - } - if (!obj.settings.onPreOpen) { - return false; - } - - updateVars(obj); - - document.body.insertAdjacentHTML('beforeend', core); - document.body.classList.add('vbox-open'); - - overlay = document.querySelector(".vbox-overlay"); - backdrop = overlay.querySelector(".vbox-backdrop"); - container = overlay.querySelector(".vbox-container"); - content = container.querySelector(".vbox-content"); - blocknum = overlay.querySelector(".vbox-num"); - blockshare = overlay.querySelector(".vbox-share"); - blocktitle = overlay.querySelector(".vbox-title"); - elPreloader = overlay.querySelector(".vbox-preloader"); - elPreloaderInner = elPreloader.querySelector(".vbox-preloader-inner"); - - overlay.style.opacity = 0; - - updateOverlay(obj); - checknav(obj); - - content.classList.add("vbox-animated", "vbox-loading"); - - // fade in overlay - animate({ - duration: 200, - timing: timingLinear, - draw: function(progress) { - overlay.style.opacity = progress; - if (progress === 1){ - content.classList.remove('vbox-animated'); - navigationDisabled = false; - checkState('loading'); - if (current_item.settings.onPostOpen && typeof current_item.settings.onPostOpen === 'function') { - current_item.settings.onPostOpen(current_item, gallIndex, thenext, theprev); - } - } - } - }); - - loadContent(); - - // Keyboard actions - if (obj.settings.navKeyboard) { - document.body.addEventListener('keydown', keyboardHandler); - - // Reset the throttle timer - document.body.addEventListener('keyup', () => { - if (throttle) { - clearTimeout(throttle); - throttle = null; - } - }); - } - - // Prev gallery - document.querySelector('.vbox-prev').addEventListener('click', function(){ - navigateGall(theprev); - }); - - // Newxt gallery - document.querySelector('.vbox-next').addEventListener('click', function(){ - navigateGall(thenext); - }); - - // Close modal. - overlay.addEventListener('click', function(e){ - let closeBtn = document.querySelector('.vbox-close'); - if (closeBtn) { - if (closeBtn.contains(e.target) || closeBtn === e.target || (current_item.settings.overlayClose && - e.target.classList.contains('vbox-overlay') || - e.target.classList.contains('vbox-content') || - e.target.classList.contains('vbox-backdrop') || - e.target.classList.contains('vbox-close') || - e.target.classList.contains('vbox-preloader') || - e.target.classList.contains('vbox-container') - )) { - close(); - } - } - }); - } - - /** - * Initialize Plugin - */ - function init(venobox, settings) { - - if (settings.onInit && typeof settings.onInit === 'function') { - settings.onInit(venobox); - } - - let selectors = settings.jQuerySelectors || document.querySelectorAll(settings.selector); - let navigation = 'NextPrev'; - let vbheader = '
0/0
'; - let vbfooter = '
'; - let preloader = '
'; - core = '
' + preloader + '
' + vbheader + navigation + vbfooter + '
'; - - /** - * Loop items. - */ - forEach(selectors, function(obj){ - if (obj.classList.contains("vbox-item")) { - return true; - } - obj.settings = settings; - obj.classList.add("vbox-item"); - - // Open Link - obj.addEventListener("click", function(e){ - e.preventDefault(); - // Remove focus from link to avoid multiple calls with enter key - obj.blur(); - open(obj); - return false; - }); // Click; - }); // forEach - - if (settings.popup) { - let popup = document.querySelector(settings.popup); - popup.settings = settings; - open(popup); - } - } // init - - /** - * VenoBox constructor - */ - const VenoBox = function (options) { - const venobox = {}; - - // Merge user options with defaults - let settings = extend( defaults, options || {} ); - - venobox.close = close; - venobox.next = next; - venobox.prev = prev; - venobox.open = open; - venobox.settings = settings; - - init(venobox, settings); - - // Public APIs - return venobox; - }; - - /* jQuery bridge for $().venobox() */ - if (typeof jQuery === 'function') { - (function($){ - $.fn.extend({ - // plugin name - venobox - venobox: function(options) { - const pluginoptions = options || {}; - pluginoptions.jQuerySelectors = this; - // Init venobx - new VenoBox({pluginoptions}); - } // venobox - }); // extend - })(jQuery); - } - - // See https://www.npmjs.com/package/venobox documentation. - - return VenoBox; - -}))); diff --git a/venobox/v2/dist/venobox.min.css b/venobox/v2/dist/venobox.min.css deleted file mode 100644 index 2496846..0000000 --- a/venobox/v2/dist/venobox.min.css +++ /dev/null @@ -1,2 +0,0 @@ -.vbox-overlay{--vbox-tools-color:#fff;--vbox-title-background:#101010;--vbox-title-width:'auto';--vbox-title-radius:0;--vbox-share-background:#101010;--vbox-share-width:'auto';--vbox-share-radius:0;--vbox-padding:0}.vbox-overlay *,.vbox-overlay :after,.vbox-overlay :before{-webkit-backface-visibility:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.vbox-overlay *{-webkit-backface-visibility:visible;backface-visibility:visible}.vbox-overlay{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;position:fixed;left:0;top:0;bottom:0;right:0;z-index:999999}.vbox-share,.vbox-title{line-height:1;position:fixed;z-index:98;text-align:center;margin:0 auto;color:var(--vbox-tools-color)}.vbox-title{font-size:12px;background-color:var(--vbox-title-background);width:var(--vbox-title-width);border-radius:var(--vbox-title-radius);padding:12px 54px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.vbox-share{font-size:24px;padding:0 .35em;background-color:var(--vbox-share-background);width:var(--vbox-share-width);border-radius:var(--vbox-share-radius)}.vbox-link-btn,button.vbox-link-btn,button.vbox-link-btn:active,button.vbox-link-btn:focus,button.vbox-link-btn:hover{border:none!important;background:0 0!important;box-shadow:none!important;color:inherit!important;padding:6px 12px;outline:0;display:inline-block;cursor:pointer}.vbox-share a{color:inherit!important;padding:6px 12px;display:inline-block}.vbox-share svg{z-index:10;vertical-align:middle}.vbox-close{cursor:pointer;position:fixed;top:0;right:0;z-index:99;padding:6px 15px;color:#000;color:var(--vbox-tools-color);border:0;font-size:24px;display:flex;align-items:center;opacity:.8;transition:opacity .2s}.vbox-close:hover{opacity:1}.vbox-left-corner{cursor:pointer;position:fixed;left:0;top:0;overflow:hidden;line-height:1;font-size:12px;z-index:99;display:flex;align-items:center;color:var(--vbox-tools-color)}.vbox-num{display:inline-block;padding:12px 15px}.vbox-left{left:0}.vbox-right{right:0}.vbox-top{top:0}.vbox-bottom{bottom:0}.vbox-next,.vbox-prev{position:fixed;top:50%;margin-top:-15px;overflow:hidden;cursor:pointer;display:block;width:45px;height:45px;z-index:99;opacity:.8;transition:opacity .2s}.vbox-next:hover,.vbox-prev:hover{opacity:1}.vbox-next span,.vbox-prev span{position:relative;width:20px;height:20px;border:2px solid transparent;border-top-color:var(--vbox-tools-color);border-right-color:var(--vbox-tools-color);text-indent:-100px;position:absolute;top:8px;display:block}.vbox-prev{left:15px}.vbox-next{right:15px}.vbox-prev span{left:10px;-ms-transform:rotate(-135deg);-webkit-transform:rotate(-135deg);transform:rotate(-135deg)}.vbox-next span{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);right:10px}.vbox-inline,.venoratio{position:relative;width:100%;margin:0 auto}.venoratio::before{display:block;padding-top:var(--vb-aspect-ratio);content:""}.venoratio>*{position:absolute;top:0;left:0;width:100%;height:100%;padding:var(--vbox-padding)}.venoratio-1x1{--vb-aspect-ratio:100%}.venoratio-4x3{--vb-aspect-ratio:calc(3 / 4 * 100%)}.venoratio-16x9{--vb-aspect-ratio:calc(9 / 16 * 100%)}.venoratio-21x9{--vb-aspect-ratio:calc(9 / 21 * 100%)}.venoratio-full{--vb-aspect-ratio:calc(100vh - 100px)}.vbox-child.vbox-inline,.vbox-child.venoratio{max-width:100%}.vbox-open{overflow:hidden}.vbox-container{position:absolute;left:0;right:0;top:0;bottom:0;overflow-x:hidden;overflow-y:scroll;overflow-scrolling:touch;-webkit-overflow-scrolling:touch;z-index:20;max-height:100%;padding:30px 0}.vbox-content{opacity:0}.vbox-content{text-align:center;width:100%;position:relative;overflow:hidden;padding:20px 4%;display:flex;align-items:center;justify-content:center;min-height:100%}.vbox-container img{max-width:100%;height:auto}.vbox-child{box-shadow:0 0 12px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);max-width:100%;text-align:initial;padding:var(--vbox-padding)}.vbox-child img{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;display:block}.vbox-grab .vbox-child img{cursor:grab}.vbox-child>iframe{border:none!important}.vbox-content.swipe-left{margin-left:-200px!important}.vbox-content.swipe-right{margin-left:200px!important}.vbox-preloader{-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-o-transform:translateZ(0);transform:translateZ(0)}.vbox-preloader .vbox-preloader-inner{opacity:1;transition:opacity .2s}.vbox-hidden{display:none}.vbox-preloader.vbox-hidden .vbox-preloader-inner{opacity:0}.vbox-backdrop{position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:translateZ(-1px);-moz-transform:translateZ(-1px);-o-transform:translateZ(-1px);transform:translateZ(-1px);z-index:0}.vbox-tooltip{position:relative;display:inline-block}.vbox-tooltip .vbox-tooltip-text{visibility:hidden;color:#fff;text-align:center;padding:0;position:absolute;z-index:1;bottom:100%;left:0;opacity:0;transition:opacity .3s;margin-bottom:2px;font-family:sans-serif}.vbox-top .vbox-tooltip .vbox-tooltip-text{bottom:auto;top:100%;margin-bottom:0;margin-top:2px}.vbox-tooltip-inner{padding:5px 10px;background-color:rgba(0,0,0,.9);border-radius:6px;font-size:10px}.vbox-tooltip:hover .vbox-tooltip-text{visibility:visible;opacity:1}.vbox-overlay{--sk-size:40px;--sk-color:#333}.sk-center{margin:auto}.sk-plane{width:var(--sk-size);height:var(--sk-size);background-color:var(--sk-color);animation:sk-plane 1.2s infinite ease-in-out}@keyframes sk-plane{0%{transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}100%{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.sk-chase{width:var(--sk-size);height:var(--sk-size);position:relative;animation:sk-chase 2.5s infinite linear both}.sk-chase-dot{width:100%;height:100%;position:absolute;left:0;top:0;animation:sk-chase-dot 2s infinite ease-in-out both}.sk-chase-dot:before{content:'';display:block;width:25%;height:25%;background-color:var(--sk-color);border-radius:100%;animation:sk-chase-dot-before 2s infinite ease-in-out both}.sk-chase-dot:nth-child(1){animation-delay:-1.1s}.sk-chase-dot:nth-child(2){animation-delay:-1s}.sk-chase-dot:nth-child(3){animation-delay:-.9s}.sk-chase-dot:nth-child(4){animation-delay:-.8s}.sk-chase-dot:nth-child(5){animation-delay:-.7s}.sk-chase-dot:nth-child(6){animation-delay:-.6s}.sk-chase-dot:nth-child(1):before{animation-delay:-1.1s}.sk-chase-dot:nth-child(2):before{animation-delay:-1s}.sk-chase-dot:nth-child(3):before{animation-delay:-.9s}.sk-chase-dot:nth-child(4):before{animation-delay:-.8s}.sk-chase-dot:nth-child(5):before{animation-delay:-.7s}.sk-chase-dot:nth-child(6):before{animation-delay:-.6s}@keyframes sk-chase{100%{transform:rotate(360deg)}}@keyframes sk-chase-dot{100%,80%{transform:rotate(360deg)}}@keyframes sk-chase-dot-before{50%{transform:scale(.4)}0%,100%{transform:scale(1)}}.sk-bounce{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-bounce-dot{width:100%;height:100%;border-radius:50%;background-color:var(--sk-color);opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite cubic-bezier(.455,.03,.515,.955)}.sk-bounce-dot:nth-child(2){animation-delay:-1s}@keyframes sk-bounce{0%,100%{transform:scale(0)}45%,55%{transform:scale(1)}}.sk-wave{width:var(--sk-size);height:var(--sk-size);display:flex;justify-content:space-between}.sk-wave-rect{background-color:var(--sk-color);height:100%;width:15%;animation:sk-wave 1.2s infinite ease-in-out}.sk-wave-rect:nth-child(1){animation-delay:-1.2s}.sk-wave-rect:nth-child(2){animation-delay:-1.1s}.sk-wave-rect:nth-child(3){animation-delay:-1s}.sk-wave-rect:nth-child(4){animation-delay:-.9s}.sk-wave-rect:nth-child(5){animation-delay:-.8s}@keyframes sk-wave{0%,100%,40%{transform:scaleY(.4)}20%{transform:scaleY(1)}}.sk-pulse{width:var(--sk-size);height:var(--sk-size);background-color:var(--sk-color);border-radius:100%;animation:sk-pulse 1.2s infinite cubic-bezier(.455,.03,.515,.955)}@keyframes sk-pulse{0%{transform:scale(0)}100%{transform:scale(1);opacity:0}}.sk-flow{width:calc(var(--sk-size) * 1.3);height:calc(var(--sk-size) * 1.3);display:flex;justify-content:space-between}.sk-flow-dot{width:25%;height:25%;background-color:var(--sk-color);border-radius:50%;animation:sk-flow 1.4s cubic-bezier(.455,.03,.515,.955) 0s infinite both}.sk-flow-dot:nth-child(1){animation-delay:-.3s}.sk-flow-dot:nth-child(2){animation-delay:-.15s}@keyframes sk-flow{0%,100%,80%{transform:scale(.3)}40%{transform:scale(1)}}.sk-swing{width:var(--sk-size);height:var(--sk-size);position:relative;animation:sk-swing 1.8s infinite linear}.sk-swing-dot{width:45%;height:45%;position:absolute;top:0;left:0;right:0;margin:auto;background-color:var(--sk-color);border-radius:100%;animation:sk-swing-dot 2s infinite ease-in-out}.sk-swing-dot:nth-child(2){top:auto;bottom:0;animation-delay:-1s}@keyframes sk-swing{100%{transform:rotate(360deg)}}@keyframes sk-swing-dot{0%,100%{transform:scale(.2)}50%{transform:scale(1)}}.sk-circle{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-circle-dot{width:100%;height:100%;position:absolute;left:0;top:0}.sk-circle-dot:before{content:'';display:block;width:15%;height:15%;background-color:var(--sk-color);border-radius:100%;animation:sk-circle 1.2s infinite ease-in-out both}.sk-circle-dot:nth-child(1){transform:rotate(30deg)}.sk-circle-dot:nth-child(2){transform:rotate(60deg)}.sk-circle-dot:nth-child(3){transform:rotate(90deg)}.sk-circle-dot:nth-child(4){transform:rotate(120deg)}.sk-circle-dot:nth-child(5){transform:rotate(150deg)}.sk-circle-dot:nth-child(6){transform:rotate(180deg)}.sk-circle-dot:nth-child(7){transform:rotate(210deg)}.sk-circle-dot:nth-child(8){transform:rotate(240deg)}.sk-circle-dot:nth-child(9){transform:rotate(270deg)}.sk-circle-dot:nth-child(10){transform:rotate(300deg)}.sk-circle-dot:nth-child(11){transform:rotate(330deg)}.sk-circle-dot:nth-child(1):before{animation-delay:-1.1s}.sk-circle-dot:nth-child(2):before{animation-delay:-1s}.sk-circle-dot:nth-child(3):before{animation-delay:-.9s}.sk-circle-dot:nth-child(4):before{animation-delay:-.8s}.sk-circle-dot:nth-child(5):before{animation-delay:-.7s}.sk-circle-dot:nth-child(6):before{animation-delay:-.6s}.sk-circle-dot:nth-child(7):before{animation-delay:-.5s}.sk-circle-dot:nth-child(8):before{animation-delay:-.4s}.sk-circle-dot:nth-child(9):before{animation-delay:-.3s}.sk-circle-dot:nth-child(10):before{animation-delay:-.2s}.sk-circle-dot:nth-child(11):before{animation-delay:-.1s}@keyframes sk-circle{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.sk-circle-fade{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-circle-fade-dot{width:100%;height:100%;position:absolute;left:0;top:0}.sk-circle-fade-dot:before{content:'';display:block;width:15%;height:15%;background-color:var(--sk-color);border-radius:100%;animation:sk-circle-fade 1.2s infinite ease-in-out both}.sk-circle-fade-dot:nth-child(1){transform:rotate(30deg)}.sk-circle-fade-dot:nth-child(2){transform:rotate(60deg)}.sk-circle-fade-dot:nth-child(3){transform:rotate(90deg)}.sk-circle-fade-dot:nth-child(4){transform:rotate(120deg)}.sk-circle-fade-dot:nth-child(5){transform:rotate(150deg)}.sk-circle-fade-dot:nth-child(6){transform:rotate(180deg)}.sk-circle-fade-dot:nth-child(7){transform:rotate(210deg)}.sk-circle-fade-dot:nth-child(8){transform:rotate(240deg)}.sk-circle-fade-dot:nth-child(9){transform:rotate(270deg)}.sk-circle-fade-dot:nth-child(10){transform:rotate(300deg)}.sk-circle-fade-dot:nth-child(11){transform:rotate(330deg)}.sk-circle-fade-dot:nth-child(1):before{animation-delay:-1.1s}.sk-circle-fade-dot:nth-child(2):before{animation-delay:-1s}.sk-circle-fade-dot:nth-child(3):before{animation-delay:-.9s}.sk-circle-fade-dot:nth-child(4):before{animation-delay:-.8s}.sk-circle-fade-dot:nth-child(5):before{animation-delay:-.7s}.sk-circle-fade-dot:nth-child(6):before{animation-delay:-.6s}.sk-circle-fade-dot:nth-child(7):before{animation-delay:-.5s}.sk-circle-fade-dot:nth-child(8):before{animation-delay:-.4s}.sk-circle-fade-dot:nth-child(9):before{animation-delay:-.3s}.sk-circle-fade-dot:nth-child(10):before{animation-delay:-.2s}.sk-circle-fade-dot:nth-child(11):before{animation-delay:-.1s}@keyframes sk-circle-fade{0%,100%,39%{opacity:0;transform:scale(.6)}40%{opacity:1;transform:scale(1)}}.sk-grid{width:var(--sk-size);height:var(--sk-size)}.sk-grid-cube{width:33.33%;height:33.33%;background-color:var(--sk-color);float:left;animation:sk-grid 1.3s infinite ease-in-out}.sk-grid-cube:nth-child(1){animation-delay:.2s}.sk-grid-cube:nth-child(2){animation-delay:.3s}.sk-grid-cube:nth-child(3){animation-delay:.4s}.sk-grid-cube:nth-child(4){animation-delay:.1s}.sk-grid-cube:nth-child(5){animation-delay:.2s}.sk-grid-cube:nth-child(6){animation-delay:.3s}.sk-grid-cube:nth-child(7){animation-delay:0s}.sk-grid-cube:nth-child(8){animation-delay:.1s}.sk-grid-cube:nth-child(9){animation-delay:.2s}@keyframes sk-grid{0%,100%,70%{transform:scale3D(1,1,1)}35%{transform:scale3D(0,0,1)}}.sk-fold{width:var(--sk-size);height:var(--sk-size);position:relative;transform:rotateZ(45deg)}.sk-fold-cube{float:left;width:50%;height:50%;position:relative;transform:scale(1.1)}.sk-fold-cube:before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sk-color);animation:sk-fold 2.4s infinite linear both;transform-origin:100% 100%}.sk-fold-cube:nth-child(2){transform:scale(1.1) rotateZ(90deg)}.sk-fold-cube:nth-child(4){transform:scale(1.1) rotateZ(180deg)}.sk-fold-cube:nth-child(3){transform:scale(1.1) rotateZ(270deg)}.sk-fold-cube:nth-child(2):before{animation-delay:.3s}.sk-fold-cube:nth-child(4):before{animation-delay:.6s}.sk-fold-cube:nth-child(3):before{animation-delay:.9s}@keyframes sk-fold{0%,10%{transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{transform:perspective(140px) rotateX(0);opacity:1}100%,90%{transform:perspective(140px) rotateY(180deg);opacity:0}}.sk-wander{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-wander-cube{background-color:var(--sk-color);width:20%;height:20%;position:absolute;top:0;left:0;--sk-wander-distance:calc(var(--sk-size) * 0.75);animation:sk-wander 2s ease-in-out -2s infinite both}.sk-wander-cube:nth-child(2){animation-delay:-.5s}.sk-wander-cube:nth-child(3){animation-delay:-1s}@keyframes sk-wander{0%{transform:rotate(0)}25%{transform:translateX(var(--sk-wander-distance)) rotate(-90deg) scale(.6)}50%{transform:translateX(var(--sk-wander-distance)) translateY(var(--sk-wander-distance)) rotate(-179deg)}50.1%{transform:translateX(var(--sk-wander-distance)) translateY(var(--sk-wander-distance)) rotate(-180deg)}75%{transform:translateX(0) translateY(var(--sk-wander-distance)) rotate(-270deg) scale(.6)}100%{transform:rotate(-360deg)}} -/*# sourceMappingURL=venobox.min.css.map */ \ No newline at end of file diff --git a/venobox/v2/dist/venobox.min.css.map b/venobox/v2/dist/venobox.min.css.map deleted file mode 100644 index b18443e..0000000 --- a/venobox/v2/dist/venobox.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/venobox.css"],"names":[],"mappings":"AAGA,cACI,mBAAoB,KACpB,wBAAyB,QACzB,mBAAqB,OACrB,oBAAsB,EACtB,wBAAyB,QACzB,mBAAqB,OACrB,oBAAsB,EACtB,eAAgB,EAIpB,gBAAyC,qBAAxB,sBACb,4BAA6B,OAC7B,mBAAmB,WACnB,gBAAgB,WAChB,WAAW,WAEf,gBACI,4BAA6B,QAC7B,oBAAqB,QAEzB,cACI,QAAS,aACT,QAAS,KACT,uBAAwB,OACxB,eAAgB,OAChB,wBAAyB,OACzB,gBAAiB,OACjB,oBAAqB,OACrB,YAAa,OACb,SAAU,MACV,KAAM,EACN,IAAK,EACL,OAAQ,EACR,MAAO,EACP,QAAS,OAGb,YAAa,YACT,YAAa,EACb,SAAU,MACV,QAAS,GACT,WAAY,OACZ,OAAQ,EAAE,KACV,MAAO,wBAEX,YACI,UAAW,KACX,iBAAkB,6BAClB,MAAO,wBACP,cAAe,yBACf,QAAS,KAAK,KACd,YAAa,OACb,SAAU,OACV,cAAe,SACf,QAAS,MAEb,YACI,UAAW,KACX,QAAS,EAAE,MACX,iBAAkB,6BAClB,MAAO,wBACP,cAAe,yBAEnB,eACA,qBAEA,4BACA,2BAFA,2BAGI,OAAQ,eACR,WAAY,cACZ,WAAY,eACZ,MAAO,kBACP,QAAS,IAAI,KACb,QAAS,EACT,QAAS,aACT,OAAQ,QAEZ,cACI,MAAO,kBACP,QAAS,IAAI,KACb,QAAS,aAGb,gBACI,QAAS,GACT,eAAgB,OAGpB,YACI,OAAQ,QACR,SAAU,MACV,IAAK,EACL,MAAO,EACP,QAAS,GACT,QAAS,IAAI,KACb,MAAO,KACP,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,sCAAsC,sCAAsC,gBAAgB,MAAM,UAAU,sCAAsC,sCAAsC,gBAAgB,IAAI,UAAU,cAAc,sCAAsC,gBAAgB,UAAW,KAAK,UAAU","sourcesContent":["/**\n * https://github.com/nicolafranchini/VenoBox/\n */\n.vbox-overlay{\n --vbox-tools-color: #fff;\n --vbox-title-background: #101010;\n --vbox-title-width: 'auto';\n --vbox-title-radius: 0;\n --vbox-share-background: #101010;\n --vbox-share-width: 'auto';\n --vbox-share-radius: 0;\n --vbox-padding: 0;\n}\n\n/* ------ venobox.css --------*/\n.vbox-overlay *, .vbox-overlay *:before, .vbox-overlay *:after{\n -webkit-backface-visibility: hidden;\n -webkit-box-sizing:border-box;\n -moz-box-sizing:border-box;\n box-sizing:border-box;\n}\n.vbox-overlay * { \n -webkit-backface-visibility: visible;\n backface-visibility: visible;\n}\n.vbox-overlay{\n display: -webkit-flex;\n display: flex;\n -webkit-flex-direction: column;\n flex-direction: column;\n -webkit-justify-content: center;\n justify-content: center;\n -webkit-align-items: center;\n align-items: center;\n position: fixed;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 999999;\n}\n\n.vbox-share, .vbox-title{\n line-height: 1;\n position: fixed;\n z-index: 98;\n text-align: center;\n margin: 0 auto;\n color: var(--vbox-tools-color);\n}\n.vbox-title{\n font-size: 12px;\n background-color: var(--vbox-title-background);\n width: var(--vbox-title-width);\n border-radius: var(--vbox-title-radius);\n padding: 12px 54px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n}\n.vbox-share{\n font-size: 24px;\n padding: 0 0.35em;\n background-color: var(--vbox-share-background);\n width: var(--vbox-share-width);\n border-radius: var(--vbox-share-radius);\n}\n.vbox-link-btn,\nbutton.vbox-link-btn,\nbutton.vbox-link-btn:hover,\nbutton.vbox-link-btn:active,\nbutton.vbox-link-btn:focus{\n border: none !important;\n background: none !important;\n box-shadow: none !important;\n color: inherit !important;\n padding: 6px 12px;\n outline: none;\n display: inline-block;\n cursor: pointer;\n}\n.vbox-share a{\n color: inherit !important;\n padding: 6px 12px;\n display: inline-block;\n}\n\n.vbox-share svg{\n z-index: 10;\n vertical-align: middle;\n}\n/* ----- navigation ----- */\n.vbox-close{\n cursor: pointer;\n position: fixed;\n top: 0;\n right: 0;\n z-index: 99;\n padding: 6px 15px;\n color: #000;\n color: var(--vbox-tools-color);\n border: 0;\n font-size: 24px;\n display: flex;\n align-items: center;\n opacity: 0.8;\n transition: opacity 0.2s;\n}\n\n.vbox-close:hover{\n opacity: 1;\n}\n\n.vbox-left-corner{\n cursor: pointer;\n position: fixed;\n left: 0;\n top: 0;\n overflow: hidden;\n line-height: 1;\n font-size: 12px;\n z-index: 99;\n display: flex;\n align-items:center;\n color: var(--vbox-tools-color);\n}\n.vbox-num{\n display: inline-block;\n padding: 12px 15px;\n}\n/* ----- Social share ----- */\n\n.vbox-left{\n left: 0;\n}\n.vbox-right{\n right: 0;\n}\n.vbox-top{\n top: 0;\n}\n.vbox-bottom{\n bottom: 0;\n}\n\n/* ----- Navigation arrows ----- */\n.vbox-next, .vbox-prev{\n position: fixed;\n top: 50%;\n margin-top: -15px;\n overflow: hidden;\n cursor: pointer;\n display: block;\n width: 45px;\n height: 45px;\n z-index: 99;\n opacity: 0.8;\n transition: opacity 0.2s;\n}\n.vbox-next:hover, .vbox-prev:hover{\n opacity: 1;\n}\n.vbox-next span, .vbox-prev span{\n position: relative;\n width: 20px;\n height: 20px;\n border: 2px solid transparent;\n border-top-color: var(--vbox-tools-color);\n border-right-color: var(--vbox-tools-color);\n text-indent: -100px;\n position: absolute;\n top: 8px;\n display: block;\n}\n.vbox-prev{\n left: 15px;\n}\n.vbox-next{\n right: 15px;\n}\n.vbox-prev span{\n left: 10px;\n -ms-transform: rotate(-135deg);\n -webkit-transform: rotate(-135deg);\n transform: rotate(-135deg);\n}\n.vbox-next span{\n -ms-transform: rotate(45deg);\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n right: 10px;\n}\n/* ----- Aspect ratio ----- */\n.venoratio, .vbox-inline {\n position: relative;\n width: 100%;\n margin: 0 auto;\n}\n.venoratio::before {\n display: block;\n padding-top: var(--vb-aspect-ratio);\n content: \"\";\n}\n.venoratio > * {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: var(--vbox-padding);\n}\n.venoratio-1x1 {\n --vb-aspect-ratio: 100%;\n}\n.venoratio-4x3 {\n --vb-aspect-ratio: calc(3 / 4 * 100%);\n}\n.venoratio-16x9 {\n --vb-aspect-ratio: calc(9 / 16 * 100%);\n}\n.venoratio-21x9 {\n --vb-aspect-ratio: calc(9 / 21 * 100%);\n}\n.venoratio-full {\n --vb-aspect-ratio: calc(100vh - 100px);\n}\n\n.vbox-child.venoratio, .vbox-child.vbox-inline{\n max-width: 100%;\n}\n.vbox-open{\n overflow: hidden;\n}\n.vbox-container{\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n overflow-scrolling: touch;\n -webkit-overflow-scrolling: touch;\n z-index: 20;\n max-height: 100%;\n padding: 30px 0px;\n}\n\n.vbox-content{\n opacity: 0;\n}\n\n.vbox-content{\n text-align: center;\n width: 100%;\n position: relative;\n overflow: hidden;\n padding: 20px 4%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100%;\n}\n.vbox-container img{\n max-width: 100%;\n height: auto;\n}\n.vbox-child{\n box-shadow: 0 0 12px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);\n max-width: 100%;\n text-align: initial;\n padding: var(--vbox-padding);\n}\n.vbox-child img{\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n user-select: none;\n display: block;\n}\n.vbox-grab .vbox-child img{\n cursor: grab;\n}\n.vbox-child > iframe{\n border: none !important;\n}\n.vbox-content.swipe-left{\n margin-left: -200px !important;\n}\n.vbox-content.swipe-right{\n margin-left: 200px !important;\n}\n.vbox-preloader{\n -webkit-transform: translateZ(0);\n -moz-transform: translateZ(0);\n -o-transform: translateZ(0);\n transform: translateZ(0);\n}\n.vbox-preloader .vbox-preloader-inner{\n opacity: 1;\n transition: opacity 200ms;\n}\n.vbox-hidden{\n display: none;\n}\n.vbox-preloader.vbox-hidden .vbox-preloader-inner{\n opacity: 0;\n}\n.vbox-backdrop{\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n -webkit-transform: translateZ(-1px);\n -moz-transform: translateZ(-1px);\n -o-transform: translateZ(-1px);\n transform: translateZ(-1px);\n z-index: 0;\n}\n\n.vbox-tooltip {\n position: relative;\n display: inline-block;\n}\n\n.vbox-tooltip .vbox-tooltip-text {\n visibility: hidden;\n color: #fff;\n text-align: center;\n padding: 0;\n position: absolute;\n z-index: 1;\n bottom: 100%;\n left: 0;\n opacity: 0;\n transition: opacity 0.3s;\n margin-bottom: 2px;\n font-family: sans-serif;\n}\n.vbox-top .vbox-tooltip .vbox-tooltip-text{\n bottom: auto;\n top: 100%;\n margin-bottom: 0;\n margin-top: 2px;\n}\n\n.vbox-tooltip-inner{\n padding: 5px 10px;\n background-color: rgba(0, 0, 0, 0.9);\n border-radius: 6px;\n font-size: 10px;\n}\n.vbox-tooltip:hover .vbox-tooltip-text {\n visibility: visible;\n opacity: 1;\n}\n\n/* ---------- preloader ----------\n * http://tobiasahlin.com/spinkit/\n-------------------------------- */\n.vbox-overlay{--sk-size:40px;--sk-color:#333}.sk-center{margin:auto}.sk-plane{width:var(--sk-size);height:var(--sk-size);background-color:var(--sk-color);animation:sk-plane 1.2s infinite ease-in-out}@keyframes sk-plane{0%{transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}100%{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.sk-chase{width:var(--sk-size);height:var(--sk-size);position:relative;animation:sk-chase 2.5s infinite linear both}.sk-chase-dot{width:100%;height:100%;position:absolute;left:0;top:0;animation:sk-chase-dot 2.0s infinite ease-in-out both}.sk-chase-dot:before{content:'';display:block;width:25%;height:25%;background-color:var(--sk-color);border-radius:100%;animation:sk-chase-dot-before 2.0s infinite ease-in-out both}.sk-chase-dot:nth-child(1){animation-delay:-1.1s}.sk-chase-dot:nth-child(2){animation-delay:-1.0s}.sk-chase-dot:nth-child(3){animation-delay:-0.9s}.sk-chase-dot:nth-child(4){animation-delay:-0.8s}.sk-chase-dot:nth-child(5){animation-delay:-0.7s}.sk-chase-dot:nth-child(6){animation-delay:-0.6s}.sk-chase-dot:nth-child(1):before{animation-delay:-1.1s}.sk-chase-dot:nth-child(2):before{animation-delay:-1.0s}.sk-chase-dot:nth-child(3):before{animation-delay:-0.9s}.sk-chase-dot:nth-child(4):before{animation-delay:-0.8s}.sk-chase-dot:nth-child(5):before{animation-delay:-0.7s}.sk-chase-dot:nth-child(6):before{animation-delay:-0.6s}@keyframes sk-chase{100%{transform:rotate(360deg)}}@keyframes sk-chase-dot{80%,100%{transform:rotate(360deg)}}@keyframes sk-chase-dot-before{50%{transform:scale(0.4)}100%,0%{transform:scale(1.0)}}.sk-bounce{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-bounce-dot{width:100%;height:100%;border-radius:50%;background-color:var(--sk-color);opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite cubic-bezier(0.455,0.03,0.515,0.955)}.sk-bounce-dot:nth-child(2){animation-delay:-1.0s}@keyframes sk-bounce{0%,100%{transform:scale(0)}45%,55%{transform:scale(1)}}.sk-wave{width:var(--sk-size);height:var(--sk-size);display:flex;justify-content:space-between}.sk-wave-rect{background-color:var(--sk-color);height:100%;width:15%;animation:sk-wave 1.2s infinite ease-in-out}.sk-wave-rect:nth-child(1){animation-delay:-1.2s}.sk-wave-rect:nth-child(2){animation-delay:-1.1s}.sk-wave-rect:nth-child(3){animation-delay:-1.0s}.sk-wave-rect:nth-child(4){animation-delay:-0.9s}.sk-wave-rect:nth-child(5){animation-delay:-0.8s}@keyframes sk-wave{0%,40%,100%{transform:scaleY(0.4)}20%{transform:scaleY(1)}}.sk-pulse{width:var(--sk-size);height:var(--sk-size);background-color:var(--sk-color);border-radius:100%;animation:sk-pulse 1.2s infinite cubic-bezier(0.455,0.03,0.515,0.955)}@keyframes sk-pulse{0%{transform:scale(0)}100%{transform:scale(1);opacity:0}}.sk-flow{width:calc(var(--sk-size) * 1.3);height:calc(var(--sk-size) * 1.3);display:flex;justify-content:space-between}.sk-flow-dot{width:25%;height:25%;background-color:var(--sk-color);border-radius:50%;animation:sk-flow 1.4s cubic-bezier(0.455,0.03,0.515,0.955) 0s infinite both}.sk-flow-dot:nth-child(1){animation-delay:-0.30s}.sk-flow-dot:nth-child(2){animation-delay:-0.15s}@keyframes sk-flow{0%,80%,100%{transform:scale(0.3)}40%{transform:scale(1)}}.sk-swing{width:var(--sk-size);height:var(--sk-size);position:relative;animation:sk-swing 1.8s infinite linear}.sk-swing-dot{width:45%;height:45%;position:absolute;top:0;left:0;right:0;margin:auto;background-color:var(--sk-color);border-radius:100%;animation:sk-swing-dot 2s infinite ease-in-out}.sk-swing-dot:nth-child(2){top:auto;bottom:0;animation-delay:-1s}@keyframes sk-swing{100%{transform:rotate(360deg)}}@keyframes sk-swing-dot{0%,100%{transform:scale(0.2)}50%{transform:scale(1)}}.sk-circle{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-circle-dot{width:100%;height:100%;position:absolute;left:0;top:0}.sk-circle-dot:before{content:'';display:block;width:15%;height:15%;background-color:var(--sk-color);border-radius:100%;animation:sk-circle 1.2s infinite ease-in-out both}.sk-circle-dot:nth-child(1){transform:rotate(30deg)}.sk-circle-dot:nth-child(2){transform:rotate(60deg)}.sk-circle-dot:nth-child(3){transform:rotate(90deg)}.sk-circle-dot:nth-child(4){transform:rotate(120deg)}.sk-circle-dot:nth-child(5){transform:rotate(150deg)}.sk-circle-dot:nth-child(6){transform:rotate(180deg)}.sk-circle-dot:nth-child(7){transform:rotate(210deg)}.sk-circle-dot:nth-child(8){transform:rotate(240deg)}.sk-circle-dot:nth-child(9){transform:rotate(270deg)}.sk-circle-dot:nth-child(10){transform:rotate(300deg)}.sk-circle-dot:nth-child(11){transform:rotate(330deg)}.sk-circle-dot:nth-child(1):before{animation-delay:-1.1s}.sk-circle-dot:nth-child(2):before{animation-delay:-1s}.sk-circle-dot:nth-child(3):before{animation-delay:-0.9s}.sk-circle-dot:nth-child(4):before{animation-delay:-0.8s}.sk-circle-dot:nth-child(5):before{animation-delay:-0.7s}.sk-circle-dot:nth-child(6):before{animation-delay:-0.6s}.sk-circle-dot:nth-child(7):before{animation-delay:-0.5s}.sk-circle-dot:nth-child(8):before{animation-delay:-0.4s}.sk-circle-dot:nth-child(9):before{animation-delay:-0.3s}.sk-circle-dot:nth-child(10):before{animation-delay:-0.2s}.sk-circle-dot:nth-child(11):before{animation-delay:-0.1s}@keyframes sk-circle{0%,80%,100%{transform:scale(0)}40%{transform:scale(1)}}.sk-circle-fade{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-circle-fade-dot{width:100%;height:100%;position:absolute;left:0;top:0}.sk-circle-fade-dot:before{content:'';display:block;width:15%;height:15%;background-color:var(--sk-color);border-radius:100%;animation:sk-circle-fade 1.2s infinite ease-in-out both}.sk-circle-fade-dot:nth-child(1){transform:rotate(30deg)}.sk-circle-fade-dot:nth-child(2){transform:rotate(60deg)}.sk-circle-fade-dot:nth-child(3){transform:rotate(90deg)}.sk-circle-fade-dot:nth-child(4){transform:rotate(120deg)}.sk-circle-fade-dot:nth-child(5){transform:rotate(150deg)}.sk-circle-fade-dot:nth-child(6){transform:rotate(180deg)}.sk-circle-fade-dot:nth-child(7){transform:rotate(210deg)}.sk-circle-fade-dot:nth-child(8){transform:rotate(240deg)}.sk-circle-fade-dot:nth-child(9){transform:rotate(270deg)}.sk-circle-fade-dot:nth-child(10){transform:rotate(300deg)}.sk-circle-fade-dot:nth-child(11){transform:rotate(330deg)}.sk-circle-fade-dot:nth-child(1):before{animation-delay:-1.1s}.sk-circle-fade-dot:nth-child(2):before{animation-delay:-1.0s}.sk-circle-fade-dot:nth-child(3):before{animation-delay:-0.9s}.sk-circle-fade-dot:nth-child(4):before{animation-delay:-0.8s}.sk-circle-fade-dot:nth-child(5):before{animation-delay:-0.7s}.sk-circle-fade-dot:nth-child(6):before{animation-delay:-0.6s}.sk-circle-fade-dot:nth-child(7):before{animation-delay:-0.5s}.sk-circle-fade-dot:nth-child(8):before{animation-delay:-0.4s}.sk-circle-fade-dot:nth-child(9):before{animation-delay:-0.3s}.sk-circle-fade-dot:nth-child(10):before{animation-delay:-0.2s}.sk-circle-fade-dot:nth-child(11):before{animation-delay:-0.1s}@keyframes sk-circle-fade{0%,39%,100%{opacity:0;transform:scale(0.6)}40%{opacity:1;transform:scale(1)}}.sk-grid{width:var(--sk-size);height:var(--sk-size)}.sk-grid-cube{width:33.33%;height:33.33%;background-color:var(--sk-color);float:left;animation:sk-grid 1.3s infinite ease-in-out}.sk-grid-cube:nth-child(1){animation-delay:.2s}.sk-grid-cube:nth-child(2){animation-delay:.3s}.sk-grid-cube:nth-child(3){animation-delay:.4s}.sk-grid-cube:nth-child(4){animation-delay:.1s}.sk-grid-cube:nth-child(5){animation-delay:.2s}.sk-grid-cube:nth-child(6){animation-delay:.3s}.sk-grid-cube:nth-child(7){animation-delay:0s}.sk-grid-cube:nth-child(8){animation-delay:.1s}.sk-grid-cube:nth-child(9){animation-delay:.2s}@keyframes sk-grid{0%,70%,100%{transform:scale3D(1,1,1)}35%{transform:scale3D(0,0,1)}}.sk-fold{width:var(--sk-size);height:var(--sk-size);position:relative;transform:rotateZ(45deg)}.sk-fold-cube{float:left;width:50%;height:50%;position:relative;transform:scale(1.1)}.sk-fold-cube:before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sk-color);animation:sk-fold 2.4s infinite linear both;transform-origin:100% 100%}.sk-fold-cube:nth-child(2){transform:scale(1.1) rotateZ(90deg)}.sk-fold-cube:nth-child(4){transform:scale(1.1) rotateZ(180deg)}.sk-fold-cube:nth-child(3){transform:scale(1.1) rotateZ(270deg)}.sk-fold-cube:nth-child(2):before{animation-delay:.3s}.sk-fold-cube:nth-child(4):before{animation-delay:.6s}.sk-fold-cube:nth-child(3):before{animation-delay:.9s}@keyframes sk-fold{0%,10%{transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{transform:perspective(140px) rotateX(0);opacity:1}90%,100%{transform:perspective(140px) rotateY(180deg);opacity:0}}.sk-wander{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-wander-cube{background-color:var(--sk-color);width:20%;height:20%;position:absolute;top:0;left:0;--sk-wander-distance:calc(var(--sk-size) * 0.75);animation:sk-wander 2.0s ease-in-out -2.0s infinite both}.sk-wander-cube:nth-child(2){animation-delay:-0.5s}.sk-wander-cube:nth-child(3){animation-delay:-1.0s}@keyframes sk-wander{0%{transform:rotate(0)}25%{transform:translateX(var(--sk-wander-distance)) rotate(-90deg) scale(0.6)}50%{transform:translateX(var(--sk-wander-distance)) translateY(var(--sk-wander-distance)) rotate(-179deg)}50.1%{transform:translateX(var(--sk-wander-distance)) translateY(var(--sk-wander-distance)) rotate(-180deg)}75%{transform:translateX(0) translateY(var(--sk-wander-distance)) rotate(-270deg) scale(0.6)}100%{transform:rotate(-360deg)}}\n"]} \ No newline at end of file diff --git a/venobox/v2/dist/venobox.min.js b/venobox/v2/dist/venobox.min.js deleted file mode 100644 index 7e38068..0000000 --- a/venobox/v2/dist/venobox.min.js +++ /dev/null @@ -1,7 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).VenoBox=t()}(this,(function(){"use strict"; -/** - * VenoBox 2.0.4 - * Copyright 2013-2021 Nicola Franchini - * @license: https://github.com/nicolafranchini/VenoBox/blob/master/LICENSE - */let e,t,o,n,s,i,a,r,l,d,c,v,u,b,p,g,f,m,y,x,h,L,w,k,S,C,A,E,P,q,M,T,j,H,O,z,B;const I=document.createElement("div");let V=0,D=0,N=0,Q=!1,R=new Image;const W={bounce:["sk-bounce","sk-bounce-dot",2],chase:["sk-chase","sk-chase-dot",6],circle:["sk-circle","sk-circle-dot",12],"circle-fade":["sk-circle-fade","sk-circle-fade-dot",12],flow:["sk-flow","sk-flow-dot",3],fold:["sk-fold","sk-fold-cube",4],grid:["sk-grid","sk-grid-cube",9],plane:["sk-plane","",0],pulse:["sk-pulse","",5],swing:["sk-swing","sk-swing-dot",2],wander:["sk-wander","sk-wander-cube",3],wave:["sk-wave","sk-wave-rec",5]},X={selector:".venobox",autoplay:!1,bgcolor:"#fff",border:"0",customClass:!1,infinigall:!1,maxWidth:"100%",navigation:!0,navKeyboard:!0,navTouch:!0,navSpeed:300,numeration:!1,overlayClose:!0,overlayColor:"rgba(23,23,23,0.95)",popup:!1,ratio:"16x9",share:!1,shareStyle:"pill",spinner:"bounce",spinColor:"#d2d2d2",titleattr:"title",titlePosition:"top",titleStyle:"bar",toolsBackground:"#1C1C1C",toolsColor:"#d2d2d2",onPreOpen:function(){return!0},onPostOpen:function(){},onPreClose:function(){return!0},onNavComplete:function(){},onContentLoaded:function(){},onInit:function(){},jQuerySelectors:!1};function Y(e,t,o){if("[object Object]"===Object.prototype.toString.call(e)){let n;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(o,e[n],n,e)}else{let n=0,s=e.length;for(n=0;n1&&(a=1);let r=e(a);t(r),a<1&&requestAnimationFrame(s)}))}function U(e){if(!e)return!1;y=!0,r=e,L=!1,w=!1,S=e.getAttribute("data-maxwidth")||e.settings.maxWidth,C=e.getAttribute("data-overlay")||e.settings.overlayColor,A=e.getAttribute("data-ratio")||e.settings.ratio,E=e.getAttribute("data-autoplay")||e.settings.autoplay,P=e.getAttribute("data-href")||e.getAttribute("href"),q=e.getAttribute("data-customclass")||e.settings.customClass,z=e.getAttribute(e.settings.titleattr)||"",H=e.getAttribute("data-border")||e.settings.border}function Z(){return!(!r||!document.body.classList.contains("vbox-open"))&&((!r.settings.onPreClose||"function"!=typeof r.settings.onPreClose||(r.settings.onPreClose(r,p,T,j),!1!==r.settings.onPreClose))&&(document.body.removeEventListener("keydown",J),document.body.classList.remove("vbox-open"),r.focus(),void K({duration:200,timing:F,draw:function(e){k.style.opacity=1-e,1===e&&k.remove()}})))}function _(){le(T)}function G(){le(j)}function J(e){27===e.keyCode&&Z(),B||(37==e.keyCode&&!0===w&&le(j),39==e.keyCode&&!0===L&&le(T),B=setTimeout((()=>{B=null}),100))}function $(e){a.classList.contains("vbox-"+e)||function(){y=!1,a.style.opacity=0,a.innerHTML=x;let e=a.querySelector(":first-child");e.classList.add("vbox-child"),e.style.backgroundColor=r.settings.bgcolor,e.style.maxWidth=S,e.style.transform="scale(0.9)",e.style.transition="transform 200ms";let t=a.querySelector(".vbox-child img");t&&t.addEventListener("dragstart",(function(e){e.preventDefault()})),i.scrollTo(0,0),e.style.transform="scale(1)",k.style.setProperty("--vbox-padding",H),Y(k.classList,(function(e){"vbox-overlay"!==e&&k.classList.remove(e)})),q&&k.classList.add(q),K({duration:200,timing:F,draw:function(e){a.style.opacity=e,1===e&&u.classList.add("vbox-hidden")}}),r.settings.onContentLoaded&&"function"==typeof r.settings.onContentLoaded&&r.settings.onContentLoaded(x)}()}function ee(e,t,o){let n;if(a.classList.add("vbox-loading"),-1!==e.search(/.+\.mp4|og[gv]|webm/))n=o?" autoplay":"",x='
";else{let s,i=function(e){let t,o,n;if(o=e.match(/(https?:\/\/)?((www\.)?(youtube(-nocookie)?|youtube.googleapis)\.com.*(v\/|v=|vi=|vi\/|e\/|embed\/|user\/.*\/u\/\d+\/)|youtu\.be\/)([_0-9a-z-]+)/i),o&&o[7])t="youtube",n=o[7];else{let s=/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/;o=e.match(s),o&&o[5]&&(t="vimeo",n=o[5])}return{type:t,id:n}}(e);n=o?"?rel=0&autoplay=1":"?rel=0";let a=n+function(e){let t="",o=decodeURIComponent(e).split("?");if(void 0!==o[1]){let e,n,s=o[1].split("&");for(n=0;n'}a.classList.remove("vbox-loading"),$("animated")}function te(){var e;if(e=x,I.innerHTML=e,g=I.querySelectorAll("img"),g.length){let e=0;Y(g,(function(t){let o=t.src;R=new Image,R.onload=function(){e++,e==g.length&&(a.classList.remove("vbox-loading"),$("animated"))},R.onerror=function(){e++,e==g.length&&(a.classList.remove("vbox-loading"),$("animated"))},R.src=o}))}else a.classList.remove("vbox-loading"),$("animated")}function oe(e){if(!y){let t=.84*r.settings.navSpeed;a.style.transition="margin "+t+"ms ease-out, opacity "+t+"ms ease-out",M=v=e.pageY,V=D=e.pageX,Q=!0}}function ne(e){if(Q){Q=!1;let e=r,t=!1;N=D-V,N<0&&L&&(e=T,t=!0),N>0&&w&&(e=j,t=!0),Math.abs(N)>=50&&t?le(e):(a.style.marginLeft=0,a.style.opacity=1)}}function se(e){if(Q&&!y){D=e.pageX,v=e.pageY,d=D-V,c=v-M;let t=Math.abs(d);if(t>Math.abs(c)&&t<=180){let o=1.5*(1-t/180);e.preventDefault(),a.style.marginLeft=d+"px",a.style.opacity=o}}}function ie(e){if(!e)return!1;O=e.dataset.gall,h=e.settings.numeration,f=e.settings.infinigall,o.innerHTML="";let s=e.dataset.vbtype;e.settings.share&&"iframe"!==s&&"inline"!==s&&"ajax"!==s&&function(e){if(navigator.canShare){const t={url:e};o.insertAdjacentHTML("beforeend",''),o.querySelector(".vbox-share-mobile").addEventListener("click",(function(e){e.preventDefault(),navigator.share(t)}))}o.insertAdjacentHTML("beforeend",''),o.insertAdjacentHTML("beforeend",'
'),o.querySelector(".vbox-share-copy").addEventListener("click",(function(t){t.preventDefault();let o=document.getElementById("myTooltip");navigator.clipboard.writeText(e).then((function(){o.innerHTML='
Copied
'}),(function(){console.log("copy failed")}))}))}(e.href),m=document.querySelectorAll('.vbox-item[data-gall="'+O+'"]'),l=Array.prototype.indexOf.call(m,e),m.length<2&&(f=!1,h=!1),T=m[l+1],j=m[l-1],!T&&f&&(T=m[0]),!j&&f&&(j=m[m.length-1]),m.length>=1?(p=l+1,t.innerHTML=p+" / "+m.length):p=1,h?t.classList.remove("vbox-hidden"):t.classList.add("vbox-hidden"),""!==z?n.classList.remove("vbox-hidden"):n.classList.add("vbox-hidden"),n.innerHTML=z,w=!1,L=!1,(T||f)&&(L=!0),(l>0||f)&&(w=!0),(w||L)&&e.settings.navTouch?(a.classList.add("vbox-grab"),a.addEventListener("touchstart",oe,!1),a.addEventListener("touchend",ne,!1),a.addEventListener("touchmove",se,!1),a.addEventListener("mousedown",oe,!1),a.addEventListener("mouseup",ne,!1),a.addEventListener("mouseout",ne,!1),a.addEventListener("mousemove",se,!1)):(a.classList.remove("vbox-grab"),a.removeEventListener("touchstart",oe,!1),a.removeEventListener("touchend",ne,!1),a.removeEventListener("touchmove",se,!1),a.removeEventListener("mousedown",oe,!1),a.removeEventListener("mouseup",ne,!1),a.removeEventListener("mouseout",ne,!1),a.removeEventListener("mousemove",se,!1));let i=k.querySelector(".vbox-next"),r=k.querySelector(".vbox-prev");w?r.classList.remove("vbox-hidden"):r.classList.add("vbox-hidden"),L?i.classList.remove("vbox-hidden"):i.classList.add("vbox-hidden"),e.settings.navigation||(i.classList.add("vbox-hidden"),r.classList.add("vbox-hidden"))}function ae(t){if(!t)return!1;e.style.backgroundColor=C,b.innerHTML=function(e){if(!e)return"Loading...";let t='
',o=0;for(o=0;o
';return t+="",t}(W[t.settings.spinner]),k.style.setProperty("--sk-color",t.settings.spinColor),u.classList.remove("vbox-hidden"),o.classList.remove("vbox-top","vbox-bottom"),n.classList.remove("vbox-top","vbox-bottom"),"top"==t.settings.titlePosition?(n.classList.add("vbox-top"),o.classList.add("vbox-bottom")):(n.classList.add("vbox-bottom"),o.classList.add("vbox-top"));let s="bar"===t.settings.titleStyle?"100%":"auto",i="pill"===t.settings.titleStyle?"5em":"0",a="bar"===t.settings.shareStyle?"100%":"auto",r="pill"===t.settings.shareStyle?"5em":"0",l="transparent"===t.settings.titleStyle?"transparent":t.settings.toolsBackground,d="transparent"===t.settings.shareStyle?"transparent":t.settings.toolsBackground;k.style.setProperty("--vbox-title-width",s),k.style.setProperty("--vbox-title-radius",i),k.style.setProperty("--vbox-share-width",a),k.style.setProperty("--vbox-share-radius",r),k.style.setProperty("--vbox-tools-color",t.settings.toolsColor),k.style.setProperty("--vbox-title-background",l),k.style.setProperty("--vbox-share-background",d)}function re(){if(!r)return!1;switch(r.dataset.vbtype){case"iframe":e=P,t=A,a.classList.add("vbox-loading"),x='
',a.classList.remove("vbox-loading"),$("animated");break;case"inline":!function(e){let t=document.querySelector(e);t&&(a.classList.add("vbox-loading"),x='
'+t.innerHTML+"
",a.classList.remove("vbox-loading"),$("animated"))}(P);break;case"ajax":!function(e){a.classList.add("vbox-loading");let t=new XMLHttpRequest;t.open("GET",e,!0),t.onload=function(){x='
'+t.response+"
",te()},t.onerror=function(){x='
',a.classList.remove("vbox-loading"),$("animated")},t.send()}(P);break;case"video":ee(P,A,E);break;default:!function(e){R.onload=function(){x='
',a.classList.remove("vbox-loading"),$("animated")},R.src=e}(P)}var e,t}function le(e){if(!e||y||!document.body.classList.contains("vbox-open"))return!1;U(e),ae(e);let t=.84*r.settings.navSpeed;a.style.transition="margin "+t+"ms ease-out, opacity "+t+"ms ease-out",e===j&&a.classList.add("swipe-right"),e===T&&a.classList.add("swipe-left"),u.classList.remove("vbox-hidden");let o=a.style.opacity;a.classList.add("vbox-animated","vbox-loading"),ie(e),K({duration:r.settings.navSpeed,timing:F,draw:function(e){a.style.opacity=o-e/o,1===e&&(a.classList.remove("swipe-left","swipe-right","vbox-animated"),a.style.marginLeft=0,a.style.transition="",$("loading"),y=!1,r.settings.onNavComplete&&"function"==typeof r.settings.onNavComplete&&r.settings.onNavComplete(r,p,T,j))}}),re()}function de(l){return!(document.body.classList.contains("vbox-open")||!l)&&(l.settings.onPreOpen&&"function"==typeof l.settings.onPreOpen&&l.settings.onPreOpen(l),!!l.settings.onPreOpen&&(U(l),document.body.insertAdjacentHTML("beforeend",s),document.body.classList.add("vbox-open"),k=document.querySelector(".vbox-overlay"),e=k.querySelector(".vbox-backdrop"),i=k.querySelector(".vbox-container"),a=i.querySelector(".vbox-content"),t=k.querySelector(".vbox-num"),o=k.querySelector(".vbox-share"),n=k.querySelector(".vbox-title"),u=k.querySelector(".vbox-preloader"),b=u.querySelector(".vbox-preloader-inner"),k.style.opacity=0,ae(l),ie(l),a.classList.add("vbox-animated","vbox-loading"),K({duration:200,timing:F,draw:function(e){k.style.opacity=e,1===e&&(a.classList.remove("vbox-animated"),y=!1,$("loading"),r.settings.onPostOpen&&"function"==typeof r.settings.onPostOpen&&r.settings.onPostOpen(r,p,T,j))}}),re(),l.settings.navKeyboard&&(document.body.addEventListener("keydown",J),document.body.addEventListener("keyup",(()=>{B&&(clearTimeout(B),B=null)}))),document.querySelector(".vbox-prev").addEventListener("click",(function(){le(j)})),document.querySelector(".vbox-next").addEventListener("click",(function(){le(T)})),void k.addEventListener("click",(function(e){let t=document.querySelector(".vbox-close");t&&(t.contains(e.target)||t===e.target||r.settings.overlayClose&&e.target.classList.contains("vbox-overlay")||e.target.classList.contains("vbox-content")||e.target.classList.contains("vbox-backdrop")||e.target.classList.contains("vbox-close")||e.target.classList.contains("vbox-preloader")||e.target.classList.contains("vbox-container"))&&Z()}))))}const ce=function(e){const t={};let o=function(e,t){let o={};return Y(e,(function(t,n){o[n]=e[n]})),Y(t,(function(e,n){o[n]=t[n]})),o}(X,e||{});return t.close=Z,t.next=_,t.prev=G,t.open=de,t.settings=o,function(e,t){t.onInit&&"function"==typeof t.onInit&&t.onInit(e);let o=t.jQuerySelectors||document.querySelectorAll(t.selector);if(s='',Y(o,(function(e){if(e.classList.contains("vbox-item"))return!0;e.settings=t,e.classList.add("vbox-item"),e.addEventListener("click",(function(t){return t.preventDefault(),e.blur(),de(e),!1}))})),t.popup){let e=document.querySelector(t.popup);e.settings=t,de(e)}}(t,o),t};return"function"==typeof jQuery&&jQuery.fn.extend({venobox:function(e){const t=e||{};t.jQuerySelectors=this,new ce({pluginoptions:t})}}),ce})); -//# sourceMappingURL=venobox.min.js.map diff --git a/venobox/v2/dist/venobox.min.js.map b/venobox/v2/dist/venobox.min.js.map deleted file mode 100644 index fe70a5e..0000000 --- a/venobox/v2/dist/venobox.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"venobox.min.js","sources":["../src/venobox.esm.js"],"sourcesContent":["/**\n * VenoBox 2.0.4\n * Copyright 2013-2021 Nicola Franchini\n * @license: https://github.com/nicolafranchini/VenoBox/blob/master/LICENSE\n */\nlet backdrop, blocknum, blockshare, blocktitle, core, container, content, current_item, current_index, diffX, diffY, endY, elPreloader, elPreloaderInner;\nlet gallIndex, images, infinigall, items, navigationDisabled, newcontent, numeratio, nextok, prevok, overlay;\nlet set_maxWidth, set_overlayColor, set_ratio, set_autoplay, set_href, set_customclass, startY, thenext, theprev, thisborder, thisgall, title, throttle;\n\nconst svgOpen = '';\nconst svgClose = '';\nconst downloadIcon = svgOpen + '' + svgClose;\nconst shareIcon = svgOpen + '' + svgClose;\nconst linkIcon = svgOpen + '' + svgClose;\nconst imagesHolder = document.createElement('div');\n\nlet startX = 0;\nlet endX = 0;\nlet diff = 0;\nlet threshold = 50;\nlet startouch = false;\nlet imgLoader = new Image();\n\nconst spinners = {\n 'bounce': ['sk-bounce', 'sk-bounce-dot', 2],\n 'chase': ['sk-chase', 'sk-chase-dot', 6],\n 'circle': ['sk-circle', 'sk-circle-dot', 12],\n 'circle-fade': ['sk-circle-fade', 'sk-circle-fade-dot', 12],\n 'flow': ['sk-flow', 'sk-flow-dot', 3],\n 'fold': ['sk-fold', 'sk-fold-cube', 4],\n 'grid': ['sk-grid', 'sk-grid-cube', 9],\n 'plane': ['sk-plane', '', 0],\n 'pulse': ['sk-pulse', '', 5],\n 'swing': ['sk-swing', 'sk-swing-dot', 2],\n 'wander': ['sk-wander', 'sk-wander-cube', 3],\n 'wave': ['sk-wave', 'sk-wave-rec', 5]\n};\n\n// Default settings\nconst defaults = {\n selector: '.venobox',\n autoplay : false,\n bgcolor: '#fff',\n border: '0',\n customClass: false,\n infinigall: false,\n maxWidth: '100%',\n navigation: true,\n navKeyboard: true,\n navTouch: true,\n navSpeed: 300,\n numeration: false,\n overlayClose: true,\n overlayColor: 'rgba(23,23,23,0.95)',\n popup: false,\n ratio: '16x9', // '1x1' | '4x3' | '16x9' | '21x9'\n share: false,\n shareStyle: 'pill', // 'bar' | 'block' | 'pill' | 'transparent'\n spinner: 'bounce', // 'plane' | 'chase' | 'bounce' | 'wave' | 'pulse' | 'flow' | 'swing' | 'circle' | 'circle-fade' | 'grid' | 'fold' | 'wander'\n spinColor : '#d2d2d2',\n titleattr: 'title',\n titlePosition: 'top', // 'top' || 'bottom'\n titleStyle: 'bar', // 'bar' | 'block' | 'pill' | 'transparent'\n toolsBackground: '#1C1C1C', // 'transparent'\n toolsColor: '#d2d2d2',\n onPreOpen: function(){ return true; }, // Return the selected object - set return false to prevent opening\n onPostOpen: function(){}, // Return: current_item, gallIndex, thenext, theprev\n onPreClose: function(){ return true; }, // Return: current_item, gallIndex, thenext, theprev - set return false to prevent closing\n onNavComplete: function(){}, // Return: current_item, gallIndex, thenext, theprev\n onContentLoaded: function(){}, // Return: newcontent\n onInit: function(){}, // Return: plugin obj\n jQuerySelectors: false,\n};\n\n/**\n * Generate spinner html\n * @param {Array} spinarray Selected spinner\n */\nfunction createspinner(spinarray){\n if (!spinarray) {\n return 'Loading...';\n }\n let spinner = '
';\n let i = 0;\n for (i = 0; i < spinarray[2]; i++) {\n spinner += '
';\n }\n spinner += '
';\n return spinner;\n}\n\n/**\n * A simple forEach() implementation for Arrays, Objects and NodeLists\n * @param {Array|Object|NodeList} collection Collection of items to iterate\n * @param {Function} callback Callback function for each iteration\n * @param {Array|Object|NodeList} scope Object/NodeList/Array that forEach is iterating over (aka `this`)\n */\nfunction forEach(collection, callback, scope) {\n if (Object.prototype.toString.call(collection) === '[object Object]') {\n let prop;\n for (prop in collection) {\n if (Object.prototype.hasOwnProperty.call(collection, prop)) {\n callback.call(scope, collection[prop], prop, collection);\n }\n }\n } else {\n let i = 0;\n let len = collection.length;\n for (i = 0; i < len; i++) {\n callback.call(scope, collection[i], i, collection);\n }\n }\n}\n\n/**\n* Merge defaults with user options\n* @param {Object} defaults Default settings\n* @param {Object} options User options\n* @returns {Object} Merged values of defaults and options\n*/\nfunction extend( defaults, options ) {\n let extended = {};\n\n forEach(defaults, function (value, prop) {\n extended[prop] = defaults[prop];\n });\n\n forEach(options, function (value, prop) {\n extended[prop] = options[prop];\n });\n return extended;\n}\n\n/**\n * Linear animation timing\n */\nfunction timingLinear(timeFraction){\n return timeFraction;\n}\n\n/**\n * Animate with callback\n * https://javascript.info/js-animation\n */\nfunction animate({timing, draw, duration}) {\n let start = performance.now();\n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1) {\n timeFraction = 1;\n }\n // calculate the current animation state\n let progress = timing(timeFraction);\n draw(progress); // draw it\n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n }\n });\n}\n\n/**\n * Parse Youtube or Vimeo videos and get host & ID\n */\nfunction parseVideo(url) {\n let type, match, vid;\n let regYt = /(https?:\\/\\/)?((www\\.)?(youtube(-nocookie)?|youtube.googleapis)\\.com.*(v\\/|v=|vi=|vi\\/|e\\/|embed\\/|user\\/.*\\/u\\/\\d+\\/)|youtu\\.be\\/)([_0-9a-z-]+)/i;\n match = url.match(regYt);\n if (match && match[7]) {\n type = 'youtube';\n vid = match[7];\n } else {\n let regVim = /^.*(vimeo\\.com\\/)((channels\\/[A-z]+\\/)|(groups\\/[A-z]+\\/videos\\/))?([0-9]+)/;\n match = url.match(regVim);\n if (match && match[5]) {\n type = 'vimeo';\n vid = match[5];\n }\n }\n return {\n type: type,\n id: vid\n };\n}\n\n/**\n * Get additional url parameters\n */\nfunction getUrlParameter(url) {\n let result = '';\n let sPageURL = decodeURIComponent(url);\n let firstsplit = sPageURL.split('?');\n\n if (firstsplit[1] !== undefined) {\n let sURLVariables = firstsplit[1].split('&');\n let sParameterName;\n let i;\n for (i = 0; i < sURLVariables.length; i++) {\n sParameterName = sURLVariables[i].split('=');\n result = result + '&'+ sParameterName[0]+'='+ sParameterName[1];\n }\n }\n return encodeURI(result);\n}\n\n/**\n * Get all images from string\n */\nfunction getImages(string) {\n imagesHolder.innerHTML = string;\n return imagesHolder.querySelectorAll('img');\n}\n\n/**\n * Update item settings.\n */\nfunction updateVars(obj){\n if (!obj) {\n return false;\n }\n navigationDisabled = true;\n current_item = obj;\n nextok = false;\n prevok = false;\n set_maxWidth = obj.getAttribute(\"data-maxwidth\") || obj.settings.maxWidth;\n set_overlayColor = obj.getAttribute(\"data-overlay\") || obj.settings.overlayColor;\n set_ratio = obj.getAttribute(\"data-ratio\") || obj.settings.ratio;\n set_autoplay = obj.getAttribute(\"data-autoplay\") || obj.settings.autoplay;\n set_href = obj.getAttribute(\"data-href\") || obj.getAttribute('href');\n set_customclass = obj.getAttribute(\"data-customclass\") || obj.settings.customClass;\n title = obj.getAttribute(obj.settings.titleattr) || '';\n thisborder = obj.getAttribute(\"data-border\") || obj.settings.border;\n}\n\n/**\n * Close modal.\n */\nfunction close() {\n if (!current_item || !document.body.classList.contains('vbox-open')) {\n return false;\n }\n if (current_item.settings.onPreClose && typeof current_item.settings.onPreClose === 'function') {\n current_item.settings.onPreClose(current_item, gallIndex, thenext, theprev);\n if (current_item.settings.onPreClose === false) {\n return false;\n }\n }\n document.body.removeEventListener('keydown', keyboardHandler);\n document.body.classList.remove('vbox-open');\n\n current_item.focus();\n animate({\n duration: 200,\n timing: timingLinear,\n draw: function(progress) {\n overlay.style.opacity = 1 - progress;\n if (progress === 1){\n overlay.remove();\n }\n }\n });\n}\n\n/**\n * Navigate gallery.\n */\nfunction next() {\n navigateGall(thenext);\n}\nfunction prev() {\n navigateGall(theprev);\n}\n\n/**\n * Keyboard navigation.\n */\nfunction keyboardHandler(e) {\n if (e.keyCode === 27) { // esc\n close();\n }\n if (!throttle) {\n if (e.keyCode == 37 && prevok === true) { // <\n navigateGall(theprev);\n }\n if (e.keyCode == 39 && nextok === true) { // >\n navigateGall(thenext);\n }\n /* prevent keyboard processing until timer completed */\n throttle = setTimeout(() => {\n throttle = null;\n }, 100);\n }\n}\n\n/**\n * Append and fade-in new content\n */\nfunction contentLoaded(){\n\n navigationDisabled = false;\n\n content.style.opacity = 0;\n\n content.innerHTML = newcontent;\n\n let vboxChild = content.querySelector(\":first-child\");\n\n vboxChild.classList.add('vbox-child');\n\n vboxChild.style.backgroundColor = current_item.settings.bgcolor;\n vboxChild.style.maxWidth = set_maxWidth;\n vboxChild.style.transform = 'scale(0.9)';\n vboxChild.style.transition = 'transform 200ms';\n\n // Fix weird drag\n let childImageLock = content.querySelector('.vbox-child img');\n\n if (childImageLock) {\n childImageLock.addEventListener('dragstart', function(e) {\n e.preventDefault();\n });\n }\n\n // reset content scroll\n container.scrollTo(0, 0);\n vboxChild.style.transform = 'scale(1)';\n\n overlay.style.setProperty('--vbox-padding', thisborder);\n\n // Reset custom classes.\n forEach(overlay.classList, function(obj){\n if (obj !== 'vbox-overlay') {\n overlay.classList.remove(obj);\n }\n });\n\n // Set custom class.\n if (set_customclass){\n overlay.classList.add(set_customclass);\n }\n\n animate({\n duration: 200,\n timing: timingLinear,\n draw: function(progress) {\n content.style.opacity = progress;\n if (progress === 1){\n elPreloader.classList.add('vbox-hidden');\n }\n }\n });\n if (current_item.settings.onContentLoaded && typeof current_item.settings.onContentLoaded === 'function') {\n current_item.settings.onContentLoaded(newcontent);\n }\n}\n\n/**\n * Check animation state\n * @param {string} state 'loading' | 'animated'\n */\nfunction checkState(state) {\n if (!content.classList.contains('vbox-' + state)) {\n contentLoaded();\n }\n}\n\n/**\n * Load iFrame\n */\nfunction loadIframe(dest, ratio){\n content.classList.add(\"vbox-loading\");\n newcontent = '
';\n content.classList.remove(\"vbox-loading\");\n checkState('animated');\n}\n\n/**\n * Load videos\n */\nfunction loadVid(dest, ratio, autoplay){\n\n content.classList.add(\"vbox-loading\");\n\n let stringAutoplay; \n // check if it's a video file - thanks to @alexxandar\n if (dest.search(/.+\\.mp4|og[gv]|webm/) !== -1) {\n stringAutoplay = autoplay ? \" autoplay\" : \"\";\n newcontent = '
';\n } else {\n let player;\n let videoObj = parseVideo(dest);\n\n // set rel=0 to hide related videos at the end of YT + optional autoplay\n stringAutoplay = autoplay ? \"?rel=0&autoplay=1\" : \"?rel=0\";\n let queryvars = stringAutoplay + getUrlParameter(dest);\n\n if (videoObj.type == 'vimeo') {\n player = 'https://player.vimeo.com/video/';\n } else if (videoObj.type == 'youtube') {\n player = 'https://www.youtube.com/embed/';\n }\n newcontent = '
';\n }\n\n content.classList.remove(\"vbox-loading\");\n checkState('animated');\n}\n\n/**\n * Load inline content\n */\nfunction loadInline(dest){\n let inlineContent = document.querySelector(dest);\n if (inlineContent) {\n content.classList.add(\"vbox-loading\");\n newcontent = '
' + inlineContent.innerHTML + '
';\n content.classList.remove(\"vbox-loading\");\n checkState('animated');\n }\n}\n\n/**\n * Preload images from ajax call\n */\nfunction loadAjaxImages(){\n images = getImages(newcontent);\n if (images.length) {\n let imgCounter = 0;\n forEach(images, function(getimg){\n let srcimg = getimg.src;\n imgLoader = new Image();\n imgLoader.onload = function(){\n imgCounter++;\n if ( imgCounter == images.length ) {\n content.classList.remove(\"vbox-loading\");\n checkState('animated');\n }\n };\n imgLoader.onerror = function(){\n imgCounter++;\n if ( imgCounter == images.length ) {\n content.classList.remove(\"vbox-loading\");\n checkState('animated');\n }\n };\n imgLoader.src = srcimg;\n });\n } else {\n content.classList.remove(\"vbox-loading\");\n checkState('animated');\n }\n}\n\n/**\n * Load Ajax\n */\nfunction loadAjax(dest){\n content.classList.add(\"vbox-loading\");\n let xhr = new XMLHttpRequest();\n xhr.open(\"GET\", dest, true);\n xhr.onload = function() {\n newcontent = '
'+ xhr.response +'
';\n loadAjaxImages();\n };\n xhr.onerror = function() {\n newcontent = '
';\n content.classList.remove(\"vbox-loading\");\n checkState('animated');\n };\n xhr.send();\n}\n\n/**\n * Preload image\n */\nfunction loadImage(dest){\n \n imgLoader.onload = function(){\n // image has been loaded\n newcontent = '
';\n content.classList.remove('vbox-loading');\n checkState('animated');\n };\n imgLoader.src = dest;\n}\n\n/**\n * Start Drag\n */\nfunction dragStart(e) {\n if (!navigationDisabled) {\n let speed = (current_item.settings.navSpeed * 0.84);\n content.style.transition = 'margin '+ speed + 'ms ease-out, opacity '+ speed + 'ms ease-out';\n startY = endY = e.pageY;\n startX = endX = e.pageX;\n startouch = true;\n }\n}\n\n/**\n * End Drag\n */\nfunction dragEnd(e) {\n if (startouch) {\n startouch = false;\n let subject = current_item;\n let change = false;\n diff = endX - startX;\n\n if (diff < 0 && nextok) {\n subject = thenext;\n change = true;\n }\n if (diff > 0 && prevok) {\n subject = theprev;\n change = true;\n }\n\n if (Math.abs(diff) >= threshold && change) {\n navigateGall(subject);\n } else {\n content.style.marginLeft = 0;\n content.style.opacity = 1;\n }\n }\n}\n\n/**\n * Drag items\n */\nfunction drag(e) {\n if (startouch && !navigationDisabled) {\n endX = e.pageX;\n endY = e.pageY;\n diffX = endX - startX;\n diffY = endY - startY;\n\n let absdiffX = Math.abs(diffX);\n let absdiffY = Math.abs(diffY);\n\n if ((absdiffX > absdiffY) && (absdiffX <= 180)) {\n let diffopac = (1 - absdiffX / 180) * 1.5;\n e.preventDefault();\n content.style.marginLeft = diffX + 'px';\n content.style.opacity = diffopac;\n }\n }\n}\n\n\nfunction setShareButtons(href){\n // Navigator share\n if (navigator.canShare) {\n const shareData = {\n url: href\n };\n blockshare.insertAdjacentHTML('beforeend', '');\n const mobileShareBtn = blockshare.querySelector('.vbox-share-mobile');\n mobileShareBtn.addEventListener('click', function(e){\n e.preventDefault();\n navigator.share(shareData);\n });\n }\n\n // Download\n blockshare.insertAdjacentHTML('beforeend', ''+downloadIcon+'');\n\n // Copy link\n blockshare.insertAdjacentHTML('beforeend', '
');\n const shareCopyBtn = blockshare.querySelector('.vbox-share-copy');\n shareCopyBtn.addEventListener('click', function(e){\n e.preventDefault();\n let tooltip = document.getElementById(\"myTooltip\");\n navigator.clipboard.writeText(href).then(function() {\n tooltip.innerHTML = '
Copied
';\n }, function() {\n console.log('copy failed');\n });\n });\n}\n\n/**\n * Check navigation\n * @param {object} el Current item\n */\nfunction checknav(el){\n\n if (!el) {\n return false;\n }\n\n thisgall = el.dataset.gall;\n numeratio = el.settings.numeration;\n infinigall = el.settings.infinigall;\n blockshare.innerHTML = '';\n\n let vbtype = el.dataset.vbtype;\n\n if (el.settings.share && vbtype !== 'iframe' && vbtype !== 'inline' && vbtype !== 'ajax' ) {\n setShareButtons(el.href);\n }\n\n items = document.querySelectorAll('.vbox-item[data-gall=\"' + thisgall + '\"]');\n\n current_index = Array.prototype.indexOf.call(items, el);\n\n if (items.length < 2) {\n infinigall = false;\n numeratio = false;\n }\n\n thenext = items[current_index + 1];\n theprev = items[current_index - 1];\n\n if (!thenext && infinigall) {\n thenext = items[0];\n }\n\n if (!theprev && infinigall) {\n theprev = items[items.length - 1];\n }\n\n // Update gallery numeration\n if (items.length >= 1) {\n gallIndex = current_index + 1;\n blocknum.innerHTML = gallIndex + ' / ' + items.length;\n } else {\n gallIndex = 1;\n }\n if (numeratio) {\n blocknum.classList.remove('vbox-hidden');\n } else {\n blocknum.classList.add('vbox-hidden');\n }\n\n // Update title\n if (title !== '') {\n blocktitle.classList.remove('vbox-hidden');\n } else {\n blocktitle.classList.add('vbox-hidden');\n }\n blocktitle.innerHTML = title;\n\n // update navigation arrows\n prevok = false;\n nextok = false;\n\n if (thenext || infinigall) {\n nextok = true;\n }\n\n if (current_index > 0 || infinigall) {\n prevok = true;\n }\n\n // activate swipe\n if ((prevok || nextok) && el.settings.navTouch) {\n content.classList.add('vbox-grab');\n content.addEventListener(\"touchstart\", dragStart, false);\n content.addEventListener(\"touchend\", dragEnd, false);\n content.addEventListener(\"touchmove\", drag, false);\n content.addEventListener(\"mousedown\", dragStart, false);\n content.addEventListener(\"mouseup\", dragEnd, false);\n content.addEventListener(\"mouseout\", dragEnd, false);\n content.addEventListener(\"mousemove\", drag, false);\n } else {\n content.classList.remove('vbox-grab');\n content.removeEventListener(\"touchstart\", dragStart, false);\n content.removeEventListener(\"touchend\", dragEnd, false);\n content.removeEventListener(\"touchmove\", drag, false);\n content.removeEventListener(\"mousedown\", dragStart, false);\n content.removeEventListener(\"mouseup\", dragEnd, false);\n content.removeEventListener(\"mouseout\", dragEnd, false);\n content.removeEventListener(\"mousemove\", drag, false);\n }\n\n let vbox_next = overlay.querySelector('.vbox-next');\n let vbox_prev = overlay.querySelector('.vbox-prev');\n\n if (prevok) {\n vbox_prev.classList.remove('vbox-hidden');\n } else {\n vbox_prev.classList.add('vbox-hidden');\n }\n\n if (nextok) {\n vbox_next.classList.remove('vbox-hidden');\n } else {\n vbox_next.classList.add('vbox-hidden');\n }\n\n if (!el.settings.navigation) {\n vbox_next.classList.add('vbox-hidden');\n vbox_prev.classList.add('vbox-hidden');\n }\n} // Checknav\n\n/**\n * Update overlay and tools style.\n */\nfunction updateOverlay(destination){\n\n if (!destination) {\n return false;\n }\n\n backdrop.style.backgroundColor = set_overlayColor;\n\n // Custom preloader color.\n elPreloaderInner.innerHTML = createspinner(spinners[destination.settings.spinner]);\n\n overlay.style.setProperty('--sk-color', destination.settings.spinColor);\n\n elPreloader.classList.remove('vbox-hidden');\n\n blockshare.classList.remove('vbox-top', 'vbox-bottom');\n blocktitle.classList.remove('vbox-top', 'vbox-bottom');\n\n if (destination.settings.titlePosition == 'top') {\n blocktitle.classList.add('vbox-top');\n blockshare.classList.add('vbox-bottom');\n } else {\n blocktitle.classList.add('vbox-bottom');\n blockshare.classList.add('vbox-top');\n }\n\n let titleWidth = destination.settings.titleStyle === 'bar' ? '100%' : 'auto';\n let titleRadius = destination.settings.titleStyle === 'pill' ? '5em' : '0';\n let shareWidth = destination.settings.shareStyle === 'bar' ? '100%' : 'auto';\n let shareRadius = destination.settings.shareStyle === 'pill' ? '5em' : '0';\n let titlebg = destination.settings.titleStyle === 'transparent' ? 'transparent' : destination.settings.toolsBackground;\n let sharebg = destination.settings.shareStyle === 'transparent' ? 'transparent' : destination.settings.toolsBackground;\n\n overlay.style.setProperty('--vbox-title-width', titleWidth);\n overlay.style.setProperty('--vbox-title-radius', titleRadius);\n overlay.style.setProperty('--vbox-share-width', shareWidth);\n overlay.style.setProperty('--vbox-share-radius', shareRadius);\n overlay.style.setProperty('--vbox-tools-color', destination.settings.toolsColor);\n overlay.style.setProperty('--vbox-title-background', titlebg);\n overlay.style.setProperty('--vbox-share-background', sharebg);\n}\n\n/**\n * Load content\n */\nfunction loadContent(){\n if (!current_item) {\n return false;\n }\n let vbtype = current_item.dataset.vbtype;\n\n switch (vbtype) {\n case 'iframe':\n loadIframe(set_href, set_ratio);\n break;\n case 'inline':\n loadInline(set_href);\n break;\n case 'ajax':\n loadAjax(set_href);\n break;\n case 'video':\n loadVid(set_href, set_ratio, set_autoplay);\n break;\n default:\n loadImage(set_href);\n }\n}\n\n/**\n * Gallery navigation.\n */\nfunction navigateGall(destination) {\n\n if (!destination || navigationDisabled || !document.body.classList.contains('vbox-open')) {\n return false;\n }\n\n updateVars(destination);\n updateOverlay(destination);\n\n // swipe out item\n let speed = (current_item.settings.navSpeed * 0.84);\n content.style.transition = 'margin '+ speed + 'ms ease-out, opacity '+ speed + 'ms ease-out';\n\n if (destination === theprev) {\n content.classList.add(\"swipe-right\");\n }\n if (destination === thenext) {\n content.classList.add(\"swipe-left\");\n }\n\n elPreloader.classList.remove('vbox-hidden');\n\n let startopacity = content.style.opacity;\n\n content.classList.add(\"vbox-animated\", \"vbox-loading\");\n\n checknav(destination);\n\n animate({\n duration: current_item.settings.navSpeed,\n timing: timingLinear,\n draw: function(progress) {\n\n content.style.opacity = startopacity - progress/startopacity;\n\n if (progress === 1){\n content.classList.remove(\"swipe-left\", \"swipe-right\", \"vbox-animated\");\n content.style.marginLeft = 0;\n content.style.transition = '';\n\n checkState('loading');\n\n navigationDisabled = false;\n\n if (current_item.settings.onNavComplete && typeof current_item.settings.onNavComplete === 'function') {\n current_item.settings.onNavComplete(current_item, gallIndex, thenext, theprev);\n }\n }\n }\n });\n loadContent();\n}\n\n/**\n * Open item.\n */\n function open(obj) {\n\n if (document.body.classList.contains('vbox-open') || !obj) {\n return false;\n }\n\n if (obj.settings.onPreOpen && typeof obj.settings.onPreOpen === 'function') {\n obj.settings.onPreOpen(obj);\n }\n if (!obj.settings.onPreOpen) {\n return false;\n }\n\n updateVars(obj);\n\n document.body.insertAdjacentHTML('beforeend', core);\n document.body.classList.add('vbox-open');\n\n overlay = document.querySelector(\".vbox-overlay\");\n backdrop = overlay.querySelector(\".vbox-backdrop\");\n container = overlay.querySelector(\".vbox-container\");\n content = container.querySelector(\".vbox-content\");\n blocknum = overlay.querySelector(\".vbox-num\");\n blockshare = overlay.querySelector(\".vbox-share\");\n blocktitle = overlay.querySelector(\".vbox-title\");\n elPreloader = overlay.querySelector(\".vbox-preloader\");\n elPreloaderInner = elPreloader.querySelector(\".vbox-preloader-inner\");\n\n overlay.style.opacity = 0;\n\n updateOverlay(obj);\n checknav(obj);\n\n content.classList.add(\"vbox-animated\", \"vbox-loading\");\n\n // fade in overlay\n animate({\n duration: 200,\n timing: timingLinear,\n draw: function(progress) {\n overlay.style.opacity = progress;\n if (progress === 1){\n content.classList.remove('vbox-animated');\n navigationDisabled = false;\n checkState('loading');\n if (current_item.settings.onPostOpen && typeof current_item.settings.onPostOpen === 'function') {\n current_item.settings.onPostOpen(current_item, gallIndex, thenext, theprev);\n }\n }\n }\n });\n\n loadContent();\n\n // Keyboard actions\n if (obj.settings.navKeyboard) {\n document.body.addEventListener('keydown', keyboardHandler);\n\n // Reset the throttle timer\n document.body.addEventListener('keyup', () => {\n if (throttle) {\n clearTimeout(throttle);\n throttle = null;\n }\n });\n }\n\n // Prev gallery\n document.querySelector('.vbox-prev').addEventListener('click', function(){\n navigateGall(theprev);\n });\n\n // Newxt gallery\n document.querySelector('.vbox-next').addEventListener('click', function(){\n navigateGall(thenext);\n });\n\n // Close modal.\n overlay.addEventListener('click', function(e){\n let closeBtn = document.querySelector('.vbox-close');\n if (closeBtn) {\n if (closeBtn.contains(e.target) || closeBtn === e.target || (current_item.settings.overlayClose &&\n e.target.classList.contains('vbox-overlay') ||\n e.target.classList.contains('vbox-content') ||\n e.target.classList.contains('vbox-backdrop') ||\n e.target.classList.contains('vbox-close') ||\n e.target.classList.contains('vbox-preloader') ||\n e.target.classList.contains('vbox-container')\n )) {\n close();\n }\n }\n });\n}\n\n/**\n * Initialize Plugin\n */\nfunction init(venobox, settings) {\n\n if (settings.onInit && typeof settings.onInit === 'function') {\n settings.onInit(venobox);\n }\n\n let selectors = settings.jQuerySelectors || document.querySelectorAll(settings.selector);\n let navigation = 'NextPrev';\n let vbheader = '
0/0
';\n let vbfooter = '
';\n let preloader = '
';\n core = '
' + preloader + '
' + vbheader + navigation + vbfooter + '
';\n\n /**\n * Loop items.\n */\n forEach(selectors, function(obj){\n if (obj.classList.contains(\"vbox-item\")) {\n return true;\n }\n obj.settings = settings;\n obj.classList.add(\"vbox-item\");\n\n // Open Link\n obj.addEventListener(\"click\", function(e){\n e.preventDefault();\n // Remove focus from link to avoid multiple calls with enter key\n obj.blur();\n open(obj);\n return false;\n }); // Click;\n }); // forEach\n\n if (settings.popup) {\n let popup = document.querySelector(settings.popup);\n popup.settings = settings;\n open(popup);\n }\n} // init\n\n/**\n * VenoBox constructor\n */\nconst VenoBox = function (options) {\n const venobox = {};\n\n // Merge user options with defaults\n let settings = extend( defaults, options || {} );\n\n venobox.close = close;\n venobox.next = next;\n venobox.prev = prev;\n venobox.open = open;\n venobox.settings = settings;\n\n init(venobox, settings);\n\n // Public APIs\n return venobox;\n};\n\n/* jQuery bridge for $().venobox() */\nif (typeof jQuery === 'function') {\n (function($){\n \"use strict\";\n $.fn.extend({\n // plugin name - venobox\n venobox: function(options) {\n const pluginoptions = options || {};\n pluginoptions.jQuerySelectors = this;\n // Init venobx\n new VenoBox({pluginoptions});\n } // venobox\n }); // extend\n })(jQuery);\n}\n\nexport default VenoBox;\n"],"names":["backdrop","blocknum","blockshare","blocktitle","core","container","content","current_item","current_index","diffX","diffY","endY","elPreloader","elPreloaderInner","gallIndex","images","infinigall","items","navigationDisabled","newcontent","numeratio","nextok","prevok","overlay","set_maxWidth","set_overlayColor","set_ratio","set_autoplay","set_href","set_customclass","startY","thenext","theprev","thisborder","thisgall","title","throttle","imagesHolder","document","createElement","startX","endX","diff","startouch","imgLoader","Image","spinners","bounce","chase","circle","flow","fold","grid","plane","pulse","swing","wander","wave","defaults","selector","autoplay","bgcolor","border","customClass","maxWidth","navigation","navKeyboard","navTouch","navSpeed","numeration","overlayClose","overlayColor","popup","ratio","share","shareStyle","spinner","spinColor","titleattr","titlePosition","titleStyle","toolsBackground","toolsColor","onPreOpen","onPostOpen","onPreClose","onNavComplete","onContentLoaded","onInit","jQuerySelectors","forEach","collection","callback","scope","Object","prototype","toString","call","prop","hasOwnProperty","i","len","length","timingLinear","timeFraction","animate","timing","draw","duration","start","performance","now","requestAnimationFrame","time","progress","updateVars","obj","getAttribute","settings","close","body","classList","contains","removeEventListener","keyboardHandler","remove","focus","style","opacity","next","navigateGall","prev","e","keyCode","setTimeout","checkState","state","innerHTML","vboxChild","querySelector","add","backgroundColor","transform","transition","childImageLock","addEventListener","preventDefault","scrollTo","setProperty","contentLoaded","loadVid","dest","stringAutoplay","search","player","videoObj","url","type","match","vid","regVim","id","parseVideo","queryvars","result","firstsplit","decodeURIComponent","split","undefined","sParameterName","sURLVariables","encodeURI","getUrlParameter","loadAjaxImages","string","querySelectorAll","imgCounter","getimg","srcimg","src","onload","onerror","dragStart","speed","pageY","pageX","dragEnd","subject","change","Math","abs","marginLeft","drag","absdiffX","diffopac","checknav","el","dataset","gall","vbtype","href","navigator","canShare","shareData","insertAdjacentHTML","tooltip","getElementById","clipboard","writeText","then","console","log","setShareButtons","Array","indexOf","vbox_next","vbox_prev","updateOverlay","destination","spinarray","createspinner","titleWidth","titleRadius","shareWidth","shareRadius","titlebg","sharebg","loadContent","inlineContent","loadInline","xhr","XMLHttpRequest","open","response","send","loadAjax","loadImage","startopacity","clearTimeout","closeBtn","target","VenoBox","options","venobox","extended","value","extend","selectors","blur","init","jQuery","fn","pluginoptions","this"],"mappings":";;;;;MAKA,IAAIA,EAAUC,EAAUC,EAAYC,EAAYC,EAAMC,EAAWC,EAASC,EAAcC,EAAeC,EAAOC,EAAOC,EAAMC,EAAaC,EACpIC,EAAWC,EAAQC,EAAYC,EAAOC,EAAoBC,EAAYC,EAAWC,EAAQC,EAAQC,EACjGC,EAAcC,EAAkBC,EAAWC,EAAcC,EAAUC,EAAiBC,EAAQC,EAASC,EAASC,EAAYC,EAAUC,EAAOC,EAE/I,MAKMC,EAAeC,SAASC,cAAc,OAE5C,IAAIC,EAAS,EACTC,EAAO,EACPC,EAAO,EAEPC,GAAY,EACZC,EAAY,IAAIC,MAEpB,MAAMC,EAAW,CACbC,OAAU,CAAC,YAAa,gBAAiB,GACzCC,MAAS,CAAC,WAAY,eAAgB,GACtCC,OAAU,CAAC,YAAa,gBAAiB,IACzC,cAAe,CAAC,iBAAkB,qBAAsB,IACxDC,KAAQ,CAAC,UAAW,cAAe,GACnCC,KAAQ,CAAC,UAAW,eAAgB,GACpCC,KAAQ,CAAC,UAAW,eAAgB,GACpCC,MAAS,CAAC,WAAY,GAAI,GAC1BC,MAAS,CAAC,WAAY,GAAI,GAC1BC,MAAS,CAAC,WAAY,eAAgB,GACtCC,OAAU,CAAC,YAAa,iBAAkB,GAC1CC,KAAQ,CAAC,UAAW,cAAe,IAIjCC,EAAW,CACbC,SAAU,WACVC,UAAW,EACXC,QAAS,OACTC,OAAQ,IACRC,aAAa,EACb/C,YAAY,EACZgD,SAAU,OACVC,YAAY,EACZC,aAAa,EACbC,UAAU,EACVC,SAAU,IACVC,YAAY,EACZC,cAAc,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AAUC,SAAS,aACvB,OAAO,EAEXN,EAAIE,SAAWA,EACfF,EAAIK,UAAUmB,IAAI,aAGlBxB,EAAI6B,iBAAiB,SAAS,SAASb,GAKnC,OAJAA,EAAEc,iBAEF9B,EAAIoI,OACJhB,GAAKpH,IACE,QAIXE,EAAS9C,MAAO,CAChB,IAAIA,EAAQlC,SAASqG,cAAcrB,EAAS9C,OAC5CA,EAAM8C,SAAWA,EACjBkH,GAAKhK,IAmBTiL,CAAKN,EAAS7H,GAGP6H,SAIW,mBAAXO,QAYJA,OATGC,GAAGL,OAAO,CAERH,QAAS,SAASD,GACd,MAAMU,EAAgBV,GAAW,GACjCU,EAAcnK,gBAAkBoK,KAEhC,IAAIZ,GAAQ,CAACW,cAAAA"} \ No newline at end of file diff --git a/venobox/v2/package.json b/venobox/v2/package.json deleted file mode 100644 index 7cc3727..0000000 --- a/venobox/v2/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "venobox", - "version": "2.0.4", - "description": "Responsive javascript modal window plugin, touch swipe gallery", - "main": "dist/venobox.min.js", - "module": "src/venobox.esm.js", - "browser": "dist/venobox.min.js", - "style": "dist/venobox.min.css", - "repository": { - "type": "git", - "url": "git+https://github.com/nicolafranchini/VenoBox.git" - }, - "keywords": [ - "lightbox", - "modal", - "responsive", - "plugin", - "popup", - "gallery", - "window", - "no-jquery", - "vanilla", - "touch", - "swipe" - ], - "author": "Nicola Franchini (https://veno.es/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/nicolafranchini/VenoBox/issues" - }, - "homepage": "https://veno.es/venobox/" -} diff --git a/venobox/v2/src/venobox.css b/venobox/v2/src/venobox.css deleted file mode 100644 index 0b0e166..0000000 --- a/venobox/v2/src/venobox.css +++ /dev/null @@ -1,364 +0,0 @@ -/** - * https://github.com/nicolafranchini/VenoBox/ - */ -.vbox-overlay{ - --vbox-tools-color: #fff; - --vbox-title-background: #101010; - --vbox-title-width: 'auto'; - --vbox-title-radius: 0; - --vbox-share-background: #101010; - --vbox-share-width: 'auto'; - --vbox-share-radius: 0; - --vbox-padding: 0; -} - -/* ------ venobox.css --------*/ -.vbox-overlay *, .vbox-overlay *:before, .vbox-overlay *:after{ - -webkit-backface-visibility: hidden; - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - box-sizing:border-box; -} -.vbox-overlay * { - -webkit-backface-visibility: visible; - backface-visibility: visible; -} -.vbox-overlay{ - display: -webkit-flex; - display: flex; - -webkit-flex-direction: column; - flex-direction: column; - -webkit-justify-content: center; - justify-content: center; - -webkit-align-items: center; - align-items: center; - position: fixed; - left: 0; - top: 0; - bottom: 0; - right: 0; - z-index: 999999; -} - -.vbox-share, .vbox-title{ - line-height: 1; - position: fixed; - z-index: 98; - text-align: center; - margin: 0 auto; - color: var(--vbox-tools-color); -} -.vbox-title{ - font-size: 12px; - background-color: var(--vbox-title-background); - width: var(--vbox-title-width); - border-radius: var(--vbox-title-radius); - padding: 12px 54px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - display: block; -} -.vbox-share{ - font-size: 24px; - padding: 0 0.35em; - background-color: var(--vbox-share-background); - width: var(--vbox-share-width); - border-radius: var(--vbox-share-radius); -} -.vbox-link-btn, -button.vbox-link-btn, -button.vbox-link-btn:hover, -button.vbox-link-btn:active, -button.vbox-link-btn:focus{ - border: none !important; - background: none !important; - box-shadow: none !important; - color: inherit !important; - padding: 6px 12px; - outline: none; - display: inline-block; - cursor: pointer; -} -.vbox-share a{ - color: inherit !important; - padding: 6px 12px; - display: inline-block; -} - -.vbox-share svg{ - z-index: 10; - vertical-align: middle; -} -/* ----- navigation ----- */ -.vbox-close{ - cursor: pointer; - position: fixed; - top: 0; - right: 0; - z-index: 99; - padding: 6px 15px; - color: #000; - color: var(--vbox-tools-color); - border: 0; - font-size: 24px; - display: flex; - align-items: center; - opacity: 0.8; - transition: opacity 0.2s; -} - -.vbox-close:hover{ - opacity: 1; -} - -.vbox-left-corner{ - cursor: pointer; - position: fixed; - left: 0; - top: 0; - overflow: hidden; - line-height: 1; - font-size: 12px; - z-index: 99; - display: flex; - align-items:center; - color: var(--vbox-tools-color); -} -.vbox-num{ - display: inline-block; - padding: 12px 15px; -} -/* ----- Social share ----- */ - -.vbox-left{ - left: 0; -} -.vbox-right{ - right: 0; -} -.vbox-top{ - top: 0; -} -.vbox-bottom{ - bottom: 0; -} - -/* ----- Navigation arrows ----- */ -.vbox-next, .vbox-prev{ - position: fixed; - top: 50%; - margin-top: -15px; - overflow: hidden; - cursor: pointer; - display: block; - width: 45px; - height: 45px; - z-index: 99; - opacity: 0.8; - transition: opacity 0.2s; -} -.vbox-next:hover, .vbox-prev:hover{ - opacity: 1; -} -.vbox-next span, .vbox-prev span{ - position: relative; - width: 20px; - height: 20px; - border: 2px solid transparent; - border-top-color: var(--vbox-tools-color); - border-right-color: var(--vbox-tools-color); - text-indent: -100px; - position: absolute; - top: 8px; - display: block; -} -.vbox-prev{ - left: 15px; -} -.vbox-next{ - right: 15px; -} -.vbox-prev span{ - left: 10px; - -ms-transform: rotate(-135deg); - -webkit-transform: rotate(-135deg); - transform: rotate(-135deg); -} -.vbox-next span{ - -ms-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - transform: rotate(45deg); - right: 10px; -} -/* ----- Aspect ratio ----- */ -.venoratio, .vbox-inline { - position: relative; - width: 100%; - margin: 0 auto; -} -.venoratio::before { - display: block; - padding-top: var(--vb-aspect-ratio); - content: ""; -} -.venoratio > * { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - padding: var(--vbox-padding); -} -.venoratio-1x1 { - --vb-aspect-ratio: 100%; -} -.venoratio-4x3 { - --vb-aspect-ratio: calc(3 / 4 * 100%); -} -.venoratio-16x9 { - --vb-aspect-ratio: calc(9 / 16 * 100%); -} -.venoratio-21x9 { - --vb-aspect-ratio: calc(9 / 21 * 100%); -} -.venoratio-full { - --vb-aspect-ratio: calc(100vh - 100px); -} - -.vbox-child.venoratio, .vbox-child.vbox-inline{ - max-width: 100%; -} -.vbox-open{ - overflow: hidden; -} -.vbox-container{ - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - overflow-x: hidden; - overflow-y: scroll; - overflow-scrolling: touch; - -webkit-overflow-scrolling: touch; - z-index: 20; - max-height: 100%; - padding: 30px 0px; -} - -.vbox-content{ - opacity: 0; -} - -.vbox-content{ - text-align: center; - width: 100%; - position: relative; - overflow: hidden; - padding: 20px 4%; - display: flex; - align-items: center; - justify-content: center; - min-height: 100%; -} -.vbox-container img{ - max-width: 100%; - height: auto; -} -.vbox-child{ - box-shadow: 0 0 12px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); - max-width: 100%; - text-align: initial; - padding: var(--vbox-padding); -} -.vbox-child img{ - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -o-user-select: none; - user-select: none; - display: block; -} -.vbox-grab .vbox-child img{ - cursor: grab; -} -.vbox-child > iframe{ - border: none !important; -} -.vbox-content.swipe-left{ - margin-left: -200px !important; -} -.vbox-content.swipe-right{ - margin-left: 200px !important; -} -.vbox-preloader{ - -webkit-transform: translateZ(0); - -moz-transform: translateZ(0); - -o-transform: translateZ(0); - transform: translateZ(0); -} -.vbox-preloader .vbox-preloader-inner{ - opacity: 1; - transition: opacity 200ms; -} -.vbox-hidden{ - display: none; -} -.vbox-preloader.vbox-hidden .vbox-preloader-inner{ - opacity: 0; -} -.vbox-backdrop{ - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - -webkit-transform: translateZ(-1px); - -moz-transform: translateZ(-1px); - -o-transform: translateZ(-1px); - transform: translateZ(-1px); - z-index: 0; -} - -.vbox-tooltip { - position: relative; - display: inline-block; -} - -.vbox-tooltip .vbox-tooltip-text { - visibility: hidden; - color: #fff; - text-align: center; - padding: 0; - position: absolute; - z-index: 1; - bottom: 100%; - left: 0; - opacity: 0; - transition: opacity 0.3s; - margin-bottom: 2px; - font-family: sans-serif; -} -.vbox-top .vbox-tooltip .vbox-tooltip-text{ - bottom: auto; - top: 100%; - margin-bottom: 0; - margin-top: 2px; -} - -.vbox-tooltip-inner{ - padding: 5px 10px; - background-color: rgba(0, 0, 0, 0.9); - border-radius: 6px; - font-size: 10px; -} -.vbox-tooltip:hover .vbox-tooltip-text { - visibility: visible; - opacity: 1; -} - -/* ---------- preloader ---------- - * http://tobiasahlin.com/spinkit/ --------------------------------- */ -.vbox-overlay{--sk-size:40px;--sk-color:#333}.sk-center{margin:auto}.sk-plane{width:var(--sk-size);height:var(--sk-size);background-color:var(--sk-color);animation:sk-plane 1.2s infinite ease-in-out}@keyframes sk-plane{0%{transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}100%{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.sk-chase{width:var(--sk-size);height:var(--sk-size);position:relative;animation:sk-chase 2.5s infinite linear both}.sk-chase-dot{width:100%;height:100%;position:absolute;left:0;top:0;animation:sk-chase-dot 2.0s infinite ease-in-out both}.sk-chase-dot:before{content:'';display:block;width:25%;height:25%;background-color:var(--sk-color);border-radius:100%;animation:sk-chase-dot-before 2.0s infinite ease-in-out both}.sk-chase-dot:nth-child(1){animation-delay:-1.1s}.sk-chase-dot:nth-child(2){animation-delay:-1.0s}.sk-chase-dot:nth-child(3){animation-delay:-0.9s}.sk-chase-dot:nth-child(4){animation-delay:-0.8s}.sk-chase-dot:nth-child(5){animation-delay:-0.7s}.sk-chase-dot:nth-child(6){animation-delay:-0.6s}.sk-chase-dot:nth-child(1):before{animation-delay:-1.1s}.sk-chase-dot:nth-child(2):before{animation-delay:-1.0s}.sk-chase-dot:nth-child(3):before{animation-delay:-0.9s}.sk-chase-dot:nth-child(4):before{animation-delay:-0.8s}.sk-chase-dot:nth-child(5):before{animation-delay:-0.7s}.sk-chase-dot:nth-child(6):before{animation-delay:-0.6s}@keyframes sk-chase{100%{transform:rotate(360deg)}}@keyframes sk-chase-dot{80%,100%{transform:rotate(360deg)}}@keyframes sk-chase-dot-before{50%{transform:scale(0.4)}100%,0%{transform:scale(1.0)}}.sk-bounce{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-bounce-dot{width:100%;height:100%;border-radius:50%;background-color:var(--sk-color);opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite cubic-bezier(0.455,0.03,0.515,0.955)}.sk-bounce-dot:nth-child(2){animation-delay:-1.0s}@keyframes sk-bounce{0%,100%{transform:scale(0)}45%,55%{transform:scale(1)}}.sk-wave{width:var(--sk-size);height:var(--sk-size);display:flex;justify-content:space-between}.sk-wave-rect{background-color:var(--sk-color);height:100%;width:15%;animation:sk-wave 1.2s infinite ease-in-out}.sk-wave-rect:nth-child(1){animation-delay:-1.2s}.sk-wave-rect:nth-child(2){animation-delay:-1.1s}.sk-wave-rect:nth-child(3){animation-delay:-1.0s}.sk-wave-rect:nth-child(4){animation-delay:-0.9s}.sk-wave-rect:nth-child(5){animation-delay:-0.8s}@keyframes sk-wave{0%,40%,100%{transform:scaleY(0.4)}20%{transform:scaleY(1)}}.sk-pulse{width:var(--sk-size);height:var(--sk-size);background-color:var(--sk-color);border-radius:100%;animation:sk-pulse 1.2s infinite cubic-bezier(0.455,0.03,0.515,0.955)}@keyframes sk-pulse{0%{transform:scale(0)}100%{transform:scale(1);opacity:0}}.sk-flow{width:calc(var(--sk-size) * 1.3);height:calc(var(--sk-size) * 1.3);display:flex;justify-content:space-between}.sk-flow-dot{width:25%;height:25%;background-color:var(--sk-color);border-radius:50%;animation:sk-flow 1.4s cubic-bezier(0.455,0.03,0.515,0.955) 0s infinite both}.sk-flow-dot:nth-child(1){animation-delay:-0.30s}.sk-flow-dot:nth-child(2){animation-delay:-0.15s}@keyframes sk-flow{0%,80%,100%{transform:scale(0.3)}40%{transform:scale(1)}}.sk-swing{width:var(--sk-size);height:var(--sk-size);position:relative;animation:sk-swing 1.8s infinite linear}.sk-swing-dot{width:45%;height:45%;position:absolute;top:0;left:0;right:0;margin:auto;background-color:var(--sk-color);border-radius:100%;animation:sk-swing-dot 2s infinite ease-in-out}.sk-swing-dot:nth-child(2){top:auto;bottom:0;animation-delay:-1s}@keyframes sk-swing{100%{transform:rotate(360deg)}}@keyframes sk-swing-dot{0%,100%{transform:scale(0.2)}50%{transform:scale(1)}}.sk-circle{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-circle-dot{width:100%;height:100%;position:absolute;left:0;top:0}.sk-circle-dot:before{content:'';display:block;width:15%;height:15%;background-color:var(--sk-color);border-radius:100%;animation:sk-circle 1.2s infinite ease-in-out both}.sk-circle-dot:nth-child(1){transform:rotate(30deg)}.sk-circle-dot:nth-child(2){transform:rotate(60deg)}.sk-circle-dot:nth-child(3){transform:rotate(90deg)}.sk-circle-dot:nth-child(4){transform:rotate(120deg)}.sk-circle-dot:nth-child(5){transform:rotate(150deg)}.sk-circle-dot:nth-child(6){transform:rotate(180deg)}.sk-circle-dot:nth-child(7){transform:rotate(210deg)}.sk-circle-dot:nth-child(8){transform:rotate(240deg)}.sk-circle-dot:nth-child(9){transform:rotate(270deg)}.sk-circle-dot:nth-child(10){transform:rotate(300deg)}.sk-circle-dot:nth-child(11){transform:rotate(330deg)}.sk-circle-dot:nth-child(1):before{animation-delay:-1.1s}.sk-circle-dot:nth-child(2):before{animation-delay:-1s}.sk-circle-dot:nth-child(3):before{animation-delay:-0.9s}.sk-circle-dot:nth-child(4):before{animation-delay:-0.8s}.sk-circle-dot:nth-child(5):before{animation-delay:-0.7s}.sk-circle-dot:nth-child(6):before{animation-delay:-0.6s}.sk-circle-dot:nth-child(7):before{animation-delay:-0.5s}.sk-circle-dot:nth-child(8):before{animation-delay:-0.4s}.sk-circle-dot:nth-child(9):before{animation-delay:-0.3s}.sk-circle-dot:nth-child(10):before{animation-delay:-0.2s}.sk-circle-dot:nth-child(11):before{animation-delay:-0.1s}@keyframes sk-circle{0%,80%,100%{transform:scale(0)}40%{transform:scale(1)}}.sk-circle-fade{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-circle-fade-dot{width:100%;height:100%;position:absolute;left:0;top:0}.sk-circle-fade-dot:before{content:'';display:block;width:15%;height:15%;background-color:var(--sk-color);border-radius:100%;animation:sk-circle-fade 1.2s infinite ease-in-out both}.sk-circle-fade-dot:nth-child(1){transform:rotate(30deg)}.sk-circle-fade-dot:nth-child(2){transform:rotate(60deg)}.sk-circle-fade-dot:nth-child(3){transform:rotate(90deg)}.sk-circle-fade-dot:nth-child(4){transform:rotate(120deg)}.sk-circle-fade-dot:nth-child(5){transform:rotate(150deg)}.sk-circle-fade-dot:nth-child(6){transform:rotate(180deg)}.sk-circle-fade-dot:nth-child(7){transform:rotate(210deg)}.sk-circle-fade-dot:nth-child(8){transform:rotate(240deg)}.sk-circle-fade-dot:nth-child(9){transform:rotate(270deg)}.sk-circle-fade-dot:nth-child(10){transform:rotate(300deg)}.sk-circle-fade-dot:nth-child(11){transform:rotate(330deg)}.sk-circle-fade-dot:nth-child(1):before{animation-delay:-1.1s}.sk-circle-fade-dot:nth-child(2):before{animation-delay:-1.0s}.sk-circle-fade-dot:nth-child(3):before{animation-delay:-0.9s}.sk-circle-fade-dot:nth-child(4):before{animation-delay:-0.8s}.sk-circle-fade-dot:nth-child(5):before{animation-delay:-0.7s}.sk-circle-fade-dot:nth-child(6):before{animation-delay:-0.6s}.sk-circle-fade-dot:nth-child(7):before{animation-delay:-0.5s}.sk-circle-fade-dot:nth-child(8):before{animation-delay:-0.4s}.sk-circle-fade-dot:nth-child(9):before{animation-delay:-0.3s}.sk-circle-fade-dot:nth-child(10):before{animation-delay:-0.2s}.sk-circle-fade-dot:nth-child(11):before{animation-delay:-0.1s}@keyframes sk-circle-fade{0%,39%,100%{opacity:0;transform:scale(0.6)}40%{opacity:1;transform:scale(1)}}.sk-grid{width:var(--sk-size);height:var(--sk-size)}.sk-grid-cube{width:33.33%;height:33.33%;background-color:var(--sk-color);float:left;animation:sk-grid 1.3s infinite ease-in-out}.sk-grid-cube:nth-child(1){animation-delay:.2s}.sk-grid-cube:nth-child(2){animation-delay:.3s}.sk-grid-cube:nth-child(3){animation-delay:.4s}.sk-grid-cube:nth-child(4){animation-delay:.1s}.sk-grid-cube:nth-child(5){animation-delay:.2s}.sk-grid-cube:nth-child(6){animation-delay:.3s}.sk-grid-cube:nth-child(7){animation-delay:0s}.sk-grid-cube:nth-child(8){animation-delay:.1s}.sk-grid-cube:nth-child(9){animation-delay:.2s}@keyframes sk-grid{0%,70%,100%{transform:scale3D(1,1,1)}35%{transform:scale3D(0,0,1)}}.sk-fold{width:var(--sk-size);height:var(--sk-size);position:relative;transform:rotateZ(45deg)}.sk-fold-cube{float:left;width:50%;height:50%;position:relative;transform:scale(1.1)}.sk-fold-cube:before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sk-color);animation:sk-fold 2.4s infinite linear both;transform-origin:100% 100%}.sk-fold-cube:nth-child(2){transform:scale(1.1) rotateZ(90deg)}.sk-fold-cube:nth-child(4){transform:scale(1.1) rotateZ(180deg)}.sk-fold-cube:nth-child(3){transform:scale(1.1) rotateZ(270deg)}.sk-fold-cube:nth-child(2):before{animation-delay:.3s}.sk-fold-cube:nth-child(4):before{animation-delay:.6s}.sk-fold-cube:nth-child(3):before{animation-delay:.9s}@keyframes sk-fold{0%,10%{transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{transform:perspective(140px) rotateX(0);opacity:1}90%,100%{transform:perspective(140px) rotateY(180deg);opacity:0}}.sk-wander{width:var(--sk-size);height:var(--sk-size);position:relative}.sk-wander-cube{background-color:var(--sk-color);width:20%;height:20%;position:absolute;top:0;left:0;--sk-wander-distance:calc(var(--sk-size) * 0.75);animation:sk-wander 2.0s ease-in-out -2.0s infinite both}.sk-wander-cube:nth-child(2){animation-delay:-0.5s}.sk-wander-cube:nth-child(3){animation-delay:-1.0s}@keyframes sk-wander{0%{transform:rotate(0)}25%{transform:translateX(var(--sk-wander-distance)) rotate(-90deg) scale(0.6)}50%{transform:translateX(var(--sk-wander-distance)) translateY(var(--sk-wander-distance)) rotate(-179deg)}50.1%{transform:translateX(var(--sk-wander-distance)) translateY(var(--sk-wander-distance)) rotate(-180deg)}75%{transform:translateX(0) translateY(var(--sk-wander-distance)) rotate(-270deg) scale(0.6)}100%{transform:rotate(-360deg)}} diff --git a/venobox/v2/src/venobox.esm.js b/venobox/v2/src/venobox.esm.js deleted file mode 100644 index a2fda0a..0000000 --- a/venobox/v2/src/venobox.esm.js +++ /dev/null @@ -1,1004 +0,0 @@ -/** - * VenoBox 2.0.4 - * Copyright 2013-2021 Nicola Franchini - * @license: https://github.com/nicolafranchini/VenoBox/blob/master/LICENSE - */ -let backdrop, blocknum, blockshare, blocktitle, core, container, content, current_item, current_index, diffX, diffY, endY, elPreloader, elPreloaderInner; -let gallIndex, images, infinigall, items, navigationDisabled, newcontent, numeratio, nextok, prevok, overlay; -let set_maxWidth, set_overlayColor, set_ratio, set_autoplay, set_href, set_customclass, startY, thenext, theprev, thisborder, thisgall, title, throttle; - -const svgOpen = ''; -const svgClose = ''; -const downloadIcon = svgOpen + '' + svgClose; -const shareIcon = svgOpen + '' + svgClose; -const linkIcon = svgOpen + '' + svgClose; -const imagesHolder = document.createElement('div'); - -let startX = 0; -let endX = 0; -let diff = 0; -let threshold = 50; -let startouch = false; -let imgLoader = new Image(); - -const spinners = { - 'bounce': ['sk-bounce', 'sk-bounce-dot', 2], - 'chase': ['sk-chase', 'sk-chase-dot', 6], - 'circle': ['sk-circle', 'sk-circle-dot', 12], - 'circle-fade': ['sk-circle-fade', 'sk-circle-fade-dot', 12], - 'flow': ['sk-flow', 'sk-flow-dot', 3], - 'fold': ['sk-fold', 'sk-fold-cube', 4], - 'grid': ['sk-grid', 'sk-grid-cube', 9], - 'plane': ['sk-plane', '', 0], - 'pulse': ['sk-pulse', '', 5], - 'swing': ['sk-swing', 'sk-swing-dot', 2], - 'wander': ['sk-wander', 'sk-wander-cube', 3], - 'wave': ['sk-wave', 'sk-wave-rec', 5] -}; - -// Default settings -const defaults = { - selector: '.venobox', - autoplay : false, - bgcolor: '#fff', - border: '0', - customClass: false, - infinigall: false, - maxWidth: '100%', - navigation: true, - navKeyboard: true, - navTouch: true, - navSpeed: 300, - numeration: false, - overlayClose: true, - overlayColor: 'rgba(23,23,23,0.95)', - popup: false, - ratio: '16x9', // '1x1' | '4x3' | '16x9' | '21x9' - share: false, - shareStyle: 'pill', // 'bar' | 'block' | 'pill' | 'transparent' - spinner: 'bounce', // 'plane' | 'chase' | 'bounce' | 'wave' | 'pulse' | 'flow' | 'swing' | 'circle' | 'circle-fade' | 'grid' | 'fold' | 'wander' - spinColor : '#d2d2d2', - titleattr: 'title', - titlePosition: 'top', // 'top' || 'bottom' - titleStyle: 'bar', // 'bar' | 'block' | 'pill' | 'transparent' - toolsBackground: '#1C1C1C', // 'transparent' - toolsColor: '#d2d2d2', - onPreOpen: function(){ return true; }, // Return the selected object - set return false to prevent opening - onPostOpen: function(){}, // Return: current_item, gallIndex, thenext, theprev - onPreClose: function(){ return true; }, // Return: current_item, gallIndex, thenext, theprev - set return false to prevent closing - onNavComplete: function(){}, // Return: current_item, gallIndex, thenext, theprev - onContentLoaded: function(){}, // Return: newcontent - onInit: function(){}, // Return: plugin obj - jQuerySelectors: false, -}; - -/** - * Generate spinner html - * @param {Array} spinarray Selected spinner - */ -function createspinner(spinarray){ - if (!spinarray) { - return 'Loading...'; - } - let spinner = '
'; - let i = 0; - for (i = 0; i < spinarray[2]; i++) { - spinner += '
'; - } - spinner += '
'; - return spinner; -} - -/** - * A simple forEach() implementation for Arrays, Objects and NodeLists - * @param {Array|Object|NodeList} collection Collection of items to iterate - * @param {Function} callback Callback function for each iteration - * @param {Array|Object|NodeList} scope Object/NodeList/Array that forEach is iterating over (aka `this`) - */ -function forEach(collection, callback, scope) { - if (Object.prototype.toString.call(collection) === '[object Object]') { - let prop; - for (prop in collection) { - if (Object.prototype.hasOwnProperty.call(collection, prop)) { - callback.call(scope, collection[prop], prop, collection); - } - } - } else { - let i = 0; - let len = collection.length; - for (i = 0; i < len; i++) { - callback.call(scope, collection[i], i, collection); - } - } -} - -/** -* Merge defaults with user options -* @param {Object} defaults Default settings -* @param {Object} options User options -* @returns {Object} Merged values of defaults and options -*/ -function extend( defaults, options ) { - let extended = {}; - - forEach(defaults, function (value, prop) { - extended[prop] = defaults[prop]; - }); - - forEach(options, function (value, prop) { - extended[prop] = options[prop]; - }); - return extended; -} - -/** - * Linear animation timing - */ -function timingLinear(timeFraction){ - return timeFraction; -} - -/** - * Animate with callback - * https://javascript.info/js-animation - */ -function animate({timing, draw, duration}) { - let start = performance.now(); - requestAnimationFrame(function animate(time) { - // timeFraction goes from 0 to 1 - let timeFraction = (time - start) / duration; - if (timeFraction > 1) { - timeFraction = 1; - } - // calculate the current animation state - let progress = timing(timeFraction); - draw(progress); // draw it - if (timeFraction < 1) { - requestAnimationFrame(animate); - } - }); -} - -/** - * Parse Youtube or Vimeo videos and get host & ID - */ -function parseVideo(url) { - let type, match, vid; - let regYt = /(https?:\/\/)?((www\.)?(youtube(-nocookie)?|youtube.googleapis)\.com.*(v\/|v=|vi=|vi\/|e\/|embed\/|user\/.*\/u\/\d+\/)|youtu\.be\/)([_0-9a-z-]+)/i; - match = url.match(regYt); - if (match && match[7]) { - type = 'youtube'; - vid = match[7]; - } else { - let regVim = /^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/; - match = url.match(regVim); - if (match && match[5]) { - type = 'vimeo'; - vid = match[5]; - } - } - return { - type: type, - id: vid - }; -} - -/** - * Get additional url parameters - */ -function getUrlParameter(url) { - let result = ''; - let sPageURL = decodeURIComponent(url); - let firstsplit = sPageURL.split('?'); - - if (firstsplit[1] !== undefined) { - let sURLVariables = firstsplit[1].split('&'); - let sParameterName; - let i; - for (i = 0; i < sURLVariables.length; i++) { - sParameterName = sURLVariables[i].split('='); - result = result + '&'+ sParameterName[0]+'='+ sParameterName[1]; - } - } - return encodeURI(result); -} - -/** - * Get all images from string - */ -function getImages(string) { - imagesHolder.innerHTML = string; - return imagesHolder.querySelectorAll('img'); -} - -/** - * Update item settings. - */ -function updateVars(obj){ - if (!obj) { - return false; - } - navigationDisabled = true; - current_item = obj; - nextok = false; - prevok = false; - set_maxWidth = obj.getAttribute("data-maxwidth") || obj.settings.maxWidth; - set_overlayColor = obj.getAttribute("data-overlay") || obj.settings.overlayColor; - set_ratio = obj.getAttribute("data-ratio") || obj.settings.ratio; - set_autoplay = obj.getAttribute("data-autoplay") || obj.settings.autoplay; - set_href = obj.getAttribute("data-href") || obj.getAttribute('href'); - set_customclass = obj.getAttribute("data-customclass") || obj.settings.customClass; - title = obj.getAttribute(obj.settings.titleattr) || ''; - thisborder = obj.getAttribute("data-border") || obj.settings.border; -} - -/** - * Close modal. - */ -function close() { - if (!current_item || !document.body.classList.contains('vbox-open')) { - return false; - } - if (current_item.settings.onPreClose && typeof current_item.settings.onPreClose === 'function') { - current_item.settings.onPreClose(current_item, gallIndex, thenext, theprev); - if (current_item.settings.onPreClose === false) { - return false; - } - } - document.body.removeEventListener('keydown', keyboardHandler); - document.body.classList.remove('vbox-open'); - - current_item.focus(); - animate({ - duration: 200, - timing: timingLinear, - draw: function(progress) { - overlay.style.opacity = 1 - progress; - if (progress === 1){ - overlay.remove(); - } - } - }); -} - -/** - * Navigate gallery. - */ -function next() { - navigateGall(thenext); -} -function prev() { - navigateGall(theprev); -} - -/** - * Keyboard navigation. - */ -function keyboardHandler(e) { - if (e.keyCode === 27) { // esc - close(); - } - if (!throttle) { - if (e.keyCode == 37 && prevok === true) { // < - navigateGall(theprev); - } - if (e.keyCode == 39 && nextok === true) { // > - navigateGall(thenext); - } - /* prevent keyboard processing until timer completed */ - throttle = setTimeout(() => { - throttle = null; - }, 100); - } -} - -/** - * Append and fade-in new content - */ -function contentLoaded(){ - - navigationDisabled = false; - - content.style.opacity = 0; - - content.innerHTML = newcontent; - - let vboxChild = content.querySelector(":first-child"); - - vboxChild.classList.add('vbox-child'); - - vboxChild.style.backgroundColor = current_item.settings.bgcolor; - vboxChild.style.maxWidth = set_maxWidth; - vboxChild.style.transform = 'scale(0.9)'; - vboxChild.style.transition = 'transform 200ms'; - - // Fix weird drag - let childImageLock = content.querySelector('.vbox-child img'); - - if (childImageLock) { - childImageLock.addEventListener('dragstart', function(e) { - e.preventDefault(); - }); - } - - // reset content scroll - container.scrollTo(0, 0); - vboxChild.style.transform = 'scale(1)'; - - overlay.style.setProperty('--vbox-padding', thisborder); - - // Reset custom classes. - forEach(overlay.classList, function(obj){ - if (obj !== 'vbox-overlay') { - overlay.classList.remove(obj); - } - }); - - // Set custom class. - if (set_customclass){ - overlay.classList.add(set_customclass); - } - - animate({ - duration: 200, - timing: timingLinear, - draw: function(progress) { - content.style.opacity = progress; - if (progress === 1){ - elPreloader.classList.add('vbox-hidden'); - } - } - }); - if (current_item.settings.onContentLoaded && typeof current_item.settings.onContentLoaded === 'function') { - current_item.settings.onContentLoaded(newcontent); - } -} - -/** - * Check animation state - * @param {string} state 'loading' | 'animated' - */ -function checkState(state) { - if (!content.classList.contains('vbox-' + state)) { - contentLoaded(); - } -} - -/** - * Load iFrame - */ -function loadIframe(dest, ratio){ - content.classList.add("vbox-loading"); - newcontent = '
'; - content.classList.remove("vbox-loading"); - checkState('animated'); -} - -/** - * Load videos - */ -function loadVid(dest, ratio, autoplay){ - - content.classList.add("vbox-loading"); - - let stringAutoplay; - // check if it's a video file - thanks to @alexxandar - if (dest.search(/.+\.mp4|og[gv]|webm/) !== -1) { - stringAutoplay = autoplay ? " autoplay" : ""; - newcontent = '
'; - } else { - let player; - let videoObj = parseVideo(dest); - - // set rel=0 to hide related videos at the end of YT + optional autoplay - stringAutoplay = autoplay ? "?rel=0&autoplay=1" : "?rel=0"; - let queryvars = stringAutoplay + getUrlParameter(dest); - - if (videoObj.type == 'vimeo') { - player = 'https://player.vimeo.com/video/'; - } else if (videoObj.type == 'youtube') { - player = 'https://www.youtube.com/embed/'; - } - newcontent = '
'; - } - - content.classList.remove("vbox-loading"); - checkState('animated'); -} - -/** - * Load inline content - */ -function loadInline(dest){ - let inlineContent = document.querySelector(dest); - if (inlineContent) { - content.classList.add("vbox-loading"); - newcontent = '
' + inlineContent.innerHTML + '
'; - content.classList.remove("vbox-loading"); - checkState('animated'); - } -} - -/** - * Preload images from ajax call - */ -function loadAjaxImages(){ - images = getImages(newcontent); - if (images.length) { - let imgCounter = 0; - forEach(images, function(getimg){ - let srcimg = getimg.src; - imgLoader = new Image(); - imgLoader.onload = function(){ - imgCounter++; - if ( imgCounter == images.length ) { - content.classList.remove("vbox-loading"); - checkState('animated'); - } - }; - imgLoader.onerror = function(){ - imgCounter++; - if ( imgCounter == images.length ) { - content.classList.remove("vbox-loading"); - checkState('animated'); - } - }; - imgLoader.src = srcimg; - }); - } else { - content.classList.remove("vbox-loading"); - checkState('animated'); - } -} - -/** - * Load Ajax - */ -function loadAjax(dest){ - content.classList.add("vbox-loading"); - let xhr = new XMLHttpRequest(); - xhr.open("GET", dest, true); - xhr.onload = function() { - newcontent = '
'+ xhr.response +'
'; - loadAjaxImages(); - }; - xhr.onerror = function() { - newcontent = '
'; - content.classList.remove("vbox-loading"); - checkState('animated'); - }; - xhr.send(); -} - -/** - * Preload image - */ -function loadImage(dest){ - - imgLoader.onload = function(){ - // image has been loaded - newcontent = '
'; - content.classList.remove('vbox-loading'); - checkState('animated'); - }; - imgLoader.src = dest; -} - -/** - * Start Drag - */ -function dragStart(e) { - if (!navigationDisabled) { - let speed = (current_item.settings.navSpeed * 0.84); - content.style.transition = 'margin '+ speed + 'ms ease-out, opacity '+ speed + 'ms ease-out'; - startY = endY = e.pageY; - startX = endX = e.pageX; - startouch = true; - } -} - -/** - * End Drag - */ -function dragEnd(e) { - if (startouch) { - startouch = false; - let subject = current_item; - let change = false; - diff = endX - startX; - - if (diff < 0 && nextok) { - subject = thenext; - change = true; - } - if (diff > 0 && prevok) { - subject = theprev; - change = true; - } - - if (Math.abs(diff) >= threshold && change) { - navigateGall(subject); - } else { - content.style.marginLeft = 0; - content.style.opacity = 1; - } - } -} - -/** - * Drag items - */ -function drag(e) { - if (startouch && !navigationDisabled) { - endX = e.pageX; - endY = e.pageY; - diffX = endX - startX; - diffY = endY - startY; - - let absdiffX = Math.abs(diffX); - let absdiffY = Math.abs(diffY); - - if ((absdiffX > absdiffY) && (absdiffX <= 180)) { - let diffopac = (1 - absdiffX / 180) * 1.5; - e.preventDefault(); - content.style.marginLeft = diffX + 'px'; - content.style.opacity = diffopac; - } - } -} - - -function setShareButtons(href){ - // Navigator share - if (navigator.canShare) { - const shareData = { - url: href - }; - blockshare.insertAdjacentHTML('beforeend', ''); - const mobileShareBtn = blockshare.querySelector('.vbox-share-mobile'); - mobileShareBtn.addEventListener('click', function(e){ - e.preventDefault(); - navigator.share(shareData); - }); - } - - // Download - blockshare.insertAdjacentHTML('beforeend', ''+downloadIcon+''); - - // Copy link - blockshare.insertAdjacentHTML('beforeend', '
'); - const shareCopyBtn = blockshare.querySelector('.vbox-share-copy'); - shareCopyBtn.addEventListener('click', function(e){ - e.preventDefault(); - let tooltip = document.getElementById("myTooltip"); - navigator.clipboard.writeText(href).then(function() { - tooltip.innerHTML = '
Copied
'; - }, function() { - console.log('copy failed'); - }); - }); -} - -/** - * Check navigation - * @param {object} el Current item - */ -function checknav(el){ - - if (!el) { - return false; - } - - thisgall = el.dataset.gall; - numeratio = el.settings.numeration; - infinigall = el.settings.infinigall; - blockshare.innerHTML = ''; - - let vbtype = el.dataset.vbtype; - - if (el.settings.share && vbtype !== 'iframe' && vbtype !== 'inline' && vbtype !== 'ajax' ) { - setShareButtons(el.href); - } - - items = document.querySelectorAll('.vbox-item[data-gall="' + thisgall + '"]'); - - current_index = Array.prototype.indexOf.call(items, el); - - if (items.length < 2) { - infinigall = false; - numeratio = false; - } - - thenext = items[current_index + 1]; - theprev = items[current_index - 1]; - - if (!thenext && infinigall) { - thenext = items[0]; - } - - if (!theprev && infinigall) { - theprev = items[items.length - 1]; - } - - // Update gallery numeration - if (items.length >= 1) { - gallIndex = current_index + 1; - blocknum.innerHTML = gallIndex + ' / ' + items.length; - } else { - gallIndex = 1; - } - if (numeratio) { - blocknum.classList.remove('vbox-hidden'); - } else { - blocknum.classList.add('vbox-hidden'); - } - - // Update title - if (title !== '') { - blocktitle.classList.remove('vbox-hidden'); - } else { - blocktitle.classList.add('vbox-hidden'); - } - blocktitle.innerHTML = title; - - // update navigation arrows - prevok = false; - nextok = false; - - if (thenext || infinigall) { - nextok = true; - } - - if (current_index > 0 || infinigall) { - prevok = true; - } - - // activate swipe - if ((prevok || nextok) && el.settings.navTouch) { - content.classList.add('vbox-grab'); - content.addEventListener("touchstart", dragStart, false); - content.addEventListener("touchend", dragEnd, false); - content.addEventListener("touchmove", drag, false); - content.addEventListener("mousedown", dragStart, false); - content.addEventListener("mouseup", dragEnd, false); - content.addEventListener("mouseout", dragEnd, false); - content.addEventListener("mousemove", drag, false); - } else { - content.classList.remove('vbox-grab'); - content.removeEventListener("touchstart", dragStart, false); - content.removeEventListener("touchend", dragEnd, false); - content.removeEventListener("touchmove", drag, false); - content.removeEventListener("mousedown", dragStart, false); - content.removeEventListener("mouseup", dragEnd, false); - content.removeEventListener("mouseout", dragEnd, false); - content.removeEventListener("mousemove", drag, false); - } - - let vbox_next = overlay.querySelector('.vbox-next'); - let vbox_prev = overlay.querySelector('.vbox-prev'); - - if (prevok) { - vbox_prev.classList.remove('vbox-hidden'); - } else { - vbox_prev.classList.add('vbox-hidden'); - } - - if (nextok) { - vbox_next.classList.remove('vbox-hidden'); - } else { - vbox_next.classList.add('vbox-hidden'); - } - - if (!el.settings.navigation) { - vbox_next.classList.add('vbox-hidden'); - vbox_prev.classList.add('vbox-hidden'); - } -} // Checknav - -/** - * Update overlay and tools style. - */ -function updateOverlay(destination){ - - if (!destination) { - return false; - } - - backdrop.style.backgroundColor = set_overlayColor; - - // Custom preloader color. - elPreloaderInner.innerHTML = createspinner(spinners[destination.settings.spinner]); - - overlay.style.setProperty('--sk-color', destination.settings.spinColor); - - elPreloader.classList.remove('vbox-hidden'); - - blockshare.classList.remove('vbox-top', 'vbox-bottom'); - blocktitle.classList.remove('vbox-top', 'vbox-bottom'); - - if (destination.settings.titlePosition == 'top') { - blocktitle.classList.add('vbox-top'); - blockshare.classList.add('vbox-bottom'); - } else { - blocktitle.classList.add('vbox-bottom'); - blockshare.classList.add('vbox-top'); - } - - let titleWidth = destination.settings.titleStyle === 'bar' ? '100%' : 'auto'; - let titleRadius = destination.settings.titleStyle === 'pill' ? '5em' : '0'; - let shareWidth = destination.settings.shareStyle === 'bar' ? '100%' : 'auto'; - let shareRadius = destination.settings.shareStyle === 'pill' ? '5em' : '0'; - let titlebg = destination.settings.titleStyle === 'transparent' ? 'transparent' : destination.settings.toolsBackground; - let sharebg = destination.settings.shareStyle === 'transparent' ? 'transparent' : destination.settings.toolsBackground; - - overlay.style.setProperty('--vbox-title-width', titleWidth); - overlay.style.setProperty('--vbox-title-radius', titleRadius); - overlay.style.setProperty('--vbox-share-width', shareWidth); - overlay.style.setProperty('--vbox-share-radius', shareRadius); - overlay.style.setProperty('--vbox-tools-color', destination.settings.toolsColor); - overlay.style.setProperty('--vbox-title-background', titlebg); - overlay.style.setProperty('--vbox-share-background', sharebg); -} - -/** - * Load content - */ -function loadContent(){ - if (!current_item) { - return false; - } - let vbtype = current_item.dataset.vbtype; - - switch (vbtype) { - case 'iframe': - loadIframe(set_href, set_ratio); - break; - case 'inline': - loadInline(set_href); - break; - case 'ajax': - loadAjax(set_href); - break; - case 'video': - loadVid(set_href, set_ratio, set_autoplay); - break; - default: - loadImage(set_href); - } -} - -/** - * Gallery navigation. - */ -function navigateGall(destination) { - - if (!destination || navigationDisabled || !document.body.classList.contains('vbox-open')) { - return false; - } - - updateVars(destination); - updateOverlay(destination); - - // swipe out item - let speed = (current_item.settings.navSpeed * 0.84); - content.style.transition = 'margin '+ speed + 'ms ease-out, opacity '+ speed + 'ms ease-out'; - - if (destination === theprev) { - content.classList.add("swipe-right"); - } - if (destination === thenext) { - content.classList.add("swipe-left"); - } - - elPreloader.classList.remove('vbox-hidden'); - - let startopacity = content.style.opacity; - - content.classList.add("vbox-animated", "vbox-loading"); - - checknav(destination); - - animate({ - duration: current_item.settings.navSpeed, - timing: timingLinear, - draw: function(progress) { - - content.style.opacity = startopacity - progress/startopacity; - - if (progress === 1){ - content.classList.remove("swipe-left", "swipe-right", "vbox-animated"); - content.style.marginLeft = 0; - content.style.transition = ''; - - checkState('loading'); - - navigationDisabled = false; - - if (current_item.settings.onNavComplete && typeof current_item.settings.onNavComplete === 'function') { - current_item.settings.onNavComplete(current_item, gallIndex, thenext, theprev); - } - } - } - }); - loadContent(); -} - -/** - * Open item. - */ - function open(obj) { - - if (document.body.classList.contains('vbox-open') || !obj) { - return false; - } - - if (obj.settings.onPreOpen && typeof obj.settings.onPreOpen === 'function') { - obj.settings.onPreOpen(obj); - } - if (!obj.settings.onPreOpen) { - return false; - } - - updateVars(obj); - - document.body.insertAdjacentHTML('beforeend', core); - document.body.classList.add('vbox-open'); - - overlay = document.querySelector(".vbox-overlay"); - backdrop = overlay.querySelector(".vbox-backdrop"); - container = overlay.querySelector(".vbox-container"); - content = container.querySelector(".vbox-content"); - blocknum = overlay.querySelector(".vbox-num"); - blockshare = overlay.querySelector(".vbox-share"); - blocktitle = overlay.querySelector(".vbox-title"); - elPreloader = overlay.querySelector(".vbox-preloader"); - elPreloaderInner = elPreloader.querySelector(".vbox-preloader-inner"); - - overlay.style.opacity = 0; - - updateOverlay(obj); - checknav(obj); - - content.classList.add("vbox-animated", "vbox-loading"); - - // fade in overlay - animate({ - duration: 200, - timing: timingLinear, - draw: function(progress) { - overlay.style.opacity = progress; - if (progress === 1){ - content.classList.remove('vbox-animated'); - navigationDisabled = false; - checkState('loading'); - if (current_item.settings.onPostOpen && typeof current_item.settings.onPostOpen === 'function') { - current_item.settings.onPostOpen(current_item, gallIndex, thenext, theprev); - } - } - } - }); - - loadContent(); - - // Keyboard actions - if (obj.settings.navKeyboard) { - document.body.addEventListener('keydown', keyboardHandler); - - // Reset the throttle timer - document.body.addEventListener('keyup', () => { - if (throttle) { - clearTimeout(throttle); - throttle = null; - } - }); - } - - // Prev gallery - document.querySelector('.vbox-prev').addEventListener('click', function(){ - navigateGall(theprev); - }); - - // Newxt gallery - document.querySelector('.vbox-next').addEventListener('click', function(){ - navigateGall(thenext); - }); - - // Close modal. - overlay.addEventListener('click', function(e){ - let closeBtn = document.querySelector('.vbox-close'); - if (closeBtn) { - if (closeBtn.contains(e.target) || closeBtn === e.target || (current_item.settings.overlayClose && - e.target.classList.contains('vbox-overlay') || - e.target.classList.contains('vbox-content') || - e.target.classList.contains('vbox-backdrop') || - e.target.classList.contains('vbox-close') || - e.target.classList.contains('vbox-preloader') || - e.target.classList.contains('vbox-container') - )) { - close(); - } - } - }); -} - -/** - * Initialize Plugin - */ -function init(venobox, settings) { - - if (settings.onInit && typeof settings.onInit === 'function') { - settings.onInit(venobox); - } - - let selectors = settings.jQuerySelectors || document.querySelectorAll(settings.selector); - let navigation = 'NextPrev'; - let vbheader = '
0/0
'; - let vbfooter = '
'; - let preloader = '
'; - core = '
' + preloader + '
' + vbheader + navigation + vbfooter + '
'; - - /** - * Loop items. - */ - forEach(selectors, function(obj){ - if (obj.classList.contains("vbox-item")) { - return true; - } - obj.settings = settings; - obj.classList.add("vbox-item"); - - // Open Link - obj.addEventListener("click", function(e){ - e.preventDefault(); - // Remove focus from link to avoid multiple calls with enter key - obj.blur(); - open(obj); - return false; - }); // Click; - }); // forEach - - if (settings.popup) { - let popup = document.querySelector(settings.popup); - popup.settings = settings; - open(popup); - } -} // init - -/** - * VenoBox constructor - */ -const VenoBox = function (options) { - const venobox = {}; - - // Merge user options with defaults - let settings = extend( defaults, options || {} ); - - venobox.close = close; - venobox.next = next; - venobox.prev = prev; - venobox.open = open; - venobox.settings = settings; - - init(venobox, settings); - - // Public APIs - return venobox; -}; - -/* jQuery bridge for $().venobox() */ -if (typeof jQuery === 'function') { - (function($){ - "use strict"; - $.fn.extend({ - // plugin name - venobox - venobox: function(options) { - const pluginoptions = options || {}; - pluginoptions.jQuerySelectors = this; - // Init venobx - new VenoBox({pluginoptions}); - } // venobox - }); // extend - })(jQuery); -} - -export default VenoBox;