Update js
-jquery -lightgallery
This commit is contained in:
6
theme/public/jquery.min.js
vendored
6
theme/public/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
theme/public/lightgallery/.DS_Store
vendored
BIN
theme/public/lightgallery/.DS_Store
vendored
Binary file not shown.
@@ -1,8 +1,10 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
/*! lightgallery - v1.10.0 - 2020-11-07
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
.lg-outer.fb-comments .lg-img-wrap {
|
||||
padding-right: 400px !important; }
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
.lg-outer.fb-comments .lg-img-wrap, .lg-outer.fb-comments .lg-video-cont {
|
||||
padding-right: 400px !important;
|
||||
}
|
||||
|
||||
.lg-outer.fb-comments .fb-comments {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
@@ -11,24 +13,45 @@
|
||||
top: 0;
|
||||
width: 420px;
|
||||
z-index: 99999;
|
||||
background: #fff url("../img/loading.gif") no-repeat scroll center center; }
|
||||
.lg-outer.fb-comments .fb-comments.fb_iframe_widget {
|
||||
background-image: none; }
|
||||
.lg-outer.fb-comments .fb-comments.fb_iframe_widget.fb_iframe_widget_loader {
|
||||
background: #fff url("../img/loading.gif") no-repeat scroll center center; }
|
||||
background: #fff url("../img/loading.gif") no-repeat scroll center center;
|
||||
}
|
||||
|
||||
.lg-outer.fb-comments .fb-comments.fb_iframe_widget {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.lg-outer.fb-comments .fb-comments.fb_iframe_widget.fb_iframe_widget_loader {
|
||||
background: #fff url("../img/loading.gif") no-repeat scroll center center;
|
||||
}
|
||||
|
||||
.lg-outer.fb-comments .lg-toolbar {
|
||||
right: 420px;
|
||||
width: auto; }
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.lg-outer.fb-comments .lg-actions .lg-next {
|
||||
right: 420px; }
|
||||
right: 420px;
|
||||
}
|
||||
|
||||
.lg-outer.fb-comments .lg-item {
|
||||
background-image: none; }
|
||||
.lg-outer.fb-comments .lg-item.lg-complete .lg-img-wrap {
|
||||
background-image: none; }
|
||||
.lg-outer.fb-comments .lg-img-wrap {
|
||||
background: url(../img/loading.gif) no-repeat scroll center center transparent; }
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.lg-outer.fb-comments .lg-item.lg-complete .lg-img-wrap, .lg-outer.fb-comments .lg-item.lg-complete .lg-video-cont {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.lg-outer.fb-comments .lg-img-wrap, .lg-outer.fb-comments .lg-video-cont {
|
||||
background: url("../img/loading.gif") no-repeat scroll transparent;
|
||||
background-position: center center;
|
||||
background-position: calc((100% - 400px) / 2) center;
|
||||
}
|
||||
|
||||
.lg-outer.fb-comments .lg-sub-html {
|
||||
padding: 0;
|
||||
position: static; }
|
||||
position: static;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=lg-fb-comment-box.css.map */
|
||||
.lg-outer.fb-comments .lg-video-cont {
|
||||
max-width: 1250px !important;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
.lg-outer.fb-comments .fb-comments{height:100%;overflow-y:auto;position:absolute;right:0;top:0;width:420px;z-index:99999;background:url(../img/loading.gif) center center no-repeat #fff}.lg-outer.fb-comments .fb-comments.fb_iframe_widget{background-image:none}.lg-outer.fb-comments .fb-comments.fb_iframe_widget.fb_iframe_widget_loader{background:url(../img/loading.gif) center center no-repeat #fff}.lg-outer.fb-comments .lg-toolbar{right:420px;width:auto}.lg-outer.fb-comments .lg-actions .lg-next{right:420px}.lg-outer.fb-comments .lg-item,.lg-outer.fb-comments .lg-item.lg-complete .lg-img-wrap{background-image:none}.lg-outer.fb-comments .lg-img-wrap{padding-right:400px!important;background:url(../img/loading.gif) center center no-repeat}.lg-outer.fb-comments .lg-sub-html{padding:0;position:static}
|
||||
.lg-outer.fb-comments .fb-comments{height:100%;overflow-y:auto;position:absolute;right:0;top:0;width:420px;z-index:99999;background:url(../img/loading.gif) center center no-repeat #fff}.lg-outer.fb-comments .fb-comments.fb_iframe_widget{background-image:none}.lg-outer.fb-comments .fb-comments.fb_iframe_widget.fb_iframe_widget_loader{background:url(../img/loading.gif) center center no-repeat #fff}.lg-outer.fb-comments .lg-toolbar{right:420px;width:auto}.lg-outer.fb-comments .lg-actions .lg-next{right:420px}.lg-outer.fb-comments .lg-item,.lg-outer.fb-comments .lg-item.lg-complete .lg-img-wrap,.lg-outer.fb-comments .lg-item.lg-complete .lg-video-cont{background-image:none}.lg-outer.fb-comments .lg-img-wrap,.lg-outer.fb-comments .lg-video-cont{padding-right:400px!important;background:url(../img/loading.gif) center center no-repeat;background-position:calc((100% - 400px)/ 2) center}.lg-outer.fb-comments .lg-sub-html{padding:0;position:static}.lg-outer.fb-comments .lg-video-cont{max-width:1250px!important}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
/*! lightgallery - v1.10.0 - 2020-11-07
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
.lg-css3.lg-zoom-in .lg-item {
|
||||
opacity: 0; }
|
||||
.lg-css3.lg-zoom-in .lg-item.lg-prev-slide {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,16 +1,17 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
/*! lightgallery - v1.10.0 - 2020-11-07
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
@font-face {
|
||||
font-family: 'lg';
|
||||
src: url("../fonts/lg.eot?n1z373");
|
||||
src: url("../fonts/lg.eot?#iefixn1z373") format("embedded-opentype"), url("../fonts/lg.woff?n1z373") format("woff"), url("../fonts/lg.ttf?n1z373") format("truetype"), url("../fonts/lg.svg?n1z373#lg") format("svg");
|
||||
src: url("../fonts/lg.ttf?22t19m") format("truetype"), url("../fonts/lg.woff?22t19m") format("woff"), url("../fonts/lg.svg?22t19m#lg") format("svg");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
.lg-icon {
|
||||
font-family: 'lg';
|
||||
speak: none;
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'lg' !important;
|
||||
speak: never;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
@@ -33,6 +34,8 @@
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
z-index: 1080;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
.lg-actions .lg-next.disabled, .lg-actions .lg-prev.disabled {
|
||||
pointer-events: none;
|
||||
@@ -156,7 +159,7 @@
|
||||
}
|
||||
|
||||
.lg-toolbar {
|
||||
z-index: 1080;
|
||||
z-index: 1082;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -175,6 +178,12 @@
|
||||
width: 50px;
|
||||
text-decoration: none !important;
|
||||
outline: medium none;
|
||||
background: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
-webkit-transition: color 0.2s linear;
|
||||
-o-transition: color 0.2s linear;
|
||||
transition: color 0.2s linear;
|
||||
}
|
||||
.lg-toolbar .lg-icon:hover {
|
||||
color: #FFF;
|
||||
@@ -219,10 +228,10 @@
|
||||
|
||||
.lg-toolbar, .lg-prev, .lg-next {
|
||||
opacity: 1;
|
||||
-webkit-transition: -webkit-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-moz-transition: -moz-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-o-transition: -o-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
transition: transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-webkit-transition: -webkit-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
|
||||
-moz-transition: -moz-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
|
||||
-o-transition: -o-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
|
||||
transition: transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
|
||||
}
|
||||
|
||||
.lg-hide-items .lg-prev {
|
||||
@@ -245,10 +254,10 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-object {
|
||||
-webkit-transform: scale3d(0.5, 0.5, 0.5);
|
||||
transform: scale3d(0.5, 0.5, 0.5);
|
||||
opacity: 0;
|
||||
-webkit-transition: -webkit-transform 250ms ease 0s, opacity 250ms !important;
|
||||
-moz-transition: -moz-transform 250ms ease 0s, opacity 250ms !important;
|
||||
-o-transition: -o-transform 250ms ease 0s, opacity 250ms !important;
|
||||
transition: transform 250ms ease 0s, opacity 250ms !important;
|
||||
-webkit-transition: -webkit-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
|
||||
-moz-transition: -moz-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
|
||||
-o-transition: -o-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
|
||||
transition: transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
|
||||
-webkit-transform-origin: 50% 50%;
|
||||
-moz-transform-origin: 50% 50%;
|
||||
-ms-transform-origin: 50% 50%;
|
||||
@@ -325,6 +334,7 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
|
||||
.lg-outer .lg-thumb-item img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.lg-outer.lg-has-thumb .lg-item {
|
||||
padding-bottom: 120px;
|
||||
@@ -354,6 +364,8 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
|
||||
text-align: center;
|
||||
top: -39px;
|
||||
width: 50px;
|
||||
outline: medium none;
|
||||
border: none;
|
||||
}
|
||||
.lg-outer .lg-toogle-thumb:after {
|
||||
content: "\e1ff";
|
||||
@@ -396,6 +408,10 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
|
||||
z-index: 1080;
|
||||
cursor: pointer;
|
||||
}
|
||||
.lg-outer .lg-has-iframe .lg-video {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow: auto;
|
||||
}
|
||||
.lg-outer .lg-has-vimeo .lg-video-play {
|
||||
background: url("../img/vimeo-play.png") no-repeat scroll 0 0 transparent;
|
||||
}
|
||||
@@ -429,10 +445,10 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
|
||||
.lg-outer .lg-has-video .lg-video-object {
|
||||
visibility: hidden;
|
||||
}
|
||||
.lg-outer .lg-has-video.lg-video-palying .lg-object, .lg-outer .lg-has-video.lg-video-palying .lg-video-play {
|
||||
.lg-outer .lg-has-video.lg-video-playing .lg-object, .lg-outer .lg-has-video.lg-video-playing .lg-video-play {
|
||||
display: none;
|
||||
}
|
||||
.lg-outer .lg-has-video.lg-video-palying .lg-video-object {
|
||||
.lg-outer .lg-has-video.lg-video-playing .lg-video-object {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
@@ -443,7 +459,7 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 1080;
|
||||
z-index: 1083;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.08s ease 0s;
|
||||
-moz-transition: opacity 0.08s ease 0s;
|
||||
@@ -473,11 +489,19 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
|
||||
-webkit-transition-duration: 0s;
|
||||
transition-duration: 0s;
|
||||
}
|
||||
.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
|
||||
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-moz-transition: -moz-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-o-transition: -o-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
}
|
||||
.lg-outer.lg-use-left-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
|
||||
-webkit-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-moz-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-o-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
}
|
||||
.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
|
||||
-webkit-transition: -webkit-transform 0.3s ease 0s;
|
||||
-moz-transition: -moz-transform 0.3s ease 0s;
|
||||
-o-transition: -o-transform 0.3s ease 0s;
|
||||
transition: transform 0.3s ease 0s;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
-webkit-backface-visibility: hidden;
|
||||
@@ -487,10 +511,10 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
|
||||
.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image {
|
||||
-webkit-transform: scale3d(1, 1, 1);
|
||||
transform: scale3d(1, 1, 1);
|
||||
-webkit-transition: -webkit-transform 0.3s ease 0s, opacity 0.15s !important;
|
||||
-moz-transition: -moz-transform 0.3s ease 0s, opacity 0.15s !important;
|
||||
-o-transition: -o-transform 0.3s ease 0s, opacity 0.15s !important;
|
||||
transition: transform 0.3s ease 0s, opacity 0.15s !important;
|
||||
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
|
||||
-moz-transition: -moz-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
|
||||
-o-transition: -o-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
|
||||
transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
|
||||
-webkit-transform-origin: 0 0;
|
||||
-moz-transform-origin: 0 0;
|
||||
-ms-transform-origin: 0 0;
|
||||
@@ -504,6 +528,13 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
|
||||
content: "\e311";
|
||||
}
|
||||
|
||||
#lg-actual-size {
|
||||
font-size: 20px;
|
||||
}
|
||||
#lg-actual-size:after {
|
||||
content: "\e033";
|
||||
}
|
||||
|
||||
#lg-zoom-out {
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
@@ -603,17 +634,171 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
|
||||
content: "\e20d";
|
||||
}
|
||||
|
||||
.group {
|
||||
*zoom: 1;
|
||||
.lg-outer #lg-dropdown-overlay {
|
||||
background-color: rgba(0, 0, 0, 0.25);
|
||||
bottom: 0;
|
||||
cursor: default;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 1081;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
-webkit-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
|
||||
-o-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
|
||||
transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
|
||||
}
|
||||
|
||||
.group:before, .group:after {
|
||||
display: table;
|
||||
.lg-outer.lg-dropdown-active .lg-dropdown, .lg-outer.lg-dropdown-active #lg-dropdown-overlay {
|
||||
-webkit-transition-delay: 0s;
|
||||
transition-delay: 0s;
|
||||
-moz-transform: translate3d(0, 0px, 0);
|
||||
-o-transform: translate3d(0, 0px, 0);
|
||||
-ms-transform: translate3d(0, 0px, 0);
|
||||
-webkit-transform: translate3d(0, 0px, 0);
|
||||
transform: translate3d(0, 0px, 0);
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
.lg-outer.lg-dropdown-active #lg-share {
|
||||
color: #FFF;
|
||||
}
|
||||
.lg-outer .lg-dropdown {
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
font-size: 14px;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
text-align: left;
|
||||
top: 50px;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
-moz-transform: translate3d(0, 5px, 0);
|
||||
-o-transform: translate3d(0, 5px, 0);
|
||||
-ms-transform: translate3d(0, 5px, 0);
|
||||
-webkit-transform: translate3d(0, 5px, 0);
|
||||
transform: translate3d(0, 5px, 0);
|
||||
-webkit-transition: -webkit-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
|
||||
-moz-transition: -moz-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
|
||||
-o-transition: -o-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
|
||||
transition: transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
|
||||
}
|
||||
.lg-outer .lg-dropdown:after {
|
||||
content: "";
|
||||
line-height: 0;
|
||||
display: block;
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
border: 8px solid transparent;
|
||||
border-bottom-color: #FFF;
|
||||
right: 16px;
|
||||
top: -16px;
|
||||
}
|
||||
.lg-outer .lg-dropdown > li:last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.lg-outer .lg-dropdown > li:hover a, .lg-outer .lg-dropdown > li:hover .lg-icon {
|
||||
color: #333;
|
||||
}
|
||||
.lg-outer .lg-dropdown a {
|
||||
color: #333;
|
||||
display: block;
|
||||
white-space: pre;
|
||||
padding: 4px 12px;
|
||||
font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
.lg-outer .lg-dropdown a:hover {
|
||||
background-color: rgba(0, 0, 0, 0.07);
|
||||
}
|
||||
.lg-outer .lg-dropdown .lg-dropdown-text {
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
margin-top: -3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.lg-outer .lg-dropdown .lg-icon {
|
||||
color: #333;
|
||||
display: inline-block;
|
||||
float: none;
|
||||
font-size: 20px;
|
||||
height: auto;
|
||||
line-height: 1;
|
||||
margin-right: 8px;
|
||||
padding: 0;
|
||||
vertical-align: middle;
|
||||
width: auto;
|
||||
}
|
||||
.lg-outer #lg-share {
|
||||
position: relative;
|
||||
}
|
||||
.lg-outer #lg-share:after {
|
||||
content: "\e80d";
|
||||
}
|
||||
.lg-outer #lg-share-facebook .lg-icon {
|
||||
color: #3b5998;
|
||||
}
|
||||
.lg-outer #lg-share-facebook .lg-icon:after {
|
||||
content: "\e904";
|
||||
}
|
||||
.lg-outer #lg-share-twitter .lg-icon {
|
||||
color: #00aced;
|
||||
}
|
||||
.lg-outer #lg-share-twitter .lg-icon:after {
|
||||
content: "\e907";
|
||||
}
|
||||
.lg-outer #lg-share-googleplus .lg-icon {
|
||||
color: #dd4b39;
|
||||
}
|
||||
.lg-outer #lg-share-googleplus .lg-icon:after {
|
||||
content: "\e905";
|
||||
}
|
||||
.lg-outer #lg-share-pinterest .lg-icon {
|
||||
color: #cb2027;
|
||||
}
|
||||
.lg-outer #lg-share-pinterest .lg-icon:after {
|
||||
content: "\e906";
|
||||
}
|
||||
|
||||
.group:after {
|
||||
.lg-outer .lg-img-rotate {
|
||||
position: absolute;
|
||||
padding: 0 5px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0.32, 0, 0.67, 0) 0s;
|
||||
-moz-transition: -moz-transform 0.3s cubic-bezier(0.32, 0, 0.67, 0) 0s;
|
||||
-o-transition: -o-transform 0.3s cubic-bezier(0.32, 0, 0.67, 0) 0s;
|
||||
transition: transform 0.3s cubic-bezier(0.32, 0, 0.67, 0) 0s;
|
||||
}
|
||||
|
||||
.lg-rotate-left:after {
|
||||
content: "\e900";
|
||||
}
|
||||
|
||||
.lg-rotate-right:after {
|
||||
content: "\e901";
|
||||
}
|
||||
|
||||
.lg-icon.lg-flip-hor, .lg-icon.lg-flip-ver {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.lg-flip-ver:after {
|
||||
content: "\e903";
|
||||
}
|
||||
|
||||
.lg-flip-hor:after {
|
||||
content: "\e902";
|
||||
}
|
||||
|
||||
.lg-group:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
@@ -624,7 +809,9 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1050;
|
||||
text-align: left;
|
||||
opacity: 0;
|
||||
outline: none;
|
||||
-webkit-transition: opacity 0.15s ease 0s;
|
||||
-o-transition: opacity 0.15s ease 0s;
|
||||
transition: opacity 0.15s ease 0s;
|
||||
@@ -706,11 +893,12 @@ body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object
|
||||
margin-right: -1px;
|
||||
}
|
||||
.lg-outer .lg-img-wrap {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
padding: 0 5px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 0 5px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.lg-outer .lg-item.lg-complete {
|
||||
background-image: none;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,14 +1,25 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
/**
|
||||
* Autoplay Plugin
|
||||
* @version 1.2.0
|
||||
* @author Sachin N - @sachinchoolur
|
||||
* @license MIT License (MIT)
|
||||
*/
|
||||
/*! lg-autoplay - v1.2.1 - 2020-06-13
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function($, window, document, undefined) {
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
@@ -76,7 +87,9 @@
|
||||
|
||||
// Start autoplay
|
||||
if (_this.core.s.autoplay) {
|
||||
_this.$el.one('onSlideItemLoad.lg.tm', function() {
|
||||
_this.startlAuto();
|
||||
});
|
||||
}
|
||||
|
||||
// cancel interval on touchstart and dragstart
|
||||
@@ -132,7 +145,7 @@
|
||||
// Manage autoplay via play/stop buttons
|
||||
Autoplay.prototype.controls = function() {
|
||||
var _this = this;
|
||||
var _html = '<span class="lg-autoplay-button lg-icon"></span>';
|
||||
var _html = '<button type="button" aria-label="Toggle autoplay" class="lg-autoplay-button lg-icon"></button>';
|
||||
|
||||
// Append autoplay controls
|
||||
$(this.core.s.appendAutoplayControlsTo).append(_html);
|
||||
@@ -160,14 +173,13 @@
|
||||
|
||||
_this.interval = setInterval(function() {
|
||||
if (_this.core.index + 1 < _this.core.$items.length) {
|
||||
_this.core.index = _this.core.index;
|
||||
_this.core.index++;
|
||||
} else {
|
||||
_this.core.index = -1;
|
||||
_this.core.index = 0;
|
||||
}
|
||||
|
||||
_this.core.index++;
|
||||
_this.fromAuto = true;
|
||||
_this.core.slide(_this.core.index, false, false);
|
||||
_this.core.slide(_this.core.index, false, false, 'next');
|
||||
}, _this.core.s.speed + _this.core.s.pause);
|
||||
};
|
||||
|
||||
@@ -188,4 +200,7 @@
|
||||
|
||||
$.fn.lightGallery.modules.autoplay = Autoplay;
|
||||
|
||||
})(jQuery, window, document);
|
||||
})();
|
||||
|
||||
|
||||
}));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
!function(a,b,c,d){"use strict";var e={autoplay:!1,pause:5e3,progressBar:!0,fourceAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.$items.length<2?!1:(this.core.s=a.extend({},e,this.core.s),this.interval=!1,this.fromAuto=!0,this.canceledOnTouch=!1,this.fourceAutoplayTemp=this.core.s.fourceAutoplay,this.core.doCss()||(this.core.s.progressBar=!1),this.init(),this)};f.prototype.init=function(){var a=this;a.core.s.autoplayControls&&a.controls(),a.core.s.progressBar&&a.core.$outer.find(".lg").append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'),a.progress(),a.core.s.autoplay&&a.startlAuto(),a.$el.on("onDragstart.lg.tm touchstart.lg.tm",function(){a.interval&&(a.cancelAuto(),a.canceledOnTouch=!0)}),a.$el.on("onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm",function(){!a.interval&&a.canceledOnTouch&&(a.startlAuto(),a.canceledOnTouch=!1)})},f.prototype.progress=function(){var a,b,c=this;c.$el.on("onBeforeSlide.lg.tm",function(){c.core.s.progressBar&&c.fromAuto&&(a=c.core.$outer.find(".lg-progress-bar"),b=c.core.$outer.find(".lg-progress"),c.interval&&(b.removeAttr("style"),a.removeClass("lg-start"),setTimeout(function(){b.css("transition","width "+(c.core.s.speed+c.core.s.pause)+"ms ease 0s"),a.addClass("lg-start")},20))),c.fromAuto||c.core.s.fourceAutoplay||c.cancelAuto(),c.fromAuto=!1})},f.prototype.controls=function(){var b=this,c='<span class="lg-autoplay-button lg-icon"></span>';a(this.core.s.appendAutoplayControlsTo).append(c),b.core.$outer.find(".lg-autoplay-button").on("click.lg",function(){a(b.core.$outer).hasClass("lg-show-autoplay")?(b.cancelAuto(),b.core.s.fourceAutoplay=!1):b.interval||(b.startlAuto(),b.core.s.fourceAutoplay=b.fourceAutoplayTemp)})},f.prototype.startlAuto=function(){var a=this;a.core.$outer.find(".lg-progress").css("transition","width "+(a.core.s.speed+a.core.s.pause)+"ms ease 0s"),a.core.$outer.addClass("lg-show-autoplay"),a.core.$outer.find(".lg-progress-bar").addClass("lg-start"),a.interval=setInterval(function(){a.core.index+1<a.core.$items.length?a.core.index=a.core.index:a.core.index=-1,a.core.index++,a.fromAuto=!0,a.core.slide(a.core.index,!1,!1)},a.core.s.speed+a.core.s.pause)},f.prototype.cancelAuto=function(){clearInterval(this.interval),this.interval=!1,this.core.$outer.find(".lg-progress").removeAttr("style"),this.core.$outer.removeClass("lg-show-autoplay"),this.core.$outer.find(".lg-progress-bar").removeClass("lg-start")},f.prototype.destroy=function(){this.cancelAuto(),this.core.$outer.find(".lg-progress-bar").remove()},a.fn.lightGallery.modules.autoplay=f}(jQuery,window,document);
|
||||
/*! lg-autoplay - v1.2.1 - 2020-06-13
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";var b={autoplay:!1,pause:5e3,progressBar:!0,fourceAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"},c=function(c){return this.core=a(c).data("lightGallery"),this.$el=a(c),!(this.core.$items.length<2)&&(this.core.s=a.extend({},b,this.core.s),this.interval=!1,this.fromAuto=!0,this.canceledOnTouch=!1,this.fourceAutoplayTemp=this.core.s.fourceAutoplay,this.core.doCss()||(this.core.s.progressBar=!1),this.init(),this)};c.prototype.init=function(){var a=this;a.core.s.autoplayControls&&a.controls(),a.core.s.progressBar&&a.core.$outer.find(".lg").append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'),a.progress(),a.core.s.autoplay&&a.$el.one("onSlideItemLoad.lg.tm",function(){a.startlAuto()}),a.$el.on("onDragstart.lg.tm touchstart.lg.tm",function(){a.interval&&(a.cancelAuto(),a.canceledOnTouch=!0)}),a.$el.on("onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm",function(){!a.interval&&a.canceledOnTouch&&(a.startlAuto(),a.canceledOnTouch=!1)})},c.prototype.progress=function(){var a,b,c=this;c.$el.on("onBeforeSlide.lg.tm",function(){c.core.s.progressBar&&c.fromAuto&&(a=c.core.$outer.find(".lg-progress-bar"),b=c.core.$outer.find(".lg-progress"),c.interval&&(b.removeAttr("style"),a.removeClass("lg-start"),setTimeout(function(){b.css("transition","width "+(c.core.s.speed+c.core.s.pause)+"ms ease 0s"),a.addClass("lg-start")},20))),c.fromAuto||c.core.s.fourceAutoplay||c.cancelAuto(),c.fromAuto=!1})},c.prototype.controls=function(){var b=this;a(this.core.s.appendAutoplayControlsTo).append('<button type="button" aria-label="Toggle autoplay" class="lg-autoplay-button lg-icon"></button>'),b.core.$outer.find(".lg-autoplay-button").on("click.lg",function(){a(b.core.$outer).hasClass("lg-show-autoplay")?(b.cancelAuto(),b.core.s.fourceAutoplay=!1):b.interval||(b.startlAuto(),b.core.s.fourceAutoplay=b.fourceAutoplayTemp)})},c.prototype.startlAuto=function(){var a=this;a.core.$outer.find(".lg-progress").css("transition","width "+(a.core.s.speed+a.core.s.pause)+"ms ease 0s"),a.core.$outer.addClass("lg-show-autoplay"),a.core.$outer.find(".lg-progress-bar").addClass("lg-start"),a.interval=setInterval(function(){a.core.index+1<a.core.$items.length?a.core.index++:a.core.index=0,a.fromAuto=!0,a.core.slide(a.core.index,!1,!1,"next")},a.core.s.speed+a.core.s.pause)},c.prototype.cancelAuto=function(){clearInterval(this.interval),this.interval=!1,this.core.$outer.find(".lg-progress").removeAttr("style"),this.core.$outer.removeClass("lg-show-autoplay"),this.core.$outer.find(".lg-progress-bar").removeClass("lg-start")},c.prototype.destroy=function(){this.cancelAuto(),this.core.$outer.find(".lg-progress-bar").remove()},a.fn.lightGallery.modules.autoplay=c}()});
|
||||
@@ -1,7 +1,24 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
/*! lg-fullscreen - v1.2.1 - 2020-06-13
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
@@ -9,6 +26,15 @@
|
||||
fullScreen: true
|
||||
};
|
||||
|
||||
function isFullScreen() {
|
||||
return (
|
||||
document.fullscreenElement ||
|
||||
document.mozFullScreenElement ||
|
||||
document.webkitFullscreenElement ||
|
||||
document.msFullscreenElement
|
||||
);
|
||||
}
|
||||
|
||||
var Fullscreen = function(element) {
|
||||
|
||||
// get lightGallery core plugin data
|
||||
@@ -33,7 +59,7 @@
|
||||
!document.mozFullScreenEnabled && !document.msFullscreenEnabled) {
|
||||
return;
|
||||
} else {
|
||||
fullScreen = '<span class="lg-fullscreen lg-icon"></span>';
|
||||
fullScreen = '<button type="button" aria-label="Toggle fullscreen" class="lg-fullscreen lg-icon"></button>';
|
||||
this.core.$outer.find('.lg-toolbar').append(fullScreen);
|
||||
this.fullScreen();
|
||||
}
|
||||
@@ -74,11 +100,10 @@
|
||||
});
|
||||
|
||||
this.core.$outer.find('.lg-fullscreen').on('click.lg', function() {
|
||||
if (!document.fullscreenElement &&
|
||||
!document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {
|
||||
_this.requestFullscreen();
|
||||
} else {
|
||||
if (isFullScreen()) {
|
||||
_this.exitFullscreen();
|
||||
} else {
|
||||
_this.requestFullscreen();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -87,11 +112,15 @@
|
||||
Fullscreen.prototype.destroy = function() {
|
||||
|
||||
// exit from fullscreen if activated
|
||||
if(isFullScreen()) {
|
||||
this.exitFullscreen();
|
||||
}
|
||||
|
||||
$(document).off('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg');
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.fullscreen = Fullscreen;
|
||||
|
||||
})(jQuery, window, document);
|
||||
})();
|
||||
|
||||
}));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
!function(a,b,c,d){"use strict";var e={fullScreen:!0},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.init(),this};f.prototype.init=function(){var a="";if(this.core.s.fullScreen){if(!(c.fullscreenEnabled||c.webkitFullscreenEnabled||c.mozFullScreenEnabled||c.msFullscreenEnabled))return;a='<span class="lg-fullscreen lg-icon"></span>',this.core.$outer.find(".lg-toolbar").append(a),this.fullScreen()}},f.prototype.requestFullscreen=function(){var a=c.documentElement;a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()},f.prototype.exitFullscreen=function(){c.exitFullscreen?c.exitFullscreen():c.msExitFullscreen?c.msExitFullscreen():c.mozCancelFullScreen?c.mozCancelFullScreen():c.webkitExitFullscreen&&c.webkitExitFullscreen()},f.prototype.fullScreen=function(){var b=this;a(c).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg",function(){b.core.$outer.toggleClass("lg-fullscreen-on")}),this.core.$outer.find(".lg-fullscreen").on("click.lg",function(){c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement||c.msFullscreenElement?b.exitFullscreen():b.requestFullscreen()})},f.prototype.destroy=function(){this.exitFullscreen(),a(c).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg")},a.fn.lightGallery.modules.fullscreen=f}(jQuery,window,document);
|
||||
/*! lg-fullscreen - v1.2.1 - 2020-06-13
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";function b(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement}var c={fullScreen:!0},d=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},c,this.core.s),this.init(),this};d.prototype.init=function(){var a="";if(this.core.s.fullScreen){if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))return;a='<button type="button" aria-label="Toggle fullscreen" class="lg-fullscreen lg-icon"></button>',this.core.$outer.find(".lg-toolbar").append(a),this.fullScreen()}},d.prototype.requestFullscreen=function(){var a=document.documentElement;a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()},d.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},d.prototype.fullScreen=function(){var c=this;a(document).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg",function(){c.core.$outer.toggleClass("lg-fullscreen-on")}),this.core.$outer.find(".lg-fullscreen").on("click.lg",function(){b()?c.exitFullscreen():c.requestFullscreen()})},d.prototype.destroy=function(){b()&&this.exitFullscreen(),a(document).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg")},a.fn.lightGallery.modules.fullscreen=d}()});
|
||||
@@ -1,7 +1,24 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
/*! lg-hash - v1.0.4 - 2017-12-20
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(jQuery);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
@@ -29,17 +46,21 @@
|
||||
|
||||
// Change hash value on after each slide transition
|
||||
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index) {
|
||||
if (history.replaceState) {
|
||||
history.replaceState(null, null, window.location.pathname + window.location.search + '#lg=' + _this.core.s.galleryId + '&slide=' + index);
|
||||
} else {
|
||||
window.location.hash = 'lg=' + _this.core.s.galleryId + '&slide=' + index;
|
||||
}
|
||||
});
|
||||
|
||||
// Listen hash change and change the slide according to slide value
|
||||
$(window).on('hashchange', function() {
|
||||
$(window).on('hashchange.lg.hash', function() {
|
||||
_hash = window.location.hash;
|
||||
var _idx = parseInt(_hash.split('&slide=')[1], 10);
|
||||
|
||||
// it galleryId doesn't exist in the url close the gallery
|
||||
if ((_hash.indexOf('lg=' + _this.core.s.galleryId) > -1)) {
|
||||
_this.core.slide(_idx);
|
||||
_this.core.slide(_idx, false, false);
|
||||
} else if (_this.core.lGalleryOn) {
|
||||
_this.core.destroy();
|
||||
}
|
||||
@@ -49,19 +70,32 @@
|
||||
|
||||
Hash.prototype.destroy = function() {
|
||||
|
||||
if (!this.core.s.hash) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset to old hash value
|
||||
if (this.oldHash && this.oldHash.indexOf('lg=' + this.core.s.galleryId) < 0) {
|
||||
window.location.hash = this.oldHash;
|
||||
if (history.replaceState) {
|
||||
history.replaceState(null, null, this.oldHash);
|
||||
} else {
|
||||
if (history.pushState) {
|
||||
history.pushState('', document.title, window.location.pathname + window.location.search);
|
||||
window.location.hash = this.oldHash;
|
||||
}
|
||||
} else {
|
||||
if (history.replaceState) {
|
||||
history.replaceState(null, document.title, window.location.pathname + window.location.search);
|
||||
} else {
|
||||
window.location.hash = '';
|
||||
}
|
||||
}
|
||||
|
||||
this.core.$el.off('.lg.hash');
|
||||
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.hash = Hash;
|
||||
|
||||
})(jQuery, window, document);
|
||||
})();
|
||||
|
||||
|
||||
}));
|
||||
|
||||
8
theme/public/lightgallery/js/lg-hash.min.js
vendored
8
theme/public/lightgallery/js/lg-hash.min.js
vendored
@@ -1,4 +1,4 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
!function(a,b,c,d){"use strict";var e={hash:!0},f=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},e,this.core.s),this.core.s.hash&&(this.oldHash=b.location.hash,this.init()),this};f.prototype.init=function(){var c,d=this;d.core.$el.on("onAfterSlide.lg.tm",function(a,c,e){b.location.hash="lg="+d.core.s.galleryId+"&slide="+e}),a(b).on("hashchange",function(){c=b.location.hash;var a=parseInt(c.split("&slide=")[1],10);c.indexOf("lg="+d.core.s.galleryId)>-1?d.core.slide(a):d.core.lGalleryOn&&d.core.destroy()})},f.prototype.destroy=function(){this.oldHash&&this.oldHash.indexOf("lg="+this.core.s.galleryId)<0?b.location.hash=this.oldHash:history.pushState?history.pushState("",c.title,b.location.pathname+b.location.search):b.location.hash=""},a.fn.lightGallery.modules.hash=f}(jQuery,window,document);
|
||||
/*! lg-hash - v1.0.4 - 2017-12-20
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
||||
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b={hash:!0},c=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},b,this.core.s),this.core.s.hash&&(this.oldHash=window.location.hash,this.init()),this};c.prototype.init=function(){var b,c=this;c.core.$el.on("onAfterSlide.lg.tm",function(a,b,d){history.replaceState?history.replaceState(null,null,window.location.pathname+window.location.search+"#lg="+c.core.s.galleryId+"&slide="+d):window.location.hash="lg="+c.core.s.galleryId+"&slide="+d}),a(window).on("hashchange.lg.hash",function(){b=window.location.hash;var a=parseInt(b.split("&slide=")[1],10);b.indexOf("lg="+c.core.s.galleryId)>-1?c.core.slide(a,!1,!1):c.core.lGalleryOn&&c.core.destroy()})},c.prototype.destroy=function(){this.core.s.hash&&(this.oldHash&&this.oldHash.indexOf("lg="+this.core.s.galleryId)<0?history.replaceState?history.replaceState(null,null,this.oldHash):window.location.hash=this.oldHash:history.replaceState?history.replaceState(null,document.title,window.location.pathname+window.location.search):window.location.hash="",this.core.$el.off(".lg.hash"))},a.fn.lightGallery.modules.hash=c}()});
|
||||
@@ -1,7 +1,24 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
/*! lg-pager - v1.0.2 - 2017-01-22
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(jQuery);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
@@ -55,7 +72,7 @@
|
||||
$pagerCont.on('click.lg touchend.lg', function() {
|
||||
var _$this = $(this);
|
||||
_this.core.index = _$this.index();
|
||||
_this.core.slide(_this.core.index, false, false);
|
||||
_this.core.slide(_this.core.index, false, true, false);
|
||||
});
|
||||
|
||||
$pagerOuter.on('mouseover.lg', function() {
|
||||
@@ -82,4 +99,7 @@
|
||||
|
||||
$.fn.lightGallery.modules.pager = Pager;
|
||||
|
||||
})(jQuery, window, document);
|
||||
})();
|
||||
|
||||
|
||||
}));
|
||||
|
||||
8
theme/public/lightgallery/js/lg-pager.min.js
vendored
8
theme/public/lightgallery/js/lg-pager.min.js
vendored
@@ -1,4 +1,4 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
!function(a,b,c,d){"use strict";var e={pager:!1},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.core.s.pager&&this.core.$items.length>1&&this.init(),this};f.prototype.init=function(){var b,c,d,e=this,f="";if(e.core.$outer.find(".lg").append('<div class="lg-pager-outer"></div>'),e.core.s.dynamic)for(var g=0;g<e.core.s.dynamicEl.length;g++)f+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+e.core.s.dynamicEl[g].thumb+'" /></div></span>';else e.core.$items.each(function(){f+=e.core.s.exThumbImage?'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).attr(e.core.s.exThumbImage)+'" /></div></span>':'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).find("img").attr("src")+'" /></div></span>'});c=e.core.$outer.find(".lg-pager-outer"),c.html(f),b=e.core.$outer.find(".lg-pager-cont"),b.on("click.lg touchend.lg",function(){var b=a(this);e.core.index=b.index(),e.core.slide(e.core.index,!1,!1)}),c.on("mouseover.lg",function(){clearTimeout(d),c.addClass("lg-pager-hover")}),c.on("mouseout.lg",function(){d=setTimeout(function(){c.removeClass("lg-pager-hover")})}),e.core.$el.on("onBeforeSlide.lg.tm",function(a,c,d){b.removeClass("lg-pager-active"),b.eq(d).addClass("lg-pager-active")})},f.prototype.destroy=function(){},a.fn.lightGallery.modules.pager=f}(jQuery,window,document);
|
||||
/*! lg-pager - v1.0.2 - 2017-01-22
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
||||
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b={pager:!1},c=function(c){return this.core=a(c).data("lightGallery"),this.$el=a(c),this.core.s=a.extend({},b,this.core.s),this.core.s.pager&&this.core.$items.length>1&&this.init(),this};c.prototype.init=function(){var b,c,d,e=this,f="";if(e.core.$outer.find(".lg").append('<div class="lg-pager-outer"></div>'),e.core.s.dynamic)for(var g=0;g<e.core.s.dynamicEl.length;g++)f+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+e.core.s.dynamicEl[g].thumb+'" /></div></span>';else e.core.$items.each(function(){f+=e.core.s.exThumbImage?'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).attr(e.core.s.exThumbImage)+'" /></div></span>':'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).find("img").attr("src")+'" /></div></span>'});c=e.core.$outer.find(".lg-pager-outer"),c.html(f),b=e.core.$outer.find(".lg-pager-cont"),b.on("click.lg touchend.lg",function(){var b=a(this);e.core.index=b.index(),e.core.slide(e.core.index,!1,!0,!1)}),c.on("mouseover.lg",function(){clearTimeout(d),c.addClass("lg-pager-hover")}),c.on("mouseout.lg",function(){d=setTimeout(function(){c.removeClass("lg-pager-hover")})}),e.core.$el.on("onBeforeSlide.lg.tm",function(a,c,d){b.removeClass("lg-pager-active"),b.eq(d).addClass("lg-pager-active")})},c.prototype.destroy=function(){},a.fn.lightGallery.modules.pager=c}()});
|
||||
@@ -1,7 +1,24 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
/*! lg-thumbnail - v1.2.1 - 2020-06-13
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
@@ -12,6 +29,7 @@
|
||||
currentPagerPosition: 'middle',
|
||||
|
||||
thumbWidth: 100,
|
||||
thumbHeight: '80px',
|
||||
thumbContHeight: 100,
|
||||
thumbMargin: 5,
|
||||
|
||||
@@ -47,6 +65,10 @@
|
||||
this.thumbTotalWidth = (this.core.$items.length * (this.core.s.thumbWidth + this.core.s.thumbMargin));
|
||||
this.thumbIndex = this.core.index;
|
||||
|
||||
if (this.core.s.animateThumb) {
|
||||
this.core.s.thumbHeight = '100%';
|
||||
}
|
||||
|
||||
// Thumbnail animation value
|
||||
this.left = 0;
|
||||
|
||||
@@ -69,12 +91,12 @@
|
||||
}
|
||||
|
||||
this.build();
|
||||
if (this.core.s.animateThumb) {
|
||||
if (this.core.s.enableThumbDrag && !this.core.isTouch && this.core.doCss()) {
|
||||
if (this.core.s.animateThumb && this.core.doCss()) {
|
||||
if (this.core.s.enableThumbDrag) {
|
||||
this.enableThumbDrag();
|
||||
}
|
||||
|
||||
if (this.core.s.enableThumbSwipe && this.core.isTouch && this.core.doCss()) {
|
||||
if (this.core.s.enableThumbSwipe) {
|
||||
this.enableThumbSwipe();
|
||||
}
|
||||
|
||||
@@ -94,7 +116,7 @@
|
||||
var vimeoErrorThumbSize = '';
|
||||
var $thumb;
|
||||
var html = '<div class="lg-thumb-outer">' +
|
||||
'<div class="lg-thumb group">' +
|
||||
'<div class="lg-thumb lg-group">' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
@@ -157,7 +179,7 @@
|
||||
thumbImg = thumb;
|
||||
}
|
||||
|
||||
thumbList += '<div data-vimeo-id="' + vimeoId + '" class="lg-thumb-item" style="width:' + _this.core.s.thumbWidth + 'px; margin-right: ' + _this.core.s.thumbMargin + 'px"><img src="' + thumbImg + '" /></div>';
|
||||
thumbList += '<div data-vimeo-id="' + vimeoId + '" class="lg-thumb-item" style="width:' + _this.core.s.thumbWidth + 'px; height: ' + _this.core.s.thumbHeight + '; margin-right: ' + _this.core.s.thumbMargin + 'px"><img src="' + thumbImg + '" /></div>';
|
||||
vimeoId = '';
|
||||
}
|
||||
|
||||
@@ -187,7 +209,7 @@
|
||||
var vimeoVideoId = $this.attr('data-vimeo-id');
|
||||
|
||||
if (vimeoVideoId) {
|
||||
$.getJSON('http://www.vimeo.com/api/v2/video/' + vimeoVideoId + '.json?callback=?', {
|
||||
$.getJSON('//www.vimeo.com/api/v2/video/' + vimeoVideoId + '.json?callback=?', {
|
||||
format: 'json'
|
||||
}, function(data) {
|
||||
$this.find('img').attr('src', data[0][_this.core.s.vimeoThumbSize]);
|
||||
@@ -210,7 +232,7 @@
|
||||
// Go to slide if browser does not support css transitions
|
||||
if ((_this.thumbClickable && !_this.core.lgBusy) || !_this.core.doCss()) {
|
||||
_this.core.index = _$this.index();
|
||||
_this.core.slide(_this.core.index, false, true);
|
||||
_this.core.slide(_this.core.index, false, true, false);
|
||||
}
|
||||
}, 50);
|
||||
});
|
||||
@@ -421,7 +443,7 @@
|
||||
var _this = this;
|
||||
if (_this.core.s.toogleThumb) {
|
||||
_this.core.$outer.addClass('lg-can-toggle');
|
||||
_this.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>');
|
||||
_this.$thumbOuter.append('<button type="button" aria-label="Toggle thumbnails" class="lg-toogle-thumb lg-icon"></button>');
|
||||
_this.core.$outer.find('.lg-toogle-thumb').on('click.lg', function() {
|
||||
_this.core.$outer.toggleClass('lg-thumb-open');
|
||||
});
|
||||
@@ -451,4 +473,6 @@
|
||||
|
||||
$.fn.lightGallery.modules.Thumbnail = Thumbnail;
|
||||
|
||||
})(jQuery, window, document);
|
||||
})();
|
||||
|
||||
}));
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,16 +1,39 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
/*! lg-video - v1.4.0 - November-07-2020
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
videoMaxWidth: '855px',
|
||||
|
||||
autoplayFirstVideo: true,
|
||||
|
||||
youtubePlayerParams: false,
|
||||
vimeoPlayerParams: false,
|
||||
dailymotionPlayerParams: false,
|
||||
videojs: false
|
||||
vkPlayerParams: false,
|
||||
|
||||
videojs: false,
|
||||
videojsOptions: {}
|
||||
};
|
||||
|
||||
var Video = function(element) {
|
||||
@@ -30,39 +53,126 @@
|
||||
var _this = this;
|
||||
|
||||
// Event triggered when video url found without poster
|
||||
_this.core.$el.on('hasVideo.lg.tm', function(event, index, src, html) {
|
||||
_this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src, 'lg-object', true, index, html));
|
||||
if (html) {
|
||||
if (_this.core.s.videojs) {
|
||||
try {
|
||||
videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0), {}, function() {
|
||||
if (!_this.videoLoaded) {
|
||||
this.play();
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
_this.core.$slide.eq(index).find('.lg-html5').get(0).play();
|
||||
}
|
||||
}
|
||||
});
|
||||
_this.core.$el.on('hasVideo.lg.tm', onHasVideo.bind(this));
|
||||
|
||||
// Set max width for video
|
||||
_this.core.$el.on('onAferAppendSlide.lg.tm', function(event, index) {
|
||||
_this.core.$slide.eq(index).find('.lg-video-cont').css('max-width', _this.core.s.videoMaxWidth);
|
||||
_this.videoLoaded = true;
|
||||
_this.core.$el.on('onAferAppendSlide.lg.tm', onAferAppendSlide.bind(this));
|
||||
|
||||
if (_this.core.doCss() && (_this.core.$items.length > 1) && (_this.core.s.enableSwipe || _this.core.s.enableDrag)) {
|
||||
_this.core.$el.on('onSlideClick.lg.tm', function() {
|
||||
var $el = _this.core.$slide.eq(_this.core.index);
|
||||
_this.loadVideoOnclick($el);
|
||||
});
|
||||
} else {
|
||||
|
||||
// For IE 9 and bellow
|
||||
_this.core.$slide.on('click.lg', function() {
|
||||
_this.loadVideoOnclick($(this));
|
||||
});
|
||||
}
|
||||
|
||||
_this.core.$el.on('onBeforeSlide.lg.tm', onBeforeSlide.bind(this));
|
||||
|
||||
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex) {
|
||||
_this.core.$slide.eq(prevIndex).removeClass('lg-video-playing');
|
||||
});
|
||||
|
||||
var loadOnClick = function($el) {
|
||||
if (_this.core.s.autoplayFirstVideo) {
|
||||
_this.core.$el.on('onAferAppendSlide.lg.tm', function (e, index) {
|
||||
if (!_this.core.lGalleryOn) {
|
||||
var $el = _this.core.$slide.eq(index);
|
||||
setTimeout(function () {
|
||||
_this.loadVideoOnclick($el);
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Video.prototype.loadVideo = function(src, addClass, noPoster, index, html) {
|
||||
var _this = this;
|
||||
var video = '';
|
||||
var autoplay = 1;
|
||||
var a = '';
|
||||
var isVideo = this.core.isVideo(src, index) || {};
|
||||
var videoTitle;
|
||||
|
||||
if (_this.core.s.dynamic) {
|
||||
videoTitle = _this.core.s.dynamicEl[_this.core.index].title;
|
||||
} else {
|
||||
videoTitle = _this.core.$items.eq(_this.core.index).attr('title') || _this.core.$items.eq(_this.core.index).find('img').first().attr('alt');
|
||||
}
|
||||
|
||||
videoTitle = videoTitle ? 'title="' + videoTitle + '"' : '';
|
||||
|
||||
// Enable autoplay based on setting for first video if poster doesn't exist
|
||||
if (noPoster) {
|
||||
if (this.videoLoaded) {
|
||||
autoplay = 0;
|
||||
} else {
|
||||
autoplay = this.core.s.autoplayFirstVideo ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (isVideo.youtube) {
|
||||
|
||||
a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
|
||||
if (this.core.s.youtubePlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.youtubePlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe allow="autoplay" class="lg-video-object lg-youtube ' + addClass + '" ' + videoTitle + ' width="560" height="315" src="//www.youtube.com/embed/' + isVideo.youtube[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
} else if (isVideo.vimeo) {
|
||||
|
||||
a = '?autoplay=' + autoplay;
|
||||
if (this.core.s.vimeoPlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.vimeoPlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe allow="autoplay" class="lg-video-object lg-vimeo ' + addClass + '" ' + videoTitle + ' width="560" height="315" src="//player.vimeo.com/video/' + isVideo.vimeo[1] + a + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
||||
|
||||
} else if (isVideo.dailymotion) {
|
||||
|
||||
a = '?wmode=opaque&autoplay=' + autoplay + '&api=postMessage';
|
||||
if (this.core.s.dailymotionPlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.dailymotionPlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe allow="autoplay" class="lg-video-object lg-dailymotion ' + addClass + '" ' + videoTitle + ' width="560" height="315" src="//www.dailymotion.com/embed/video/' + isVideo.dailymotion[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
} else if (isVideo.html5) {
|
||||
var fL = html.substring(0, 1);
|
||||
if (fL === '.' || fL === '#') {
|
||||
html = $(html).html();
|
||||
}
|
||||
|
||||
video = html;
|
||||
|
||||
} else if (isVideo.vk) {
|
||||
|
||||
a = '&autoplay=' + autoplay;
|
||||
if (this.core.s.vkPlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.vkPlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe allow="autoplay" class="lg-video-object lg-vk ' + addClass + '" ' + videoTitle + ' width="560" height="315" src="//vk.com/video_ext.php?' + isVideo.vk[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
}
|
||||
|
||||
return video;
|
||||
};
|
||||
|
||||
Video.prototype.loadVideoOnclick = function($el){
|
||||
|
||||
var _this = this;
|
||||
// check slide has poster
|
||||
if ($el.find('.lg-object').hasClass('lg-has-poster') && $el.find('.lg-object').is(':visible')) {
|
||||
|
||||
// chack already video element present
|
||||
// check already video element present
|
||||
if (!$el.hasClass('lg-has-video')) {
|
||||
|
||||
$el.addClass('lg-video-palying lg-has-video');
|
||||
$el.addClass('lg-video-playing lg-has-video');
|
||||
|
||||
var _src;
|
||||
var _html;
|
||||
@@ -73,11 +183,11 @@
|
||||
if (_html) {
|
||||
if (_this.core.s.videojs) {
|
||||
try {
|
||||
videojs(_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0), {}, function() {
|
||||
videojs(_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {
|
||||
this.play();
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included videojs');
|
||||
console.error('lightGallery:- Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0).play();
|
||||
@@ -124,9 +234,11 @@
|
||||
youtubePlayer.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
|
||||
} else if (vimeoPlayer) {
|
||||
try {
|
||||
$f(vimeoPlayer).api('play');
|
||||
new Vimeo.Player(vimeoPlayer).play().catch(function(error) {
|
||||
console.error('error playing the video:', error.name);
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included froogaloop2 js');
|
||||
console.warn('lightGallery:- Make sure you have included https://github.com/vimeo/player.js');
|
||||
}
|
||||
} else if (dailymotionPlayer) {
|
||||
dailymotionPlayer.contentWindow.postMessage('play', '*');
|
||||
@@ -136,46 +248,74 @@
|
||||
try {
|
||||
videojs(html5Player).play();
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included videojs');
|
||||
console.error('lightGallery:- Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
html5Player.play();
|
||||
}
|
||||
}
|
||||
|
||||
$el.addClass('lg-video-palying');
|
||||
$el.addClass('lg-video-playing');
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (_this.core.doCss() && _this.core.$items.length > 1 && ((_this.core.s.enableSwipe && _this.core.isTouch) || (_this.core.s.enableDrag && !_this.core.isTouch))) {
|
||||
_this.core.$el.on('onSlideClick.lg.tm', function() {
|
||||
var $el = _this.core.$slide.eq(_this.core.index);
|
||||
loadOnClick($el);
|
||||
});
|
||||
} else {
|
||||
Video.prototype.destroy = function() {
|
||||
this.videoLoaded = false;
|
||||
};
|
||||
|
||||
// For IE 9 and bellow
|
||||
_this.core.$slide.on('click.lg', function() {
|
||||
loadOnClick($(this));
|
||||
function onHasVideo(event, index, src, html) {
|
||||
/*jshint validthis:true */
|
||||
var _this = this;
|
||||
_this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src, 'lg-object', true, index, html));
|
||||
if (html) {
|
||||
if (_this.core.s.videojs) {
|
||||
try {
|
||||
videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {
|
||||
if (!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
|
||||
this.play();
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('lightGallery:- Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
if(!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
|
||||
_this.core.$slide.eq(index).find('.lg-html5').get(0).play();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_this.core.$el.on('onBeforeSlide.lg.tm', function(event, prevIndex, index) {
|
||||
function onAferAppendSlide(event, index) {
|
||||
/*jshint validthis:true */
|
||||
var $videoCont = this.core.$slide.eq(index).find('.lg-video-cont');
|
||||
if (!$videoCont.hasClass('lg-has-iframe')) {
|
||||
$videoCont.css('max-width', this.core.s.videoMaxWidth);
|
||||
this.videoLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
function onBeforeSlide(event, prevIndex, index) {
|
||||
/*jshint validthis:true */
|
||||
var _this = this;
|
||||
|
||||
var $videoSlide = _this.core.$slide.eq(prevIndex);
|
||||
var youtubePlayer = $videoSlide.find('.lg-youtube').get(0);
|
||||
var vimeoPlayer = $videoSlide.find('.lg-vimeo').get(0);
|
||||
var dailymotionPlayer = $videoSlide.find('.lg-dailymotion').get(0);
|
||||
var vkPlayer = $videoSlide.find('.lg-vk').get(0);
|
||||
var html5Player = $videoSlide.find('.lg-html5').get(0);
|
||||
if (youtubePlayer) {
|
||||
youtubePlayer.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
|
||||
} else if (vimeoPlayer) {
|
||||
try {
|
||||
$f(vimeoPlayer).api('pause');
|
||||
new Vimeo.Player(vimeoPlayer).pause().catch(function(error) {
|
||||
console.error('Unable to pause the video:', error.name);
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included froogaloop2 js');
|
||||
console.warn('lightGallery:- Make sure you have included https://github.com/vimeo/player.js');
|
||||
}
|
||||
} else if (dailymotionPlayer) {
|
||||
dailymotionPlayer.contentWindow.postMessage('pause', '*');
|
||||
@@ -185,11 +325,13 @@
|
||||
try {
|
||||
videojs(html5Player).pause();
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included videojs');
|
||||
console.error('lightGallery:- Make sure you have included videojs');
|
||||
}
|
||||
} else {
|
||||
html5Player.pause();
|
||||
}
|
||||
} if (vkPlayer) {
|
||||
$(vkPlayer).attr('src', $(vkPlayer).attr('src').replace('&autoplay', '&noplay'));
|
||||
}
|
||||
|
||||
var _src;
|
||||
@@ -201,77 +343,15 @@
|
||||
}
|
||||
|
||||
var _isVideo = _this.core.isVideo(_src, index) || {};
|
||||
if (_isVideo.youtube || _isVideo.vimeo || _isVideo.dailymotion) {
|
||||
if (_isVideo.youtube || _isVideo.vimeo || _isVideo.dailymotion || _isVideo.vk) {
|
||||
_this.core.$outer.addClass('lg-hide-download');
|
||||
}
|
||||
|
||||
//$videoSlide.addClass('lg-complete');
|
||||
|
||||
});
|
||||
|
||||
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex) {
|
||||
_this.core.$slide.eq(prevIndex).removeClass('lg-video-palying');
|
||||
});
|
||||
};
|
||||
|
||||
Video.prototype.loadVideo = function(src, addClass, noposter, index, html) {
|
||||
var video = '';
|
||||
var autoplay = 1;
|
||||
var a = '';
|
||||
var isVideo = this.core.isVideo(src, index) || {};
|
||||
|
||||
// Enable autoplay for first video if poster doesn't exist
|
||||
if (noposter) {
|
||||
if (this.videoLoaded) {
|
||||
autoplay = 0;
|
||||
} else {
|
||||
autoplay = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (isVideo.youtube) {
|
||||
|
||||
a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
|
||||
if (this.core.s.youtubePlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.youtubePlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe class="lg-video-object lg-youtube ' + addClass + '" width="560" height="315" src="//www.youtube.com/embed/' + isVideo.youtube[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
} else if (isVideo.vimeo) {
|
||||
|
||||
a = '?autoplay=' + autoplay + '&api=1';
|
||||
if (this.core.s.vimeoPlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.vimeoPlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe class="lg-video-object lg-vimeo ' + addClass + '" width="560" height="315" src="http://player.vimeo.com/video/' + isVideo.vimeo[1] + a + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
||||
|
||||
} else if (isVideo.dailymotion) {
|
||||
|
||||
a = '?wmode=opaque&autoplay=' + autoplay + '&api=postMessage';
|
||||
if (this.core.s.dailymotionPlayerParams) {
|
||||
a = a + '&' + $.param(this.core.s.dailymotionPlayerParams);
|
||||
}
|
||||
|
||||
video = '<iframe class="lg-video-object lg-dailymotion ' + addClass + '" width="560" height="315" src="//www.dailymotion.com/embed/video/' + isVideo.dailymotion[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
} else if (isVideo.html5) {
|
||||
var fL = html.substring(0, 1);
|
||||
if (fL === '.' || fL === '#') {
|
||||
html = $(html).html();
|
||||
}
|
||||
|
||||
video = html;
|
||||
}
|
||||
|
||||
return video;
|
||||
};
|
||||
|
||||
Video.prototype.destroy = function() {
|
||||
this.videoLoaded = false;
|
||||
};
|
||||
|
||||
$.fn.lightGallery.modules.video = Video;
|
||||
|
||||
})(jQuery, window, document);
|
||||
})();
|
||||
|
||||
|
||||
}));
|
||||
|
||||
8
theme/public/lightgallery/js/lg-video.min.js
vendored
8
theme/public/lightgallery/js/lg-video.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,14 +1,43 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
/*! lg-zoom - v1.3.0-beta.0 - October-05-2020
|
||||
* http://sachinchoolur.github.io/lightGallery
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
var getUseLeft = function() {
|
||||
var useLeft = false;
|
||||
var isChrome = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
|
||||
if (isChrome && parseInt(isChrome[2], 10) < 54) {
|
||||
useLeft = true;
|
||||
}
|
||||
|
||||
return useLeft;
|
||||
};
|
||||
|
||||
var defaults = {
|
||||
scale: 1,
|
||||
zoom: true,
|
||||
enableZoomAfter: 300
|
||||
actualSize: true,
|
||||
enableZoomAfter: 300,
|
||||
useLeftForZoom: getUseLeft()
|
||||
};
|
||||
|
||||
var Zoom = function(element) {
|
||||
@@ -34,7 +63,17 @@
|
||||
Zoom.prototype.init = function() {
|
||||
|
||||
var _this = this;
|
||||
var zoomIcons = '<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>';
|
||||
var zoomIcons = '<button type="button" aria-label="Zoom in" id="lg-zoom-in" class="lg-icon"></button><button type="button" aria-label="Zoom out" id="lg-zoom-out" class="lg-icon"></button>';
|
||||
|
||||
if (_this.core.s.actualSize) {
|
||||
zoomIcons += '<button type="button" aria-label="Actual size" id="lg-actual-size" class="lg-icon"></button>';
|
||||
}
|
||||
|
||||
if (_this.core.s.useLeftForZoom) {
|
||||
_this.core.$outer.addClass('lg-use-left-for-zoom');
|
||||
} else {
|
||||
_this.core.$outer.addClass('lg-use-transition-for-zoom');
|
||||
}
|
||||
|
||||
this.core.$outer.find('.lg-toolbar').append(zoomIcons);
|
||||
|
||||
@@ -74,8 +113,8 @@
|
||||
var _y;
|
||||
|
||||
// Find offset manually to avoid issue after zoom
|
||||
var offsetX = ($(window).width() - $image.width()) / 2;
|
||||
var offsetY = (($(window).height() - $image.height()) / 2) + $(window).scrollTop();
|
||||
var offsetX = ($(window).width() - $image.prop('offsetWidth')) / 2;
|
||||
var offsetY = (($(window).height() - $image.prop('offsetHeight')) / 2) + $(window).scrollTop();
|
||||
|
||||
_x = _this.pageX - offsetX;
|
||||
_y = _this.pageY - offsetY;
|
||||
@@ -85,7 +124,14 @@
|
||||
|
||||
$image.css('transform', 'scale3d(' + scaleVal + ', ' + scaleVal + ', 1)').attr('data-scale', scaleVal);
|
||||
|
||||
if (_this.core.s.useLeftForZoom) {
|
||||
$image.parent().css({
|
||||
left: -x + 'px',
|
||||
top: -y + 'px'
|
||||
}).attr('data-x', x).attr('data-y', y);
|
||||
} else {
|
||||
$image.parent().css('transform', 'translate3d(-' + x + 'px, -' + y + 'px, 0)').attr('data-x', x).attr('data-y', y);
|
||||
}
|
||||
};
|
||||
|
||||
var callScale = function() {
|
||||
@@ -102,8 +148,8 @@
|
||||
zoom(scale);
|
||||
};
|
||||
|
||||
var actualSize = function(event, $image, index) {
|
||||
var w = $image.width();
|
||||
var actualSize = function(event, $image, index, fromIcon) {
|
||||
var w = $image.prop('offsetWidth');
|
||||
var nw;
|
||||
if (_this.core.s.dynamic) {
|
||||
nw = _this.core.s.dynamicEl[index].width || $image[0].naturalWidth || w;
|
||||
@@ -122,8 +168,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (fromIcon) {
|
||||
_this.pageX = $(window).width() / 2;
|
||||
_this.pageY = ($(window).height() / 2) + $(window).scrollTop();
|
||||
} else {
|
||||
_this.pageX = event.pageX || event.originalEvent.targetTouches[0].pageX;
|
||||
_this.pageY = event.pageY || event.originalEvent.targetTouches[0].pageY;
|
||||
}
|
||||
|
||||
callScale();
|
||||
setTimeout(function() {
|
||||
_this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab');
|
||||
@@ -179,6 +231,10 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#lg-actual-size').on('click.lg', function(event) {
|
||||
actualSize(event, _this.core.$slide.eq(_this.core.index).find('.lg-image'), _this.core.index, true);
|
||||
});
|
||||
|
||||
// Reset zoom on slide change
|
||||
_this.core.$el.on('onBeforeSlide.lg.tm', function() {
|
||||
scale = 1;
|
||||
@@ -186,16 +242,166 @@
|
||||
});
|
||||
|
||||
// Drag option after zoom
|
||||
if (!_this.core.isTouch) {
|
||||
_this.zoomDrag();
|
||||
}
|
||||
|
||||
if (_this.core.isTouch) {
|
||||
_this.zoomSwipe();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Element} el
|
||||
* @return matrix(cos(X), sin(X), -sin(X), cos(X), 0, 0);
|
||||
* Get the current transform value
|
||||
*/
|
||||
Zoom.prototype.getCurrentTransform = function (el) {
|
||||
if (!el) {
|
||||
return 0;
|
||||
}
|
||||
var st = window.getComputedStyle(el, null);
|
||||
var tm = st.getPropertyValue('-webkit-transform') ||
|
||||
st.getPropertyValue('-moz-transform') ||
|
||||
st.getPropertyValue('-ms-transform') ||
|
||||
st.getPropertyValue('-o-transform') ||
|
||||
st.getPropertyValue('transform') ||
|
||||
'none';
|
||||
if (tm !== 'none') {
|
||||
return tm.split('(')[1].split(')')[0].split(',');
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
Zoom.prototype.getCurrentRotation = function (el) {
|
||||
if (!el) {
|
||||
return 0;
|
||||
}
|
||||
var values = this.getCurrentTransform(el);
|
||||
if (values) {
|
||||
return Math.round(Math.atan2(values[1], values[0]) * (180 / Math.PI));
|
||||
// If you want rotate in 360
|
||||
//return (angle < 0 ? angle + 360 : angle);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
Zoom.prototype.getModifier = function (rotateValue, axis, el) {
|
||||
var originalRotate = rotateValue;
|
||||
rotateValue = Math.abs(rotateValue);
|
||||
var transformValues = this.getCurrentTransform(el);
|
||||
if (!transformValues) {
|
||||
return 1;
|
||||
}
|
||||
var modifier = 1;
|
||||
if (axis === 'X') {
|
||||
var flipHorizontalValue = Math.sign(parseFloat(transformValues[0]));
|
||||
if (rotateValue === 0 || rotateValue === 180) {
|
||||
modifier = 1;
|
||||
} else if (rotateValue === 90) {
|
||||
if ((originalRotate === -90 && flipHorizontalValue === 1) || (originalRotate === 90 && flipHorizontalValue === -1)) {
|
||||
modifier = -1;
|
||||
} else {
|
||||
modifier = 1;
|
||||
}
|
||||
}
|
||||
modifier = modifier * flipHorizontalValue;
|
||||
} else {
|
||||
var flipVerticalValue = Math.sign(parseFloat(transformValues[3]));
|
||||
if (rotateValue === 0 || rotateValue === 180) {
|
||||
modifier = 1;
|
||||
} else if (rotateValue === 90) {
|
||||
var sinX = parseFloat(transformValues[1]);
|
||||
var sinMinusX = parseFloat(transformValues[2]);
|
||||
modifier = Math.sign(sinX * sinMinusX * originalRotate * flipVerticalValue);
|
||||
}
|
||||
modifier = modifier * flipVerticalValue;
|
||||
}
|
||||
return modifier;
|
||||
};
|
||||
|
||||
Zoom.prototype.getImageSize = function ($image, rotateValue, axis) {
|
||||
var imageSizes = {
|
||||
y: 'offsetHeight',
|
||||
x: 'offsetWidth'
|
||||
};
|
||||
if (rotateValue === 90) {
|
||||
// Swap axis
|
||||
if (axis === 'x') {
|
||||
axis = 'y';
|
||||
} else {
|
||||
axis = 'x';
|
||||
}
|
||||
}
|
||||
return $image.prop(imageSizes[axis]);
|
||||
};
|
||||
|
||||
Zoom.prototype.getDragCords = function (e, rotateValue) {
|
||||
if (rotateValue === 90) {
|
||||
return {
|
||||
x: e.pageY,
|
||||
y: e.pageX
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
x: e.pageX,
|
||||
y: e.pageY
|
||||
};
|
||||
}
|
||||
};
|
||||
Zoom.prototype.getSwipeCords = function (e, rotateValue) {
|
||||
var x = e.originalEvent.targetTouches[0].pageX;
|
||||
var y = e.originalEvent.targetTouches[0].pageY;
|
||||
if (rotateValue === 90) {
|
||||
return {
|
||||
x: y,
|
||||
y: x
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
x: x,
|
||||
y: y
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Zoom.prototype.getPossibleDragCords = function ($image, rotateValue) {
|
||||
|
||||
var minY = (this.core.$outer.find('.lg').height() - this.getImageSize($image, rotateValue, 'y')) / 2;
|
||||
var maxY = Math.abs((this.getImageSize($image, rotateValue, 'y') * Math.abs($image.attr('data-scale'))) - this.core.$outer.find('.lg').height() + minY);
|
||||
var minX = (this.core.$outer.find('.lg').width() - this.getImageSize($image, rotateValue, 'x')) / 2;
|
||||
var maxX = Math.abs((this.getImageSize($image, rotateValue, 'x') * Math.abs($image.attr('data-scale'))) - this.core.$outer.find('.lg').width() + minX);
|
||||
if (rotateValue === 90) {
|
||||
return {
|
||||
minY: minX,
|
||||
maxY: maxX,
|
||||
minX: minY,
|
||||
maxX: maxY,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
minY: minY,
|
||||
maxY: maxY,
|
||||
minX: minX,
|
||||
maxX: maxX,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Zoom.prototype.getDragAllowedAxises = function ($image, rotateValue) {
|
||||
var allowY = this.getImageSize($image, rotateValue, 'y') * $image.attr('data-scale') > this.core.$outer.find('.lg').height();
|
||||
var allowX = this.getImageSize($image, rotateValue, 'x') * $image.attr('data-scale') > this.core.$outer.find('.lg').width();
|
||||
if (rotateValue === 90) {
|
||||
return {
|
||||
allowX: allowY,
|
||||
allowY: allowX
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
allowX: allowX,
|
||||
allowY: allowY
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// Reset zoom effect
|
||||
Zoom.prototype.resetZoom = function() {
|
||||
this.core.$outer.removeClass('lg-zoomed');
|
||||
@@ -219,19 +425,24 @@
|
||||
// Allow Y direction drag
|
||||
var allowY = false;
|
||||
|
||||
var rotateValue = 0;
|
||||
var rotateEl;
|
||||
|
||||
_this.core.$slide.on('touchstart.lg', function(e) {
|
||||
|
||||
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
||||
var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
|
||||
|
||||
allowY = $image.outerHeight() * $image.attr('data-scale') > _this.core.$outer.find('.lg').height();
|
||||
allowX = $image.outerWidth() * $image.attr('data-scale') > _this.core.$outer.find('.lg').width();
|
||||
rotateEl = _this.core.$slide.eq(_this.core.index).find('.lg-img-rotate')[0];
|
||||
rotateValue = _this.getCurrentRotation(rotateEl);
|
||||
|
||||
var dragAllowedAxises = _this.getDragAllowedAxises($image, Math.abs(rotateValue));
|
||||
allowY = dragAllowedAxises.allowY;
|
||||
allowX = dragAllowedAxises.allowX;
|
||||
|
||||
if ((allowX || allowY)) {
|
||||
e.preventDefault();
|
||||
startCoords = {
|
||||
x: e.originalEvent.targetTouches[0].pageX,
|
||||
y: e.originalEvent.targetTouches[0].pageY
|
||||
};
|
||||
startCoords = _this.getSwipeCords(e, Math.abs(rotateValue));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,29 +459,35 @@
|
||||
e.preventDefault();
|
||||
isMoved = true;
|
||||
|
||||
endCoords = {
|
||||
x: e.originalEvent.targetTouches[0].pageX,
|
||||
y: e.originalEvent.targetTouches[0].pageY
|
||||
};
|
||||
endCoords = _this.getSwipeCords(e, Math.abs(rotateValue));
|
||||
|
||||
// reset opacity and transition duration
|
||||
_this.core.$outer.addClass('lg-zoom-dragging');
|
||||
|
||||
if (allowY) {
|
||||
distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
|
||||
distanceY = (-Math.abs(_$el.attr('data-y'))) + ((endCoords.y - startCoords.y) * _this.getModifier(rotateValue, 'Y', rotateEl));
|
||||
} else {
|
||||
distanceY = -Math.abs(_$el.attr('data-y'));
|
||||
}
|
||||
|
||||
if (allowX) {
|
||||
distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
|
||||
distanceX = (-Math.abs(_$el.attr('data-x'))) + ((endCoords.x - startCoords.x) * _this.getModifier(rotateValue, 'X', rotateEl));
|
||||
|
||||
} else {
|
||||
distanceX = -Math.abs(_$el.attr('data-x'));
|
||||
}
|
||||
|
||||
if ((Math.abs(endCoords.x - startCoords.x) > 15) || (Math.abs(endCoords.y - startCoords.y) > 15)) {
|
||||
|
||||
if (_this.core.s.useLeftForZoom) {
|
||||
_$el.css({
|
||||
left: distanceX + 'px',
|
||||
top: distanceY + 'px'
|
||||
});
|
||||
} else {
|
||||
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -281,7 +498,7 @@
|
||||
if (isMoved) {
|
||||
isMoved = false;
|
||||
_this.core.$outer.removeClass('lg-zoom-dragging');
|
||||
_this.touchendZoom(startCoords, endCoords, allowX, allowY);
|
||||
_this.touchendZoom(startCoords, endCoords, allowX, allowY, rotateValue);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -303,21 +520,22 @@
|
||||
// Allow Y direction drag
|
||||
var allowY = false;
|
||||
|
||||
_this.core.$slide.on('mousedown.lg.zoom', function(e) {
|
||||
var rotateValue = 0;
|
||||
var rotateEl;
|
||||
|
||||
_this.core.$slide.on('mousedown.lg.zoom', function(e) {
|
||||
rotateEl = _this.core.$slide.eq(_this.core.index).find('.lg-img-rotate')[0];
|
||||
rotateValue = _this.getCurrentRotation(rotateEl);
|
||||
// execute only on .lg-object
|
||||
var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
|
||||
|
||||
allowY = $image.outerHeight() * $image.attr('data-scale') > _this.core.$outer.find('.lg').height();
|
||||
allowX = $image.outerWidth() * $image.attr('data-scale') > _this.core.$outer.find('.lg').width();
|
||||
var dragAllowedAxises = _this.getDragAllowedAxises($image, Math.abs(rotateValue));
|
||||
allowY = dragAllowedAxises.allowY;
|
||||
allowX = dragAllowedAxises.allowX;
|
||||
|
||||
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
||||
if ($(e.target).hasClass('lg-object') && (allowX || allowY)) {
|
||||
e.preventDefault();
|
||||
startCoords = {
|
||||
x: e.pageX,
|
||||
y: e.pageY
|
||||
};
|
||||
startCoords = _this.getDragCords(e, Math.abs(rotateValue));
|
||||
|
||||
isDraging = true;
|
||||
|
||||
@@ -337,28 +555,32 @@
|
||||
var distanceY;
|
||||
|
||||
isMoved = true;
|
||||
endCoords = {
|
||||
x: e.pageX,
|
||||
y: e.pageY
|
||||
};
|
||||
endCoords = _this.getDragCords(e, Math.abs(rotateValue));
|
||||
|
||||
// reset opacity and transition duration
|
||||
_this.core.$outer.addClass('lg-zoom-dragging');
|
||||
|
||||
if (allowY) {
|
||||
distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
|
||||
distanceY = (-Math.abs(_$el.attr('data-y'))) + ((endCoords.y - startCoords.y) * _this.getModifier(rotateValue, 'Y', rotateEl));
|
||||
} else {
|
||||
distanceY = -Math.abs(_$el.attr('data-y'));
|
||||
}
|
||||
|
||||
if (allowX) {
|
||||
distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
|
||||
distanceX = (-Math.abs(_$el.attr('data-x'))) + ((endCoords.x - startCoords.x) * _this.getModifier(rotateValue, 'X', rotateEl));
|
||||
} else {
|
||||
distanceX = -Math.abs(_$el.attr('data-x'));
|
||||
}
|
||||
|
||||
if (_this.core.s.useLeftForZoom) {
|
||||
_$el.css({
|
||||
left: distanceX + 'px',
|
||||
top: distanceY + 'px'
|
||||
});
|
||||
} else {
|
||||
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(window).on('mouseup.lg.zoom', function(e) {
|
||||
@@ -369,11 +591,8 @@
|
||||
|
||||
// Fix for chrome mouse move on click
|
||||
if (isMoved && ((startCoords.x !== endCoords.x) || (startCoords.y !== endCoords.y))) {
|
||||
endCoords = {
|
||||
x: e.pageX,
|
||||
y: e.pageY
|
||||
};
|
||||
_this.touchendZoom(startCoords, endCoords, allowX, allowY);
|
||||
endCoords = _this.getDragCords(e, Math.abs(rotateValue));
|
||||
_this.touchendZoom(startCoords, endCoords, allowX, allowY, rotateValue);
|
||||
|
||||
}
|
||||
|
||||
@@ -385,32 +604,29 @@
|
||||
});
|
||||
};
|
||||
|
||||
Zoom.prototype.touchendZoom = function(startCoords, endCoords, allowX, allowY) {
|
||||
Zoom.prototype.touchendZoom = function(startCoords, endCoords, allowX, allowY, rotateValue) {
|
||||
|
||||
var _this = this;
|
||||
var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
|
||||
var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
|
||||
var distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
|
||||
var distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
|
||||
var minY = (_this.core.$outer.find('.lg').height() - $image.outerHeight()) / 2;
|
||||
var maxY = Math.abs(($image.outerHeight() * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('.lg').height() + minY);
|
||||
var minX = (_this.core.$outer.find('.lg').width() - $image.outerWidth()) / 2;
|
||||
var maxX = Math.abs(($image.outerWidth() * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('.lg').width() + minX);
|
||||
|
||||
var rotateEl = _this.core.$slide.eq(_this.core.index).find('.lg-img-rotate')[0];
|
||||
var distanceX = (-Math.abs(_$el.attr('data-x'))) + ((endCoords.x - startCoords.x) * _this.getModifier(rotateValue, 'X', rotateEl));
|
||||
var distanceY = (-Math.abs(_$el.attr('data-y'))) + ((endCoords.y - startCoords.y) * _this.getModifier(rotateValue, 'Y', rotateEl));
|
||||
var possibleDragCords = _this.getPossibleDragCords($image, Math.abs(rotateValue));
|
||||
if ((Math.abs(endCoords.x - startCoords.x) > 15) || (Math.abs(endCoords.y - startCoords.y) > 15)) {
|
||||
if (allowY) {
|
||||
if (distanceY <= -maxY) {
|
||||
distanceY = -maxY;
|
||||
} else if (distanceY >= -minY) {
|
||||
distanceY = -minY;
|
||||
if (distanceY <= -possibleDragCords.maxY) {
|
||||
distanceY = -possibleDragCords.maxY;
|
||||
} else if (distanceY >= -possibleDragCords.minY) {
|
||||
distanceY = -possibleDragCords.minY;
|
||||
}
|
||||
}
|
||||
|
||||
if (allowX) {
|
||||
if (distanceX <= -maxX) {
|
||||
distanceX = -maxX;
|
||||
} else if (distanceX >= -minX) {
|
||||
distanceX = -minX;
|
||||
if (distanceX <= -possibleDragCords.maxX) {
|
||||
distanceX = -possibleDragCords.maxX;
|
||||
} else if (distanceX >= -possibleDragCords.minX) {
|
||||
distanceX = -possibleDragCords.minX;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,8 +642,16 @@
|
||||
distanceX = -Math.abs(_$el.attr('data-x'));
|
||||
}
|
||||
|
||||
if (_this.core.s.useLeftForZoom) {
|
||||
_$el.css({
|
||||
left: distanceX + 'px',
|
||||
top: distanceY + 'px'
|
||||
});
|
||||
} else {
|
||||
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Zoom.prototype.destroy = function() {
|
||||
@@ -446,4 +670,7 @@
|
||||
|
||||
$.fn.lightGallery.modules.zoom = Zoom;
|
||||
|
||||
})(jQuery, window, document);
|
||||
})();
|
||||
|
||||
|
||||
}));
|
||||
|
||||
8
theme/public/lightgallery/js/lg-zoom.min.js
vendored
8
theme/public/lightgallery/js/lg-zoom.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,8 +1,23 @@
|
||||
/*! lightgallery - v1.2.14 - 2016-01-18
|
||||
/*! lightgallery - v1.10.0 - 2020-11-07
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
|
||||
(function($, window, document, undefined) {
|
||||
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(['jquery'], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(root["jQuery"]);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
var defaults = {
|
||||
@@ -20,10 +35,18 @@
|
||||
addClass: '',
|
||||
startClass: 'lg-start-zoom',
|
||||
backdropDuration: 150,
|
||||
|
||||
// Set 0, if u don't want to hide the controls
|
||||
hideBarsDelay: 6000,
|
||||
|
||||
useLeft: false,
|
||||
|
||||
// aria-labelledby attribute fot gallery
|
||||
ariaLabelledby: '',
|
||||
|
||||
//aria-describedby attribute for gallery
|
||||
ariaDescribedby: '',
|
||||
|
||||
closable: true,
|
||||
loop: true,
|
||||
escKey: true,
|
||||
@@ -33,12 +56,16 @@
|
||||
hideControlOnEnd: false,
|
||||
mousewheel: true,
|
||||
|
||||
getCaptionFromTitleOrAlt: true,
|
||||
|
||||
// .lg-item || '.lg-sub-html'
|
||||
appendSubHtmlTo: '.lg-sub-html',
|
||||
|
||||
subHtmlSelectorRelative: false,
|
||||
|
||||
/**
|
||||
* @desc number of preload slides
|
||||
* will exicute only after the current slide is fully loaded.
|
||||
* will execute only after the current slide is fully loaded.
|
||||
*
|
||||
* @ex you clicked on 4th image and if preload = 1 then 3rd slide and 5th
|
||||
* slide will be loaded in the background after the 4th slide is fully loaded..
|
||||
@@ -67,7 +94,8 @@
|
||||
|
||||
dynamic: false,
|
||||
dynamicEl: [],
|
||||
galleryId: 1
|
||||
galleryId: 1,
|
||||
supportLegacyBrowser: true
|
||||
};
|
||||
|
||||
function Plugin(element, options) {
|
||||
@@ -95,7 +123,7 @@
|
||||
this.lgBusy = false;
|
||||
|
||||
// Timeout function for hiding controls;
|
||||
this.hideBartimeout = false;
|
||||
this.hideBarTimeout = false;
|
||||
|
||||
// To determine browser supports for touch events;
|
||||
this.isTouch = ('ontouchstart' in document.documentElement);
|
||||
@@ -152,8 +180,9 @@
|
||||
if (!$('body').hasClass('lg-on')) {
|
||||
setTimeout(function() {
|
||||
_this.build(_this.index);
|
||||
$('body').addClass('lg-on');
|
||||
});
|
||||
|
||||
$('body').addClass('lg-on');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +238,7 @@
|
||||
});
|
||||
|
||||
// initiate slide function
|
||||
_this.slide(index, false, false);
|
||||
_this.slide(index, false, false, false);
|
||||
|
||||
if (_this.s.keyPress) {
|
||||
_this.keyPress();
|
||||
@@ -227,6 +256,10 @@
|
||||
if (_this.s.mousewheel) {
|
||||
_this.mousewheel();
|
||||
}
|
||||
} else {
|
||||
_this.$slide.on('click.lg', function() {
|
||||
_this.$el.trigger('onSlideClick.lg');
|
||||
});
|
||||
}
|
||||
|
||||
_this.counter();
|
||||
@@ -236,18 +269,23 @@
|
||||
_this.$el.trigger('onAfterOpen.lg');
|
||||
|
||||
// Hide controllers if mouse doesn't move for some period
|
||||
_this.$outer.on('mousemove.lg click.lg touchstart.lg', function() {
|
||||
if (_this.s.hideBarsDelay > 0) {
|
||||
|
||||
// Hide controllers if mouse doesn't move for some period
|
||||
_this.$outer.on('mousemove.lg click.lg touchstart.lg', function () {
|
||||
_this.$outer.removeClass('lg-hide-items');
|
||||
|
||||
clearTimeout(_this.hideBartimeout);
|
||||
clearTimeout(_this.hideBarTimeout);
|
||||
|
||||
// Timeout will be cleared on each slide movement also
|
||||
_this.hideBartimeout = setTimeout(function() {
|
||||
_this.hideBarTimeout = setTimeout(function () {
|
||||
_this.$outer.addClass('lg-hide-items');
|
||||
}, _this.s.hideBarsDelay);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
_this.$outer.trigger('mousemove.lg');
|
||||
|
||||
};
|
||||
|
||||
@@ -270,20 +308,25 @@
|
||||
// Create controlls
|
||||
if (this.s.controls && this.$items.length > 1) {
|
||||
controls = '<div class="lg-actions">' +
|
||||
'<div class="lg-prev lg-icon">' + this.s.prevHtml + '</div>' +
|
||||
'<div class="lg-next lg-icon">' + this.s.nextHtml + '</div>' +
|
||||
'<button type="button" aria-label="Previous slide" class="lg-prev lg-icon">' + this.s.prevHtml + '</button>' +
|
||||
'<button type="button" aria-label="Next slide" class="lg-next lg-icon">' + this.s.nextHtml + '</button>' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
if (this.s.appendSubHtmlTo === '.lg-sub-html') {
|
||||
subHtmlCont = '<div class="lg-sub-html"></div>';
|
||||
subHtmlCont = '<div role="status" aria-live="polite" class="lg-sub-html"></div>';
|
||||
}
|
||||
|
||||
template = '<div class="lg-outer ' + this.s.addClass + ' ' + this.s.startClass + '">' +
|
||||
var ariaLabelledby = this.s.ariaLabelledby ?
|
||||
'aria-labelledby="' + this.s.ariaLabelledby + '"' : '';
|
||||
var ariaDescribedby = this.s.ariaDescribedby ?
|
||||
'aria-describedby="' + this.s.ariaDescribedby + '"' : '';
|
||||
|
||||
template = '<div tabindex="-1" aria-modal="true" ' + ariaLabelledby + ' ' + ariaDescribedby + ' role="dialog" class="lg-outer ' + this.s.addClass + ' ' + this.s.startClass + '">' +
|
||||
'<div class="lg" style="width:' + this.s.width + '; height:' + this.s.height + '">' +
|
||||
'<div class="lg-inner">' + list + '</div>' +
|
||||
'<div class="lg-toolbar group">' +
|
||||
'<span class="lg-close lg-icon"></span>' +
|
||||
'<div class="lg-toolbar lg-group">' +
|
||||
'<button type="button" aria-label="Close gallery" class="lg-close lg-icon"></button>' +
|
||||
'</div>' +
|
||||
controls +
|
||||
subHtmlCont +
|
||||
@@ -292,6 +335,7 @@
|
||||
|
||||
$('body').append(template);
|
||||
this.$outer = $('.lg-outer');
|
||||
this.$outer.focus();
|
||||
this.$slide = this.$outer.find('.lg-item');
|
||||
|
||||
if (this.s.useLeft) {
|
||||
@@ -340,14 +384,16 @@
|
||||
$inner.css('transition-duration', this.s.speed + 'ms');
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
$('.lg-backdrop').addClass('in');
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
_this.$outer.addClass('lg-visible');
|
||||
}, this.s.backdropDuration);
|
||||
|
||||
if (this.s.download) {
|
||||
this.$outer.find('.lg-toolbar').append('<a id="lg-download" target="_blank" download class="lg-download lg-icon"></a>');
|
||||
this.$outer.find('.lg-toolbar').append('<a id="lg-download" aria-label="Download" target="_blank" download class="lg-download lg-icon"></a>');
|
||||
}
|
||||
|
||||
// Store the current scroll top value to scroll back after closing the gallery..
|
||||
@@ -405,15 +451,21 @@
|
||||
html = this.$items.eq(index).attr('data-html');
|
||||
}
|
||||
|
||||
if (!src && html) {
|
||||
if (!src) {
|
||||
if (html) {
|
||||
return {
|
||||
html5: true
|
||||
};
|
||||
} else {
|
||||
console.error('lightGallery :- data-src is not provided on slide item ' + (index + 1) + '. Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i);
|
||||
var vimeo = src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i);
|
||||
var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i);
|
||||
var vimeo = src.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)/i);
|
||||
var dailymotion = src.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i);
|
||||
var vk = src.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);
|
||||
|
||||
if (youtube) {
|
||||
return {
|
||||
@@ -427,6 +479,10 @@
|
||||
return {
|
||||
dailymotion: dailymotion
|
||||
};
|
||||
} else if (vk) {
|
||||
return {
|
||||
vk: vk
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -436,7 +492,7 @@
|
||||
*/
|
||||
Plugin.prototype.counter = function() {
|
||||
if (this.s.counter) {
|
||||
$(this.s.appendCounterTo).append('<div id="lg-counter"><span id="lg-counter-current">' + (parseInt(this.index, 10) + 1) + '</span> / <span id="lg-counter-all">' + this.$items.length + '</span></div>');
|
||||
$(this.s.appendCounterTo).append('<div id="lg-counter" role="status" aria-live="polite"><span id="lg-counter-current">' + (parseInt(this.index, 10) + 1) + '</span> / <span id="lg-counter-all">' + this.$items.length + '</span></div>');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -447,6 +503,7 @@
|
||||
Plugin.prototype.addHtml = function(index) {
|
||||
var subHtml = null;
|
||||
var subHtmlUrl;
|
||||
var $currentEle;
|
||||
if (this.s.dynamic) {
|
||||
if (this.s.dynamicEl[index].subHtmlUrl) {
|
||||
subHtmlUrl = this.s.dynamicEl[index].subHtmlUrl;
|
||||
@@ -454,10 +511,14 @@
|
||||
subHtml = this.s.dynamicEl[index].subHtml;
|
||||
}
|
||||
} else {
|
||||
if (this.$items.eq(index).attr('data-sub-html-url')) {
|
||||
subHtmlUrl = this.$items.eq(index).attr('data-sub-html-url');
|
||||
$currentEle = this.$items.eq(index);
|
||||
if ($currentEle.attr('data-sub-html-url')) {
|
||||
subHtmlUrl = $currentEle.attr('data-sub-html-url');
|
||||
} else {
|
||||
subHtml = this.$items.eq(index).attr('data-sub-html');
|
||||
subHtml = $currentEle.attr('data-sub-html');
|
||||
if (this.s.getCaptionFromTitleOrAlt && !subHtml) {
|
||||
subHtml = $currentEle.attr('title') || $currentEle.find('img').first().attr('alt');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,9 +529,11 @@
|
||||
// if first letter starts with . or # get the html form the jQuery object
|
||||
var fL = subHtml.substring(0, 1);
|
||||
if (fL === '.' || fL === '#') {
|
||||
subHtml = $(subHtml).html();
|
||||
if (this.s.subHtmlSelectorRelative && !this.s.dynamic) {
|
||||
subHtml = $currentEle.find(subHtml).html();
|
||||
} else {
|
||||
subHtml = subHtml;
|
||||
subHtml = $(subHtml).html();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
subHtml = '';
|
||||
@@ -546,6 +609,7 @@
|
||||
var _srcset;
|
||||
var _sizes;
|
||||
var _html;
|
||||
var _alt;
|
||||
var getResponsiveSrc = function(srcItms) {
|
||||
var rsWidth = [];
|
||||
var rsSrc = [];
|
||||
@@ -579,6 +643,7 @@
|
||||
|
||||
_html = _this.s.dynamicEl[index].html;
|
||||
_src = _this.s.dynamicEl[index].src;
|
||||
_alt = _this.s.dynamicEl[index].alt;
|
||||
|
||||
if (_this.s.dynamicEl[index].responsive) {
|
||||
var srcDyItms = _this.s.dynamicEl[index].responsive.split(',');
|
||||
@@ -589,22 +654,23 @@
|
||||
_sizes = _this.s.dynamicEl[index].sizes;
|
||||
|
||||
} else {
|
||||
|
||||
if (_this.$items.eq(index).attr('data-poster')) {
|
||||
var $currentEle = _this.$items.eq(index);
|
||||
if ($currentEle.attr('data-poster')) {
|
||||
_hasPoster = true;
|
||||
_poster = _this.$items.eq(index).attr('data-poster');
|
||||
_poster = $currentEle.attr('data-poster');
|
||||
}
|
||||
|
||||
_html = _this.$items.eq(index).attr('data-html');
|
||||
_src = _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src');
|
||||
_html = $currentEle.attr('data-html');
|
||||
_src = $currentEle.attr('href') || $currentEle.attr('data-src');
|
||||
_alt = $currentEle.attr('title') || $currentEle.find('img').first().attr('alt');
|
||||
|
||||
if (_this.$items.eq(index).attr('data-responsive')) {
|
||||
var srcItms = _this.$items.eq(index).attr('data-responsive').split(',');
|
||||
if ($currentEle.attr('data-responsive')) {
|
||||
var srcItms = $currentEle.attr('data-responsive').split(',');
|
||||
getResponsiveSrc(srcItms);
|
||||
}
|
||||
|
||||
_srcset = _this.$items.eq(index).attr('data-srcset');
|
||||
_sizes = _this.$items.eq(index).attr('data-sizes');
|
||||
_srcset = $currentEle.attr('data-srcset');
|
||||
_sizes = $currentEle.attr('data-sizes');
|
||||
|
||||
}
|
||||
|
||||
@@ -624,7 +690,7 @@
|
||||
var _isVideo = _this.isVideo(_src, index);
|
||||
if (!_this.$slide.eq(index).hasClass('lg-loaded')) {
|
||||
if (iframe) {
|
||||
_this.$slide.eq(index).prepend('<div class="lg-video-cont" style="max-width:' + _this.s.iframeMaxWidth + '"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="' + _src + '" allowfullscreen="true"></iframe></div></div>');
|
||||
_this.$slide.eq(index).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:' + _this.s.iframeMaxWidth + '"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="' + _src + '" allowfullscreen="true"></iframe></div></div>');
|
||||
} else if (_hasPoster) {
|
||||
var videoClass = '';
|
||||
if (_isVideo && _isVideo.youtube) {
|
||||
@@ -641,7 +707,8 @@
|
||||
_this.$slide.eq(index).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>');
|
||||
_this.$el.trigger('hasVideo.lg', [index, _src, _html]);
|
||||
} else {
|
||||
_this.$slide.eq(index).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="' + _src + '" /></div>');
|
||||
_alt = _alt ? 'alt="' + _alt + '"' : '';
|
||||
_this.$slide.eq(index).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" ' + _alt + ' src="' + _src + '" /></div>');
|
||||
}
|
||||
|
||||
_this.$el.trigger('onAferAppendSlide.lg', [index]);
|
||||
@@ -653,12 +720,14 @@
|
||||
|
||||
if (_srcset) {
|
||||
_$img.attr('srcset', _srcset);
|
||||
if (this.s.supportLegacyBrowser) {
|
||||
try {
|
||||
picturefill({
|
||||
elements: [_$img[0]]
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('Make sure you have included Picturefill version 2');
|
||||
console.warn('lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -724,8 +793,9 @@
|
||||
* @param {Number} index - index of the slide
|
||||
* @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag
|
||||
* @param {Boolean} fromThumb - true if slide function called via thumbnail click
|
||||
* @param {String} direction - Direction of the slide(next/prev)
|
||||
*/
|
||||
Plugin.prototype.slide = function(index, fromTouch, fromThumb) {
|
||||
Plugin.prototype.slide = function(index, fromTouch, fromThumb, direction) {
|
||||
|
||||
var _prevIndex = this.$outer.find('.lg-current').index();
|
||||
var _this = this;
|
||||
@@ -738,8 +808,6 @@
|
||||
|
||||
var _length = this.$slide.length;
|
||||
var _time = _this.lGalleryOn ? this.s.speed : 0;
|
||||
var _next = false;
|
||||
var _prev = false;
|
||||
|
||||
if (!_this.lgBusy) {
|
||||
|
||||
@@ -764,7 +832,7 @@
|
||||
|
||||
_this.lgBusy = true;
|
||||
|
||||
clearTimeout(_this.hideBartimeout);
|
||||
clearTimeout(_this.hideBarTimeout);
|
||||
|
||||
// Add title if this.s.appendSubHtmlTo === lg-sub-html
|
||||
if (this.s.appendSubHtmlTo === '.lg-sub-html') {
|
||||
@@ -777,6 +845,14 @@
|
||||
|
||||
this.arrowDisable(index);
|
||||
|
||||
if (!direction) {
|
||||
if (index < _prevIndex) {
|
||||
direction = 'prev';
|
||||
} else if (index > _prevIndex) {
|
||||
direction = 'next';
|
||||
}
|
||||
}
|
||||
|
||||
if (!fromTouch) {
|
||||
|
||||
// remove all transitions
|
||||
@@ -784,26 +860,12 @@
|
||||
|
||||
this.$slide.removeClass('lg-prev-slide lg-next-slide');
|
||||
|
||||
if (index < _prevIndex) {
|
||||
_prev = true;
|
||||
if ((index === 0) && (_prevIndex === _length - 1) && !fromThumb) {
|
||||
_prev = false;
|
||||
_next = true;
|
||||
}
|
||||
} else if (index > _prevIndex) {
|
||||
_next = true;
|
||||
if ((index === _length - 1) && (_prevIndex === 0) && !fromThumb) {
|
||||
_prev = true;
|
||||
_next = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (_prev) {
|
||||
if (direction === 'prev') {
|
||||
|
||||
//prevslide
|
||||
this.$slide.eq(index).addClass('lg-prev-slide');
|
||||
this.$slide.eq(_prevIndex).addClass('lg-next-slide');
|
||||
} else if (_next) {
|
||||
} else {
|
||||
|
||||
// next slide
|
||||
this.$slide.eq(index).addClass('lg-next-slide');
|
||||
@@ -822,8 +884,12 @@
|
||||
}, 50);
|
||||
} else {
|
||||
|
||||
var touchPrev = index - 1;
|
||||
var touchNext = index + 1;
|
||||
this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide');
|
||||
var touchPrev;
|
||||
var touchNext;
|
||||
if (_length > 2) {
|
||||
touchPrev = index - 1;
|
||||
touchNext = index + 1;
|
||||
|
||||
if ((index === 0) && (_prevIndex === _length - 1)) {
|
||||
|
||||
@@ -837,9 +903,17 @@
|
||||
touchPrev = _length - 1;
|
||||
}
|
||||
|
||||
this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide');
|
||||
_this.$slide.eq(touchPrev).addClass('lg-prev-slide');
|
||||
} else {
|
||||
touchPrev = 0;
|
||||
touchNext = 1;
|
||||
}
|
||||
|
||||
if (direction === 'prev') {
|
||||
_this.$slide.eq(touchNext).addClass('lg-next-slide');
|
||||
} else {
|
||||
_this.$slide.eq(touchPrev).addClass('lg-prev-slide');
|
||||
}
|
||||
|
||||
_this.$slide.eq(index).addClass('lg-current');
|
||||
}
|
||||
|
||||
@@ -867,6 +941,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
_this.index = index;
|
||||
|
||||
};
|
||||
|
||||
@@ -876,17 +951,22 @@
|
||||
*/
|
||||
Plugin.prototype.goToNextSlide = function(fromTouch) {
|
||||
var _this = this;
|
||||
var _loop = _this.s.loop;
|
||||
if (fromTouch && _this.$slide.length < 3) {
|
||||
_loop = false;
|
||||
}
|
||||
|
||||
if (!_this.lgBusy) {
|
||||
if ((_this.index + 1) < _this.$slide.length) {
|
||||
_this.index++;
|
||||
_this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
|
||||
_this.slide(_this.index, fromTouch, false);
|
||||
_this.slide(_this.index, fromTouch, false, 'next');
|
||||
} else {
|
||||
if (_this.s.loop) {
|
||||
if (_loop) {
|
||||
_this.index = 0;
|
||||
_this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
|
||||
_this.slide(_this.index, fromTouch, false);
|
||||
} else if (_this.s.slideEndAnimatoin) {
|
||||
_this.slide(_this.index, fromTouch, false, 'next');
|
||||
} else if (_this.s.slideEndAnimatoin && !fromTouch) {
|
||||
_this.$outer.addClass('lg-right-end');
|
||||
setTimeout(function() {
|
||||
_this.$outer.removeClass('lg-right-end');
|
||||
@@ -902,17 +982,22 @@
|
||||
*/
|
||||
Plugin.prototype.goToPrevSlide = function(fromTouch) {
|
||||
var _this = this;
|
||||
var _loop = _this.s.loop;
|
||||
if (fromTouch && _this.$slide.length < 3) {
|
||||
_loop = false;
|
||||
}
|
||||
|
||||
if (!_this.lgBusy) {
|
||||
if (_this.index > 0) {
|
||||
_this.index--;
|
||||
_this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
|
||||
_this.slide(_this.index, fromTouch, false);
|
||||
_this.slide(_this.index, fromTouch, false, 'prev');
|
||||
} else {
|
||||
if (_this.s.loop) {
|
||||
if (_loop) {
|
||||
_this.index = _this.$items.length - 1;
|
||||
_this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
|
||||
_this.slide(_this.index, fromTouch, false);
|
||||
} else if (_this.s.slideEndAnimatoin) {
|
||||
_this.slide(_this.index, fromTouch, false, 'prev');
|
||||
} else if (_this.s.slideEndAnimatoin && !fromTouch) {
|
||||
_this.$outer.addClass('lg-left-end');
|
||||
setTimeout(function() {
|
||||
_this.$outer.removeClass('lg-left-end');
|
||||
@@ -1050,7 +1135,7 @@
|
||||
var endCoords = 0;
|
||||
var isMoved = false;
|
||||
|
||||
if (_this.s.enableSwipe && _this.isTouch && _this.doCss()) {
|
||||
if (_this.s.enableSwipe && _this.doCss()) {
|
||||
|
||||
_this.$slide.on('touchstart.lg', function(e) {
|
||||
if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy) {
|
||||
@@ -1089,14 +1174,10 @@
|
||||
var endCoords = 0;
|
||||
var isDraging = false;
|
||||
var isMoved = false;
|
||||
if (_this.s.enableDrag && !_this.isTouch && _this.doCss()) {
|
||||
if (_this.s.enableDrag && _this.doCss()) {
|
||||
_this.$slide.on('mousedown.lg', function(e) {
|
||||
// execute only on .lg-object
|
||||
if (!_this.$outer.hasClass('lg-zoomed')) {
|
||||
if ($(e.target).hasClass('lg-object') || $(e.target).hasClass('lg-video-play')) {
|
||||
if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy && !$(e.target).text().trim()) {
|
||||
e.preventDefault();
|
||||
|
||||
if (!_this.lgBusy) {
|
||||
_this.manageSwipeClass();
|
||||
startCoords = e.pageX;
|
||||
isDraging = true;
|
||||
@@ -1111,9 +1192,6 @@
|
||||
|
||||
_this.$el.trigger('onDragstart.lg');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(window).on('mousemove.lg', function(e) {
|
||||
@@ -1145,23 +1223,22 @@
|
||||
};
|
||||
|
||||
Plugin.prototype.manageSwipeClass = function() {
|
||||
var touchNext = this.index + 1;
|
||||
var touchPrev = this.index - 1;
|
||||
var length = this.$slide.length;
|
||||
if (this.s.loop) {
|
||||
var _touchNext = this.index + 1;
|
||||
var _touchPrev = this.index - 1;
|
||||
if (this.s.loop && this.$slide.length > 2) {
|
||||
if (this.index === 0) {
|
||||
touchPrev = length - 1;
|
||||
} else if (this.index === length - 1) {
|
||||
touchNext = 0;
|
||||
_touchPrev = this.$slide.length - 1;
|
||||
} else if (this.index === this.$slide.length - 1) {
|
||||
_touchNext = 0;
|
||||
}
|
||||
}
|
||||
|
||||
this.$slide.removeClass('lg-next-slide lg-prev-slide');
|
||||
if (touchPrev > -1) {
|
||||
this.$slide.eq(touchPrev).addClass('lg-prev-slide');
|
||||
if (_touchPrev > -1) {
|
||||
this.$slide.eq(_touchPrev).addClass('lg-prev-slide');
|
||||
}
|
||||
|
||||
this.$slide.eq(touchNext).addClass('lg-next-slide');
|
||||
this.$slide.eq(_touchNext).addClass('lg-next-slide');
|
||||
};
|
||||
|
||||
Plugin.prototype.mousewheel = function() {
|
||||
@@ -1205,6 +1282,10 @@
|
||||
|
||||
});
|
||||
|
||||
_this.$outer.on('mousemove.lg', function() {
|
||||
mousedown = false;
|
||||
});
|
||||
|
||||
_this.$outer.on('mouseup.lg', function(e) {
|
||||
|
||||
if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap') && mousedown) {
|
||||
@@ -1225,9 +1306,9 @@
|
||||
|
||||
if (!d) {
|
||||
_this.$el.trigger('onBeforeClose.lg');
|
||||
$(window).scrollTop(_this.prevScrollTop);
|
||||
}
|
||||
|
||||
$(window).scrollTop(_this.prevScrollTop);
|
||||
|
||||
/**
|
||||
* if d is false or undefined destroy will only close the gallery
|
||||
@@ -1248,7 +1329,7 @@
|
||||
// Unbind all events added by lightGallery
|
||||
this.$el.off('.lg.tm');
|
||||
|
||||
// Distroy all lightGallery modules
|
||||
// destroy all lightGallery modules
|
||||
$.each($.fn.lightGallery.modules, function(key) {
|
||||
if (_this.modules[key]) {
|
||||
_this.modules[key].destroy();
|
||||
@@ -1257,8 +1338,8 @@
|
||||
|
||||
this.lGalleryOn = false;
|
||||
|
||||
clearTimeout(_this.hideBartimeout);
|
||||
this.hideBartimeout = false;
|
||||
clearTimeout(_this.hideBarTimeout);
|
||||
this.hideBarTimeout = false;
|
||||
$(window).off('.lg');
|
||||
$('body').removeClass('lg-on lg-from-hash');
|
||||
|
||||
@@ -1278,6 +1359,7 @@
|
||||
if (!d) {
|
||||
_this.$el.trigger('onCloseAfter.lg');
|
||||
}
|
||||
_this.$el.focus();
|
||||
|
||||
}, _this.s.backdropDuration + 50);
|
||||
};
|
||||
@@ -1290,7 +1372,7 @@
|
||||
try {
|
||||
$(this).data('lightGallery').init();
|
||||
} catch (err) {
|
||||
console.error('lightGallery has not initiated properly');
|
||||
console.error('lightGallery has not initiated properly', err);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1298,4 +1380,7 @@
|
||||
|
||||
$.fn.lightGallery.modules = {};
|
||||
|
||||
})(jQuery, window, document);
|
||||
})();
|
||||
|
||||
|
||||
}));
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user