j1-template 2021.0.16 → 2021.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/blocks/footer/boxes/legal_statements.proc +4 -0
- data/_includes/themes/j1/layouts/layout_metadata_generator.html +54 -39
- data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +15 -7
- data/_includes/themes/j1/modules/connectors/ads +4 -6
- data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +1 -1
- data/_includes/themes/j1/modules/connectors/analytics +5 -4
- data/_includes/themes/j1/modules/connectors/comment/disqus.html +1 -1
- data/_includes/themes/j1/modules/connectors/comments +7 -6
- data/_includes/themes/j1/modules/connectors/translator +3 -4
- data/_includes/themes/j1/modules/navigator/generator.html +2 -38
- data/_includes/themes/j1/modules/navigator/generator.org.html +232 -0
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +2 -2
- data/_includes/themes/j1/procedures/global/create_bs_button.proc +64 -22
- data/_includes/themes/j1/procedures/posts/collate_timeline.proc +14 -10
- data/_layouts/default.html +11 -1
- data/apps/public/cc/index.adoc +13 -4
- data/assets/data/authclient.html +234 -228
- data/assets/data/banner.html +34 -31
- data/assets/data/cookiebar.html +205 -198
- data/assets/data/fam.html +5 -0
- data/assets/data/footer.html +4 -0
- data/assets/data/footer.new.1.html +256 -0
- data/assets/data/footer.new.2.html +256 -0
- data/assets/data/footer.org.html +249 -0
- data/assets/data/galleries.json +2 -2
- data/assets/data/gallery_customizer.html +16 -6
- data/assets/data/menu.html +7 -2
- data/assets/data/mmenu.html +6 -2
- data/assets/data/mmenu_sidebar.html +5 -1
- data/assets/data/mmenu_toc.html +4 -0
- data/assets/data/panel.html +23 -15
- data/assets/data/quicklinks.html +6 -1
- data/assets/error_pages/HTTP204.html +2 -1
- data/assets/error_pages/HTTP400.html +2 -1
- data/assets/error_pages/HTTP401.html +2 -1
- data/assets/error_pages/HTTP403.html +2 -1
- data/assets/error_pages/HTTP404.html +2 -1
- data/assets/error_pages/HTTP500.html +2 -1
- data/assets/error_pages/HTTP501.html +2 -1
- data/assets/error_pages/HTTP502.html +2 -1
- data/assets/error_pages/HTTP503.html +2 -1
- data/assets/error_pages/HTTP520.html +2 -1
- data/assets/error_pages/HTTP521.html +2 -1
- data/assets/error_pages/HTTP533.html +2 -1
- data/assets/themes/j1/adapter/js/asciidoctor.js +166 -0
- data/assets/themes/j1/adapter/js/carousel.js +24 -0
- data/assets/themes/j1/adapter/js/fam.js +0 -12
- data/assets/themes/j1/adapter/js/j1.js +48 -25
- data/assets/themes/j1/adapter/js/j1.new.js +1878 -0
- data/assets/themes/j1/adapter/js/j1.org.js +1874 -0
- data/assets/themes/j1/adapter/js/{jf_gallery.js → justifiedGallery.js} +9 -9
- data/assets/themes/j1/adapter/js/{gallery_customizer.js → justifiedGalleryCustomizer.js} +14 -13
- data/assets/themes/j1/adapter/js/logger.js +35 -23
- data/assets/themes/j1/adapter/js/mmenu.js +8 -4
- data/assets/themes/j1/adapter/js/navigator.js +77 -34
- data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.css +17 -14
- data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +3959 -239
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.css +14 -2
- data/assets/themes/j1/core/css/vendor.min.css +1 -1
- data/assets/themes/j1/core/js/template.js +8 -2
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.min.js +8 -2
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/_lightGallery/css/core/lg-fb-comment-box.css +58 -0
- data/assets/themes/j1/modules/_lightGallery/css/core/lg-fb-comment-box.min.css +5 -0
- data/assets/themes/j1/modules/_lightGallery/css/core/lg-transitions.css +778 -0
- data/assets/themes/j1/modules/_lightGallery/css/core/lg-transitions.min.css +5 -0
- data/assets/themes/j1/modules/_lightGallery/css/core/lightgallery.css +981 -0
- data/assets/themes/j1/modules/_lightGallery/css/core/lightgallery.min.css +5 -0
- data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.eot +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.svg +47 -0
- data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.ttf +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.woff +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/img/loading.gif +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/img/video-play.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/img/vimeo-play.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/img/youtube-play.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/animation-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/customize-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/dynamic-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/facebook-icon.svg +10 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/googleplus-icon.svg +30 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/html5-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/linked-in.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/module-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/play-button.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/responsive-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/thumb-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/touch-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/twitter-icon.svg +15 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/twitter.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/video1-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/zoom-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/zoom.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/uno.css +262 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/uno.min.css +15 -0
- data/assets/themes/j1/modules/_lightGallery/js/core/lightgallery.js +1362 -0
- data/assets/themes/j1/modules/_lightGallery/js/core/lightgallery.min.js +4 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/j1/j1-video.js +402 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/j1/j1-video.min.js +8 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-autoplay.js +206 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-autoplay.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-fullscreen.js +126 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-fullscreen.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-hash.js +101 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-hash.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-pager.js +105 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-pager.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-share.js +107 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-share.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-thumbnail.js +478 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-thumbnail.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-video.js +342 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-video.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-zoom.js +527 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-zoom.min.js +5 -0
- data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery-x.js +1368 -0
- data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery-x.min.js +10 -0
- data/assets/themes/j1/modules/lightGallery/js/modules/j1/j1-x-video.js +344 -0
- data/assets/themes/j1/modules/lightGallery/js/modules/j1/j1-x-video.min.js +7 -0
- data/assets/themes/j1/modules/log4javascript/docs/backwardsincompatibilities.html +90 -0
- data/assets/themes/j1/modules/log4javascript/docs/distribution.html +87 -0
- data/assets/themes/j1/modules/log4javascript/docs/index.html +190 -0
- data/assets/themes/j1/modules/log4javascript/docs/lite.html +182 -0
- data/assets/themes/j1/modules/log4javascript/docs/manual.html +3217 -0
- data/assets/themes/j1/modules/log4javascript/docs/manual_lite.html +383 -0
- data/assets/themes/j1/modules/log4javascript/docs/quickstart.html +230 -0
- data/assets/themes/j1/modules/log4javascript/docs/whatsnew.html +86 -0
- data/assets/themes/j1/modules/log4javascript/js/log4javascript.js +5826 -0
- data/assets/themes/j1/modules/{util/js/log4javascript.js → log4javascript/js/log4javascript.min.js} +17 -0
- data/exe/j1 +1 -1
- data/lib/j1/commands/generate.rb +32 -9
- data/lib/{patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.6 → j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.7}/fastfilereaderext.so +0 -0
- data/lib/{patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.6 → j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.7}/rubyeventmachine.so +0 -0
- data/lib/j1/patches/rubygems/execjs-2.7.0/lib/execjs/external_runtime.rb +246 -0
- data/lib/j1/version.rb +3 -3
- data/lib/j1_app.rb +1 -1
- data/lib/j1_app/j1_auth_manager/auth_manager.rb +8 -2
- data/lib/j1_app/j1_site_manager/static_site.no-cross-origin.rb +94 -0
- data/lib/j1_app/j1_site_manager/static_site.rb +13 -11
- data/lib/starter_web/Gemfile +20 -14
- data/lib/starter_web/_config.yml +77 -122
- data/lib/starter_web/_data/_defaults/j1_config.yml +460 -0
- data/lib/starter_web/_data/_defaults/resources.yml +626 -325
- data/lib/starter_web/_data/apps/defaults/{justified_gallery.yml → justifiedGallery.yml} +2 -2
- data/lib/starter_web/_data/apps/defaults/{gallery_customizer.yml → justifiedGalleryCustomizer.yml} +1 -0
- data/lib/starter_web/_data/apps/defaults/{light_gallery.yml → lightGallery.yml} +0 -0
- data/lib/starter_web/_data/apps/{justified_gallery.yml → justifiedGallery.yml} +7 -7
- data/lib/starter_web/_data/apps/{gallery_customizer.yml → justifiedGalleryCustomizer.yml} +0 -0
- data/lib/starter_web/_data/apps/{light_gallery.yml → lightGallery.yml} +0 -0
- data/lib/starter_web/_data/blocks/banner.yml +45 -51
- data/lib/starter_web/_data/blocks/footer.yml +15 -3
- data/lib/starter_web/_data/blocks/panel.yml +13 -13
- data/lib/starter_web/_data/builder/blog_navigator.yml +6 -1
- data/lib/starter_web/_data/j1_config.yml +8 -7
- data/lib/starter_web/_data/layouts/blog_archive.yml +9 -0
- data/lib/starter_web/_data/layouts/collection.yml +10 -0
- data/lib/starter_web/_data/layouts/default.yml +25 -59
- data/lib/starter_web/_data/layouts/home.yml +6 -5
- data/lib/starter_web/_data/layouts/page.yml +1 -1
- data/lib/starter_web/_data/modules/authentication.yml +11 -100
- data/lib/starter_web/_data/modules/defaults/authentication.yml +1 -0
- data/lib/starter_web/_data/modules/defaults/cookiebar.yml +1 -0
- data/lib/starter_web/_data/modules/defaults/log4javascript.yml +37 -40
- data/lib/starter_web/_data/modules/defaults/navigator.yml +5 -2
- data/lib/starter_web/_data/modules/defaults/quicksearch.yml +2 -0
- data/lib/starter_web/_data/modules/log4javascript.yml +11 -83
- data/lib/starter_web/_data/modules/navigator.yml +24 -21
- data/lib/starter_web/_data/modules/navigator_menu.yml +27 -8
- data/lib/starter_web/_data/modules/quicksearch.yml +2 -0
- data/lib/starter_web/_data/plugins/defaults/paginator.yml +15 -12
- data/lib/starter_web/_data/plugins/paginator.yml +5 -3
- data/lib/starter_web/_data/private.yml +29 -57
- data/lib/starter_web/_data/resources.yml +37 -17
- data/lib/starter_web/_data/utilities/defaults/util_srv.yml +49 -3
- data/lib/starter_web/_data/utilities/util_srv.yml +8 -65
- data/lib/starter_web/_includes/attributes.asciidoc +9 -6
- data/lib/starter_web/_plugins/asciidoctor-extensions/callout.rb +47 -5
- data/lib/starter_web/_plugins/asciidoctor-extensions/conum.rb +28 -1
- data/lib/starter_web/_plugins/lunr_index.rb +17 -2
- data/lib/starter_web/assets/images/collections/blog/featured/dynamic-web-access.png +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/jamstack-generators.gif +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/jamstack-generators.jpg +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/static-web-access.png +0 -0
- data/lib/starter_web/assets/images/modules/attics/christa-dodoo-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/leon-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/machine-generator-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/icons/j1/j1-256x256.gif +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +42 -49
- data/lib/starter_web/collections/posts/public/featured/_posts/{2020-06-01-about-cookies.adoc → 2020-01-01-about-cookies.adoc} +37 -42
- data/lib/starter_web/collections/posts/public/featured/_posts/{2020-05-01-top-site-generators.adoc → 2021-03-01-site-generators.adoc} +51 -31
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-03-03-about-j1.adoc +119 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/_includes/attributes.asciidoc +4 -0
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +2 -8
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +3 -10
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +3 -10
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +3 -10
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +4 -2
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +4 -2
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +4 -2
- data/lib/starter_web/dot.gitattributes +1 -1
- data/lib/starter_web/dot.gitignore +5 -1
- data/lib/starter_web/index.html +7 -13
- data/lib/starter_web/package.json +5 -4
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/gallery.asciidoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/000_intro.adoc +7 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/100_chapter.adoc +5 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/200_chapter.adoc +7 -2
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/900_references.adoc +5 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +7 -2
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/100_chapter.asciidoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/200_chapter.asciidoc +2 -2
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +7 -2
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +6 -1
- data/lib/starter_web/pages/public/blog/navigator/archive.html +41 -25
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +49 -29
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +47 -30
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +42 -14
- data/lib/starter_web/pages/public/blog/navigator/index.html +2 -5
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +45 -48
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.org.asciidoc +244 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +21 -20
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +6 -2
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +39 -35
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +38 -36
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +16 -14
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +11 -9
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +30 -27
- data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +50 -49
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/100_gistblock.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +33 -22
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +116 -0
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +82 -0
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +77 -53
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +123 -0
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +85 -72
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/iframer.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/justified_gallery.html +3 -3
- data/lib/starter_web/pages/public/previewer/md_color_palette.adoc +1 -1940
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +7 -9
- data/lib/starter_web/pages/public/previewer/rouge.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +13 -9
- data/lib/starter_web/utilsrv/package.json +6 -2
- data/lib/starter_web/utilsrv/server.js +228 -55
- metadata +106 -216
- data/assets/data/menu.1.html +0 -505
- data/lib/starter_web/_data/_defaults/j1_light_gallery.yml +0 -110
- data/lib/starter_web/_data/_defaults/template_settings.yml +0 -258
- data/lib/starter_web/_data/plugins/defaults/notebooks.yml +0 -61
- data/lib/starter_web/_data/plugins/notebooks.yml +0 -70
- data/lib/starter_web/_data/private.yml@localhost +0 -199
- data/lib/starter_web/assets/images/collections/blog/featured/staticgen.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/aditya-joshi-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/alex-holyoake-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/anaya-katlego-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonella-lombardi-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/docker-1280x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/jekyll.1200x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/signpost-1920x800-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/water-journal-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/write-1280x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/brandon-mowinkel-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/daniel-jensen-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/florian-olivo-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/go-up-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/ian-schneider-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/jason-rosewell-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/joel-filipe-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/library-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280-v.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/markus-spiske-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/markus-spiske.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/markus-spiske3-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/modules-apps-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/nicola-styles-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/no-time-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/nousnou-iwasaki-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/premium-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/responsive-text-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/robert-v-ruggiero-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/spider-web-1920x1200-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/the-place-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/icons/algolia/search-by-algolia.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-256x256.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-32x32.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-512x512.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-64x64.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/favicon.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/scalable/d1.svg +0 -2025
- data/lib/starter_web/assets/images/modules/icons/netlify/nf-logo.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/favicon.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-256x256.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-32x32.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-512x512.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-64x64.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/scalable/p1.svg +0 -2020
- data/lib/starter_web/assets/images/modules/icons/patreon/favicon-16x16.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/patreon/favicon-32x32.png +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/000_browser_console-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/001_smee_channel-1280x400.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/002_gh_repo_settings-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/003_gh_webhook_settings-1280x1000.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/004_gh_webhook_settings-post-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/005_smee_channel_ping_receive-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/006_gh_redeliver_payload-1280x900.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/007_receive_redelivered_payload-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/000_browser_console.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/000_smee_channel.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/002_gh_repo-settings.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/003_gh_webhook_settings.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/004_gh_webhook_settings-post.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/005_smee_channel_ping_received.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/006_gh_redeliver_payload.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/007_receive_redelivered_payload.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/webhook_flow.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/flows/webhook_flow-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/scaleable/webhook_flow.svg +0 -432
- data/lib/starter_web/assets/images/pages/j1_webhooks/uml/auth_mgmr_signin_request_flow.uxf +0 -632
- data/lib/starter_web/assets/images/pages/j1_webhooks/uml/webhook_flow.uxf +0 -648
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/get-started-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/130_layout_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/content_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/content_inheritance_thumb.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/html_layout.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/j1-quickstart-windows.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/j1-template-theme.jpg +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/j1_layout.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/jekyll-minima-theme.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/lane_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/layout_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/preparations/msys_installation.jpg +0 -0
- data/lib/starter_web/assets/images/pages/log4j/apache-log4j-logo.png +0 -0
- data/lib/starter_web/assets/images/pages/log4r/code-1920x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/log4r/log4r-logo.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_000.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_001.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_002.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_003.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_004.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_005.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_006.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_007.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_008.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_009.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_010.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_011.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_012.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_013.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_014.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_015.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_016.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_017.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_018.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_019.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_020.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_021.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_022.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_023.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_024.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_025.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_026.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_027.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_028.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_029.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_030.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_031.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_032.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_033.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_034.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_035.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_036.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_037.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_038.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_039.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_040.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_041.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_042.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_043.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_044.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_045.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_046.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_047.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_048.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_049.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_050.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_051.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_052.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_053.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_054.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_055.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_056.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_057.png +0 -0
- data/lib/starter_web/assets/images/pages/material/apple-touch-icon.png +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/jQuery-logo.png +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/jquery-banner-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/jquery-banner-1920x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/src/JQuery-Logo.svg +0 -122
- data/lib/starter_web/assets/images/pages/pen/jquery/src/banner.psd +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/coordinate-map.png +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/kibana-powershell.jpg +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/option_ignore_outgoing.png +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/winlogbeat-dashboard.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/1280px-PDCA_Process.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/annie-spratt-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/deming-cycle.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/humble-lamb-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/john-schnobrich-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/sigmund-1920x1280.jpg +0 -0
- data/lib/starter_web/collections/posts/public/series/_posts/_includes/attributes.asciidoc +0 -37
- data/lib/starter_web/collections/posts/public/series/_posts/_includes/documents/readme +0 -0
- data/lib/starter_web/collections/posts/public/series/_posts/_includes/tables/debug_variables.asciidoc +0 -47
- data/lib/starter_web/pages/protected/site_search.adoc +0 -180
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.pdf +1 -5439
- data/lib/starter_web/pages/public/legal/en/000_copyright.adoc +0 -93
- data/lib/starter_web/pages/public/legal/en/100_impress.adoc +0 -55
- data/lib/starter_web/pages/public/legal/en/200_terms_of_use.adoc +0 -53
- data/lib/starter_web/pages/public/legal/en/eu/cookie.policy.asciidoc +0 -50
@@ -0,0 +1,5 @@
|
|
1
|
+
/*! lg-zoom - v1.1.0 - 2017-08-08
|
2
|
+
* http://sachinchoolur.github.io/lightGallery
|
3
|
+
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
4
|
+
|
5
|
+
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(){"use strict";var b=function(){var a=!1,b=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return b&&parseInt(b[2],10)<54&&(a=!0),a},c={scale:1,zoom:!0,actualSize:!0,enableZoomAfter:300,useLeftForZoom:b()},d=function(b){return this.core=a(b).data("lightGallery"),this.core.s=a.extend({},c,this.core.s),this.core.s.zoom&&this.core.doCss()&&(this.init(),this.zoomabletimeout=!1,this.pageX=a(window).width()/2,this.pageY=a(window).height()/2+a(window).scrollTop()),this};d.prototype.init=function(){var b=this,c='<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>';b.core.s.actualSize&&(c+='<span id="lg-actual-size" class="lg-icon"></span>'),b.core.s.useLeftForZoom?b.core.$outer.addClass("lg-use-left-for-zoom"):b.core.$outer.addClass("lg-use-transition-for-zoom"),this.core.$outer.find(".lg-toolbar").append(c),b.core.$el.on("onSlideItemLoad.lg.tm.zoom",function(c,d,e){var f=b.core.s.enableZoomAfter+e;a("body").hasClass("lg-from-hash")&&e?f=0:a("body").removeClass("lg-from-hash"),b.zoomabletimeout=setTimeout(function(){b.core.$slide.eq(d).addClass("lg-zoomable")},f+30)});var d=1,e=function(c){var d,e,f=b.core.$outer.find(".lg-current .lg-image"),g=(a(window).width()-f.prop("offsetWidth"))/2,h=(a(window).height()-f.prop("offsetHeight"))/2+a(window).scrollTop();d=b.pageX-g,e=b.pageY-h;var i=(c-1)*d,j=(c-1)*e;f.css("transform","scale3d("+c+", "+c+", 1)").attr("data-scale",c),b.core.s.useLeftForZoom?f.parent().css({left:-i+"px",top:-j+"px"}).attr("data-x",i).attr("data-y",j):f.parent().css("transform","translate3d(-"+i+"px, -"+j+"px, 0)").attr("data-x",i).attr("data-y",j)},f=function(){d>1?b.core.$outer.addClass("lg-zoomed"):b.resetZoom(),d<1&&(d=1),e(d)},g=function(c,e,g,h){var i,j=e.prop("offsetWidth");i=b.core.s.dynamic?b.core.s.dynamicEl[g].width||e[0].naturalWidth||j:b.core.$items.eq(g).attr("data-width")||e[0].naturalWidth||j;var k;b.core.$outer.hasClass("lg-zoomed")?d=1:i>j&&(k=i/j,d=k||2),h?(b.pageX=a(window).width()/2,b.pageY=a(window).height()/2+a(window).scrollTop()):(b.pageX=c.pageX||c.originalEvent.targetTouches[0].pageX,b.pageY=c.pageY||c.originalEvent.targetTouches[0].pageY),f(),setTimeout(function(){b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")},10)},h=!1;b.core.$el.on("onAferAppendSlide.lg.tm.zoom",function(a,c){var d=b.core.$slide.eq(c).find(".lg-image");d.on("dblclick",function(a){g(a,d,c)}),d.on("touchstart",function(a){h?(clearTimeout(h),h=null,g(a,d,c)):h=setTimeout(function(){h=null},300),a.preventDefault()})}),a(window).on("resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom",function(){b.pageX=a(window).width()/2,b.pageY=a(window).height()/2+a(window).scrollTop(),e(d)}),a("#lg-zoom-out").on("click.lg",function(){b.core.$outer.find(".lg-current .lg-image").length&&(d-=b.core.s.scale,f())}),a("#lg-zoom-in").on("click.lg",function(){b.core.$outer.find(".lg-current .lg-image").length&&(d+=b.core.s.scale,f())}),a("#lg-actual-size").on("click.lg",function(a){g(a,b.core.$slide.eq(b.core.index).find(".lg-image"),b.core.index,!0)}),b.core.$el.on("onBeforeSlide.lg.tm",function(){d=1,b.resetZoom()}),b.zoomDrag(),b.zoomSwipe()},d.prototype.resetZoom=function(){this.core.$outer.removeClass("lg-zoomed"),this.core.$slide.find(".lg-img-wrap").removeAttr("style data-x data-y"),this.core.$slide.find(".lg-image").removeAttr("style data-scale"),this.pageX=a(window).width()/2,this.pageY=a(window).height()/2+a(window).scrollTop()},d.prototype.zoomSwipe=function(){var a=this,b={},c={},d=!1,e=!1,f=!1;a.core.$slide.on("touchstart.lg",function(c){if(a.core.$outer.hasClass("lg-zoomed")){var d=a.core.$slide.eq(a.core.index).find(".lg-object");f=d.prop("offsetHeight")*d.attr("data-scale")>a.core.$outer.find(".lg").height(),e=d.prop("offsetWidth")*d.attr("data-scale")>a.core.$outer.find(".lg").width(),(e||f)&&(c.preventDefault(),b={x:c.originalEvent.targetTouches[0].pageX,y:c.originalEvent.targetTouches[0].pageY})}}),a.core.$slide.on("touchmove.lg",function(g){if(a.core.$outer.hasClass("lg-zoomed")){var h,i,j=a.core.$slide.eq(a.core.index).find(".lg-img-wrap");g.preventDefault(),d=!0,c={x:g.originalEvent.targetTouches[0].pageX,y:g.originalEvent.targetTouches[0].pageY},a.core.$outer.addClass("lg-zoom-dragging"),i=f?-Math.abs(j.attr("data-y"))+(c.y-b.y):-Math.abs(j.attr("data-y")),h=e?-Math.abs(j.attr("data-x"))+(c.x-b.x):-Math.abs(j.attr("data-x")),(Math.abs(c.x-b.x)>15||Math.abs(c.y-b.y)>15)&&(a.core.s.useLeftForZoom?j.css({left:h+"px",top:i+"px"}):j.css("transform","translate3d("+h+"px, "+i+"px, 0)"))}}),a.core.$slide.on("touchend.lg",function(){a.core.$outer.hasClass("lg-zoomed")&&d&&(d=!1,a.core.$outer.removeClass("lg-zoom-dragging"),a.touchendZoom(b,c,e,f))})},d.prototype.zoomDrag=function(){var b=this,c={},d={},e=!1,f=!1,g=!1,h=!1;b.core.$slide.on("mousedown.lg.zoom",function(d){var f=b.core.$slide.eq(b.core.index).find(".lg-object");h=f.prop("offsetHeight")*f.attr("data-scale")>b.core.$outer.find(".lg").height(),g=f.prop("offsetWidth")*f.attr("data-scale")>b.core.$outer.find(".lg").width(),b.core.$outer.hasClass("lg-zoomed")&&a(d.target).hasClass("lg-object")&&(g||h)&&(d.preventDefault(),c={x:d.pageX,y:d.pageY},e=!0,b.core.$outer.scrollLeft+=1,b.core.$outer.scrollLeft-=1,b.core.$outer.removeClass("lg-grab").addClass("lg-grabbing"))}),a(window).on("mousemove.lg.zoom",function(a){if(e){var i,j,k=b.core.$slide.eq(b.core.index).find(".lg-img-wrap");f=!0,d={x:a.pageX,y:a.pageY},b.core.$outer.addClass("lg-zoom-dragging"),j=h?-Math.abs(k.attr("data-y"))+(d.y-c.y):-Math.abs(k.attr("data-y")),i=g?-Math.abs(k.attr("data-x"))+(d.x-c.x):-Math.abs(k.attr("data-x")),b.core.s.useLeftForZoom?k.css({left:i+"px",top:j+"px"}):k.css("transform","translate3d("+i+"px, "+j+"px, 0)")}}),a(window).on("mouseup.lg.zoom",function(a){e&&(e=!1,b.core.$outer.removeClass("lg-zoom-dragging"),!f||c.x===d.x&&c.y===d.y||(d={x:a.pageX,y:a.pageY},b.touchendZoom(c,d,g,h)),f=!1),b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")})},d.prototype.touchendZoom=function(a,b,c,d){var e=this,f=e.core.$slide.eq(e.core.index).find(".lg-img-wrap"),g=e.core.$slide.eq(e.core.index).find(".lg-object"),h=-Math.abs(f.attr("data-x"))+(b.x-a.x),i=-Math.abs(f.attr("data-y"))+(b.y-a.y),j=(e.core.$outer.find(".lg").height()-g.prop("offsetHeight"))/2,k=Math.abs(g.prop("offsetHeight")*Math.abs(g.attr("data-scale"))-e.core.$outer.find(".lg").height()+j),l=(e.core.$outer.find(".lg").width()-g.prop("offsetWidth"))/2,m=Math.abs(g.prop("offsetWidth")*Math.abs(g.attr("data-scale"))-e.core.$outer.find(".lg").width()+l);(Math.abs(b.x-a.x)>15||Math.abs(b.y-a.y)>15)&&(d&&(i<=-k?i=-k:i>=-j&&(i=-j)),c&&(h<=-m?h=-m:h>=-l&&(h=-l)),d?f.attr("data-y",Math.abs(i)):i=-Math.abs(f.attr("data-y")),c?f.attr("data-x",Math.abs(h)):h=-Math.abs(f.attr("data-x")),e.core.s.useLeftForZoom?f.css({left:h+"px",top:i+"px"}):f.css("transform","translate3d("+h+"px, "+i+"px, 0)"))},d.prototype.destroy=function(){var b=this;b.core.$el.off(".lg.zoom"),a(window).off(".lg.zoom"),b.core.$slide.off(".lg.zoom"),b.core.$el.off(".lg.tm.zoom"),b.resetZoom(),clearTimeout(b.zoomabletimeout),b.zoomabletimeout=!1},a.fn.lightGallery.modules.zoom=d}()});
|
@@ -0,0 +1,1368 @@
|
|
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
|
+
(function (root, factory) {
|
7
|
+
if (typeof define === 'function' && define.amd) {
|
8
|
+
// AMD. Register as an anonymous module unless amdModuleId is set
|
9
|
+
define(['jquery'], function (a0) {
|
10
|
+
return (factory(a0));
|
11
|
+
});
|
12
|
+
} else if (typeof module === 'object' && module.exports) {
|
13
|
+
// Node. Does not work with strict CommonJS, but
|
14
|
+
// only CommonJS-like environments that support module.exports,
|
15
|
+
// like Node.
|
16
|
+
module.exports = factory(require('jquery'));
|
17
|
+
} else {
|
18
|
+
factory(root["jQuery"]);
|
19
|
+
}
|
20
|
+
}(this, function ($) {
|
21
|
+
|
22
|
+
(function() {
|
23
|
+
'use strict';
|
24
|
+
|
25
|
+
var defaults = {
|
26
|
+
|
27
|
+
mode: 'lg-slide',
|
28
|
+
|
29
|
+
// Ex : 'ease'
|
30
|
+
cssEasing: 'ease',
|
31
|
+
|
32
|
+
//'for jquery animation'
|
33
|
+
easing: 'linear',
|
34
|
+
speed: 600,
|
35
|
+
height: '100%',
|
36
|
+
width: '100%',
|
37
|
+
addClass: '',
|
38
|
+
startClass: 'lg-start-zoom',
|
39
|
+
backdropDuration: 150,
|
40
|
+
hideBarsDelay: 6000,
|
41
|
+
|
42
|
+
useLeft: false,
|
43
|
+
|
44
|
+
closable: true,
|
45
|
+
loop: true,
|
46
|
+
escKey: true,
|
47
|
+
keyPress: true,
|
48
|
+
controls: true,
|
49
|
+
slideEndAnimatoin: true,
|
50
|
+
hideControlOnEnd: false,
|
51
|
+
mousewheel: true,
|
52
|
+
|
53
|
+
getCaptionFromTitleOrAlt: true,
|
54
|
+
|
55
|
+
// .lg-item || '.lg-sub-html'
|
56
|
+
appendSubHtmlTo: '.lg-sub-html',
|
57
|
+
|
58
|
+
subHtmlSelectorRelative: false,
|
59
|
+
|
60
|
+
/**
|
61
|
+
* @desc number of preload slides
|
62
|
+
* will exicute only after the current slide is fully loaded.
|
63
|
+
*
|
64
|
+
* @ex you clicked on 4th image and if preload = 1 then 3rd slide and 5th
|
65
|
+
* slide will be loaded in the background after the 4th slide is fully loaded..
|
66
|
+
* if preload is 2 then 2nd 3rd 5th 6th slides will be preloaded.. ... ...
|
67
|
+
*
|
68
|
+
*/
|
69
|
+
preload: 1,
|
70
|
+
showAfterLoad: true,
|
71
|
+
selector: '',
|
72
|
+
selectWithin: '',
|
73
|
+
nextHtml: '',
|
74
|
+
prevHtml: '',
|
75
|
+
|
76
|
+
// 0, 1
|
77
|
+
index: false,
|
78
|
+
|
79
|
+
iframeMaxWidth: '100%',
|
80
|
+
|
81
|
+
download: true,
|
82
|
+
counter: true,
|
83
|
+
appendCounterTo: '.lg-toolbar',
|
84
|
+
|
85
|
+
swipeThreshold: 50,
|
86
|
+
enableSwipe: true,
|
87
|
+
enableDrag: true,
|
88
|
+
|
89
|
+
dynamic: false,
|
90
|
+
dynamicEl: [],
|
91
|
+
galleryId: 1
|
92
|
+
};
|
93
|
+
|
94
|
+
function Plugin(element, options) {
|
95
|
+
|
96
|
+
// Current lightGallery element
|
97
|
+
this.el = element;
|
98
|
+
|
99
|
+
// Current jquery element
|
100
|
+
this.$el = $(element);
|
101
|
+
|
102
|
+
// lightGallery settings
|
103
|
+
this.s = $.extend({}, defaults, options);
|
104
|
+
|
105
|
+
// When using dynamic mode, ensure dynamicEl is an array
|
106
|
+
if (this.s.dynamic && this.s.dynamicEl !== 'undefined' && this.s.dynamicEl.constructor === Array && !this.s.dynamicEl.length) {
|
107
|
+
throw ('When using dynamic mode, you must also define dynamicEl as an Array.');
|
108
|
+
}
|
109
|
+
|
110
|
+
// lightGallery modules
|
111
|
+
this.modules = {};
|
112
|
+
|
113
|
+
// false when lightgallery complete first slide;
|
114
|
+
this.lGalleryOn = false;
|
115
|
+
|
116
|
+
this.lgBusy = false;
|
117
|
+
|
118
|
+
// Timeout function for hiding controls;
|
119
|
+
this.hideBartimeout = false;
|
120
|
+
|
121
|
+
// To determine browser supports for touch events;
|
122
|
+
this.isTouch = ('ontouchstart' in document.documentElement);
|
123
|
+
|
124
|
+
// Disable hideControlOnEnd if sildeEndAnimation is true
|
125
|
+
if (this.s.slideEndAnimatoin) {
|
126
|
+
this.s.hideControlOnEnd = false;
|
127
|
+
}
|
128
|
+
|
129
|
+
// Gallery items
|
130
|
+
if (this.s.dynamic) {
|
131
|
+
this.$items = this.s.dynamicEl;
|
132
|
+
} else {
|
133
|
+
if (this.s.selector === 'this') {
|
134
|
+
this.$items = this.$el;
|
135
|
+
} else if (this.s.selector !== '') {
|
136
|
+
if (this.s.selectWithin) {
|
137
|
+
this.$items = $(this.s.selectWithin).find(this.s.selector);
|
138
|
+
} else {
|
139
|
+
this.$items = this.$el.find($(this.s.selector));
|
140
|
+
}
|
141
|
+
} else {
|
142
|
+
this.$items = this.$el.children();
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
// .lg-item
|
147
|
+
this.$slide = '';
|
148
|
+
|
149
|
+
// .lg-outer
|
150
|
+
this.$outer = '';
|
151
|
+
|
152
|
+
this.init();
|
153
|
+
|
154
|
+
return this;
|
155
|
+
}
|
156
|
+
|
157
|
+
Plugin.prototype.init = function() {
|
158
|
+
|
159
|
+
var _this = this;
|
160
|
+
|
161
|
+
// s.preload should not be more than $item.length
|
162
|
+
if (_this.s.preload > _this.$items.length) {
|
163
|
+
_this.s.preload = _this.$items.length;
|
164
|
+
}
|
165
|
+
|
166
|
+
// if dynamic option is enabled execute immediately
|
167
|
+
var _hash = window.location.hash;
|
168
|
+
if (_hash.indexOf('lg=' + this.s.galleryId) > 0) {
|
169
|
+
|
170
|
+
_this.index = parseInt(_hash.split('&slide=')[1], 10);
|
171
|
+
|
172
|
+
$('body').addClass('lg-from-hash');
|
173
|
+
if (!$('body').hasClass('lg-on')) {
|
174
|
+
setTimeout(function() {
|
175
|
+
_this.build(_this.index);
|
176
|
+
});
|
177
|
+
|
178
|
+
$('body').addClass('lg-on');
|
179
|
+
}
|
180
|
+
}
|
181
|
+
|
182
|
+
if (_this.s.dynamic) {
|
183
|
+
|
184
|
+
_this.$el.trigger('onBeforeOpen.lg');
|
185
|
+
|
186
|
+
_this.index = _this.s.index || 0;
|
187
|
+
|
188
|
+
// prevent accidental double execution
|
189
|
+
if (!$('body').hasClass('lg-on')) {
|
190
|
+
setTimeout(function() {
|
191
|
+
_this.build(_this.index);
|
192
|
+
$('body').addClass('lg-on');
|
193
|
+
});
|
194
|
+
}
|
195
|
+
} else {
|
196
|
+
|
197
|
+
// Using different namespace for click because click event should not unbind if selector is same object('this')
|
198
|
+
_this.$items.on('click.lgcustom', function(event) {
|
199
|
+
|
200
|
+
// For IE8
|
201
|
+
try {
|
202
|
+
event.preventDefault();
|
203
|
+
event.preventDefault();
|
204
|
+
} catch (er) {
|
205
|
+
event.returnValue = false;
|
206
|
+
}
|
207
|
+
|
208
|
+
_this.$el.trigger('onBeforeOpen.lg');
|
209
|
+
|
210
|
+
_this.index = _this.s.index || _this.$items.index(this);
|
211
|
+
|
212
|
+
// prevent accidental double execution
|
213
|
+
if (!$('body').hasClass('lg-on')) {
|
214
|
+
_this.build(_this.index);
|
215
|
+
$('body').addClass('lg-on');
|
216
|
+
}
|
217
|
+
});
|
218
|
+
}
|
219
|
+
|
220
|
+
};
|
221
|
+
|
222
|
+
Plugin.prototype.build = function(index) {
|
223
|
+
|
224
|
+
var _this = this;
|
225
|
+
|
226
|
+
_this.structure();
|
227
|
+
|
228
|
+
// module constructor
|
229
|
+
$.each($.fn.lightGallery.modules, function(key) {
|
230
|
+
_this.modules[key] = new $.fn.lightGallery.modules[key](_this.el);
|
231
|
+
});
|
232
|
+
|
233
|
+
// initiate slide function
|
234
|
+
_this.slide(index, false, false, false);
|
235
|
+
|
236
|
+
if (_this.s.keyPress) {
|
237
|
+
_this.keyPress();
|
238
|
+
}
|
239
|
+
|
240
|
+
if (_this.$items.length > 1) {
|
241
|
+
|
242
|
+
_this.arrow();
|
243
|
+
|
244
|
+
setTimeout(function() {
|
245
|
+
_this.enableDrag();
|
246
|
+
_this.enableSwipe();
|
247
|
+
}, 50);
|
248
|
+
|
249
|
+
if (_this.s.mousewheel) {
|
250
|
+
_this.mousewheel();
|
251
|
+
}
|
252
|
+
} else {
|
253
|
+
_this.$slide.on('click.lg', function() {
|
254
|
+
_this.$el.trigger('onSlideClick.lg');
|
255
|
+
});
|
256
|
+
}
|
257
|
+
|
258
|
+
_this.counter();
|
259
|
+
|
260
|
+
_this.closeGallery();
|
261
|
+
|
262
|
+
_this.$el.trigger('onAfterOpen.lg');
|
263
|
+
|
264
|
+
// Hide controllers if mouse doesn't move for some period
|
265
|
+
_this.$outer.on('mousemove.lg click.lg touchstart.lg', function() {
|
266
|
+
|
267
|
+
_this.$outer.removeClass('lg-hide-items');
|
268
|
+
|
269
|
+
clearTimeout(_this.hideBartimeout);
|
270
|
+
|
271
|
+
// Timeout will be cleared on each slide movement also
|
272
|
+
_this.hideBartimeout = setTimeout(function() {
|
273
|
+
_this.$outer.addClass('lg-hide-items');
|
274
|
+
}, _this.s.hideBarsDelay);
|
275
|
+
|
276
|
+
});
|
277
|
+
|
278
|
+
_this.$outer.trigger('mousemove.lg');
|
279
|
+
|
280
|
+
};
|
281
|
+
|
282
|
+
Plugin.prototype.structure = function() {
|
283
|
+
var list = '';
|
284
|
+
var controls = '';
|
285
|
+
var i = 0;
|
286
|
+
var subHtmlCont = '';
|
287
|
+
var template;
|
288
|
+
var _this = this;
|
289
|
+
|
290
|
+
$('body').append('<div class="lg-backdrop"></div>');
|
291
|
+
$('.lg-backdrop').css('transition-duration', this.s.backdropDuration + 'ms');
|
292
|
+
|
293
|
+
// Create gallery items
|
294
|
+
for (i = 0; i < this.$items.length; i++) {
|
295
|
+
list += '<div class="lg-item"></div>';
|
296
|
+
}
|
297
|
+
|
298
|
+
// Create controlls
|
299
|
+
if (this.s.controls && this.$items.length > 1) {
|
300
|
+
controls = '<div class="lg-actions">' +
|
301
|
+
'<button class="lg-prev lg-icon">' + this.s.prevHtml + '</button>' +
|
302
|
+
'<button class="lg-next lg-icon">' + this.s.nextHtml + '</button>' +
|
303
|
+
'</div>';
|
304
|
+
}
|
305
|
+
|
306
|
+
if (this.s.appendSubHtmlTo === '.lg-sub-html') {
|
307
|
+
subHtmlCont = '<div class="lg-sub-html"></div>';
|
308
|
+
}
|
309
|
+
|
310
|
+
template = '<div class="lg-outer ' + this.s.addClass + ' ' + this.s.startClass + '">' +
|
311
|
+
'<div class="lg" style="width:' + this.s.width + '; height:' + this.s.height + '">' +
|
312
|
+
'<div class="lg-inner">' + list + '</div>' +
|
313
|
+
'<div class="lg-toolbar lg-group">' +
|
314
|
+
'<span class="lg-close lg-icon"></span>' +
|
315
|
+
'</div>' +
|
316
|
+
controls +
|
317
|
+
subHtmlCont +
|
318
|
+
'</div>' +
|
319
|
+
'</div>';
|
320
|
+
|
321
|
+
$('body').append(template);
|
322
|
+
this.$outer = $('.lg-outer');
|
323
|
+
this.$slide = this.$outer.find('.lg-item');
|
324
|
+
|
325
|
+
if (this.s.useLeft) {
|
326
|
+
this.$outer.addClass('lg-use-left');
|
327
|
+
|
328
|
+
// Set mode lg-slide if use left is true;
|
329
|
+
this.s.mode = 'lg-slide';
|
330
|
+
} else {
|
331
|
+
this.$outer.addClass('lg-use-css3');
|
332
|
+
}
|
333
|
+
|
334
|
+
// For fixed height gallery
|
335
|
+
_this.setTop();
|
336
|
+
$(window).on('resize.lg orientationchange.lg', function() {
|
337
|
+
setTimeout(function() {
|
338
|
+
_this.setTop();
|
339
|
+
}, 100);
|
340
|
+
});
|
341
|
+
|
342
|
+
// add class lg-current to remove initial transition
|
343
|
+
this.$slide.eq(this.index).addClass('lg-current');
|
344
|
+
|
345
|
+
// add Class for css support and transition mode
|
346
|
+
if (this.doCss()) {
|
347
|
+
this.$outer.addClass('lg-css3');
|
348
|
+
} else {
|
349
|
+
this.$outer.addClass('lg-css');
|
350
|
+
|
351
|
+
// Set speed 0 because no animation will happen if browser doesn't support css3
|
352
|
+
this.s.speed = 0;
|
353
|
+
}
|
354
|
+
|
355
|
+
this.$outer.addClass(this.s.mode);
|
356
|
+
|
357
|
+
if (this.s.enableDrag && this.$items.length > 1) {
|
358
|
+
this.$outer.addClass('lg-grab');
|
359
|
+
}
|
360
|
+
|
361
|
+
if (this.s.showAfterLoad) {
|
362
|
+
this.$outer.addClass('lg-show-after-load');
|
363
|
+
}
|
364
|
+
|
365
|
+
if (this.doCss()) {
|
366
|
+
var $inner = this.$outer.find('.lg-inner');
|
367
|
+
$inner.css('transition-timing-function', this.s.cssEasing);
|
368
|
+
$inner.css('transition-duration', this.s.speed + 'ms');
|
369
|
+
}
|
370
|
+
|
371
|
+
setTimeout(function() {
|
372
|
+
$('.lg-backdrop').addClass('in');
|
373
|
+
});
|
374
|
+
|
375
|
+
setTimeout(function() {
|
376
|
+
_this.$outer.addClass('lg-visible');
|
377
|
+
}, this.s.backdropDuration);
|
378
|
+
|
379
|
+
if (this.s.download) {
|
380
|
+
this.$outer.find('.lg-toolbar').append('<a id="lg-download" target="_blank" download class="lg-download lg-icon"></a>');
|
381
|
+
}
|
382
|
+
|
383
|
+
// Store the current scroll top value to scroll back after closing the gallery..
|
384
|
+
this.prevScrollTop = $(window).scrollTop();
|
385
|
+
|
386
|
+
};
|
387
|
+
|
388
|
+
// For fixed height gallery
|
389
|
+
Plugin.prototype.setTop = function() {
|
390
|
+
if (this.s.height !== '100%') {
|
391
|
+
var wH = $(window).height();
|
392
|
+
var top = (wH - parseInt(this.s.height, 10)) / 2;
|
393
|
+
var $lGallery = this.$outer.find('.lg');
|
394
|
+
if (wH >= parseInt(this.s.height, 10)) {
|
395
|
+
$lGallery.css('top', top + 'px');
|
396
|
+
} else {
|
397
|
+
$lGallery.css('top', '0px');
|
398
|
+
}
|
399
|
+
}
|
400
|
+
};
|
401
|
+
|
402
|
+
// Find css3 support
|
403
|
+
Plugin.prototype.doCss = function() {
|
404
|
+
// check for css animation support
|
405
|
+
var support = function() {
|
406
|
+
var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition'];
|
407
|
+
var root = document.documentElement;
|
408
|
+
var i = 0;
|
409
|
+
for (i = 0; i < transition.length; i++) {
|
410
|
+
if (transition[i] in root.style) {
|
411
|
+
return true;
|
412
|
+
}
|
413
|
+
}
|
414
|
+
};
|
415
|
+
|
416
|
+
if (support()) {
|
417
|
+
return true;
|
418
|
+
}
|
419
|
+
|
420
|
+
return false;
|
421
|
+
};
|
422
|
+
|
423
|
+
/**
|
424
|
+
* @desc Check the given src is video
|
425
|
+
* @param {String} src
|
426
|
+
* @return {Object} video type
|
427
|
+
* Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] }
|
428
|
+
*/
|
429
|
+
Plugin.prototype.isVideo = function(src, index) {
|
430
|
+
|
431
|
+
var html;
|
432
|
+
if (this.s.dynamic) {
|
433
|
+
html = this.s.dynamicEl[index].html;
|
434
|
+
} else {
|
435
|
+
html = this.$items.eq(index).attr('data-html');
|
436
|
+
}
|
437
|
+
|
438
|
+
if (!src) {
|
439
|
+
if(html) {
|
440
|
+
return {
|
441
|
+
html5: true
|
442
|
+
};
|
443
|
+
} else {
|
444
|
+
console.error('lightGallery :- data-src is not pvovided on slide item ' + (index + 1) + '. Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html');
|
445
|
+
return false;
|
446
|
+
}
|
447
|
+
}
|
448
|
+
|
449
|
+
var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i);
|
450
|
+
var youporn = src.match(/\/\/(?:www\.)?youporn.com\/embed\/([0-9]+\/[0-9a-z\-_]+\/)/i);
|
451
|
+
var vimeo = src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i);
|
452
|
+
var dailymotion = src.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i);
|
453
|
+
var vk = src.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);
|
454
|
+
|
455
|
+
if (youtube) {
|
456
|
+
return {
|
457
|
+
youtube: youtube
|
458
|
+
};
|
459
|
+
} else if (youporn) {
|
460
|
+
return {
|
461
|
+
youporn: youporn
|
462
|
+
};
|
463
|
+
} else if (vimeo) {
|
464
|
+
return {
|
465
|
+
vimeo: vimeo
|
466
|
+
};
|
467
|
+
} else if (dailymotion) {
|
468
|
+
return {
|
469
|
+
dailymotion: dailymotion
|
470
|
+
};
|
471
|
+
} else if (vk) {
|
472
|
+
return {
|
473
|
+
vk: vk
|
474
|
+
};
|
475
|
+
}
|
476
|
+
};
|
477
|
+
|
478
|
+
/**
|
479
|
+
* @desc Create image counter
|
480
|
+
* Ex: 1/10
|
481
|
+
*/
|
482
|
+
Plugin.prototype.counter = function() {
|
483
|
+
if (this.s.counter) {
|
484
|
+
$(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>');
|
485
|
+
}
|
486
|
+
};
|
487
|
+
|
488
|
+
/**
|
489
|
+
* @desc add sub-html into the slide
|
490
|
+
* @param {Number} index - index of the slide
|
491
|
+
*/
|
492
|
+
Plugin.prototype.addHtml = function(index) {
|
493
|
+
var subHtml = null;
|
494
|
+
var subHtmlUrl;
|
495
|
+
var $currentEle;
|
496
|
+
if (this.s.dynamic) {
|
497
|
+
if (this.s.dynamicEl[index].subHtmlUrl) {
|
498
|
+
subHtmlUrl = this.s.dynamicEl[index].subHtmlUrl;
|
499
|
+
} else {
|
500
|
+
subHtml = this.s.dynamicEl[index].subHtml;
|
501
|
+
}
|
502
|
+
} else {
|
503
|
+
$currentEle = this.$items.eq(index);
|
504
|
+
if ($currentEle.attr('data-sub-html-url')) {
|
505
|
+
subHtmlUrl = $currentEle.attr('data-sub-html-url');
|
506
|
+
} else {
|
507
|
+
subHtml = $currentEle.attr('data-sub-html');
|
508
|
+
if (this.s.getCaptionFromTitleOrAlt && !subHtml) {
|
509
|
+
subHtml = $currentEle.attr('title') || $currentEle.find('img').first().attr('alt');
|
510
|
+
}
|
511
|
+
}
|
512
|
+
}
|
513
|
+
|
514
|
+
if (!subHtmlUrl) {
|
515
|
+
if (typeof subHtml !== 'undefined' && subHtml !== null) {
|
516
|
+
|
517
|
+
// get first letter of subhtml
|
518
|
+
// if first letter starts with . or # get the html form the jQuery object
|
519
|
+
var fL = subHtml.substring(0, 1);
|
520
|
+
if (fL === '.' || fL === '#') {
|
521
|
+
if (this.s.subHtmlSelectorRelative && !this.s.dynamic) {
|
522
|
+
subHtml = $currentEle.find(subHtml).html();
|
523
|
+
} else {
|
524
|
+
subHtml = $(subHtml).html();
|
525
|
+
}
|
526
|
+
}
|
527
|
+
} else {
|
528
|
+
subHtml = '';
|
529
|
+
}
|
530
|
+
}
|
531
|
+
|
532
|
+
if (this.s.appendSubHtmlTo === '.lg-sub-html') {
|
533
|
+
|
534
|
+
if (subHtmlUrl) {
|
535
|
+
this.$outer.find(this.s.appendSubHtmlTo).load(subHtmlUrl);
|
536
|
+
} else {
|
537
|
+
this.$outer.find(this.s.appendSubHtmlTo).html(subHtml);
|
538
|
+
}
|
539
|
+
|
540
|
+
} else {
|
541
|
+
|
542
|
+
if (subHtmlUrl) {
|
543
|
+
this.$slide.eq(index).load(subHtmlUrl);
|
544
|
+
} else {
|
545
|
+
this.$slide.eq(index).append(subHtml);
|
546
|
+
}
|
547
|
+
}
|
548
|
+
|
549
|
+
// Add lg-empty-html class if title doesn't exist
|
550
|
+
if (typeof subHtml !== 'undefined' && subHtml !== null) {
|
551
|
+
if (subHtml === '') {
|
552
|
+
this.$outer.find(this.s.appendSubHtmlTo).addClass('lg-empty-html');
|
553
|
+
} else {
|
554
|
+
this.$outer.find(this.s.appendSubHtmlTo).removeClass('lg-empty-html');
|
555
|
+
}
|
556
|
+
}
|
557
|
+
|
558
|
+
this.$el.trigger('onAfterAppendSubHtml.lg', [index]);
|
559
|
+
};
|
560
|
+
|
561
|
+
/**
|
562
|
+
* @desc Preload slides
|
563
|
+
* @param {Number} index - index of the slide
|
564
|
+
*/
|
565
|
+
Plugin.prototype.preload = function(index) {
|
566
|
+
var i = 1;
|
567
|
+
var j = 1;
|
568
|
+
for (i = 1; i <= this.s.preload; i++) {
|
569
|
+
if (i >= this.$items.length - index) {
|
570
|
+
break;
|
571
|
+
}
|
572
|
+
|
573
|
+
this.loadContent(index + i, false, 0);
|
574
|
+
}
|
575
|
+
|
576
|
+
for (j = 1; j <= this.s.preload; j++) {
|
577
|
+
if (index - j < 0) {
|
578
|
+
break;
|
579
|
+
}
|
580
|
+
|
581
|
+
this.loadContent(index - j, false, 0);
|
582
|
+
}
|
583
|
+
};
|
584
|
+
|
585
|
+
/**
|
586
|
+
* @desc Load slide content into slide.
|
587
|
+
* @param {Number} index - index of the slide.
|
588
|
+
* @param {Boolean} rec - if true call loadcontent() function again.
|
589
|
+
* @param {Boolean} delay - delay for adding complete class. it is 0 except first time.
|
590
|
+
*/
|
591
|
+
Plugin.prototype.loadContent = function(index, rec, delay) {
|
592
|
+
|
593
|
+
var _this = this;
|
594
|
+
var _hasPoster = false;
|
595
|
+
var _$img;
|
596
|
+
var _src;
|
597
|
+
var _poster;
|
598
|
+
var _srcset;
|
599
|
+
var _sizes;
|
600
|
+
var _html;
|
601
|
+
var getResponsiveSrc = function(srcItms) {
|
602
|
+
var rsWidth = [];
|
603
|
+
var rsSrc = [];
|
604
|
+
for (var i = 0; i < srcItms.length; i++) {
|
605
|
+
var __src = srcItms[i].split(' ');
|
606
|
+
|
607
|
+
// Manage empty space
|
608
|
+
if (__src[0] === '') {
|
609
|
+
__src.splice(0, 1);
|
610
|
+
}
|
611
|
+
|
612
|
+
rsSrc.push(__src[0]);
|
613
|
+
rsWidth.push(__src[1]);
|
614
|
+
}
|
615
|
+
|
616
|
+
var wWidth = $(window).width();
|
617
|
+
for (var j = 0; j < rsWidth.length; j++) {
|
618
|
+
if (parseInt(rsWidth[j], 10) > wWidth) {
|
619
|
+
_src = rsSrc[j];
|
620
|
+
break;
|
621
|
+
}
|
622
|
+
}
|
623
|
+
};
|
624
|
+
|
625
|
+
if (_this.s.dynamic) {
|
626
|
+
|
627
|
+
if (_this.s.dynamicEl[index].poster) {
|
628
|
+
_hasPoster = true;
|
629
|
+
_poster = _this.s.dynamicEl[index].poster;
|
630
|
+
}
|
631
|
+
|
632
|
+
_html = _this.s.dynamicEl[index].html;
|
633
|
+
_src = _this.s.dynamicEl[index].src;
|
634
|
+
|
635
|
+
if (_this.s.dynamicEl[index].responsive) {
|
636
|
+
var srcDyItms = _this.s.dynamicEl[index].responsive.split(',');
|
637
|
+
getResponsiveSrc(srcDyItms);
|
638
|
+
}
|
639
|
+
|
640
|
+
_srcset = _this.s.dynamicEl[index].srcset;
|
641
|
+
_sizes = _this.s.dynamicEl[index].sizes;
|
642
|
+
|
643
|
+
} else {
|
644
|
+
|
645
|
+
if (_this.$items.eq(index).attr('data-poster')) {
|
646
|
+
_hasPoster = true;
|
647
|
+
_poster = _this.$items.eq(index).attr('data-poster');
|
648
|
+
}
|
649
|
+
|
650
|
+
_html = _this.$items.eq(index).attr('data-html');
|
651
|
+
_src = _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src');
|
652
|
+
|
653
|
+
if (_this.$items.eq(index).attr('data-responsive')) {
|
654
|
+
var srcItms = _this.$items.eq(index).attr('data-responsive').split(',');
|
655
|
+
getResponsiveSrc(srcItms);
|
656
|
+
}
|
657
|
+
|
658
|
+
_srcset = _this.$items.eq(index).attr('data-srcset');
|
659
|
+
_sizes = _this.$items.eq(index).attr('data-sizes');
|
660
|
+
|
661
|
+
}
|
662
|
+
|
663
|
+
//if (_src || _srcset || _sizes || _poster) {
|
664
|
+
|
665
|
+
var iframe = false;
|
666
|
+
if (_this.s.dynamic) {
|
667
|
+
if (_this.s.dynamicEl[index].iframe) {
|
668
|
+
iframe = true;
|
669
|
+
}
|
670
|
+
} else {
|
671
|
+
if (_this.$items.eq(index).attr('data-iframe') === 'true') {
|
672
|
+
iframe = true;
|
673
|
+
}
|
674
|
+
}
|
675
|
+
|
676
|
+
var _isVideo = _this.isVideo(_src, index);
|
677
|
+
if (!_this.$slide.eq(index).hasClass('lg-loaded')) {
|
678
|
+
if (iframe) {
|
679
|
+
_this.$slide.eq(index).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:' + _this.s.iframeMaxWidth + '"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="' + _src + '" allowfullscreen="true"></iframe></div></div>');
|
680
|
+
} else if (_hasPoster) {
|
681
|
+
var videoClass = '';
|
682
|
+
if (_isVideo && _isVideo.youtube) {
|
683
|
+
videoClass = 'lg-has-youtube';
|
684
|
+
} else if (_isVideo && _isVideo.vimeo) {
|
685
|
+
videoClass = 'lg-has-vimeo';
|
686
|
+
} else {
|
687
|
+
videoClass = 'lg-has-html5';
|
688
|
+
}
|
689
|
+
|
690
|
+
_this.$slide.eq(index).prepend('<div class="lg-video-cont ' + videoClass + ' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="' + _poster + '" /></div></div>');
|
691
|
+
|
692
|
+
} else if (_isVideo) {
|
693
|
+
_this.$slide.eq(index).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>');
|
694
|
+
_this.$el.trigger('hasVideo.lg', [index, _src, _html]);
|
695
|
+
} else {
|
696
|
+
_this.$slide.eq(index).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="' + _src + '" /></div>');
|
697
|
+
}
|
698
|
+
|
699
|
+
_this.$el.trigger('onAferAppendSlide.lg', [index]);
|
700
|
+
|
701
|
+
_$img = _this.$slide.eq(index).find('.lg-object');
|
702
|
+
if (_sizes) {
|
703
|
+
_$img.attr('sizes', _sizes);
|
704
|
+
}
|
705
|
+
|
706
|
+
if (_srcset) {
|
707
|
+
_$img.attr('srcset', _srcset);
|
708
|
+
try {
|
709
|
+
picturefill({
|
710
|
+
elements: [_$img[0]]
|
711
|
+
});
|
712
|
+
} catch (e) {
|
713
|
+
console.warn('lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.');
|
714
|
+
}
|
715
|
+
}
|
716
|
+
|
717
|
+
if (this.s.appendSubHtmlTo !== '.lg-sub-html') {
|
718
|
+
_this.addHtml(index);
|
719
|
+
}
|
720
|
+
|
721
|
+
_this.$slide.eq(index).addClass('lg-loaded');
|
722
|
+
}
|
723
|
+
|
724
|
+
_this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {
|
725
|
+
|
726
|
+
// For first time add some delay for displaying the start animation.
|
727
|
+
var _speed = 0;
|
728
|
+
|
729
|
+
// Do not change the delay value because it is required for zoom plugin.
|
730
|
+
// If gallery opened from direct url (hash) speed value should be 0
|
731
|
+
if (delay && !$('body').hasClass('lg-from-hash')) {
|
732
|
+
_speed = delay;
|
733
|
+
}
|
734
|
+
|
735
|
+
setTimeout(function() {
|
736
|
+
_this.$slide.eq(index).addClass('lg-complete');
|
737
|
+
_this.$el.trigger('onSlideItemLoad.lg', [index, delay || 0]);
|
738
|
+
}, _speed);
|
739
|
+
|
740
|
+
});
|
741
|
+
|
742
|
+
// @todo check load state for html5 videos
|
743
|
+
if (_isVideo && _isVideo.html5 && !_hasPoster) {
|
744
|
+
_this.$slide.eq(index).addClass('lg-complete');
|
745
|
+
}
|
746
|
+
|
747
|
+
if (rec === true) {
|
748
|
+
if (!_this.$slide.eq(index).hasClass('lg-complete')) {
|
749
|
+
_this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {
|
750
|
+
_this.preload(index);
|
751
|
+
});
|
752
|
+
} else {
|
753
|
+
_this.preload(index);
|
754
|
+
}
|
755
|
+
}
|
756
|
+
|
757
|
+
//}
|
758
|
+
};
|
759
|
+
|
760
|
+
/**
|
761
|
+
* @desc slide function for lightgallery
|
762
|
+
** Slide() gets call on start
|
763
|
+
** ** Set lg.on true once slide() function gets called.
|
764
|
+
** Call loadContent() on slide() function inside setTimeout
|
765
|
+
** ** On first slide we do not want any animation like slide of fade
|
766
|
+
** ** So on first slide( if lg.on if false that is first slide) loadContent() should start loading immediately
|
767
|
+
** ** Else loadContent() should wait for the transition to complete.
|
768
|
+
** ** So set timeout s.speed + 50
|
769
|
+
<=> ** loadContent() will load slide content in to the particular slide
|
770
|
+
** ** It has recursion (rec) parameter. if rec === true loadContent() will call preload() function.
|
771
|
+
** ** preload will execute only when the previous slide is fully loaded (images iframe)
|
772
|
+
** ** avoid simultaneous image load
|
773
|
+
<=> ** Preload() will check for s.preload value and call loadContent() again accoring to preload value
|
774
|
+
** loadContent() <====> Preload();
|
775
|
+
|
776
|
+
* @param {Number} index - index of the slide
|
777
|
+
* @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag
|
778
|
+
* @param {Boolean} fromThumb - true if slide function called via thumbnail click
|
779
|
+
* @param {String} direction - Direction of the slide(next/prev)
|
780
|
+
*/
|
781
|
+
Plugin.prototype.slide = function(index, fromTouch, fromThumb, direction) {
|
782
|
+
|
783
|
+
var _prevIndex = this.$outer.find('.lg-current').index();
|
784
|
+
var _this = this;
|
785
|
+
|
786
|
+
// Prevent if multiple call
|
787
|
+
// Required for hsh plugin
|
788
|
+
if (_this.lGalleryOn && (_prevIndex === index)) {
|
789
|
+
return;
|
790
|
+
}
|
791
|
+
|
792
|
+
var _length = this.$slide.length;
|
793
|
+
var _time = _this.lGalleryOn ? this.s.speed : 0;
|
794
|
+
|
795
|
+
if (!_this.lgBusy) {
|
796
|
+
|
797
|
+
if (this.s.download) {
|
798
|
+
var _src;
|
799
|
+
if (_this.s.dynamic) {
|
800
|
+
_src = _this.s.dynamicEl[index].downloadUrl !== false && (_this.s.dynamicEl[index].downloadUrl || _this.s.dynamicEl[index].src);
|
801
|
+
} else {
|
802
|
+
_src = _this.$items.eq(index).attr('data-download-url') !== 'false' && (_this.$items.eq(index).attr('data-download-url') || _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src'));
|
803
|
+
|
804
|
+
}
|
805
|
+
|
806
|
+
if (_src) {
|
807
|
+
$('#lg-download').attr('href', _src);
|
808
|
+
_this.$outer.removeClass('lg-hide-download');
|
809
|
+
} else {
|
810
|
+
_this.$outer.addClass('lg-hide-download');
|
811
|
+
}
|
812
|
+
}
|
813
|
+
|
814
|
+
this.$el.trigger('onBeforeSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
|
815
|
+
|
816
|
+
_this.lgBusy = true;
|
817
|
+
|
818
|
+
clearTimeout(_this.hideBartimeout);
|
819
|
+
|
820
|
+
// Add title if this.s.appendSubHtmlTo === lg-sub-html
|
821
|
+
if (this.s.appendSubHtmlTo === '.lg-sub-html') {
|
822
|
+
|
823
|
+
// wait for slide animation to complete
|
824
|
+
setTimeout(function() {
|
825
|
+
_this.addHtml(index);
|
826
|
+
}, _time);
|
827
|
+
}
|
828
|
+
|
829
|
+
this.arrowDisable(index);
|
830
|
+
|
831
|
+
if (!direction) {
|
832
|
+
if (index < _prevIndex) {
|
833
|
+
direction = 'prev';
|
834
|
+
} else if (index > _prevIndex) {
|
835
|
+
direction = 'next';
|
836
|
+
}
|
837
|
+
}
|
838
|
+
|
839
|
+
if (!fromTouch) {
|
840
|
+
|
841
|
+
// remove all transitions
|
842
|
+
_this.$outer.addClass('lg-no-trans');
|
843
|
+
|
844
|
+
this.$slide.removeClass('lg-prev-slide lg-next-slide');
|
845
|
+
|
846
|
+
if (direction === 'prev') {
|
847
|
+
|
848
|
+
//prevslide
|
849
|
+
this.$slide.eq(index).addClass('lg-prev-slide');
|
850
|
+
this.$slide.eq(_prevIndex).addClass('lg-next-slide');
|
851
|
+
} else {
|
852
|
+
|
853
|
+
// next slide
|
854
|
+
this.$slide.eq(index).addClass('lg-next-slide');
|
855
|
+
this.$slide.eq(_prevIndex).addClass('lg-prev-slide');
|
856
|
+
}
|
857
|
+
|
858
|
+
// give 50 ms for browser to add/remove class
|
859
|
+
setTimeout(function() {
|
860
|
+
_this.$slide.removeClass('lg-current');
|
861
|
+
|
862
|
+
//_this.$slide.eq(_prevIndex).removeClass('lg-current');
|
863
|
+
_this.$slide.eq(index).addClass('lg-current');
|
864
|
+
|
865
|
+
// reset all transitions
|
866
|
+
_this.$outer.removeClass('lg-no-trans');
|
867
|
+
}, 50);
|
868
|
+
} else {
|
869
|
+
|
870
|
+
this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide');
|
871
|
+
var touchPrev;
|
872
|
+
var touchNext;
|
873
|
+
if (_length > 2) {
|
874
|
+
touchPrev = index - 1;
|
875
|
+
touchNext = index + 1;
|
876
|
+
|
877
|
+
if ((index === 0) && (_prevIndex === _length - 1)) {
|
878
|
+
|
879
|
+
// next slide
|
880
|
+
touchNext = 0;
|
881
|
+
touchPrev = _length - 1;
|
882
|
+
} else if ((index === _length - 1) && (_prevIndex === 0)) {
|
883
|
+
|
884
|
+
// prev slide
|
885
|
+
touchNext = 0;
|
886
|
+
touchPrev = _length - 1;
|
887
|
+
}
|
888
|
+
|
889
|
+
} else {
|
890
|
+
touchPrev = 0;
|
891
|
+
touchNext = 1;
|
892
|
+
}
|
893
|
+
|
894
|
+
if (direction === 'prev') {
|
895
|
+
_this.$slide.eq(touchNext).addClass('lg-next-slide');
|
896
|
+
} else {
|
897
|
+
_this.$slide.eq(touchPrev).addClass('lg-prev-slide');
|
898
|
+
}
|
899
|
+
|
900
|
+
_this.$slide.eq(index).addClass('lg-current');
|
901
|
+
}
|
902
|
+
|
903
|
+
if (_this.lGalleryOn) {
|
904
|
+
setTimeout(function() {
|
905
|
+
_this.loadContent(index, true, 0);
|
906
|
+
}, this.s.speed + 50);
|
907
|
+
|
908
|
+
setTimeout(function() {
|
909
|
+
_this.lgBusy = false;
|
910
|
+
_this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
|
911
|
+
}, this.s.speed);
|
912
|
+
|
913
|
+
} else {
|
914
|
+
_this.loadContent(index, true, _this.s.backdropDuration);
|
915
|
+
|
916
|
+
_this.lgBusy = false;
|
917
|
+
_this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
|
918
|
+
}
|
919
|
+
|
920
|
+
_this.lGalleryOn = true;
|
921
|
+
|
922
|
+
if (this.s.counter) {
|
923
|
+
$('#lg-counter-current').text(index + 1);
|
924
|
+
}
|
925
|
+
|
926
|
+
}
|
927
|
+
_this.index = index;
|
928
|
+
|
929
|
+
};
|
930
|
+
|
931
|
+
/**
|
932
|
+
* @desc Go to next slide
|
933
|
+
* @param {Boolean} fromTouch - true if slide function called via touch event
|
934
|
+
*/
|
935
|
+
Plugin.prototype.goToNextSlide = function(fromTouch) {
|
936
|
+
var _this = this;
|
937
|
+
var _loop = _this.s.loop;
|
938
|
+
if (fromTouch && _this.$slide.length < 3) {
|
939
|
+
_loop = false;
|
940
|
+
}
|
941
|
+
|
942
|
+
if (!_this.lgBusy) {
|
943
|
+
if ((_this.index + 1) < _this.$slide.length) {
|
944
|
+
_this.index++;
|
945
|
+
_this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
|
946
|
+
_this.slide(_this.index, fromTouch, false, 'next');
|
947
|
+
} else {
|
948
|
+
if (_loop) {
|
949
|
+
_this.index = 0;
|
950
|
+
_this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
|
951
|
+
_this.slide(_this.index, fromTouch, false, 'next');
|
952
|
+
} else if (_this.s.slideEndAnimatoin && !fromTouch) {
|
953
|
+
_this.$outer.addClass('lg-right-end');
|
954
|
+
setTimeout(function() {
|
955
|
+
_this.$outer.removeClass('lg-right-end');
|
956
|
+
}, 400);
|
957
|
+
}
|
958
|
+
}
|
959
|
+
}
|
960
|
+
};
|
961
|
+
|
962
|
+
/**
|
963
|
+
* @desc Go to previous slide
|
964
|
+
* @param {Boolean} fromTouch - true if slide function called via touch event
|
965
|
+
*/
|
966
|
+
Plugin.prototype.goToPrevSlide = function(fromTouch) {
|
967
|
+
var _this = this;
|
968
|
+
var _loop = _this.s.loop;
|
969
|
+
if (fromTouch && _this.$slide.length < 3) {
|
970
|
+
_loop = false;
|
971
|
+
}
|
972
|
+
|
973
|
+
if (!_this.lgBusy) {
|
974
|
+
if (_this.index > 0) {
|
975
|
+
_this.index--;
|
976
|
+
_this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
|
977
|
+
_this.slide(_this.index, fromTouch, false, 'prev');
|
978
|
+
} else {
|
979
|
+
if (_loop) {
|
980
|
+
_this.index = _this.$items.length - 1;
|
981
|
+
_this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
|
982
|
+
_this.slide(_this.index, fromTouch, false, 'prev');
|
983
|
+
} else if (_this.s.slideEndAnimatoin && !fromTouch) {
|
984
|
+
_this.$outer.addClass('lg-left-end');
|
985
|
+
setTimeout(function() {
|
986
|
+
_this.$outer.removeClass('lg-left-end');
|
987
|
+
}, 400);
|
988
|
+
}
|
989
|
+
}
|
990
|
+
}
|
991
|
+
};
|
992
|
+
|
993
|
+
Plugin.prototype.keyPress = function() {
|
994
|
+
var _this = this;
|
995
|
+
if (this.$items.length > 1) {
|
996
|
+
$(window).on('keyup.lg', function(e) {
|
997
|
+
if (_this.$items.length > 1) {
|
998
|
+
if (e.keyCode === 37) {
|
999
|
+
e.preventDefault();
|
1000
|
+
_this.goToPrevSlide();
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
if (e.keyCode === 39) {
|
1004
|
+
e.preventDefault();
|
1005
|
+
_this.goToNextSlide();
|
1006
|
+
}
|
1007
|
+
}
|
1008
|
+
});
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
$(window).on('keydown.lg', function(e) {
|
1012
|
+
if (_this.s.escKey === true && e.keyCode === 27) {
|
1013
|
+
e.preventDefault();
|
1014
|
+
if (!_this.$outer.hasClass('lg-thumb-open')) {
|
1015
|
+
_this.destroy();
|
1016
|
+
} else {
|
1017
|
+
_this.$outer.removeClass('lg-thumb-open');
|
1018
|
+
}
|
1019
|
+
}
|
1020
|
+
});
|
1021
|
+
};
|
1022
|
+
|
1023
|
+
Plugin.prototype.arrow = function() {
|
1024
|
+
var _this = this;
|
1025
|
+
this.$outer.find('.lg-prev').on('click.lg', function() {
|
1026
|
+
_this.goToPrevSlide();
|
1027
|
+
});
|
1028
|
+
|
1029
|
+
this.$outer.find('.lg-next').on('click.lg', function() {
|
1030
|
+
_this.goToNextSlide();
|
1031
|
+
});
|
1032
|
+
};
|
1033
|
+
|
1034
|
+
Plugin.prototype.arrowDisable = function(index) {
|
1035
|
+
|
1036
|
+
// Disable arrows if s.hideControlOnEnd is true
|
1037
|
+
if (!this.s.loop && this.s.hideControlOnEnd) {
|
1038
|
+
if ((index + 1) < this.$slide.length) {
|
1039
|
+
this.$outer.find('.lg-next').removeAttr('disabled').removeClass('disabled');
|
1040
|
+
} else {
|
1041
|
+
this.$outer.find('.lg-next').attr('disabled', 'disabled').addClass('disabled');
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
if (index > 0) {
|
1045
|
+
this.$outer.find('.lg-prev').removeAttr('disabled').removeClass('disabled');
|
1046
|
+
} else {
|
1047
|
+
this.$outer.find('.lg-prev').attr('disabled', 'disabled').addClass('disabled');
|
1048
|
+
}
|
1049
|
+
}
|
1050
|
+
};
|
1051
|
+
|
1052
|
+
Plugin.prototype.setTranslate = function($el, xValue, yValue) {
|
1053
|
+
// jQuery supports Automatic CSS prefixing since jQuery 1.8.0
|
1054
|
+
if (this.s.useLeft) {
|
1055
|
+
$el.css('left', xValue);
|
1056
|
+
} else {
|
1057
|
+
$el.css({
|
1058
|
+
transform: 'translate3d(' + (xValue) + 'px, ' + yValue + 'px, 0px)'
|
1059
|
+
});
|
1060
|
+
}
|
1061
|
+
};
|
1062
|
+
|
1063
|
+
Plugin.prototype.touchMove = function(startCoords, endCoords) {
|
1064
|
+
|
1065
|
+
var distance = endCoords - startCoords;
|
1066
|
+
|
1067
|
+
if (Math.abs(distance) > 15) {
|
1068
|
+
// reset opacity and transition duration
|
1069
|
+
this.$outer.addClass('lg-dragging');
|
1070
|
+
|
1071
|
+
// move current slide
|
1072
|
+
this.setTranslate(this.$slide.eq(this.index), distance, 0);
|
1073
|
+
|
1074
|
+
// move next and prev slide with current slide
|
1075
|
+
this.setTranslate($('.lg-prev-slide'), -this.$slide.eq(this.index).width() + distance, 0);
|
1076
|
+
this.setTranslate($('.lg-next-slide'), this.$slide.eq(this.index).width() + distance, 0);
|
1077
|
+
}
|
1078
|
+
};
|
1079
|
+
|
1080
|
+
Plugin.prototype.touchEnd = function(distance) {
|
1081
|
+
var _this = this;
|
1082
|
+
|
1083
|
+
// keep slide animation for any mode while dragg/swipe
|
1084
|
+
if (_this.s.mode !== 'lg-slide') {
|
1085
|
+
_this.$outer.addClass('lg-slide');
|
1086
|
+
}
|
1087
|
+
|
1088
|
+
this.$slide.not('.lg-current, .lg-prev-slide, .lg-next-slide').css('opacity', '0');
|
1089
|
+
|
1090
|
+
// set transition duration
|
1091
|
+
setTimeout(function() {
|
1092
|
+
_this.$outer.removeClass('lg-dragging');
|
1093
|
+
if ((distance < 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {
|
1094
|
+
_this.goToNextSlide(true);
|
1095
|
+
} else if ((distance > 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {
|
1096
|
+
_this.goToPrevSlide(true);
|
1097
|
+
} else if (Math.abs(distance) < 5) {
|
1098
|
+
|
1099
|
+
// Trigger click if distance is less than 5 pix
|
1100
|
+
_this.$el.trigger('onSlideClick.lg');
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
_this.$slide.removeAttr('style');
|
1104
|
+
});
|
1105
|
+
|
1106
|
+
// remove slide class once drag/swipe is completed if mode is not slide
|
1107
|
+
setTimeout(function() {
|
1108
|
+
if (!_this.$outer.hasClass('lg-dragging') && _this.s.mode !== 'lg-slide') {
|
1109
|
+
_this.$outer.removeClass('lg-slide');
|
1110
|
+
}
|
1111
|
+
}, _this.s.speed + 100);
|
1112
|
+
|
1113
|
+
};
|
1114
|
+
|
1115
|
+
Plugin.prototype.enableSwipe = function() {
|
1116
|
+
var _this = this;
|
1117
|
+
var startCoords = 0;
|
1118
|
+
var endCoords = 0;
|
1119
|
+
var isMoved = false;
|
1120
|
+
|
1121
|
+
if (_this.s.enableSwipe && _this.doCss()) {
|
1122
|
+
|
1123
|
+
_this.$slide.on('touchstart.lg', function(e) {
|
1124
|
+
if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy) {
|
1125
|
+
e.preventDefault();
|
1126
|
+
_this.manageSwipeClass();
|
1127
|
+
startCoords = e.originalEvent.targetTouches[0].pageX;
|
1128
|
+
}
|
1129
|
+
});
|
1130
|
+
|
1131
|
+
_this.$slide.on('touchmove.lg', function(e) {
|
1132
|
+
if (!_this.$outer.hasClass('lg-zoomed')) {
|
1133
|
+
e.preventDefault();
|
1134
|
+
endCoords = e.originalEvent.targetTouches[0].pageX;
|
1135
|
+
_this.touchMove(startCoords, endCoords);
|
1136
|
+
isMoved = true;
|
1137
|
+
}
|
1138
|
+
});
|
1139
|
+
|
1140
|
+
_this.$slide.on('touchend.lg', function() {
|
1141
|
+
if (!_this.$outer.hasClass('lg-zoomed')) {
|
1142
|
+
if (isMoved) {
|
1143
|
+
isMoved = false;
|
1144
|
+
_this.touchEnd(endCoords - startCoords);
|
1145
|
+
} else {
|
1146
|
+
_this.$el.trigger('onSlideClick.lg');
|
1147
|
+
}
|
1148
|
+
}
|
1149
|
+
});
|
1150
|
+
}
|
1151
|
+
|
1152
|
+
};
|
1153
|
+
|
1154
|
+
Plugin.prototype.enableDrag = function() {
|
1155
|
+
var _this = this;
|
1156
|
+
var startCoords = 0;
|
1157
|
+
var endCoords = 0;
|
1158
|
+
var isDraging = false;
|
1159
|
+
var isMoved = false;
|
1160
|
+
if (_this.s.enableDrag && _this.doCss()) {
|
1161
|
+
_this.$slide.on('mousedown.lg', function(e) {
|
1162
|
+
if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy && !$(e.target).text().trim()) {
|
1163
|
+
e.preventDefault();
|
1164
|
+
_this.manageSwipeClass();
|
1165
|
+
startCoords = e.pageX;
|
1166
|
+
isDraging = true;
|
1167
|
+
|
1168
|
+
// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
1169
|
+
_this.$outer.scrollLeft += 1;
|
1170
|
+
_this.$outer.scrollLeft -= 1;
|
1171
|
+
|
1172
|
+
// *
|
1173
|
+
|
1174
|
+
_this.$outer.removeClass('lg-grab').addClass('lg-grabbing');
|
1175
|
+
|
1176
|
+
_this.$el.trigger('onDragstart.lg');
|
1177
|
+
}
|
1178
|
+
});
|
1179
|
+
|
1180
|
+
$(window).on('mousemove.lg', function(e) {
|
1181
|
+
if (isDraging) {
|
1182
|
+
isMoved = true;
|
1183
|
+
endCoords = e.pageX;
|
1184
|
+
_this.touchMove(startCoords, endCoords);
|
1185
|
+
_this.$el.trigger('onDragmove.lg');
|
1186
|
+
}
|
1187
|
+
});
|
1188
|
+
|
1189
|
+
$(window).on('mouseup.lg', function(e) {
|
1190
|
+
if (isMoved) {
|
1191
|
+
isMoved = false;
|
1192
|
+
_this.touchEnd(endCoords - startCoords);
|
1193
|
+
_this.$el.trigger('onDragend.lg');
|
1194
|
+
} else if ($(e.target).hasClass('lg-object') || $(e.target).hasClass('lg-video-play')) {
|
1195
|
+
_this.$el.trigger('onSlideClick.lg');
|
1196
|
+
}
|
1197
|
+
|
1198
|
+
// Prevent execution on click
|
1199
|
+
if (isDraging) {
|
1200
|
+
isDraging = false;
|
1201
|
+
_this.$outer.removeClass('lg-grabbing').addClass('lg-grab');
|
1202
|
+
}
|
1203
|
+
});
|
1204
|
+
|
1205
|
+
}
|
1206
|
+
};
|
1207
|
+
|
1208
|
+
Plugin.prototype.manageSwipeClass = function() {
|
1209
|
+
var _touchNext = this.index + 1;
|
1210
|
+
var _touchPrev = this.index - 1;
|
1211
|
+
if (this.s.loop && this.$slide.length > 2) {
|
1212
|
+
if (this.index === 0) {
|
1213
|
+
_touchPrev = this.$slide.length - 1;
|
1214
|
+
} else if (this.index === this.$slide.length - 1) {
|
1215
|
+
_touchNext = 0;
|
1216
|
+
}
|
1217
|
+
}
|
1218
|
+
|
1219
|
+
this.$slide.removeClass('lg-next-slide lg-prev-slide');
|
1220
|
+
if (_touchPrev > -1) {
|
1221
|
+
this.$slide.eq(_touchPrev).addClass('lg-prev-slide');
|
1222
|
+
}
|
1223
|
+
|
1224
|
+
this.$slide.eq(_touchNext).addClass('lg-next-slide');
|
1225
|
+
};
|
1226
|
+
|
1227
|
+
Plugin.prototype.mousewheel = function() {
|
1228
|
+
var _this = this;
|
1229
|
+
_this.$outer.on('mousewheel.lg', function(e) {
|
1230
|
+
|
1231
|
+
if (!e.deltaY) {
|
1232
|
+
return;
|
1233
|
+
}
|
1234
|
+
|
1235
|
+
if (e.deltaY > 0) {
|
1236
|
+
_this.goToPrevSlide();
|
1237
|
+
} else {
|
1238
|
+
_this.goToNextSlide();
|
1239
|
+
}
|
1240
|
+
|
1241
|
+
e.preventDefault();
|
1242
|
+
});
|
1243
|
+
|
1244
|
+
};
|
1245
|
+
|
1246
|
+
Plugin.prototype.closeGallery = function() {
|
1247
|
+
|
1248
|
+
var _this = this;
|
1249
|
+
var mousedown = false;
|
1250
|
+
this.$outer.find('.lg-close').on('click.lg', function() {
|
1251
|
+
_this.destroy();
|
1252
|
+
});
|
1253
|
+
|
1254
|
+
if (_this.s.closable) {
|
1255
|
+
|
1256
|
+
// If you drag the slide and release outside gallery gets close on chrome
|
1257
|
+
// for preventing this check mousedown and mouseup happened on .lg-item or lg-outer
|
1258
|
+
_this.$outer.on('mousedown.lg', function(e) {
|
1259
|
+
|
1260
|
+
if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap')) {
|
1261
|
+
mousedown = true;
|
1262
|
+
} else {
|
1263
|
+
mousedown = false;
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
});
|
1267
|
+
|
1268
|
+
_this.$outer.on('mousemove.lg', function() {
|
1269
|
+
mousedown = false;
|
1270
|
+
});
|
1271
|
+
|
1272
|
+
_this.$outer.on('mouseup.lg', function(e) {
|
1273
|
+
|
1274
|
+
if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap') && mousedown) {
|
1275
|
+
if (!_this.$outer.hasClass('lg-dragging')) {
|
1276
|
+
_this.destroy();
|
1277
|
+
}
|
1278
|
+
}
|
1279
|
+
|
1280
|
+
});
|
1281
|
+
|
1282
|
+
}
|
1283
|
+
|
1284
|
+
};
|
1285
|
+
|
1286
|
+
Plugin.prototype.destroy = function(d) {
|
1287
|
+
|
1288
|
+
var _this = this;
|
1289
|
+
|
1290
|
+
if (!d) {
|
1291
|
+
_this.$el.trigger('onBeforeClose.lg');
|
1292
|
+
$(window).scrollTop(_this.prevScrollTop);
|
1293
|
+
}
|
1294
|
+
|
1295
|
+
|
1296
|
+
/**
|
1297
|
+
* if d is false or undefined destroy will only close the gallery
|
1298
|
+
* plugins instance remains with the element
|
1299
|
+
*
|
1300
|
+
* if d is true destroy will completely remove the plugin
|
1301
|
+
*/
|
1302
|
+
|
1303
|
+
if (d) {
|
1304
|
+
if (!_this.s.dynamic) {
|
1305
|
+
// only when not using dynamic mode is $items a jquery collection
|
1306
|
+
this.$items.off('click.lg click.lgcustom');
|
1307
|
+
}
|
1308
|
+
|
1309
|
+
$.removeData(_this.el, 'lightGallery');
|
1310
|
+
}
|
1311
|
+
|
1312
|
+
// Unbind all events added by lightGallery
|
1313
|
+
this.$el.off('.lg.tm');
|
1314
|
+
|
1315
|
+
// Distroy all lightGallery modules
|
1316
|
+
$.each($.fn.lightGallery.modules, function(key) {
|
1317
|
+
if (_this.modules[key]) {
|
1318
|
+
_this.modules[key].destroy();
|
1319
|
+
}
|
1320
|
+
});
|
1321
|
+
|
1322
|
+
this.lGalleryOn = false;
|
1323
|
+
|
1324
|
+
clearTimeout(_this.hideBartimeout);
|
1325
|
+
this.hideBartimeout = false;
|
1326
|
+
$(window).off('.lg');
|
1327
|
+
$('body').removeClass('lg-on lg-from-hash');
|
1328
|
+
|
1329
|
+
if (_this.$outer) {
|
1330
|
+
_this.$outer.removeClass('lg-visible');
|
1331
|
+
}
|
1332
|
+
|
1333
|
+
$('.lg-backdrop').removeClass('in');
|
1334
|
+
|
1335
|
+
setTimeout(function() {
|
1336
|
+
if (_this.$outer) {
|
1337
|
+
_this.$outer.remove();
|
1338
|
+
}
|
1339
|
+
|
1340
|
+
$('.lg-backdrop').remove();
|
1341
|
+
|
1342
|
+
if (!d) {
|
1343
|
+
_this.$el.trigger('onCloseAfter.lg');
|
1344
|
+
}
|
1345
|
+
|
1346
|
+
}, _this.s.backdropDuration + 50);
|
1347
|
+
};
|
1348
|
+
|
1349
|
+
$.fn.lightGallery = function(options) {
|
1350
|
+
return this.each(function() {
|
1351
|
+
if (!$.data(this, 'lightGallery')) {
|
1352
|
+
$.data(this, 'lightGallery', new Plugin(this, options));
|
1353
|
+
} else {
|
1354
|
+
try {
|
1355
|
+
$(this).data('lightGallery').init();
|
1356
|
+
} catch (err) {
|
1357
|
+
console.error('lightGallery has not initiated properly');
|
1358
|
+
}
|
1359
|
+
}
|
1360
|
+
});
|
1361
|
+
};
|
1362
|
+
|
1363
|
+
$.fn.lightGallery.modules = {};
|
1364
|
+
|
1365
|
+
})();
|
1366
|
+
|
1367
|
+
|
1368
|
+
}));
|