j1-template 2021.1.4 → 2021.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/layout_metadata_generator.html +4 -4
  3. data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +7 -15
  4. data/_includes/themes/j1/modules/connectors/ads +18 -7
  5. data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +7 -3
  6. data/_includes/themes/j1/modules/connectors/analytics +17 -3
  7. data/_includes/themes/j1/modules/connectors/comments +22 -8
  8. data/_includes/themes/j1/modules/connectors/translator +20 -6
  9. data/_includes/themes/j1/modules/navigator/generator.html +2 -2
  10. data/_includes/themes/j1/procedures/global/select_location.proc +3 -3
  11. data/_layouts/default.html +4 -7
  12. data/assets/data/cookieconsent.html +249 -0
  13. data/assets/data/quicklinks.html +18 -16
  14. data/assets/data/themes.json +6 -6
  15. data/assets/error_pages/HTTP204.html +30 -10
  16. data/assets/error_pages/HTTP400.html +29 -8
  17. data/assets/error_pages/HTTP401.html +29 -9
  18. data/assets/error_pages/HTTP403.html +29 -8
  19. data/assets/error_pages/HTTP404.html +29 -8
  20. data/assets/error_pages/HTTP500.html +29 -8
  21. data/assets/error_pages/HTTP501.html +29 -8
  22. data/assets/error_pages/HTTP502.html +29 -8
  23. data/assets/error_pages/HTTP503.html +30 -8
  24. data/assets/themes/j1/adapter/js/cookieConsent.js +290 -0
  25. data/assets/themes/j1/adapter/js/fam.js +2 -1
  26. data/assets/themes/j1/adapter/js/j1.js +154 -153
  27. data/assets/themes/j1/adapter/js/navigator.js +157 -200
  28. data/assets/themes/j1/adapter/js/themer.1.js +326 -0
  29. data/assets/themes/j1/adapter/js/themer.js +41 -57
  30. data/assets/themes/j1/adapter/js/toccer.js +4 -45
  31. data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +2 -2
  32. data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +1 -1
  33. data/assets/themes/j1/core/js/template.js +3 -9
  34. data/assets/themes/j1/core/js/template.js.map +1 -1
  35. data/assets/themes/j1/core/js/template.min.js +3 -9
  36. data/assets/themes/j1/core/js/template.min.js.map +1 -1
  37. data/assets/themes/j1/modules/cookieConsent/LICENSE +21 -0
  38. data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +301 -0
  39. data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js +301 -0
  40. data/assets/themes/j1/modules/fam/css/{uno → theme/uno}/fam.css +0 -0
  41. data/assets/themes/j1/modules/fam/css/theme/uno/fam.min.css +15 -0
  42. data/assets/themes/j1/modules/fam/js/fam.js +1 -6
  43. data/assets/themes/j1/modules/iframeResizer/examples/frame.absolute.html +4 -2
  44. data/assets/themes/j1/modules/iframeResizer/examples/frame.content.html +4 -3
  45. data/assets/themes/j1/modules/iframeResizer/examples/frame.hover.html +4 -2
  46. data/assets/themes/j1/modules/iframeResizer/examples/frame.nested.html +4 -2
  47. data/assets/themes/j1/modules/iframeResizer/examples/frame.textarea.html +4 -2
  48. data/assets/themes/j1/modules/iframeResizer/examples/frame.tolerance.html +4 -2
  49. data/assets/themes/j1/modules/iframeResizer/examples/index.html +2 -0
  50. data/assets/themes/j1/modules/iframeResizer/examples/two.html +4 -2
  51. data/assets/themes/j1/modules/mmenuLight/css/{mmenu.css → mmenu-light.css} +0 -0
  52. data/assets/themes/j1/modules/mmenuLight/css/{mmenu.min.css → mmenu-light.min.css} +0 -0
  53. data/assets/themes/j1/modules/mmenuLight/css/theme/{uno.css → uno/mmenu.css} +0 -0
  54. data/assets/themes/j1/modules/mmenuLight/css/theme/{uno.min.css → uno/mmenu.min.css} +0 -0
  55. data/assets/themes/j1/modules/rtable/css/theme/{uno.css → uno/rtable.css} +0 -0
  56. data/assets/themes/j1/modules/rtable/css/theme/{uno.min.css → uno/rtable.min.css} +0 -0
  57. data/assets/themes/j1/modules/themeSwitcher/js/switcher.js +34 -49
  58. data/assets/themes/j1/modules/themeSwitcher/js/switcher.min.js +410 -2
  59. data/assets/themes/j1/modules/util/js/domready.js +146 -0
  60. data/assets/themes/j1/modules/util/js/gtag-opt-in.js +1 -0
  61. data/lib/j1/version.rb +3 -3
  62. data/lib/j1_app/j1_auth_manager/auth_manager.rb +2 -3
  63. data/lib/starter_web/Gemfile +1 -1
  64. data/lib/starter_web/_config.yml +19 -10
  65. data/lib/starter_web/_data/_defaults/resources.yml +11 -8
  66. data/lib/starter_web/_data/j1_config.yml +21 -18
  67. data/lib/starter_web/_data/modules/{cookiebar.yml → cookieconsent.yml} +5 -4
  68. data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +136 -0
  69. data/lib/starter_web/_data/modules/defaults/themer.yml +2 -1
  70. data/lib/starter_web/_data/pages/builder.yml +7 -7
  71. data/lib/starter_web/_data/private.default.yml +119 -0
  72. data/lib/starter_web/_data/private.yml +6 -6
  73. data/lib/starter_web/_data/resources.yml +15 -14
  74. data/lib/starter_web/_includes/attributes.asciidoc +10 -1
  75. data/lib/starter_web/_plugins/lunr_index.rb +1 -1
  76. data/lib/starter_web/assets/images/modules/attics/{cookies-1920x1200-bw.jpg → cookies-1920x1200.jpg} +0 -0
  77. data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.jpg +0 -0
  78. data/lib/starter_web/collections/posts/public/featured/_posts/2020-01-01-about-cookies.adoc +2 -2
  79. data/lib/starter_web/dot.gitignore +1 -1
  80. data/lib/starter_web/index.html +3 -3
  81. data/lib/starter_web/package.json +2 -2
  82. data/lib/starter_web/pages/public/blog/navigator/archive.html +5 -3
  83. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +3 -2
  84. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +6 -4
  85. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +23 -5
  86. data/lib/starter_web/pages/public/cookieConsent.adoc +93 -0
  87. data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +2 -1
  88. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +111 -213
  89. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  90. data/lib/starter_web/utilsrv/package.json +1 -1
  91. metadata +24 -76
  92. data/_includes/themes/j1/modules/navigator/generator.org.html +0 -232
  93. data/assets/data/cookiebar.html +0 -288
  94. data/assets/data/footer.new.1.html +0 -256
  95. data/assets/data/footer.new.2.html +0 -256
  96. data/assets/data/footer.org.html +0 -249
  97. data/assets/error_pages/HTTP520.html +0 -68
  98. data/assets/error_pages/HTTP521.html +0 -68
  99. data/assets/error_pages/HTTP533.html +0 -68
  100. data/assets/themes/j1/adapter/js/cookiebar.js +0 -212
  101. data/assets/themes/j1/adapter/js/j1.new.js +0 -1878
  102. data/assets/themes/j1/adapter/js/j1.org.js +0 -1874
  103. data/assets/themes/j1/modules/_lightGallery/css/core/lg-fb-comment-box.css +0 -58
  104. data/assets/themes/j1/modules/_lightGallery/css/core/lg-fb-comment-box.min.css +0 -5
  105. data/assets/themes/j1/modules/_lightGallery/css/core/lg-transitions.css +0 -778
  106. data/assets/themes/j1/modules/_lightGallery/css/core/lg-transitions.min.css +0 -5
  107. data/assets/themes/j1/modules/_lightGallery/css/core/lightgallery.css +0 -981
  108. data/assets/themes/j1/modules/_lightGallery/css/core/lightgallery.min.css +0 -5
  109. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.eot +0 -0
  110. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.svg +0 -47
  111. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.ttf +0 -0
  112. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.woff +0 -0
  113. data/assets/themes/j1/modules/_lightGallery/css/img/loading.gif +0 -0
  114. data/assets/themes/j1/modules/_lightGallery/css/img/video-play.png +0 -0
  115. data/assets/themes/j1/modules/_lightGallery/css/img/vimeo-play.png +0 -0
  116. data/assets/themes/j1/modules/_lightGallery/css/img/youtube-play.png +0 -0
  117. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/animation-w.png +0 -0
  118. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/customize-w.png +0 -0
  119. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/dynamic-w.png +0 -0
  120. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/facebook-icon.svg +0 -10
  121. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/googleplus-icon.svg +0 -30
  122. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/html5-w.png +0 -0
  123. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/linked-in.png +0 -0
  124. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/module-w.png +0 -0
  125. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/play-button.png +0 -0
  126. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/responsive-w.png +0 -0
  127. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/thumb-w.png +0 -0
  128. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/touch-w.png +0 -0
  129. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/twitter-icon.svg +0 -15
  130. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/twitter.png +0 -0
  131. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/video1-w.png +0 -0
  132. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/zoom-w.png +0 -0
  133. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/zoom.png +0 -0
  134. data/assets/themes/j1/modules/_lightGallery/css/themes/uno.css +0 -262
  135. data/assets/themes/j1/modules/_lightGallery/css/themes/uno.min.css +0 -15
  136. data/assets/themes/j1/modules/_lightGallery/js/core/lightgallery.js +0 -1362
  137. data/assets/themes/j1/modules/_lightGallery/js/core/lightgallery.min.js +0 -4
  138. data/assets/themes/j1/modules/_lightGallery/js/modules/j1/j1-video.js +0 -402
  139. data/assets/themes/j1/modules/_lightGallery/js/modules/j1/j1-video.min.js +0 -8
  140. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-autoplay.js +0 -206
  141. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-autoplay.min.js +0 -5
  142. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-fullscreen.js +0 -126
  143. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-fullscreen.min.js +0 -5
  144. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-hash.js +0 -101
  145. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-hash.min.js +0 -5
  146. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-pager.js +0 -105
  147. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-pager.min.js +0 -5
  148. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-share.js +0 -107
  149. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-share.min.js +0 -5
  150. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-thumbnail.js +0 -478
  151. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-thumbnail.min.js +0 -5
  152. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-video.js +0 -342
  153. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-video.min.js +0 -5
  154. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-zoom.js +0 -527
  155. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-zoom.min.js +0 -5
  156. data/lib/starter_web/_data/modules/defaults/cookiebar.yml +0 -133
@@ -1,4 +0,0 @@
1
- /*! lightgallery - v1.6.12 - 2019-02-19
2
- * http://sachinchoolur.github.io/lightGallery/
3
- * Copyright (c) 2019 Sachin N; Licensed GPLv3 */
4
- (function(a,b){if(typeof define==="function"&&define.amd){define(["jquery"],function(c){return(b(c))})}else{if(typeof module==="object"&&module.exports){module.exports=b(require("jquery"))}else{b(a.jQuery)}}}(this,function(a){(function(){var c={mode:"lg-slide",cssEasing:"ease",easing:"linear",speed:600,height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:150,hideBarsDelay:6000,useLeft:false,closable:true,loop:true,escKey:true,keyPress:true,controls:true,slideEndAnimatoin:true,hideControlOnEnd:false,mousewheel:true,getCaptionFromTitleOrAlt:true,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:false,preload:1,showAfterLoad:true,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:false,iframeMaxWidth:"100%",download:true,counter:true,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:true,enableDrag:true,dynamic:false,dynamicEl:[],galleryId:1};function b(e,d){this.el=e;this.$el=a(e);this.s=a.extend({},c,d);if(this.s.dynamic&&this.s.dynamicEl!=="undefined"&&this.s.dynamicEl.constructor===Array&&!this.s.dynamicEl.length){throw ("When using dynamic mode, you must also define dynamicEl as an Array.")}this.modules={};this.lGalleryOn=false;this.lgBusy=false;this.hideBartimeout=false;this.isTouch=("ontouchstart" in document.documentElement);if(this.s.slideEndAnimatoin){this.s.hideControlOnEnd=false}if(this.s.dynamic){this.$items=this.s.dynamicEl}else{if(this.s.selector==="this"){this.$items=this.$el}else{if(this.s.selector!==""){if(this.s.selectWithin){this.$items=a(this.s.selectWithin).find(this.s.selector)}else{this.$items=this.$el.find(a(this.s.selector))}}else{this.$items=this.$el.children()}}}this.$slide="";this.$outer="";this.init();return this}b.prototype.init=function(){var e=this;if(e.s.preload>e.$items.length){e.s.preload=e.$items.length}var d=window.location.hash;if(d.indexOf("lg="+this.s.galleryId)>0){e.index=parseInt(d.split("&slide=")[1],10);a("body").addClass("lg-from-hash");if(!a("body").hasClass("lg-on")){setTimeout(function(){e.build(e.index)});a("body").addClass("lg-on")}}if(e.s.dynamic){e.$el.trigger("onBeforeOpen.lg");e.index=e.s.index||0;if(!a("body").hasClass("lg-on")){setTimeout(function(){e.build(e.index);a("body").addClass("lg-on")})}}else{e.$items.on("click.lgcustom",function(f){try{f.preventDefault();f.preventDefault()}catch(g){f.returnValue=false}e.$el.trigger("onBeforeOpen.lg");e.index=e.s.index||e.$items.index(this);if(!a("body").hasClass("lg-on")){e.build(e.index);a("body").addClass("lg-on")}})}};b.prototype.build=function(d){var e=this;e.structure();a.each(a.fn.lightGallery.modules,function(f){e.modules[f]=new a.fn.lightGallery.modules[f](e.el)});e.slide(d,false,false,false);if(e.s.keyPress){e.keyPress()}if(e.$items.length>1){e.arrow();setTimeout(function(){e.enableDrag();e.enableSwipe()},50);if(e.s.mousewheel){e.mousewheel()}}else{e.$slide.on("click.lg",function(){e.$el.trigger("onSlideClick.lg")})}e.counter();e.closeGallery();e.$el.trigger("onAfterOpen.lg");e.$outer.on("mousemove.lg click.lg touchstart.lg",function(){e.$outer.removeClass("lg-hide-items");clearTimeout(e.hideBartimeout);e.hideBartimeout=setTimeout(function(){e.$outer.addClass("lg-hide-items")},e.s.hideBarsDelay)});e.$outer.trigger("mousemove.lg")};b.prototype.structure=function(){var h="";var d="";var e=0;var g="";var f;var k=this;a("body").append('<div class="lg-backdrop"></div>');a(".lg-backdrop").css("transition-duration",this.s.backdropDuration+"ms");for(e=0;e<this.$items.length;e++){h+='<div class="lg-item"></div>'}if(this.s.controls&&this.$items.length>1){d='<div class="lg-actions"><button class="lg-prev lg-icon">'+this.s.prevHtml+'</button><button class="lg-next lg-icon">'+this.s.nextHtml+"</button></div>"}if(this.s.appendSubHtmlTo===".lg-sub-html"){g='<div class="lg-sub-html"></div>'}f='<div 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">'+h+'</div><div class="lg-toolbar lg-group"><span class="lg-close lg-icon"></span></div>'+d+g+"</div></div>";a("body").append(f);this.$outer=a(".lg-outer");this.$slide=this.$outer.find(".lg-item");if(this.s.useLeft){this.$outer.addClass("lg-use-left");this.s.mode="lg-slide"}else{this.$outer.addClass("lg-use-css3")}k.setTop();a(window).on("resize.lg orientationchange.lg",function(){setTimeout(function(){k.setTop()},100)});this.$slide.eq(this.index).addClass("lg-current");if(this.doCss()){this.$outer.addClass("lg-css3")}else{this.$outer.addClass("lg-css");this.s.speed=0}this.$outer.addClass(this.s.mode);if(this.s.enableDrag&&this.$items.length>1){this.$outer.addClass("lg-grab")}if(this.s.showAfterLoad){this.$outer.addClass("lg-show-after-load")}if(this.doCss()){var j=this.$outer.find(".lg-inner");j.css("transition-timing-function",this.s.cssEasing);j.css("transition-duration",this.s.speed+"ms")}setTimeout(function(){a(".lg-backdrop").addClass("in")});setTimeout(function(){k.$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.prevScrollTop=a(window).scrollTop()};b.prototype.setTop=function(){if(this.s.height!=="100%"){var d=a(window).height();var f=(d-parseInt(this.s.height,10))/2;var e=this.$outer.find(".lg");if(d>=parseInt(this.s.height,10)){e.css("top",f+"px")}else{e.css("top","0px")}}};b.prototype.doCss=function(){var d=function(){var g=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"];var e=document.documentElement;var f=0;for(f=0;f<g.length;f++){if(g[f] in e.style){return true}}};if(d()){return true}return false};b.prototype.isVideo=function(j,e){var g;if(this.s.dynamic){g=this.s.dynamicEl[e].html}else{g=this.$items.eq(e).attr("data-html")}if(!j){if(g){return{html5:true}}else{console.error("lightGallery :- data-src is not pvovided on slide item "+(e+1)+". Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html");return false}}var f=j.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i);var d=j.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i);var h=j.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i);var i=j.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);if(f){return{youtube:f}}else{if(d){return{vimeo:d}}else{if(h){return{dailymotion:h}}else{if(i){return{vk:i}}}}}};b.prototype.counter=function(){if(this.s.counter){a(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>")}};b.prototype.addHtml=function(e){var g=null;var h;var d;if(this.s.dynamic){if(this.s.dynamicEl[e].subHtmlUrl){h=this.s.dynamicEl[e].subHtmlUrl}else{g=this.s.dynamicEl[e].subHtml}}else{d=this.$items.eq(e);if(d.attr("data-sub-html-url")){h=d.attr("data-sub-html-url")}else{g=d.attr("data-sub-html");if(this.s.getCaptionFromTitleOrAlt&&!g){g=d.attr("title")||d.find("img").first().attr("alt")}}}if(!h){if(typeof g!=="undefined"&&g!==null){var f=g.substring(0,1);if(f==="."||f==="#"){if(this.s.subHtmlSelectorRelative&&!this.s.dynamic){g=d.find(g).html()}else{g=a(g).html()}}}else{g=""}}if(this.s.appendSubHtmlTo===".lg-sub-html"){if(h){this.$outer.find(this.s.appendSubHtmlTo).load(h)}else{this.$outer.find(this.s.appendSubHtmlTo).html(g)}}else{if(h){this.$slide.eq(e).load(h)}else{this.$slide.eq(e).append(g)}}if(typeof g!=="undefined"&&g!==null){if(g===""){this.$outer.find(this.s.appendSubHtmlTo).addClass("lg-empty-html")}else{this.$outer.find(this.s.appendSubHtmlTo).removeClass("lg-empty-html")}}this.$el.trigger("onAfterAppendSubHtml.lg",[e])};b.prototype.preload=function(e){var f=1;var d=1;for(f=1;f<=this.s.preload;f++){if(f>=this.$items.length-e){break}this.loadContent(e+f,false,0)}for(d=1;d<=this.s.preload;d++){if(e-d<0){break}this.loadContent(e-d,false,0)}};b.prototype.loadContent=function(h,i,u){var o=this;var q=false;var v;var l;var t;var g;var n;var f;var m=function(A){var e=[];var x=[];for(var z=0;z<A.length;z++){var B=A[z].split(" ");if(B[0]===""){B.splice(0,1)}x.push(B[0]);e.push(B[1])}var y=a(window).width();for(var w=0;w<e.length;w++){if(parseInt(e[w],10)>y){l=x[w];break}}};if(o.s.dynamic){if(o.s.dynamicEl[h].poster){q=true;t=o.s.dynamicEl[h].poster}f=o.s.dynamicEl[h].html;l=o.s.dynamicEl[h].src;if(o.s.dynamicEl[h].responsive){var s=o.s.dynamicEl[h].responsive.split(",");m(s)}g=o.s.dynamicEl[h].srcset;n=o.s.dynamicEl[h].sizes}else{if(o.$items.eq(h).attr("data-poster")){q=true;t=o.$items.eq(h).attr("data-poster")}f=o.$items.eq(h).attr("data-html");l=o.$items.eq(h).attr("href")||o.$items.eq(h).attr("data-src");if(o.$items.eq(h).attr("data-responsive")){var j=o.$items.eq(h).attr("data-responsive").split(",");m(j)}g=o.$items.eq(h).attr("data-srcset");n=o.$items.eq(h).attr("data-sizes")}var k=false;if(o.s.dynamic){if(o.s.dynamicEl[h].iframe){k=true}}else{if(o.$items.eq(h).attr("data-iframe")==="true"){k=true}}var p=o.isVideo(l,h);if(!o.$slide.eq(h).hasClass("lg-loaded")){if(k){o.$slide.eq(h).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:'+o.s.iframeMaxWidth+'"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="'+l+'" allowfullscreen="true"></iframe></div></div>')}else{if(q){var d="";if(p&&p.youtube){d="lg-has-youtube"}else{if(p&&p.vimeo){d="lg-has-vimeo"}else{d="lg-has-html5"}}o.$slide.eq(h).prepend('<div class="lg-video-cont '+d+' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="'+t+'" /></div></div>')}else{if(p){o.$slide.eq(h).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>');o.$el.trigger("hasVideo.lg",[h,l,f])}else{o.$slide.eq(h).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="'+l+'" /></div>')}}}o.$el.trigger("onAferAppendSlide.lg",[h]);v=o.$slide.eq(h).find(".lg-object");if(n){v.attr("sizes",n)}if(g){v.attr("srcset",g);try{picturefill({elements:[v[0]]})}catch(r){console.warn("lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.")}}if(this.s.appendSubHtmlTo!==".lg-sub-html"){o.addHtml(h)}o.$slide.eq(h).addClass("lg-loaded")}o.$slide.eq(h).find(".lg-object").on("load.lg error.lg",function(){var e=0;if(u&&!a("body").hasClass("lg-from-hash")){e=u}setTimeout(function(){o.$slide.eq(h).addClass("lg-complete");o.$el.trigger("onSlideItemLoad.lg",[h,u||0])},e)});if(p&&p.html5&&!q){o.$slide.eq(h).addClass("lg-complete")}if(i===true){if(!o.$slide.eq(h).hasClass("lg-complete")){o.$slide.eq(h).find(".lg-object").on("load.lg error.lg",function(){o.preload(h)})}else{o.preload(h)}}};b.prototype.slide=function(h,j,e,l){var f=this.$outer.find(".lg-current").index();var g=this;if(g.lGalleryOn&&(f===h)){return}var i=this.$slide.length;var n=g.lGalleryOn?this.s.speed:0;if(!g.lgBusy){if(this.s.download){var d;if(g.s.dynamic){d=g.s.dynamicEl[h].downloadUrl!==false&&(g.s.dynamicEl[h].downloadUrl||g.s.dynamicEl[h].src)}else{d=g.$items.eq(h).attr("data-download-url")!=="false"&&(g.$items.eq(h).attr("data-download-url")||g.$items.eq(h).attr("href")||g.$items.eq(h).attr("data-src"))}if(d){a("#lg-download").attr("href",d);g.$outer.removeClass("lg-hide-download")}else{g.$outer.addClass("lg-hide-download")}}this.$el.trigger("onBeforeSlide.lg",[f,h,j,e]);g.lgBusy=true;clearTimeout(g.hideBartimeout);if(this.s.appendSubHtmlTo===".lg-sub-html"){setTimeout(function(){g.addHtml(h)},n)}this.arrowDisable(h);if(!l){if(h<f){l="prev"}else{if(h>f){l="next"}}}if(!j){g.$outer.addClass("lg-no-trans");this.$slide.removeClass("lg-prev-slide lg-next-slide");if(l==="prev"){this.$slide.eq(h).addClass("lg-prev-slide");this.$slide.eq(f).addClass("lg-next-slide")}else{this.$slide.eq(h).addClass("lg-next-slide");this.$slide.eq(f).addClass("lg-prev-slide")}setTimeout(function(){g.$slide.removeClass("lg-current");g.$slide.eq(h).addClass("lg-current");g.$outer.removeClass("lg-no-trans")},50)}else{this.$slide.removeClass("lg-prev-slide lg-current lg-next-slide");var k;var m;if(i>2){k=h-1;m=h+1;if((h===0)&&(f===i-1)){m=0;k=i-1}else{if((h===i-1)&&(f===0)){m=0;k=i-1}}}else{k=0;m=1}if(l==="prev"){g.$slide.eq(m).addClass("lg-next-slide")}else{g.$slide.eq(k).addClass("lg-prev-slide")}g.$slide.eq(h).addClass("lg-current")}if(g.lGalleryOn){setTimeout(function(){g.loadContent(h,true,0)},this.s.speed+50);setTimeout(function(){g.lgBusy=false;g.$el.trigger("onAfterSlide.lg",[f,h,j,e])},this.s.speed)}else{g.loadContent(h,true,g.s.backdropDuration);g.lgBusy=false;g.$el.trigger("onAfterSlide.lg",[f,h,j,e])}g.lGalleryOn=true;if(this.s.counter){a("#lg-counter-current").text(h+1)}}g.index=h};b.prototype.goToNextSlide=function(d){var f=this;var e=f.s.loop;if(d&&f.$slide.length<3){e=false}if(!f.lgBusy){if((f.index+1)<f.$slide.length){f.index++;f.$el.trigger("onBeforeNextSlide.lg",[f.index]);f.slide(f.index,d,false,"next")}else{if(e){f.index=0;f.$el.trigger("onBeforeNextSlide.lg",[f.index]);f.slide(f.index,d,false,"next")}else{if(f.s.slideEndAnimatoin&&!d){f.$outer.addClass("lg-right-end");setTimeout(function(){f.$outer.removeClass("lg-right-end")},400)}}}}};b.prototype.goToPrevSlide=function(d){var f=this;var e=f.s.loop;if(d&&f.$slide.length<3){e=false}if(!f.lgBusy){if(f.index>0){f.index--;f.$el.trigger("onBeforePrevSlide.lg",[f.index,d]);f.slide(f.index,d,false,"prev")}else{if(e){f.index=f.$items.length-1;f.$el.trigger("onBeforePrevSlide.lg",[f.index,d]);f.slide(f.index,d,false,"prev")}else{if(f.s.slideEndAnimatoin&&!d){f.$outer.addClass("lg-left-end");setTimeout(function(){f.$outer.removeClass("lg-left-end")},400)}}}}};b.prototype.keyPress=function(){var d=this;if(this.$items.length>1){a(window).on("keyup.lg",function(f){if(d.$items.length>1){if(f.keyCode===37){f.preventDefault();d.goToPrevSlide()}if(f.keyCode===39){f.preventDefault();d.goToNextSlide()}}})}a(window).on("keydown.lg",function(f){if(d.s.escKey===true&&f.keyCode===27){f.preventDefault();if(!d.$outer.hasClass("lg-thumb-open")){d.destroy()}else{d.$outer.removeClass("lg-thumb-open")}}})};b.prototype.arrow=function(){var d=this;this.$outer.find(".lg-prev").on("click.lg",function(){d.goToPrevSlide()});this.$outer.find(".lg-next").on("click.lg",function(){d.goToNextSlide()})};b.prototype.arrowDisable=function(d){if(!this.s.loop&&this.s.hideControlOnEnd){if((d+1)<this.$slide.length){this.$outer.find(".lg-next").removeAttr("disabled").removeClass("disabled")}else{this.$outer.find(".lg-next").attr("disabled","disabled").addClass("disabled")}if(d>0){this.$outer.find(".lg-prev").removeAttr("disabled").removeClass("disabled")}else{this.$outer.find(".lg-prev").attr("disabled","disabled").addClass("disabled")}}};b.prototype.setTranslate=function(e,f,d){if(this.s.useLeft){e.css("left",f)}else{e.css({transform:"translate3d("+(f)+"px, "+d+"px, 0px)"})}};b.prototype.touchMove=function(e,d){var f=d-e;if(Math.abs(f)>15){this.$outer.addClass("lg-dragging");this.setTranslate(this.$slide.eq(this.index),f,0);this.setTranslate(a(".lg-prev-slide"),-this.$slide.eq(this.index).width()+f,0);this.setTranslate(a(".lg-next-slide"),this.$slide.eq(this.index).width()+f,0)}};b.prototype.touchEnd=function(e){var d=this;if(d.s.mode!=="lg-slide"){d.$outer.addClass("lg-slide")}this.$slide.not(".lg-current, .lg-prev-slide, .lg-next-slide").css("opacity","0");setTimeout(function(){d.$outer.removeClass("lg-dragging");if((e<0)&&(Math.abs(e)>d.s.swipeThreshold)){d.goToNextSlide(true)}else{if((e>0)&&(Math.abs(e)>d.s.swipeThreshold)){d.goToPrevSlide(true)}else{if(Math.abs(e)<5){d.$el.trigger("onSlideClick.lg")}}}d.$slide.removeAttr("style")});setTimeout(function(){if(!d.$outer.hasClass("lg-dragging")&&d.s.mode!=="lg-slide"){d.$outer.removeClass("lg-slide")}},d.s.speed+100)};b.prototype.enableSwipe=function(){var g=this;var f=0;var d=0;var e=false;if(g.s.enableSwipe&&g.doCss()){g.$slide.on("touchstart.lg",function(h){if(!g.$outer.hasClass("lg-zoomed")&&!g.lgBusy){h.preventDefault();g.manageSwipeClass();f=h.originalEvent.targetTouches[0].pageX}});g.$slide.on("touchmove.lg",function(h){if(!g.$outer.hasClass("lg-zoomed")){h.preventDefault();d=h.originalEvent.targetTouches[0].pageX;g.touchMove(f,d);e=true}});g.$slide.on("touchend.lg",function(){if(!g.$outer.hasClass("lg-zoomed")){if(e){e=false;g.touchEnd(d-f)}else{g.$el.trigger("onSlideClick.lg")}}})}};b.prototype.enableDrag=function(){var h=this;var g=0;var e=0;var d=false;var f=false;if(h.s.enableDrag&&h.doCss()){h.$slide.on("mousedown.lg",function(i){if(!h.$outer.hasClass("lg-zoomed")&&!h.lgBusy&&!a(i.target).text().trim()){i.preventDefault();h.manageSwipeClass();g=i.pageX;d=true;h.$outer.scrollLeft+=1;h.$outer.scrollLeft-=1;h.$outer.removeClass("lg-grab").addClass("lg-grabbing");h.$el.trigger("onDragstart.lg")}});a(window).on("mousemove.lg",function(i){if(d){f=true;e=i.pageX;h.touchMove(g,e);h.$el.trigger("onDragmove.lg")}});a(window).on("mouseup.lg",function(i){if(f){f=false;h.touchEnd(e-g);h.$el.trigger("onDragend.lg")}else{if(a(i.target).hasClass("lg-object")||a(i.target).hasClass("lg-video-play")){h.$el.trigger("onSlideClick.lg")}}if(d){d=false;h.$outer.removeClass("lg-grabbing").addClass("lg-grab")}})}};b.prototype.manageSwipeClass=function(){var d=this.index+1;var e=this.index-1;if(this.s.loop&&this.$slide.length>2){if(this.index===0){e=this.$slide.length-1}else{if(this.index===this.$slide.length-1){d=0}}}this.$slide.removeClass("lg-next-slide lg-prev-slide");if(e>-1){this.$slide.eq(e).addClass("lg-prev-slide")}this.$slide.eq(d).addClass("lg-next-slide")};b.prototype.mousewheel=function(){var d=this;d.$outer.on("mousewheel.lg",function(f){if(!f.deltaY){return}if(f.deltaY>0){d.goToPrevSlide()}else{d.goToNextSlide()}f.preventDefault()})};b.prototype.closeGallery=function(){var e=this;var d=false;this.$outer.find(".lg-close").on("click.lg",function(){e.destroy()});if(e.s.closable){e.$outer.on("mousedown.lg",function(f){if(a(f.target).is(".lg-outer")||a(f.target).is(".lg-item ")||a(f.target).is(".lg-img-wrap")){d=true}else{d=false}});e.$outer.on("mousemove.lg",function(){d=false});e.$outer.on("mouseup.lg",function(f){if(a(f.target).is(".lg-outer")||a(f.target).is(".lg-item ")||a(f.target).is(".lg-img-wrap")&&d){if(!e.$outer.hasClass("lg-dragging")){e.destroy()}}})}};b.prototype.destroy=function(e){var f=this;if(!e){f.$el.trigger("onBeforeClose.lg");a(window).scrollTop(f.prevScrollTop)}if(e){if(!f.s.dynamic){this.$items.off("click.lg click.lgcustom")}a.removeData(f.el,"lightGallery")}this.$el.off(".lg.tm");a.each(a.fn.lightGallery.modules,function(d){if(f.modules[d]){f.modules[d].destroy()}});this.lGalleryOn=false;clearTimeout(f.hideBartimeout);this.hideBartimeout=false;a(window).off(".lg");a("body").removeClass("lg-on lg-from-hash");if(f.$outer){f.$outer.removeClass("lg-visible")}a(".lg-backdrop").removeClass("in");setTimeout(function(){if(f.$outer){f.$outer.remove()}a(".lg-backdrop").remove();if(!e){f.$el.trigger("onCloseAfter.lg")}},f.s.backdropDuration+50)};a.fn.lightGallery=function(d){return this.each(function(){if(!a.data(this,"lightGallery")){a.data(this,"lightGallery",new b(this,d))}else{try{a(this).data("lightGallery").init()}catch(e){console.error("lightGallery has not initiated properly")}}})};a.fn.lightGallery.modules={}})()}));
@@ -1,402 +0,0 @@
1
- /*! jg-video - v1 - 2020-04-10
2
- * based on lg-video - v1.2.2 - 2018-05-01
3
- * http://sachinchoolur.github.io/lightGallery
4
- * Copyright (C) 2021 Juergen Adams
5
- * Copyright (C) 2018 Sachin N; Licensed GPLv3
6
- */
7
-
8
- (function (root, factory) {
9
- if (typeof define === 'function' && define.amd) {
10
- // AMD. Register as an anonymous module unless amdModuleId is set
11
- define(['jquery'], function (a0) {
12
- return (factory(a0));
13
- });
14
- } else if (typeof module === 'object' && module.exports) {
15
- // Node. Does not work with strict CommonJS, but
16
- // only CommonJS-like environments that support module.exports,
17
- // like Node.
18
- module.exports = factory(require('jquery'));
19
- } else {
20
- factory(root["jQuery"]);
21
- }
22
- }(this, function ($) {
23
-
24
- (function() {
25
-
26
- 'use strict';
27
-
28
- var defaults = {
29
- videoMaxWidth: '855px',
30
-
31
- autoplayFirstVideo: true,
32
-
33
- youtubePlayerParams: false,
34
- vimeoPlayerParams: false,
35
- dailymotionPlayerParams: false,
36
- vkPlayerParams: false,
37
-
38
- videojs: false,
39
- videojsOptions: {}
40
- };
41
-
42
- var Video = function(element) {
43
-
44
- this.core = $(element).data('lightGallery');
45
-
46
- this.$el = $(element);
47
- this.core.s = $.extend({}, defaults, this.core.s);
48
- this.videoLoaded = false;
49
-
50
- this.init();
51
-
52
- return this;
53
- };
54
-
55
- Video.prototype.init = function() {
56
- var _this = this;
57
-
58
- // Event triggered when video url found without poster
59
- _this.core.$el.on('hasVideo.lg.tm', onHasVideo.bind(this));
60
-
61
- // Set max width for video
62
- _this.core.$el.on('onAferAppendSlide.lg.tm', onAferAppendSlide.bind(this));
63
-
64
- if (_this.core.doCss() && (_this.core.$items.length > 1) && (_this.core.s.enableSwipe || _this.core.s.enableDrag)) {
65
- _this.core.$el.on('onSlideClick.lg.tm', function() {
66
- var $el = _this.core.$slide.eq(_this.core.index);
67
- _this.loadVideoOnclick($el);
68
- });
69
- } else {
70
-
71
- // For IE 9 and bellow
72
- _this.core.$slide.on('click.lg', function() {
73
- _this.loadVideoOnclick($(this));
74
- });
75
- }
76
-
77
- _this.core.$el.on('onBeforeSlide.lg.tm', onBeforeSlide.bind(this));
78
-
79
- _this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex) {
80
- _this.core.$slide.eq(prevIndex).removeClass('lg-video-playing');
81
- });
82
-
83
- if (_this.core.s.autoplayFirstVideo) {
84
- _this.core.$el.on('onAferAppendSlide.lg.tm', function (e, index) {
85
- if (!_this.core.lGalleryOn) {
86
- var $el = _this.core.$slide.eq(index);
87
- setTimeout(function () {
88
- _this.loadVideoOnclick($el);
89
- }, 100);
90
- }
91
- });
92
- }
93
- };
94
-
95
- Video.prototype.loadVideo = function(src, addClass, noPoster, index, html) {
96
- var video = '';
97
- var autoplay = 1;
98
- var a = '';
99
- var isVideo = this.core.isVideo(src, index) || {};
100
-
101
- // Enable autoplay based on setting for first video if poster doesn't exist
102
- if (noPoster) {
103
- if (this.videoLoaded) {
104
- autoplay = 0;
105
- } else {
106
- autoplay = this.core.s.autoplayFirstVideo ? 1 : 0;
107
- }
108
- }
109
-
110
- if (isVideo.youtube) {
111
-
112
- /* jadams, 2020-04-10:
113
- This code loads the YouTube IFrame Player API code
114
- asynchronously (before the first JS script tag in the head)
115
- */
116
- var tag = document.createElement('script');
117
- tag.src = "https://www.youtube.com/iframe_api";
118
- var firstScriptTag = document.getElementsByTagName('script')[0];
119
- firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
120
-
121
- a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
122
- if (this.core.s.youtubePlayerParams) {
123
- a = a + '&' + $.param(this.core.s.youtubePlayerParams);
124
- }
125
-
126
- 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>';
127
-
128
- } else if (isVideo.vimeo) {
129
-
130
- a = '?autoplay=' + autoplay + '&api=1';
131
- if (this.core.s.vimeoPlayerParams) {
132
- a = a + '&' + $.param(this.core.s.vimeoPlayerParams);
133
- }
134
-
135
- video = '<iframe class="lg-video-object lg-vimeo ' + addClass + '" width="560" height="315" src="//player.vimeo.com/video/' + isVideo.vimeo[1] + a + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
136
-
137
- } else if (isVideo.dailymotion) {
138
-
139
- a = '?wmode=opaque&autoplay=' + autoplay + '&api=postMessage';
140
- if (this.core.s.dailymotionPlayerParams) {
141
- a = a + '&' + $.param(this.core.s.dailymotionPlayerParams);
142
- }
143
-
144
- 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>';
145
-
146
- } else if (isVideo.html5) {
147
- var fL = html.substring(0, 1);
148
- if (fL === '.' || fL === '#') {
149
- html = $(html).html();
150
- }
151
- video = html;
152
-
153
- } else if (isVideo.vk) {
154
-
155
- a = '&autoplay=' + autoplay;
156
- if (this.core.s.vkPlayerParams) {
157
- a = a + '&' + $.param(this.core.s.vkPlayerParams);
158
- }
159
-
160
- video = '<iframe class="lg-video-object lg-vk ' + addClass + '" width="560" height="315" src="//vk.com/video_ext.php?' + isVideo.vk[1] + a + '" frameborder="0" allowfullscreen></iframe>';
161
- }
162
- return video;
163
- };
164
-
165
- Video.prototype.loadVideoOnclick = function($el){
166
-
167
- var _this = this;
168
- // check slide has poster
169
- if ($el.find('.lg-object').hasClass('lg-has-poster') && $el.find('.lg-object').is(':visible')) {
170
-
171
- // check if video container is already present
172
- if (!$el.hasClass('lg-has-video')) {
173
-
174
- $el.addClass('lg-video-playing lg-has-video');
175
-
176
- var _src;
177
- var _html;
178
- var _loadVideo = function(_src, _html) {
179
-
180
- $el.find('.lg-video').append(_this.loadVideo(_src, '', false, _this.core.index, _html));
181
-
182
- if (_html) {
183
- // VideoJS
184
- if (_this.core.s.videojs) {
185
- var player_ref = _this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0);
186
- var videoOptions = _this.core.s.videojsOptions;
187
- /*
188
- jadams, 2020-04-10: Player Readiness:
189
- Pass a callback to the videojs function (as a third argument)
190
- */
191
- try {
192
- videojs(player_ref, videoOptions, function() {
193
- this.addClass('my-test-ready-class');
194
- this.play();
195
- });
196
- } catch (e) {
197
- console.error('Make sure you have included videojs');
198
- }
199
- } else {
200
- _this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0).play();
201
- }
202
- }
203
-
204
- };
205
-
206
- if (_this.core.s.dynamic) {
207
-
208
- _src = _this.core.s.dynamicEl[_this.core.index].src;
209
- _html = _this.core.s.dynamicEl[_this.core.index].html;
210
-
211
- _loadVideo(_src, _html);
212
-
213
- } else {
214
-
215
- _src = _this.core.$items.eq(_this.core.index).attr('href') || _this.core.$items.eq(_this.core.index).attr('data-src');
216
- _html = _this.core.$items.eq(_this.core.index).attr('data-html');
217
-
218
- _loadVideo(_src, _html);
219
-
220
- }
221
-
222
- var $tempImg = $el.find('.lg-object');
223
- $el.find('.lg-video').append($tempImg);
224
-
225
- // @todo loading icon for html5 videos also
226
- // for showing the loading indicator while loading video
227
- if (!$el.find('.lg-video-object').hasClass('lg-html5')) {
228
- $el.removeClass('lg-complete');
229
- $el.find('.lg-video-object').on('load.lg error.lg', function() {
230
- $el.addClass('lg-complete');
231
- });
232
- }
233
-
234
- } else {
235
-
236
- var youtubePlayer;
237
- var vimeoPlayer;
238
- var dailymotionPlayer;
239
- var html5Player;
240
-
241
- /*
242
- jadams, 2020-04-10: Player Readiness:
243
- Make sure that the HTML portion of a player is already loaded
244
- */
245
- var player_loaded = setInterval(function() {
246
-
247
- youtubePlayer = $el.find('.lg-youtube').get(0);
248
- vimeoPlayer = $el.find('.lg-vimeo').get(0);
249
- dailymotionPlayer = $el.find('.lg-dailymotion').get(0);
250
- html5Player = $el.find('.lg-html5').get(0);
251
-
252
- if ( youtubePlayer || vimeoPlayer || dailymotionPlayer || html5Player ) {
253
-
254
- if (youtubePlayer) {
255
- youtubePlayer.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
256
- } else if (vimeoPlayer) {
257
- try {
258
- $f(vimeoPlayer).api('play');
259
- } catch (e) {
260
- console.error('Make sure you have included froogaloop2 js');
261
- }
262
- } else if (dailymotionPlayer) {
263
- dailymotionPlayer.contentWindow.postMessage('play', '*');
264
-
265
- } else if (html5Player) {
266
- if (_this.core.s.videojs) {
267
- try {
268
- videojs(html5Player).play();
269
- } catch (e) {
270
- console.error('Make sure you have included videojs');
271
- }
272
- } else {
273
- html5Player.play();
274
- }
275
- }
276
-
277
- $el.addClass('lg-video-playing');
278
- clearInterval(player_loaded);
279
- }
280
- }, 25);
281
-
282
- $el.addClass('lg-video-playing');
283
- }
284
- }
285
- };
286
-
287
- Video.prototype.destroy = function() {
288
- this.videoLoaded = false;
289
- };
290
-
291
- function onHasVideo(event, index, src, html) {
292
- /* jshint validthis:true */
293
-
294
- var _this = this;
295
-
296
- _this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src, 'lg-object', true, index, html));
297
-
298
- if (html) {
299
- if (_this.core.s.videojs) {
300
- try {
301
- videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {
302
- if (!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
303
- this.play();
304
- }
305
- });
306
- } catch (e) {
307
- console.error('Make sure you have included videojs');
308
- }
309
- } else {
310
- if(!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
311
- _this.core.$slide.eq(index).find('.lg-html5').get(0).play();
312
- }
313
- }
314
- }
315
- }
316
-
317
- function onAferAppendSlide(event, index) {
318
- /* jshint validthis:true */
319
-
320
- var $videoCont = this.core.$slide.eq(index).find('.lg-video-cont');
321
-
322
- if (!$videoCont.hasClass('lg-has-iframe')) {
323
- $videoCont.css('max-width', this.core.s.videoMaxWidth);
324
- this.videoLoaded = true;
325
- }
326
- }
327
-
328
- function onBeforeSlide(event, prevIndex, index) {
329
- /* jshint validthis:true */
330
-
331
- var _this = this;
332
- var $videoSlide;
333
-
334
- var youtubePlayer;
335
- var vimeoPlayer;
336
- var dailymotionPlayer;
337
- var html5Player;
338
- var vkPlayer;
339
-
340
- /*
341
- jadams, 2020-04-10: Player Readiness:
342
- Make sure that the HTML portion of a player is already loaded
343
- */
344
- var player_loaded = setInterval(function() {
345
-
346
- $videoSlide = _this.core.$slide.eq(prevIndex);
347
-
348
- youtubePlayer = $videoSlide.find('.lg-youtube').get(0);
349
- vimeoPlayer = $videoSlide.find('.lg-vimeo').get(0);
350
- dailymotionPlayer = $videoSlide.find('.lg-dailymotion').get(0);
351
- vkPlayer = $videoSlide.find('.lg-vk').get(0);
352
- html5Player = $videoSlide.find('.lg-html5').get(0);
353
-
354
- if ( youtubePlayer || vimeoPlayer || dailymotionPlayer || vkPlayer || html5Player ) {
355
-
356
- if (youtubePlayer) {
357
- youtubePlayer.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
358
- } else if (vimeoPlayer) {
359
- try {
360
- $f(vimeoPlayer).api('pause');
361
- } catch (e) {
362
- console.error('Make sure you have included froogaloop2 js');
363
- }
364
- } else if (dailymotionPlayer) {
365
- dailymotionPlayer.contentWindow.postMessage('pause', '*');
366
-
367
- } else if (html5Player) {
368
- if (_this.core.s.videojs) {
369
- try {
370
- videojs(html5Player).pause();
371
- } catch (e) {
372
- console.error('Make sure you have included videojs');
373
- }
374
- } else {
375
- html5Player.pause();
376
- }
377
- } if (vkPlayer) {
378
- $(vkPlayer).attr('src', $(vkPlayer).attr('src').replace('&autoplay', '&noplay'));
379
- }
380
-
381
- var _src;
382
- if (_this.core.s.dynamic) {
383
- _src = _this.core.s.dynamicEl[index].src;
384
- } else {
385
- _src = _this.core.$items.eq(index).attr('href') || _this.core.$items.eq(index).attr('data-src');
386
-
387
- }
388
-
389
- var _isVideo = _this.core.isVideo(_src, index) || {};
390
- if (_isVideo.youtube || _isVideo.vimeo || _isVideo.dailymotion || _isVideo.vk) {
391
- _this.core.$outer.addClass('lg-hide-download');
392
- }
393
- clearInterval(player_loaded);
394
- }
395
- }, 25);
396
- }
397
-
398
- $.fn.lightGallery.modules.video = Video;
399
-
400
- })();
401
-
402
- }));
@@ -1,8 +0,0 @@
1
- /*! jg-video - v1 - 2020-04-10
2
- * based on lg-video - v1.2.2 - 2018-05-01
3
- * http://sachinchoolur.github.io/lightGallery
4
- * Copyright (C) 2021 Juergen Adams
5
- * Copyright (C) 2018 Sachin N; Licensed GPLv3
6
- */
7
-
8
- !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(a,b,c,d){var e=this;if(e.core.$slide.eq(b).find(".lg-video").append(e.loadVideo(c,"lg-object",!0,b,d)),d)if(e.core.s.videojs)try{videojs(e.core.$slide.eq(b).find(".lg-html5").get(0),e.core.s.videojsOptions,function(){!e.videoLoaded&&e.core.s.autoplayFirstVideo&&this.play()})}catch(a){console.error("Make sure you have included videojs")}else!e.videoLoaded&&e.core.s.autoplayFirstVideo&&e.core.$slide.eq(b).find(".lg-html5").get(0).play()}function c(a,b){var c=this.core.$slide.eq(b).find(".lg-video-cont");c.hasClass("lg-has-iframe")||(c.css("max-width",this.core.s.videoMaxWidth),this.videoLoaded=!0)}function d(b,c,d){var e=this,f=e.core.$slide.eq(c),g=f.find(".lg-youtube").get(0),h=f.find(".lg-vimeo").get(0),i=f.find(".lg-dailymotion").get(0),j=f.find(".lg-vk").get(0),k=f.find(".lg-html5").get(0);if(g)g.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*");else if(h)try{$f(h).api("pause")}catch(a){console.error("Make sure you have included froogaloop2 js")}else if(i)i.contentWindow.postMessage("pause","*");else if(k)if(e.core.s.videojs)try{videojs(k).pause()}catch(a){console.error("Make sure you have included videojs")}else k.pause();j&&a(j).attr("src",a(j).attr("src").replace("&autoplay","&noplay"));var l;l=e.core.s.dynamic?e.core.s.dynamicEl[d].src:e.core.$items.eq(d).attr("href")||e.core.$items.eq(d).attr("data-src");var m=e.core.isVideo(l,d)||{};(m.youtube||m.vimeo||m.dailymotion||m.vk)&&e.core.$outer.addClass("lg-hide-download")}var e={videoMaxWidth:"855px",autoplayFirstVideo:!0,youtubePlayerParams:!1,vimeoPlayerParams:!1,dailymotionPlayerParams:!1,vkPlayerParams:!1,videojs:!1,videojsOptions:{}},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.videoLoaded=!1,this.init(),this};f.prototype.init=function(){var e=this;e.core.$el.on("hasVideo.lg.tm",b.bind(this)),e.core.$el.on("onAferAppendSlide.lg.tm",c.bind(this)),e.core.doCss()&&e.core.$items.length>1&&(e.core.s.enableSwipe||e.core.s.enableDrag)?e.core.$el.on("onSlideClick.lg.tm",function(){var a=e.core.$slide.eq(e.core.index);e.loadVideoOnclick(a)}):e.core.$slide.on("click.lg",function(){e.loadVideoOnclick(a(this))}),e.core.$el.on("onBeforeSlide.lg.tm",d.bind(this)),e.core.$el.on("onAfterSlide.lg.tm",function(a,b){e.core.$slide.eq(b).removeClass("lg-video-playing")}),e.core.s.autoplayFirstVideo&&e.core.$el.on("onAferAppendSlide.lg.tm",function(a,b){if(!e.core.lGalleryOn){var c=e.core.$slide.eq(b);setTimeout(function(){e.loadVideoOnclick(c)},100)}})},f.prototype.loadVideo=function(b,c,d,e,f){var g="",h=1,i="",j=this.core.isVideo(b,e)||{};if(d&&(h=this.videoLoaded?0:this.core.s.autoplayFirstVideo?1:0),j.youtube)i="?wmode=opaque&autoplay="+h+"&enablejsapi=1",this.core.s.youtubePlayerParams&&(i=i+"&"+a.param(this.core.s.youtubePlayerParams)),g='<iframe class="lg-video-object lg-youtube '+c+'" width="560" height="315" src="//www.youtube.com/embed/'+j.youtube[1]+i+'" frameborder="0" allowfullscreen></iframe>';else if(j.vimeo)i="?autoplay="+h+"&api=1",this.core.s.vimeoPlayerParams&&(i=i+"&"+a.param(this.core.s.vimeoPlayerParams)),g='<iframe class="lg-video-object lg-vimeo '+c+'" width="560" height="315" src="//player.vimeo.com/video/'+j.vimeo[1]+i+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';else if(j.dailymotion)i="?wmode=opaque&autoplay="+h+"&api=postMessage",this.core.s.dailymotionPlayerParams&&(i=i+"&"+a.param(this.core.s.dailymotionPlayerParams)),g='<iframe class="lg-video-object lg-dailymotion '+c+'" width="560" height="315" src="//www.dailymotion.com/embed/video/'+j.dailymotion[1]+i+'" frameborder="0" allowfullscreen></iframe>';else if(j.html5){var k=f.substring(0,1);"."!==k&&"#"!==k||(f=a(f).html()),g=f}else j.vk&&(i="&autoplay="+h,this.core.s.vkPlayerParams&&(i=i+"&"+a.param(this.core.s.vkPlayerParams)),g='<iframe class="lg-video-object lg-vk '+c+'" width="560" height="315" src="//vk.com/video_ext.php?'+j.vk[1]+i+'" frameborder="0" allowfullscreen></iframe>');return g},f.prototype.loadVideoOnclick=function(a){var b=this;if(a.find(".lg-object").hasClass("lg-has-poster")&&a.find(".lg-object").is(":visible"))if(a.hasClass("lg-has-video")){var c=a.find(".lg-youtube").get(0),d=a.find(".lg-vimeo").get(0),e=a.find(".lg-dailymotion").get(0),f=a.find(".lg-html5").get(0);if(c)c.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*");else if(d)try{$f(d).api("play")}catch(a){console.error("Make sure you have included froogaloop2 js")}else if(e)e.contentWindow.postMessage("play","*");else if(f)if(b.core.s.videojs)try{videojs(f).play()}catch(a){console.error("Make sure you have included videojs")}else f.play();a.addClass("lg-video-playing")}else{a.addClass("lg-video-playing lg-has-video");var g,h,i=function(c,d){if(a.find(".lg-video").append(b.loadVideo(c,"",!1,b.core.index,d)),d)if(b.core.s.videojs)try{videojs(b.core.$slide.eq(b.core.index).find(".lg-html5").get(0),b.core.s.videojsOptions,function(){this.play()})}catch(a){console.error("Make sure you have included videojs")}else b.core.$slide.eq(b.core.index).find(".lg-html5").get(0).play()};b.core.s.dynamic?(g=b.core.s.dynamicEl[b.core.index].src,h=b.core.s.dynamicEl[b.core.index].html,i(g,h)):(g=b.core.$items.eq(b.core.index).attr("href")||b.core.$items.eq(b.core.index).attr("data-src"),h=b.core.$items.eq(b.core.index).attr("data-html"),i(g,h));var j=a.find(".lg-object");a.find(".lg-video").append(j),a.find(".lg-video-object").hasClass("lg-html5")||(a.removeClass("lg-complete"),a.find(".lg-video-object").on("load.lg error.lg",function(){a.addClass("lg-complete")}))}},f.prototype.destroy=function(){this.videoLoaded=!1},a.fn.lightGallery.modules.video=f}()});
@@ -1,206 +0,0 @@
1
- /*! lg-autoplay - v1.0.4 - 2017-03-28
2
- * http://sachinchoolur.github.io/lightGallery
3
- * Copyright (c) 2017 Sachin N; Licensed GPLv3 */
4
-
5
- (function (root, factory) {
6
- if (typeof define === 'function' && define.amd) {
7
- // AMD. Register as an anonymous module unless amdModuleId is set
8
- define(['jquery'], function (a0) {
9
- return (factory(a0));
10
- });
11
- } else if (typeof exports === 'object') {
12
- // Node. Does not work with strict CommonJS, but
13
- // only CommonJS-like environments that support module.exports,
14
- // like Node.
15
- module.exports = factory(require('jquery'));
16
- } else {
17
- factory(jQuery);
18
- }
19
- }(this, function ($) {
20
-
21
-
22
- (function() {
23
-
24
- 'use strict';
25
-
26
- var defaults = {
27
- autoplay: false,
28
- pause: 5000,
29
- progressBar: true,
30
- fourceAutoplay: false,
31
- autoplayControls: true,
32
- appendAutoplayControlsTo: '.lg-toolbar'
33
- };
34
-
35
- /**
36
- * Creates the autoplay plugin.
37
- * @param {object} element - lightGallery element
38
- */
39
- var Autoplay = function(element) {
40
-
41
- this.core = $(element).data('lightGallery');
42
-
43
- this.$el = $(element);
44
-
45
- // Execute only if items are above 1
46
- if (this.core.$items.length < 2) {
47
- return false;
48
- }
49
-
50
- this.core.s = $.extend({}, defaults, this.core.s);
51
- this.interval = false;
52
-
53
- // Identify if slide happened from autoplay
54
- this.fromAuto = true;
55
-
56
- // Identify if autoplay canceled from touch/drag
57
- this.canceledOnTouch = false;
58
-
59
- // save fourceautoplay value
60
- this.fourceAutoplayTemp = this.core.s.fourceAutoplay;
61
-
62
- // do not allow progress bar if browser does not support css3 transitions
63
- if (!this.core.doCss()) {
64
- this.core.s.progressBar = false;
65
- }
66
-
67
- this.init();
68
-
69
- return this;
70
- };
71
-
72
- Autoplay.prototype.init = function() {
73
- var _this = this;
74
-
75
- // append autoplay controls
76
- if (_this.core.s.autoplayControls) {
77
- _this.controls();
78
- }
79
-
80
- // Create progress bar
81
- if (_this.core.s.progressBar) {
82
- _this.core.$outer.find('.lg').append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>');
83
- }
84
-
85
- // set progress
86
- _this.progress();
87
-
88
- // Start autoplay
89
- if (_this.core.s.autoplay) {
90
- _this.$el.one('onSlideItemLoad.lg.tm', function() {
91
- _this.startlAuto();
92
- });
93
- }
94
-
95
- // cancel interval on touchstart and dragstart
96
- _this.$el.on('onDragstart.lg.tm touchstart.lg.tm', function() {
97
- if (_this.interval) {
98
- _this.cancelAuto();
99
- _this.canceledOnTouch = true;
100
- }
101
- });
102
-
103
- // restore autoplay if autoplay canceled from touchstart / dragstart
104
- _this.$el.on('onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm', function() {
105
- if (!_this.interval && _this.canceledOnTouch) {
106
- _this.startlAuto();
107
- _this.canceledOnTouch = false;
108
- }
109
- });
110
-
111
- };
112
-
113
- Autoplay.prototype.progress = function() {
114
-
115
- var _this = this;
116
- var _$progressBar;
117
- var _$progress;
118
-
119
- _this.$el.on('onBeforeSlide.lg.tm', function() {
120
-
121
- // start progress bar animation
122
- if (_this.core.s.progressBar && _this.fromAuto) {
123
- _$progressBar = _this.core.$outer.find('.lg-progress-bar');
124
- _$progress = _this.core.$outer.find('.lg-progress');
125
- if (_this.interval) {
126
- _$progress.removeAttr('style');
127
- _$progressBar.removeClass('lg-start');
128
- setTimeout(function() {
129
- _$progress.css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
130
- _$progressBar.addClass('lg-start');
131
- }, 20);
132
- }
133
- }
134
-
135
- // Remove setinterval if slide is triggered manually and fourceautoplay is false
136
- if (!_this.fromAuto && !_this.core.s.fourceAutoplay) {
137
- _this.cancelAuto();
138
- }
139
-
140
- _this.fromAuto = false;
141
-
142
- });
143
- };
144
-
145
- // Manage autoplay via play/stop buttons
146
- Autoplay.prototype.controls = function() {
147
- var _this = this;
148
- var _html = '<span class="lg-autoplay-button lg-icon"></span>';
149
-
150
- // Append autoplay controls
151
- $(this.core.s.appendAutoplayControlsTo).append(_html);
152
-
153
- _this.core.$outer.find('.lg-autoplay-button').on('click.lg', function() {
154
- if ($(_this.core.$outer).hasClass('lg-show-autoplay')) {
155
- _this.cancelAuto();
156
- _this.core.s.fourceAutoplay = false;
157
- } else {
158
- if (!_this.interval) {
159
- _this.startlAuto();
160
- _this.core.s.fourceAutoplay = _this.fourceAutoplayTemp;
161
- }
162
- }
163
- });
164
- };
165
-
166
- // Autostart gallery
167
- Autoplay.prototype.startlAuto = function() {
168
- var _this = this;
169
-
170
- _this.core.$outer.find('.lg-progress').css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
171
- _this.core.$outer.addClass('lg-show-autoplay');
172
- _this.core.$outer.find('.lg-progress-bar').addClass('lg-start');
173
-
174
- _this.interval = setInterval(function() {
175
- if (_this.core.index + 1 < _this.core.$items.length) {
176
- _this.core.index++;
177
- } else {
178
- _this.core.index = 0;
179
- }
180
-
181
- _this.fromAuto = true;
182
- _this.core.slide(_this.core.index, false, false, 'next');
183
- }, _this.core.s.speed + _this.core.s.pause);
184
- };
185
-
186
- // cancel Autostart
187
- Autoplay.prototype.cancelAuto = function() {
188
- clearInterval(this.interval);
189
- this.interval = false;
190
- this.core.$outer.find('.lg-progress').removeAttr('style');
191
- this.core.$outer.removeClass('lg-show-autoplay');
192
- this.core.$outer.find('.lg-progress-bar').removeClass('lg-start');
193
- };
194
-
195
- Autoplay.prototype.destroy = function() {
196
-
197
- this.cancelAuto();
198
- this.core.$outer.find('.lg-progress-bar').remove();
199
- };
200
-
201
- $.fn.lightGallery.modules.autoplay = Autoplay;
202
-
203
- })();
204
-
205
-
206
- }));