j1-template 2021.1.0 → 2021.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/layout_metadata_generator.html +54 -39
  3. data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +1 -1
  4. data/_includes/themes/j1/modules/connectors/ads +3 -5
  5. data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +9 -5
  6. data/_includes/themes/j1/modules/connectors/analytics +4 -2
  7. data/_includes/themes/j1/modules/connectors/comments +7 -6
  8. data/_includes/themes/j1/modules/connectors/translator +3 -4
  9. data/_includes/themes/j1/modules/navigator/generator.html +4 -40
  10. data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +2 -2
  11. data/_includes/themes/j1/procedures/global/create_bs_button.proc +64 -22
  12. data/_includes/themes/j1/procedures/posts/collate_timeline.proc +14 -10
  13. data/_layouts/default.html +4 -7
  14. data/apps/public/cc/index.adoc +13 -4
  15. data/assets/data/authclient.html +234 -228
  16. data/assets/data/banner.html +34 -31
  17. data/assets/data/cookieconsent.html +249 -0
  18. data/assets/data/fam.html +5 -0
  19. data/assets/data/footer.html +4 -0
  20. data/assets/data/gallery_customizer.html +14 -4
  21. data/assets/data/menu.html +7 -2
  22. data/assets/data/mmenu.html +6 -2
  23. data/assets/data/mmenu_sidebar.html +5 -1
  24. data/assets/data/mmenu_toc.html +4 -0
  25. data/assets/data/panel.html +23 -15
  26. data/assets/data/quicklinks.html +24 -17
  27. data/assets/error_pages/HTTP204.html +2 -1
  28. data/assets/error_pages/HTTP400.html +2 -1
  29. data/assets/error_pages/HTTP401.html +2 -1
  30. data/assets/error_pages/HTTP403.html +2 -1
  31. data/assets/error_pages/HTTP404.html +2 -1
  32. data/assets/error_pages/HTTP500.html +2 -1
  33. data/assets/error_pages/HTTP501.html +2 -1
  34. data/assets/error_pages/HTTP502.html +2 -1
  35. data/assets/error_pages/HTTP503.html +2 -1
  36. data/assets/error_pages/HTTP520.html +2 -1
  37. data/assets/error_pages/HTTP521.html +2 -1
  38. data/assets/error_pages/HTTP533.html +2 -1
  39. data/assets/themes/j1/adapter/js/{cookiebar.js → cookieConsent.js} +102 -54
  40. data/assets/themes/j1/adapter/js/j1.js +53 -20
  41. data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +3 -2
  42. data/assets/themes/j1/adapter/js/mmenu.js +8 -4
  43. data/assets/themes/j1/adapter/js/navigator.js +77 -22
  44. data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.css +17 -14
  45. data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.min.css +1 -1
  46. data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +3960 -240
  47. data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +1 -1
  48. data/assets/themes/j1/core/js/template.js +3 -9
  49. data/assets/themes/j1/core/js/template.js.map +1 -1
  50. data/assets/themes/j1/core/js/template.min.js +3 -9
  51. data/assets/themes/j1/core/js/template.min.js.map +1 -1
  52. data/assets/themes/j1/modules/_lightGallery/css/core/lg-fb-comment-box.css +58 -0
  53. data/assets/themes/j1/modules/_lightGallery/css/core/lg-fb-comment-box.min.css +5 -0
  54. data/assets/themes/j1/modules/_lightGallery/css/core/lg-transitions.css +778 -0
  55. data/assets/themes/j1/modules/_lightGallery/css/core/lg-transitions.min.css +5 -0
  56. data/assets/themes/j1/modules/_lightGallery/css/core/lightgallery.css +981 -0
  57. data/assets/themes/j1/modules/_lightGallery/css/core/lightgallery.min.css +5 -0
  58. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.eot +0 -0
  59. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.svg +47 -0
  60. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.ttf +0 -0
  61. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.woff +0 -0
  62. data/assets/themes/j1/modules/_lightGallery/css/img/loading.gif +0 -0
  63. data/assets/themes/j1/modules/_lightGallery/css/img/video-play.png +0 -0
  64. data/assets/themes/j1/modules/_lightGallery/css/img/vimeo-play.png +0 -0
  65. data/assets/themes/j1/modules/_lightGallery/css/img/youtube-play.png +0 -0
  66. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/animation-w.png +0 -0
  67. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/customize-w.png +0 -0
  68. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/dynamic-w.png +0 -0
  69. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/facebook-icon.svg +10 -0
  70. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/googleplus-icon.svg +30 -0
  71. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/html5-w.png +0 -0
  72. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/linked-in.png +0 -0
  73. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/module-w.png +0 -0
  74. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/play-button.png +0 -0
  75. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/responsive-w.png +0 -0
  76. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/thumb-w.png +0 -0
  77. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/touch-w.png +0 -0
  78. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/twitter-icon.svg +15 -0
  79. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/twitter.png +0 -0
  80. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/video1-w.png +0 -0
  81. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/zoom-w.png +0 -0
  82. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/zoom.png +0 -0
  83. data/assets/themes/j1/modules/_lightGallery/css/themes/uno.css +262 -0
  84. data/assets/themes/j1/modules/_lightGallery/css/themes/uno.min.css +15 -0
  85. data/assets/themes/j1/modules/_lightGallery/js/core/lightgallery.js +1362 -0
  86. data/assets/themes/j1/modules/_lightGallery/js/core/lightgallery.min.js +4 -0
  87. data/assets/themes/j1/modules/_lightGallery/js/modules/j1/j1-video.js +402 -0
  88. data/assets/themes/j1/modules/_lightGallery/js/modules/j1/j1-video.min.js +8 -0
  89. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-autoplay.js +206 -0
  90. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-autoplay.min.js +5 -0
  91. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-fullscreen.js +126 -0
  92. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-fullscreen.min.js +5 -0
  93. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-hash.js +101 -0
  94. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-hash.min.js +5 -0
  95. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-pager.js +105 -0
  96. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-pager.min.js +5 -0
  97. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-share.js +107 -0
  98. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-share.min.js +5 -0
  99. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-thumbnail.js +478 -0
  100. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-thumbnail.min.js +5 -0
  101. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-video.js +342 -0
  102. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-video.min.js +5 -0
  103. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-zoom.js +527 -0
  104. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-zoom.min.js +5 -0
  105. data/assets/themes/j1/modules/cookieConsent/LICENSE +21 -0
  106. data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +286 -0
  107. data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js +28 -0
  108. data/assets/themes/j1/modules/iframeResizer/examples/frame.absolute.html +4 -2
  109. data/assets/themes/j1/modules/iframeResizer/examples/frame.content.html +4 -3
  110. data/assets/themes/j1/modules/iframeResizer/examples/frame.hover.html +4 -2
  111. data/assets/themes/j1/modules/iframeResizer/examples/frame.nested.html +4 -2
  112. data/assets/themes/j1/modules/iframeResizer/examples/frame.textarea.html +4 -2
  113. data/assets/themes/j1/modules/iframeResizer/examples/frame.tolerance.html +4 -2
  114. data/assets/themes/j1/modules/iframeResizer/examples/index.html +2 -0
  115. data/assets/themes/j1/modules/iframeResizer/examples/two.html +4 -2
  116. data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery-x.js +1368 -0
  117. data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery-x.min.js +10 -0
  118. data/assets/themes/j1/modules/lightGallery/js/modules/j1/j1-x-video.js +344 -0
  119. data/assets/themes/j1/modules/lightGallery/js/modules/j1/j1-x-video.min.js +7 -0
  120. data/assets/themes/j1/modules/util/js/domready.js +146 -0
  121. data/assets/themes/j1/modules/util/js/gtag-opt-in.js +1 -0
  122. data/lib/j1/version.rb +1 -1
  123. data/lib/starter_web/Gemfile +1 -1
  124. data/lib/starter_web/_config.yml +74 -77
  125. data/lib/starter_web/_data/_defaults/resources.yml +11 -8
  126. data/lib/starter_web/_data/apps/defaults/justifiedGalleryCustomizer.yml +1 -0
  127. data/lib/starter_web/_data/blocks/banner.yml +30 -24
  128. data/lib/starter_web/_data/blocks/panel.yml +9 -7
  129. data/lib/starter_web/_data/builder/blog_navigator.yml +6 -1
  130. data/lib/starter_web/_data/j1_config.yml +2 -2
  131. data/lib/starter_web/_data/layouts/blog_archive.yml +9 -0
  132. data/lib/starter_web/_data/layouts/collection.yml +10 -0
  133. data/lib/starter_web/_data/layouts/default.yml +25 -59
  134. data/lib/starter_web/_data/layouts/home.yml +6 -5
  135. data/lib/starter_web/_data/layouts/page.yml +1 -1
  136. data/lib/starter_web/_data/modules/{cookiebar.yml → cookieconsent.yml} +4 -4
  137. data/lib/starter_web/_data/modules/defaults/authentication.yml +1 -0
  138. data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +135 -0
  139. data/lib/starter_web/_data/modules/defaults/navigator.yml +5 -2
  140. data/lib/starter_web/_data/modules/navigator.yml +24 -21
  141. data/lib/starter_web/_data/modules/navigator_menu.yml +2 -2
  142. data/lib/starter_web/_data/pages/builder.yml +7 -7
  143. data/lib/starter_web/_data/private.yml +6 -6
  144. data/lib/starter_web/_data/resources.yml +13 -8
  145. data/lib/starter_web/_includes/attributes.asciidoc +10 -1
  146. data/lib/starter_web/_plugins/lunr_index.rb +1 -1
  147. data/lib/starter_web/assets/images/modules/attics/christa-dodoo-1920x1280.jpg +0 -0
  148. data/lib/starter_web/assets/images/modules/attics/{cookies-1920x1200-bw.jpg → cookies-1920x1200.jpg} +0 -0
  149. data/lib/starter_web/assets/images/modules/attics/giammarco-boscaro-1920x1280.jpg +0 -0
  150. data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.jpg +0 -0
  151. data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +3 -9
  152. data/lib/starter_web/collections/posts/public/featured/_posts/2020-01-01-about-cookies.adoc +4 -11
  153. data/lib/starter_web/collections/posts/public/featured/_posts/2021-03-01-site-generators.adoc +1 -8
  154. data/lib/starter_web/collections/posts/public/featured/_posts/2021-03-03-about-j1.adoc +2 -8
  155. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +2 -8
  156. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +2 -9
  157. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +2 -9
  158. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +2 -9
  159. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +3 -1
  160. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +3 -1
  161. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +3 -1
  162. data/lib/starter_web/index.html +7 -13
  163. data/lib/starter_web/package.json +3 -3
  164. data/lib/starter_web/pages/public/asciidoc_skeletons/book/000_intro.adoc +7 -1
  165. data/lib/starter_web/pages/public/asciidoc_skeletons/book/100_chapter.adoc +5 -1
  166. data/lib/starter_web/pages/public/asciidoc_skeletons/book/200_chapter.adoc +6 -1
  167. data/lib/starter_web/pages/public/asciidoc_skeletons/book/900_references.adoc +5 -0
  168. data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +6 -1
  169. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/100_chapter.asciidoc +1 -1
  170. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/200_chapter.asciidoc +1 -1
  171. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +6 -1
  172. data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +6 -1
  173. data/lib/starter_web/pages/public/blog/navigator/archive.html +40 -24
  174. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +48 -28
  175. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +45 -28
  176. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +41 -13
  177. data/lib/starter_web/pages/public/blog/navigator/index.html +1 -4
  178. data/lib/starter_web/pages/public/cookieConsent.adoc +93 -0
  179. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +1 -1
  180. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.org.asciidoc +244 -0
  181. data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +1 -1
  182. data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +1 -1
  183. data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +1 -1
  184. data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +3 -2
  185. data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +1 -1
  186. data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +1 -1
  187. data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +1 -1
  188. data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +1 -1
  189. data/lib/starter_web/pages/public/learn/where_to_go.adoc +2 -18
  190. data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +7 -5
  191. data/lib/starter_web/pages/public/legal/en/200_impress.adoc +7 -6
  192. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +111 -214
  193. data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +7 -5
  194. data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +7 -2
  195. data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +1 -1
  196. data/lib/starter_web/pages/public/previewer/iframer.adoc +1 -1
  197. data/lib/starter_web/pages/public/previewer/justified_gallery.html +1 -1
  198. data/lib/starter_web/pages/public/previewer/md_color_palette.adoc +1 -1
  199. data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +1 -1
  200. data/lib/starter_web/pages/public/previewer/rouge.adoc +1 -1
  201. data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +1 -1
  202. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  203. data/lib/starter_web/utilsrv/package.json +1 -1
  204. metadata +74 -14
  205. data/_includes/themes/j1/modules/connectors/analytic/google-analytics-legacy.html +0 -36
  206. data/assets/data/cookiebar.html +0 -281
  207. data/lib/starter_web/_data/_defaults/private.yml +0 -156
  208. data/lib/starter_web/_data/modules/defaults/cookiebar.yml +0 -132
  209. data/lib/starter_web/_data/private@default.yml +0 -119
  210. data/lib/starter_web/_data/private@localhost.yml +0 -156
  211. data/lib/starter_web/collections/posts/public/series/_posts/_includes/attributes.asciidoc +0 -37
  212. data/lib/starter_web/collections/posts/public/series/_posts/_includes/documents/readme +0 -0
  213. data/lib/starter_web/collections/posts/public/series/_posts/_includes/tables/debug_variables.asciidoc +0 -47
@@ -0,0 +1,10 @@
1
+ /*! lightgallery - v1.6.12 - 2019-02-19
2
+ * Extended version to support YouPorn
3
+ * http://sachinchoolur.github.io/lightGallery/
4
+ * Copyright (c) 2019 Sachin N; Licensed GPLv3 */
5
+
6
+ /*! lightgallery - v1.6.12 - 2019-02-19
7
+ * http://sachinchoolur.github.io/lightGallery/
8
+ * Copyright (c) 2019 Sachin N; Licensed GPLv3 */
9
+
10
+ (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(k,e){var g;if(this.s.dynamic){g=this.s.dynamicEl[e].html}else{g=this.$items.eq(e).attr("data-html")}if(!k){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=k.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i);var j=k.match(/\/\/(?:www\.)?youporn.com\/embed\/([0-9]+\/[0-9a-z\-_]+\/)/i);var d=k.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i);var h=k.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i);var i=k.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);if(f){return{youtube:f}}else{if(j){return{youporn:j}}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={}})()}));
@@ -0,0 +1,344 @@
1
+ /*! lg-video - v1.2.1 - 2020-03-28
2
+ * based on lg-video v1.2.0 of 2017-11-16
3
+ * Extended version to support YouPorn
4
+ * http://sachinchoolur.github.io/lightGallery
5
+ * Copyright (C) 2017 Sachin N; Licensed GPLv3 */
6
+
7
+ (function (root, factory) {
8
+ if (typeof define === 'function' && define.amd) {
9
+ // AMD. Register as an anonymous module unless amdModuleId is set
10
+ define(['jquery'], function (a0) {
11
+ return (factory(a0));
12
+ });
13
+ } else if (typeof exports === 'object') {
14
+ // Node. Does not work with strict CommonJS, but
15
+ // only CommonJS-like environments that support module.exports,
16
+ // like Node.
17
+ module.exports = factory(require('jquery'));
18
+ } else {
19
+ factory(jQuery);
20
+ }
21
+ }(this, function ($) {
22
+
23
+ (function() {
24
+
25
+ 'use strict';
26
+
27
+ var defaults = {
28
+ videoMaxWidth: '855px',
29
+
30
+ autoplayFirstVideo: true,
31
+
32
+ youtubePlayerParams: false,
33
+ vimeoPlayerParams: false,
34
+ dailymotionPlayerParams: false,
35
+ vkPlayerParams: false,
36
+
37
+ videojs: false,
38
+ videojsOptions: {}
39
+ };
40
+
41
+ var Video = function(element) {
42
+
43
+ this.core = $(element).data('lightGallery');
44
+
45
+ this.$el = $(element);
46
+ this.core.s = $.extend({}, defaults, this.core.s);
47
+ this.videoLoaded = false;
48
+
49
+ this.init();
50
+
51
+ return this;
52
+ };
53
+
54
+ Video.prototype.init = function() {
55
+ var _this = this;
56
+
57
+ // Event triggered when video url found without poster
58
+ _this.core.$el.on('hasVideo.lg.tm', onHasVideo.bind(this));
59
+
60
+ // Set max width for video
61
+ _this.core.$el.on('onAferAppendSlide.lg.tm', onAferAppendSlide.bind(this));
62
+
63
+ if (_this.core.doCss() && (_this.core.$items.length > 1) && (_this.core.s.enableSwipe || _this.core.s.enableDrag)) {
64
+ _this.core.$el.on('onSlideClick.lg.tm', function() {
65
+ var $el = _this.core.$slide.eq(_this.core.index);
66
+ _this.loadVideoOnclick($el);
67
+ });
68
+ } else {
69
+
70
+ // For IE 9 and bellow
71
+ _this.core.$slide.on('click.lg', function() {
72
+ _this.loadVideoOnclick($(this));
73
+ });
74
+ }
75
+
76
+ _this.core.$el.on('onBeforeSlide.lg.tm', onBeforeSlide.bind(this));
77
+
78
+ _this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex) {
79
+ _this.core.$slide.eq(prevIndex).removeClass('lg-video-playing');
80
+ });
81
+ };
82
+
83
+ Video.prototype.loadVideo = function(src, addClass, noPoster, index, html) {
84
+ var video = '';
85
+ var autoplay = 1;
86
+ var a = '';
87
+ var isVideo = this.core.isVideo(src, index) || {};
88
+
89
+ // Enable autoplay based on setting for first video if poster doesn't exist
90
+ if (noPoster) {
91
+ if (this.videoLoaded) {
92
+ autoplay = 0;
93
+ } else {
94
+ autoplay = this.core.s.autoplayFirstVideo ? 1 : 0;
95
+ }
96
+ }
97
+
98
+ // jadams
99
+ if (isVideo.youtube) {
100
+
101
+ a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
102
+ if (this.core.s.youtubePlayerParams) {
103
+ a = a + '&' + $.param(this.core.s.youtubePlayerParams);
104
+ }
105
+
106
+ 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>';
107
+ // jadams
108
+ } else if (isVideo.youporn) {
109
+
110
+ a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
111
+ if (this.core.s.youtubePlayerParams) {
112
+ a = a + '&' + $.param(this.core.s.youtubePlayerParams);
113
+ }
114
+
115
+ video = '<iframe class="lg-video-object lg-youtube ' + addClass + '" width="560" height="315" src="https://www.youporn.com/embed/' + isVideo.youporn[1] + a + '" frameborder="0" scrolling=no allowfullscreen name="yp_embed_video" frameborder="0"></iframe>';
116
+
117
+ } else if (isVideo.vimeo) {
118
+
119
+ a = '?autoplay=' + autoplay + '&api=1';
120
+ if (this.core.s.vimeoPlayerParams) {
121
+ a = a + '&' + $.param(this.core.s.vimeoPlayerParams);
122
+ }
123
+
124
+ 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>';
125
+
126
+ } else if (isVideo.dailymotion) {
127
+
128
+ a = '?wmode=opaque&autoplay=' + autoplay + '&api=postMessage';
129
+ if (this.core.s.dailymotionPlayerParams) {
130
+ a = a + '&' + $.param(this.core.s.dailymotionPlayerParams);
131
+ }
132
+
133
+ 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>';
134
+
135
+ } else if (isVideo.html5) {
136
+ var fL = html.substring(0, 1);
137
+ if (fL === '.' || fL === '#') {
138
+ html = $(html).html();
139
+ }
140
+
141
+ video = html;
142
+
143
+ } else if (isVideo.vk) {
144
+
145
+ a = '&autoplay=' + autoplay;
146
+ if (this.core.s.vkPlayerParams) {
147
+ a = a + '&' + $.param(this.core.s.vkPlayerParams);
148
+ }
149
+
150
+ video = '<iframe class="lg-video-object lg-vk ' + addClass + '" width="560" height="315" src="http://vk.com/video_ext.php?' + isVideo.vk[1] + a + '" frameborder="0" allowfullscreen></iframe>';
151
+
152
+ }
153
+
154
+ return video;
155
+ };
156
+
157
+ Video.prototype.loadVideoOnclick = function($el){
158
+
159
+ var _this = this;
160
+ // check slide has poster
161
+ if ($el.find('.lg-object').hasClass('lg-has-poster') && $el.find('.lg-object').is(':visible')) {
162
+
163
+ // check already video element present
164
+ if (!$el.hasClass('lg-has-video')) {
165
+
166
+ $el.addClass('lg-video-playing lg-has-video');
167
+
168
+ var _src;
169
+ var _html;
170
+ var _loadVideo = function(_src, _html) {
171
+
172
+ $el.find('.lg-video').append(_this.loadVideo(_src, '', false, _this.core.index, _html));
173
+
174
+ if (_html) {
175
+ if (_this.core.s.videojs) {
176
+ try {
177
+ videojs(_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {
178
+ this.play();
179
+ });
180
+ } catch (e) {
181
+ console.error('Make sure you have included videojs');
182
+ }
183
+ } else {
184
+ _this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0).play();
185
+ }
186
+ }
187
+
188
+ };
189
+
190
+ if (_this.core.s.dynamic) {
191
+
192
+ _src = _this.core.s.dynamicEl[_this.core.index].src;
193
+ _html = _this.core.s.dynamicEl[_this.core.index].html;
194
+
195
+ _loadVideo(_src, _html);
196
+
197
+ } else {
198
+
199
+ _src = _this.core.$items.eq(_this.core.index).attr('href') || _this.core.$items.eq(_this.core.index).attr('data-src');
200
+ _html = _this.core.$items.eq(_this.core.index).attr('data-html');
201
+
202
+ _loadVideo(_src, _html);
203
+
204
+ }
205
+
206
+ var $tempImg = $el.find('.lg-object');
207
+ $el.find('.lg-video').append($tempImg);
208
+
209
+ // @todo loading icon for html5 videos also
210
+ // for showing the loading indicator while loading video
211
+ if (!$el.find('.lg-video-object').hasClass('lg-html5')) {
212
+ $el.removeClass('lg-complete');
213
+ $el.find('.lg-video-object').on('load.lg error.lg', function() {
214
+ $el.addClass('lg-complete');
215
+ });
216
+ }
217
+
218
+ } else {
219
+
220
+ var youtubePlayer = $el.find('.lg-youtube').get(0);
221
+ var vimeoPlayer = $el.find('.lg-vimeo').get(0);
222
+ var dailymotionPlayer = $el.find('.lg-dailymotion').get(0);
223
+ var html5Player = $el.find('.lg-html5').get(0);
224
+ if (youtubePlayer) {
225
+ youtubePlayer.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
226
+ } else if (vimeoPlayer) {
227
+ try {
228
+ $f(vimeoPlayer).api('play');
229
+ } catch (e) {
230
+ console.error('Make sure you have included froogaloop2 js');
231
+ }
232
+ } else if (dailymotionPlayer) {
233
+ dailymotionPlayer.contentWindow.postMessage('play', '*');
234
+
235
+ } else if (html5Player) {
236
+ if (_this.core.s.videojs) {
237
+ try {
238
+ videojs(html5Player).play();
239
+ } catch (e) {
240
+ console.error('Make sure you have included videojs');
241
+ }
242
+ } else {
243
+ html5Player.play();
244
+ }
245
+ }
246
+
247
+ $el.addClass('lg-video-playing');
248
+
249
+ }
250
+ }
251
+ };
252
+
253
+ Video.prototype.destroy = function() {
254
+ this.videoLoaded = false;
255
+ };
256
+
257
+ function onHasVideo(event, index, src, html) {
258
+ /*jshint validthis:true */
259
+ var _this = this;
260
+ _this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src, 'lg-object', true, index, html));
261
+ if (html) {
262
+ if (_this.core.s.videojs) {
263
+ try {
264
+ videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {
265
+ if (!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
266
+ this.play();
267
+ }
268
+ });
269
+ } catch (e) {
270
+ console.error('Make sure you have included videojs');
271
+ }
272
+ } else {
273
+ if(!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
274
+ _this.core.$slide.eq(index).find('.lg-html5').get(0).play();
275
+ }
276
+ }
277
+ }
278
+ }
279
+
280
+ function onAferAppendSlide(event, index) {
281
+ /*jshint validthis:true */
282
+ var $videoCont = this.core.$slide.eq(index).find('.lg-video-cont');
283
+ if (!$videoCont.hasClass('lg-has-iframe')) {
284
+ $videoCont.css('max-width', this.core.s.videoMaxWidth);
285
+ this.videoLoaded = true;
286
+ }
287
+ }
288
+
289
+ function onBeforeSlide(event, prevIndex, index) {
290
+ /*jshint validthis:true */
291
+ var _this = this;
292
+
293
+ var $videoSlide = _this.core.$slide.eq(prevIndex);
294
+ var youtubePlayer = $videoSlide.find('.lg-youtube').get(0);
295
+ var vimeoPlayer = $videoSlide.find('.lg-vimeo').get(0);
296
+ var dailymotionPlayer = $videoSlide.find('.lg-dailymotion').get(0);
297
+ var vkPlayer = $videoSlide.find('.lg-vk').get(0);
298
+ var html5Player = $videoSlide.find('.lg-html5').get(0);
299
+ if (youtubePlayer) {
300
+ youtubePlayer.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
301
+ } else if (vimeoPlayer) {
302
+ try {
303
+ $f(vimeoPlayer).api('pause');
304
+ } catch (e) {
305
+ console.error('Make sure you have included froogaloop2 js');
306
+ }
307
+ } else if (dailymotionPlayer) {
308
+ dailymotionPlayer.contentWindow.postMessage('pause', '*');
309
+
310
+ } else if (html5Player) {
311
+ if (_this.core.s.videojs) {
312
+ try {
313
+ videojs(html5Player).pause();
314
+ } catch (e) {
315
+ console.error('Make sure you have included videojs');
316
+ }
317
+ } else {
318
+ html5Player.pause();
319
+ }
320
+ } if (vkPlayer) {
321
+ $(vkPlayer).attr('src', $(vkPlayer).attr('src').replace('&autoplay', '&noplay'));
322
+ }
323
+
324
+ var _src;
325
+ if (_this.core.s.dynamic) {
326
+ _src = _this.core.s.dynamicEl[index].src;
327
+ } else {
328
+ _src = _this.core.$items.eq(index).attr('href') || _this.core.$items.eq(index).attr('data-src');
329
+
330
+ }
331
+
332
+ // jadams
333
+ var _isVideo = _this.core.isVideo(_src, index) || {};
334
+ if (_isVideo.youtube || _isVideo.youporn || _isVideo.vimeo || _isVideo.dailymotion || _isVideo.vk) {
335
+ _this.core.$outer.addClass('lg-hide-download');
336
+ }
337
+
338
+ }
339
+
340
+ $.fn.lightGallery.modules.video = Video;
341
+
342
+ })();
343
+
344
+ }));
@@ -0,0 +1,7 @@
1
+ /*! lg-video - v1.2.1 - 2020-03-28
2
+ * based on lg-video v1.2.0 of 2017-11-16
3
+ * Extended version to support YouPorn
4
+ * http://sachinchoolur.github.io/lightGallery
5
+ * Copyright (C) 2017 Sachin N; Licensed GPLv3 */
6
+
7
+ (function(a,b){if(typeof define==="function"&&define.amd){define(["jquery"],function(c){return(b(c))})}else{if(typeof exports==="object"){module.exports=b(require("jquery"))}else{b(jQuery)}}}(this,function(a){(function(){var f={videoMaxWidth:"855px",autoplayFirstVideo:true,youtubePlayerParams:false,vimeoPlayerParams:false,dailymotionPlayerParams:false,vkPlayerParams:false,videojs:false,videojsOptions:{}};var c=function(g){this.core=a(g).data("lightGallery");this.$el=a(g);this.core.s=a.extend({},f,this.core.s);this.videoLoaded=false;this.init();return this};c.prototype.init=function(){var g=this;g.core.$el.on("hasVideo.lg.tm",e.bind(this));g.core.$el.on("onAferAppendSlide.lg.tm",b.bind(this));if(g.core.doCss()&&(g.core.$items.length>1)&&(g.core.s.enableSwipe||g.core.s.enableDrag)){g.core.$el.on("onSlideClick.lg.tm",function(){var h=g.core.$slide.eq(g.core.index);g.loadVideoOnclick(h)})}else{g.core.$slide.on("click.lg",function(){g.loadVideoOnclick(a(this))})}g.core.$el.on("onBeforeSlide.lg.tm",d.bind(this));g.core.$el.on("onAfterSlide.lg.tm",function(i,h){g.core.$slide.eq(h).removeClass("lg-video-playing")})};c.prototype.loadVideo=function(h,o,m,n,l){var i="";var k=1;var p="";var g=this.core.isVideo(h,n)||{};if(m){if(this.videoLoaded){k=0}else{k=this.core.s.autoplayFirstVideo?1:0}}if(g.youtube){p="?wmode=opaque&autoplay="+k+"&enablejsapi=1";if(this.core.s.youtubePlayerParams){p=p+"&"+a.param(this.core.s.youtubePlayerParams)}i='<iframe class="lg-video-object lg-youtube '+o+'" width="560" height="315" src="//www.youtube.com/embed/'+g.youtube[1]+p+'" frameborder="0" allowfullscreen></iframe>'}else{if(g.youporn){p="?wmode=opaque&autoplay="+k+"&enablejsapi=1";if(this.core.s.youtubePlayerParams){p=p+"&"+a.param(this.core.s.youtubePlayerParams)}i='<iframe class="lg-video-object lg-youtube '+o+'" width="560" height="315" src="https://www.youporn.com/embed/'+g.youporn[1]+p+'" frameborder="0" scrolling=no allowfullscreen name="yp_embed_video" frameborder="0"></iframe>'}else{if(g.vimeo){p="?autoplay="+k+"&api=1";if(this.core.s.vimeoPlayerParams){p=p+"&"+a.param(this.core.s.vimeoPlayerParams)}i='<iframe class="lg-video-object lg-vimeo '+o+'" width="560" height="315" src="//player.vimeo.com/video/'+g.vimeo[1]+p+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'}else{if(g.dailymotion){p="?wmode=opaque&autoplay="+k+"&api=postMessage";if(this.core.s.dailymotionPlayerParams){p=p+"&"+a.param(this.core.s.dailymotionPlayerParams)}i='<iframe class="lg-video-object lg-dailymotion '+o+'" width="560" height="315" src="//www.dailymotion.com/embed/video/'+g.dailymotion[1]+p+'" frameborder="0" allowfullscreen></iframe>'}else{if(g.html5){var j=l.substring(0,1);if(j==="."||j==="#"){l=a(l).html()}i=l}else{if(g.vk){p="&autoplay="+k;if(this.core.s.vkPlayerParams){p=p+"&"+a.param(this.core.s.vkPlayerParams)}i='<iframe class="lg-video-object lg-vk '+o+'" width="560" height="315" src="http://vk.com/video_ext.php?'+g.vk[1]+p+'" frameborder="0" allowfullscreen></iframe>'}}}}}}return i};c.prototype.loadVideoOnclick=function(q){var m=this;if(q.find(".lg-object").hasClass("lg-has-poster")&&q.find(".lg-object").is(":visible")){if(!q.hasClass("lg-has-video")){q.addClass("lg-video-playing lg-has-video");var k;var j;var p=function(t,r){q.find(".lg-video").append(m.loadVideo(t,"",false,m.core.index,r));if(r){if(m.core.s.videojs){try{videojs(m.core.$slide.eq(m.core.index).find(".lg-html5").get(0),m.core.s.videojsOptions,function(){this.play()})}catch(s){console.error("Make sure you have included videojs")}}else{m.core.$slide.eq(m.core.index).find(".lg-html5").get(0).play()}}};if(m.core.s.dynamic){k=m.core.s.dynamicEl[m.core.index].src;j=m.core.s.dynamicEl[m.core.index].html;p(k,j)}else{k=m.core.$items.eq(m.core.index).attr("href")||m.core.$items.eq(m.core.index).attr("data-src");j=m.core.$items.eq(m.core.index).attr("data-html");p(k,j)}var i=q.find(".lg-object");q.find(".lg-video").append(i);if(!q.find(".lg-video-object").hasClass("lg-html5")){q.removeClass("lg-complete");q.find(".lg-video-object").on("load.lg error.lg",function(){q.addClass("lg-complete")})}}else{var o=q.find(".lg-youtube").get(0);var l=q.find(".lg-vimeo").get(0);var h=q.find(".lg-dailymotion").get(0);var g=q.find(".lg-html5").get(0);if(o){o.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}else{if(l){try{$f(l).api("play")}catch(n){console.error("Make sure you have included froogaloop2 js")}}else{if(h){h.contentWindow.postMessage("play","*")}else{if(g){if(m.core.s.videojs){try{videojs(g).play()}catch(n){console.error("Make sure you have included videojs")}}else{g.play()}}}}}q.addClass("lg-video-playing")}}};c.prototype.destroy=function(){this.videoLoaded=false};function e(i,g,k,h){var l=this;l.core.$slide.eq(g).find(".lg-video").append(l.loadVideo(k,"lg-object",true,g,h));if(h){if(l.core.s.videojs){try{videojs(l.core.$slide.eq(g).find(".lg-html5").get(0),l.core.s.videojsOptions,function(){if(!l.videoLoaded&&l.core.s.autoplayFirstVideo){this.play()}})}catch(j){console.error("Make sure you have included videojs")}}else{if(!l.videoLoaded&&l.core.s.autoplayFirstVideo){l.core.$slide.eq(g).find(".lg-html5").get(0).play()}}}}function b(h,g){var i=this.core.$slide.eq(g).find(".lg-video-cont");if(!i.hasClass("lg-has-iframe")){i.css("max-width",this.core.s.videoMaxWidth);this.videoLoaded=true}}function d(h,l,o){var n=this;var r=n.core.$slide.eq(l);var q=r.find(".lg-youtube").get(0);var m=r.find(".lg-vimeo").get(0);var i=r.find(".lg-dailymotion").get(0);var s=r.find(".lg-vk").get(0);var g=r.find(".lg-html5").get(0);if(q){q.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}else{if(m){try{$f(m).api("pause")}catch(p){console.error("Make sure you have included froogaloop2 js")}}else{if(i){i.contentWindow.postMessage("pause","*")}else{if(g){if(n.core.s.videojs){try{videojs(g).pause()}catch(p){console.error("Make sure you have included videojs")}}else{g.pause()}}}}}if(s){a(s).attr("src",a(s).attr("src").replace("&autoplay","&noplay"))}var k;if(n.core.s.dynamic){k=n.core.s.dynamicEl[o].src}else{k=n.core.$items.eq(o).attr("href")||n.core.$items.eq(o).attr("data-src")}var j=n.core.isVideo(k,o)||{};if(j.youtube||j.youporn||j.vimeo||j.dailymotion||j.vk){n.core.$outer.addClass("lg-hide-download")}}a.fn.lightGallery.modules.video=c})()}));
@@ -0,0 +1,146 @@
1
+ (function(){
2
+
3
+ var DomReady = window.DomReady = {};
4
+
5
+ // Everything that has to do with properly supporting our document ready event. Brought over from the most awesome jQuery.
6
+
7
+ var userAgent = navigator.userAgent.toLowerCase();
8
+
9
+ // Figure out what browser is being used
10
+ var browser = {
11
+ version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1],
12
+ safari: /webkit/.test(userAgent),
13
+ opera: /opera/.test(userAgent),
14
+ msie: (/msie/.test(userAgent)) && (!/opera/.test( userAgent )),
15
+ mozilla: (/mozilla/.test(userAgent)) && (!/(compatible|webkit)/.test(userAgent))
16
+ };
17
+
18
+ var readyBound = false;
19
+ var isReady = false;
20
+ var readyList = [];
21
+
22
+ // Handle when the DOM is ready
23
+ function domReady() {
24
+ // Make sure that the DOM is not already loaded
25
+ if(!isReady) {
26
+ // Remember that the DOM is ready
27
+ isReady = true;
28
+
29
+ if(readyList) {
30
+ for(var fn = 0; fn < readyList.length; fn++) {
31
+ readyList[fn].call(window, []);
32
+ }
33
+
34
+ readyList = [];
35
+ }
36
+ }
37
+ };
38
+
39
+ // From Simon Willison. A safe way to fire onload w/o screwing up everyone else.
40
+ function addLoadEvent(func) {
41
+ var oldonload = window.onload;
42
+ if (typeof window.onload != 'function') {
43
+ window.onload = func;
44
+ } else {
45
+ window.onload = function() {
46
+ if (oldonload) {
47
+ oldonload();
48
+ }
49
+ func();
50
+ }
51
+ }
52
+ };
53
+
54
+ // does the heavy work of working through the browsers idiosyncracies (let's call them that) to hook onload.
55
+ function bindReady() {
56
+ if(readyBound) {
57
+ return;
58
+ }
59
+
60
+ readyBound = true;
61
+
62
+ // Mozilla, Opera (see further below for it) and webkit nightlies currently support this event
63
+ if (document.addEventListener && !browser.opera) {
64
+ // Use the handy event callback
65
+ document.addEventListener("DOMContentLoaded", domReady, false);
66
+ }
67
+
68
+ // If IE is used and is not in a frame
69
+ // Continually check to see if the document is ready
70
+ if (browser.msie && window == top) (function(){
71
+ if (isReady) return;
72
+ try {
73
+ // If IE is used, use the trick by Diego Perini
74
+ // http://javascript.nwbox.com/IEContentLoaded/
75
+ document.documentElement.doScroll("left");
76
+ } catch(error) {
77
+ setTimeout(arguments.callee, 0);
78
+ return;
79
+ }
80
+ // and execute any waiting functions
81
+ domReady();
82
+ })();
83
+
84
+ if(browser.opera) {
85
+ document.addEventListener( "DOMContentLoaded", function () {
86
+ if (isReady) return;
87
+ for (var i = 0; i < document.styleSheets.length; i++)
88
+ if (document.styleSheets[i].disabled) {
89
+ setTimeout( arguments.callee, 0 );
90
+ return;
91
+ }
92
+ // and execute any waiting functions
93
+ domReady();
94
+ }, false);
95
+ }
96
+
97
+ if(browser.safari) {
98
+ var numStyles;
99
+ (function(){
100
+ if (isReady) return;
101
+ if (document.readyState != "loaded" && document.readyState != "complete") {
102
+ setTimeout( arguments.callee, 0 );
103
+ return;
104
+ }
105
+ if (numStyles === undefined) {
106
+ var links = document.getElementsByTagName("link");
107
+ for (var i=0; i < links.length; i++) {
108
+ if(links[i].getAttribute('rel') == 'stylesheet') {
109
+ numStyles++;
110
+ }
111
+ }
112
+ var styles = document.getElementsByTagName("style");
113
+ numStyles += styles.length;
114
+ }
115
+ if (document.styleSheets.length != numStyles) {
116
+ setTimeout( arguments.callee, 0 );
117
+ return;
118
+ }
119
+
120
+ // and execute any waiting functions
121
+ domReady();
122
+ })();
123
+ }
124
+
125
+ // A fallback to window.onload, that will always work
126
+ addLoadEvent(domReady);
127
+ };
128
+
129
+ // This is the public function that people can use to hook up ready.
130
+ DomReady.ready = function(fn, args) {
131
+ // Attach the listeners
132
+ bindReady();
133
+
134
+ // If the DOM is already ready
135
+ if (isReady) {
136
+ // Execute the function immediately
137
+ fn.call(window, []);
138
+ } else {
139
+ // Add the function to the wait list
140
+ readyList.push( function() { return fn.call(window, []); } );
141
+ }
142
+ };
143
+
144
+ bindReady();
145
+
146
+ })();