j1-template 2023.9.1 → 2023.10.0
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/layouts/content_generator_collection.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_news_panel_posts.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_page.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_post.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_raw.html +1 -1
- data/_includes/themes/j1/layouts/layout_metadata_generator.html +1 -1
- data/_includes/themes/j1/layouts/layout_module_generator.html +1 -1
- data/_includes/themes/j1/layouts/layout_resource_generator.html +1 -1
- data/_includes/themes/j1/modules/attics/generator.html +1 -1
- data/_includes/themes/j1/modules/navigator/generator.html +1 -1
- data/_includes/themes/j1/modules/searcher/generator.html +1 -1
- data/_includes/themes/j1/modules/searcher/procedures/topsearch.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/about_box.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/contacts_box.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/issue.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/legal_statements.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/links_box.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/news_box.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/social_media_icons.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/get_wave.proc +1 -1
- data/_includes/themes/j1/procedures/collections/create_collection_article_preview.proc +1 -1
- data/_includes/themes/j1/procedures/collections/pager.proc +1 -1
- data/_includes/themes/j1/procedures/global/attributes_loader.proc +1 -1
- data/_includes/themes/j1/procedures/global/collect_frontmatter_options.proc +1 -1
- data/_includes/themes/j1/procedures/global/collect_page_options.proc +1 -1
- data/_includes/themes/j1/procedures/global/create_bs_button.proc +1 -1
- data/_includes/themes/j1/procedures/global/create_word_cloud.proc +1 -1
- data/_includes/themes/j1/procedures/global/date-german.proc +1 -1
- data/_includes/themes/j1/procedures/global/get_category.proc +1 -1
- data/_includes/themes/j1/procedures/global/get_category_item.proc +1 -1
- data/_includes/themes/j1/procedures/global/get_documents_dir.proc +1 -1
- data/_includes/themes/j1/procedures/global/get_page_path.proc +1 -1
- data/_includes/themes/j1/procedures/global/get_page_url.proc +1 -1
- data/_includes/themes/j1/procedures/global/select_color.proc +1 -1
- data/_includes/themes/j1/procedures/global/select_font_size.proc +1 -1
- data/_includes/themes/j1/procedures/global/select_icon_size.proc +1 -1
- data/_includes/themes/j1/procedures/global/select_location.proc +1 -1
- data/_includes/themes/j1/procedures/global/set_base_vars_folders.proc +1 -1
- data/_includes/themes/j1/procedures/global/set_env_entry_document.proc +1 -1
- data/_includes/themes/j1/procedures/global/set_image_block.proc +1 -1
- data/_includes/themes/j1/procedures/global/setup.proc +1 -1
- data/_includes/themes/j1/procedures/layouts/content_writer.proc +1 -1
- data/_includes/themes/j1/procedures/layouts/default_writer.proc +1 -1
- data/_includes/themes/j1/procedures/layouts/module_writer.proc +1 -1
- data/_includes/themes/j1/procedures/layouts/resource_writer.proc +1 -1
- data/_includes/themes/j1/procedures/posts/collate_calendar.proc +1 -1
- data/_includes/themes/j1/procedures/posts/collate_list.proc +1 -1
- data/_includes/themes/j1/procedures/posts/collate_timeline.proc +1 -1
- data/_includes/themes/j1/procedures/posts/create_ad_block.proc +1 -1
- data/_includes/themes/j1/procedures/posts/create_series_header.proc +1 -1
- data/_includes/themes/j1/procedures/posts/pager.proc +1 -1
- data/_layouts/_home.html +1 -1
- data/_layouts/autopage_category.html +1 -1
- data/_layouts/autopage_collection.html +1 -1
- data/_layouts/autopage_collections_tags.html +1 -1
- data/_layouts/autopage_tags.html +1 -1
- data/_layouts/collection.html +1 -1
- data/_layouts/compress.html +1 -1
- data/_layouts/default.html +1 -1
- data/_layouts/home.html +1 -1
- data/_layouts/news_panel_posts.html +1 -1
- data/_layouts/page.html +1 -1
- data/_layouts/post.html +1 -1
- data/_layouts/raw.html +1 -1
- data/apps/public/cc/cc.yml +1 -1
- data/assets/data/authclient.html +2 -2
- data/assets/data/banner.html +5 -5
- data/assets/data/carousel.json +1 -1
- data/assets/data/cookieconsent.html +2 -2
- data/assets/data/fab.html +2 -2
- data/assets/data/footer.html +2 -2
- data/assets/data/galeries.html +240 -0
- data/assets/data/gallery_customizer.html +2 -2
- data/assets/data/iso-639-language-codes-flags.json +1 -1
- data/assets/data/iso-639-language-codes.json +1 -1
- data/assets/data/j1_config.json +1 -1
- data/assets/data/masonry.html +99 -86
- data/assets/data/masterslider.html +2 -2
- data/assets/data/mdi_icons.json +1 -1
- data/assets/data/mdil_icons.json +1 -1
- data/assets/data/menu.html +2 -2
- data/assets/data/mmenu.html +2 -2
- data/assets/data/mmenu_sidebar.html +2 -2
- data/assets/data/mmenu_toc.html +2 -2
- data/assets/data/panel.html +2 -2
- data/assets/data/particles.yml +1 -1
- data/assets/data/private.json +1 -1
- data/assets/data/quicklinks.html +2 -2
- data/assets/data/rtext_resizer.html +2 -2
- data/assets/data/slick.html +2 -2
- data/assets/data/speak2me.html +11 -9
- data/assets/data/themes.bootswatch.json +1 -1
- data/assets/data/themes.json +1 -1
- data/assets/data/translator.html +2 -2
- data/assets/error_pages/HTTP204.html +1 -1
- data/assets/error_pages/HTTP400.html +1 -1
- data/assets/error_pages/HTTP401.html +1 -1
- data/assets/error_pages/HTTP403.html +1 -1
- data/assets/error_pages/HTTP404.html +1 -1
- data/assets/error_pages/HTTP444.html +1 -1
- data/assets/error_pages/HTTP445.html +1 -1
- data/assets/error_pages/HTTP446.html +1 -1
- data/assets/error_pages/HTTP447.html +1 -1
- data/assets/error_pages/HTTP448.html +1 -1
- data/assets/error_pages/HTTP500.html +1 -1
- data/assets/error_pages/HTTP501.html +1 -1
- data/assets/error_pages/HTTP502.html +1 -1
- data/assets/error_pages/HTTP503.html +1 -1
- data/assets/themes/j1/adapter/js/advertising.js +2 -2
- data/assets/themes/j1/adapter/js/algolia.js +2 -2
- data/assets/themes/j1/adapter/js/analytics.js +2 -2
- data/assets/themes/j1/adapter/js/asciidoctor.js +2 -2
- data/assets/themes/j1/adapter/js/attic.js +2 -2
- data/assets/themes/j1/adapter/js/bmd.js +2 -2
- data/assets/themes/j1/adapter/js/carousel.js +2 -2
- data/assets/themes/j1/adapter/js/clipboard.js +2 -2
- data/assets/themes/j1/adapter/js/comments.js +2 -2
- data/assets/themes/j1/adapter/js/cookieConsent.js +1 -1
- data/assets/themes/j1/adapter/js/customFunctions.js +2 -2
- data/assets/themes/j1/adapter/js/customModule.js +2 -2
- data/assets/themes/j1/adapter/js/dropdowns.js +2 -2
- data/assets/themes/j1/adapter/js/fab.js +2 -2
- data/assets/themes/j1/adapter/js/framer.js +2 -2
- data/assets/themes/j1/adapter/js/gallery.js +325 -0
- data/assets/themes/j1/adapter/js/iconPicker.js +2 -2
- data/assets/themes/j1/adapter/js/j1.js +2 -2
- data/assets/themes/j1/adapter/js/lazyLoader.js +2 -2
- data/assets/themes/j1/adapter/js/{justifiedGallery.js → lightGallery.js} +54 -48
- data/assets/themes/j1/adapter/js/lightbox.js +2 -2
- data/assets/themes/j1/adapter/js/logger.js +2 -2
- data/assets/themes/j1/adapter/js/lunr.js +2 -2
- data/assets/themes/j1/adapter/js/masonry.js +80 -13
- data/assets/themes/j1/adapter/js/masterslider.js +2 -2
- data/assets/themes/j1/adapter/js/mmenu.js +2 -2
- data/assets/themes/j1/adapter/js/navigator.js +7 -4
- data/assets/themes/j1/adapter/js/particles.js +2 -2
- data/assets/themes/j1/adapter/js/rangeSlider.js +2 -2
- data/assets/themes/j1/adapter/js/rouge.js +2 -2
- data/assets/themes/j1/adapter/js/rtable.js +2 -2
- data/assets/themes/j1/adapter/js/rtextResizer.js +2 -2
- data/assets/themes/j1/adapter/js/scroller.js +2 -2
- data/assets/themes/j1/adapter/js/slick.js +1 -1
- data/assets/themes/j1/adapter/js/speak2me.js +183 -48
- data/assets/themes/j1/adapter/js/themeToggler.js +2 -2
- data/assets/themes/j1/adapter/js/themer.js +2 -2
- data/assets/themes/j1/adapter/js/toccer.js +2 -2
- data/assets/themes/j1/adapter/js/translator.js +1 -1
- data/assets/themes/j1/adapter/js/waves.js +2 -2
- data/assets/themes/j1/core/country-flags/css/theme/uno.css +1 -1
- data/assets/themes/j1/core/country-flags/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/core/css/animate.css +2 -2
- data/assets/themes/j1/core/css/icon-fonts/fontawesome.css +2 -2
- data/assets/themes/j1/core/css/icon-fonts/iconify.css +5 -5
- data/assets/themes/j1/core/css/icon-fonts/mdi.css +9 -9
- data/assets/themes/j1/core/css/icon-fonts/mdib.css +7 -7
- data/assets/themes/j1/core/css/icon-fonts/mdil.css +10 -10
- data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.css +1 -1
- data/assets/themes/j1/core/css/themes/unodark/bootstrap.css +30 -30
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +107 -100
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.css +10 -10
- data/assets/themes/j1/core/js/template.js +240 -83
- data/assets/themes/j1/core/js/template.min.js +6 -6
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/backstretch/js/backstretch.js +1 -1
- data/assets/themes/j1/modules/backstretch/js/backstretch.min.js +1 -1
- data/assets/themes/j1/modules/bmd/js/bmd.js +1 -1
- data/assets/themes/j1/modules/bmd/js/bmd.min.js +1 -1
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.js +2118 -2696
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.js.map +1 -0
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js +3 -3
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js.map +1 -1
- data/assets/themes/j1/modules/carousel/css/carousel.css +1 -1
- data/assets/themes/j1/modules/carousel/css/carousel.min.css +1 -1
- data/assets/themes/j1/modules/carousel/css/carousel_transitions.css +1 -1
- data/assets/themes/j1/modules/carousel/css/carousel_transitions.min.css +1 -1
- data/assets/themes/j1/modules/carousel/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/carousel/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/clipboard/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/clipboard/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/dropdowns/css/theme/uno/dropdowns.css +1 -1
- data/assets/themes/j1/modules/dropdowns/css/theme/uno/dropdowns.min.css +1 -1
- data/assets/themes/j1/modules/dropdowns/js/cash.js +1 -1
- data/assets/themes/j1/modules/dropdowns/js/cash.min.js +1 -1
- data/assets/themes/j1/modules/dropdowns/js/dropdowns.js +1 -1
- data/assets/themes/j1/modules/dropdowns/js/dropdowns.min.js +1 -1
- data/assets/themes/j1/modules/fab/js/cash.js +1 -1
- data/assets/themes/j1/modules/fab/js/cash.min.js +1 -1
- data/assets/themes/j1/modules/fab/js/fab.js +1 -1
- data/assets/themes/j1/modules/fab/js/fab.min.js +1 -1
- data/assets/themes/j1/modules/iconPicker/css/universal-icon-picker.css +1 -1
- data/assets/themes/j1/modules/iconPicker/css/universal-icon-picker.min.css +1 -1
- data/assets/themes/j1/modules/iconPicker/js/universal-icon-picker.js +1 -1
- data/assets/themes/j1/modules/iconPicker/js/universal-icon-picker.min.js +1 -1
- data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.min.js +0 -1
- data/assets/themes/j1/modules/iframeResizer/js/resizer.min.js +0 -1
- data/assets/themes/j1/modules/jquery/js/extensions/hasClass.js +1 -1
- data/assets/themes/j1/modules/jquery/js/extensions/hasClass.min.js +1 -1
- data/assets/themes/j1/modules/jquery/js/extensions/removeClass.js +1 -1
- data/assets/themes/j1/modules/jquery/js/extensions/removeClass.min.js +1 -1
- data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/lightGallery/css/lg-transitions.css +984 -0
- data/assets/themes/j1/modules/lightGallery/css/lg-transitions.min.css +26 -0
- data/assets/themes/j1/modules/lightGallery/css/lightgallery-bundle.css +1627 -0
- data/assets/themes/j1/modules/lightGallery/css/lightgallery-bundle.min.css +25 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-autoplay.css +67 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-comments.css +157 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-fullscreen.css +32 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-medium-zoom.css +40 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-pager.css +115 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-rotate.css +74 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-share.css +168 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-thumbnail.css +133 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-video.css +169 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-zoom.css +141 -0
- data/assets/themes/j1/modules/lightGallery/css/themes/uno/uno.css +109 -0
- data/assets/themes/j1/modules/lightGallery/css/themes/uno/uno.min.css +19 -0
- data/assets/themes/j1/modules/lightGallery/{css/fonts → fonts}/lg.svg +35 -28
- data/assets/themes/j1/modules/lightGallery/fonts/lg.ttf +0 -0
- data/assets/themes/j1/modules/lightGallery/fonts/lg.woff +0 -0
- data/assets/themes/j1/modules/lightGallery/fonts/lg.woff2 +0 -0
- data/assets/themes/j1/modules/lightGallery/img/loading.gif +0 -0
- data/assets/themes/j1/modules/lightGallery/js/lightgallery.js +2759 -0
- data/assets/themes/j1/modules/lightGallery/js/lightgallery.min.js +25 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-autoplay.js +275 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-autoplay.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-comment.js +230 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-comment.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-fullscreen.js +160 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-fullscreen.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-hash.js +223 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-hash.min.js +27 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-medium-zoom.js +157 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-medium-zoom.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-pager.js +164 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-pager.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-rotate.js +299 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-rotate.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-share.js +244 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-share.min.js +27 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-thumbnail.js +509 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-thumbnail.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-video.js +585 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-video.min.js +27 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.js +207 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-zoom.js +999 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-zoom.min.js +26 -0
- data/assets/themes/j1/modules/lightbox/css/lightbox.css +1 -1
- data/assets/themes/j1/modules/lightbox/css/lightbox.min.css +1 -1
- data/assets/themes/j1/modules/lightbox/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/lightbox/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/lightbox/js/lightbox.js +1 -1
- data/assets/themes/j1/modules/lightbox/js/lightbox.min.js +1 -1
- data/assets/themes/j1/modules/lunr/js/j1.js +1 -1
- data/assets/themes/j1/modules/lunr/js/j1.min.js +1 -1
- data/assets/themes/j1/modules/masonry/js/utils/images_loaded.js +439 -0
- data/assets/themes/j1/modules/masonry/js/utils/images_loaded.min.js +12 -0
- data/assets/themes/j1/modules/masterslider/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/masterslider/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.css +1 -1
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.min.css +1 -1
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.js +1 -1
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.min.js +1 -1
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.polyfills.js +118 -0
- data/assets/themes/j1/modules/particles/skies/cavern1.png +0 -0
- data/assets/themes/j1/modules/particles/skies/cavern2.png +0 -0
- data/assets/themes/j1/modules/particles/skies/chrome.png +0 -0
- data/assets/themes/j1/modules/particles/skies/deep-space.jpg +0 -0
- data/assets/themes/j1/modules/particles/skies/deepblue.png +0 -0
- data/assets/themes/j1/modules/particles/skies/fire.png +0 -0
- data/assets/themes/j1/modules/particles/skies/fog.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sky1.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sky2.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sky3.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sky4.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sky5.png +0 -0
- data/assets/themes/j1/modules/particles/skies/space1.png +0 -0
- data/assets/themes/j1/modules/particles/skies/space2.png +0 -0
- data/assets/themes/j1/modules/particles/skies/space3.png +0 -0
- data/assets/themes/j1/modules/particles/skies/starfield.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sunorbit.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sunset.png +0 -0
- data/assets/themes/j1/modules/particles/skies/toxic.png +0 -0
- data/assets/themes/j1/modules/particles/skies/underwater1.png +0 -0
- data/assets/themes/j1/modules/particles/skies/underwater2.png +0 -0
- data/assets/themes/j1/modules/particles/skies/underwater3.png +0 -0
- data/assets/themes/j1/modules/particles/skies/wtf.png +0 -0
- data/assets/themes/j1/modules/particles/sprites/slime.png +0 -0
- data/assets/themes/j1/modules/particles/sprites/slimeeyes.png +0 -0
- data/assets/themes/j1/modules/particles/sprites/snake.png +0 -0
- data/assets/themes/j1/modules/particles/sprites/snowflakes.png +0 -0
- data/assets/themes/j1/modules/particles/sprites/snowflakes_large.png +0 -0
- data/assets/themes/j1/modules/popper/js/popper.min.js +0 -1
- data/assets/themes/j1/modules/rangeSlider/css/theme/uno/nouislider.css +1 -1
- data/assets/themes/j1/modules/rangeSlider/css/theme/uno/nouislider.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.dark/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.dark/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.light/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.light/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai.dark/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai.dark/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai.light/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai.light/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized.dark/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized.dark/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized.light/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized.light/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/colorful/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/colorful/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/github/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/github/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox.dark/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox.dark/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox.light/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox.light/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/igorpro/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/igorpro/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/molokai/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/molokai/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/monokai/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/monokai/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/monokai.sublime/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/monokai.sublime/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/pastie/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/pastie/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/thankful_eyes/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/thankful_eyes/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/themes.txt +1 -1
- data/assets/themes/j1/modules/rouge/css/tulip/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/tulip/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/uno.dark/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/uno.dark/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/uno.light/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/uno.light/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/js/select.js +1 -1
- data/assets/themes/j1/modules/rtable/css/theme/uno/rtable.css +1 -1
- data/assets/themes/j1/modules/rtable/css/theme/uno/rtable.min.css +1 -1
- data/assets/themes/j1/modules/rtable/js/rtable.js +1 -1
- data/assets/themes/j1/modules/rtable/js/rtable.min.js +1 -1
- data/assets/themes/j1/modules/scroller/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/scroller/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/scroller/js/scroller.min.js +1 -1
- data/assets/themes/j1/modules/slick/lightbox/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/slick/lightbox/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/slick/lightbox/js/slick-lightbox.min.js +0 -1
- data/assets/themes/j1/modules/slick/slider/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/slick/slider/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/spinner/css/spin.css +1 -1
- data/assets/themes/j1/modules/spinner/css/spin.min.css +1 -1
- data/assets/themes/j1/modules/spinner/js/spin.js +1 -1
- data/assets/themes/j1/modules/spinner/js/spin.min.js +1 -1
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.js +1 -1
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.min.js +1 -1
- data/assets/themes/j1/modules/translator/css/translator.css +1 -1
- data/assets/themes/j1/modules/translator/css/translator.min.css +1 -1
- data/assets/themes/j1/modules/videojs/css/themes/city.css +74 -74
- data/assets/themes/j1/modules/videojs/css/themes/city.min.css +3 -4
- data/assets/themes/j1/modules/videojs/css/themes/fantasy.css +3 -3
- data/assets/themes/j1/modules/videojs/css/themes/fantasy.min.css +3 -4
- data/assets/themes/j1/modules/videojs/css/themes/forest.css +4 -3
- data/assets/themes/j1/modules/videojs/css/themes/forest.min.css +3 -4
- data/assets/themes/j1/modules/videojs/css/themes/sea.css +2 -2
- data/assets/themes/j1/modules/videojs/css/themes/sea.min.css +3 -4
- data/assets/themes/j1/modules/videojs/css/themes/uno.css +151 -0
- data/assets/themes/j1/modules/videojs/css/themes/uno.min.css +17 -0
- data/assets/themes/j1/modules/videojs/css/video-js.css +12 -0
- data/assets/themes/j1/modules/videojs/css/video-js.min.css +12 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/LICENSE +19 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/README.md +94 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/api/README.md +7 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/api/dailymotion.min.js +29 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/api/dailymotion.player.min.js +80 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/dailymotion.js +603 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/dailymotion.min.js +16 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/dailymotion-controls.html +18 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/dailymotion-javascript.html +27 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/dailymotion-playlist.html +19 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/global-parameters.html +28 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/simple.html +20 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/switch.html +37 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/LICENSE +21 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/README.md +15 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/api/README.md +1818 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/api/player.min.js +23 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/api/vimeo.js +3562 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/api/vimeo.min.js +35 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/examples/index.html +33 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/examples/player/index.html +37 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/vimeo.js +521 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/vimeo.min.js +15 -0
- data/assets/themes/j1/modules/videojs/js/plugins/wt/api/Readme.txt +20 -0
- data/assets/themes/j1/modules/videojs/js/plugins/wt/api/WistiaPlayer.ts +1617 -0
- data/assets/themes/j1/modules/videojs/js/plugins/wt/api/wistia.min.js +2 -0
- data/assets/themes/j1/modules/videojs/js/plugins/wt/wistia.js +383 -0
- data/assets/themes/j1/modules/videojs/js/plugins/wt/wistia.min.js +18 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/README.md +115 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/api/youtube.min.js +20 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/global-parameters.html +32 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/simple.html +20 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/switch.html +37 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-controls.html +18 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-javascript.html +27 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-list.html +19 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-playlist.html +19 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/youtube.js +832 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/youtube.min.js +16 -0
- data/assets/themes/j1/modules/videojs/js/video.js +40610 -32915
- data/assets/themes/j1/modules/videojs/js/video.min.js +33 -20
- data/lib/j1/version.rb +1 -1
- data/lib/j1_app/j1_auth_manager/auth_manager.rb +1 -1
- data/lib/j1_app/j1_auth_manager/warden_omniauth.rb +1 -1
- data/lib/j1_app/omniauth/strategies/github.rb +1 -1
- data/lib/starter_web/Gemfile +3 -3
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +2 -2
- data/lib/starter_web/_data/_defaults/categories.yml +1 -1
- data/lib/starter_web/_data/_defaults/colors.yml +1 -1
- data/lib/starter_web/_data/_defaults/font_sizes.yml +1 -1
- data/lib/starter_web/_data/_defaults/j1_config.yml +1 -1
- data/lib/starter_web/_data/_defaults/private.yml +1 -1
- data/lib/starter_web/_data/_defaults/resources.yml +1 -1
- data/lib/starter_web/_data/apps/defaults/justifiedGalleryCustomizer.yml +1 -1
- data/lib/starter_web/_data/apps/justifiedGalleryCustomizer.yml +1 -1
- data/lib/starter_web/_data/asciidoc2pdf/themes/j1-theme.yml +1 -1
- data/lib/starter_web/_data/blocks/banner.yml +1 -1
- data/lib/starter_web/_data/blocks/defaults/banner.yml +1 -1
- data/lib/starter_web/_data/blocks/defaults/footer.yml +1 -1
- data/lib/starter_web/_data/blocks/defaults/panel.yml +1 -1
- data/lib/starter_web/_data/blocks/footer.yml +2 -2
- data/lib/starter_web/_data/blocks/panel.yml +1 -1
- data/lib/starter_web/_data/categories.yml +1 -1
- data/lib/starter_web/_data/colors.yml +1 -1
- data/lib/starter_web/_data/font_sizes.yml +1 -1
- data/lib/starter_web/_data/j1_config.yml +1 -1
- data/lib/starter_web/_data/layouts/collection.yml +1 -1
- data/lib/starter_web/_data/layouts/default.yml +1 -1
- data/lib/starter_web/_data/layouts/home.yml +1 -1
- data/lib/starter_web/_data/layouts/news_panel_posts.yml +1 -1
- data/lib/starter_web/_data/layouts/page.yml +1 -1
- data/lib/starter_web/_data/layouts/post.yml +1 -1
- data/lib/starter_web/_data/layouts/raw.yml +1 -1
- data/lib/starter_web/_data/modules/advertising.yml +2 -2
- data/lib/starter_web/_data/modules/analytics.yml +1 -1
- data/lib/starter_web/_data/modules/attics.yml +1 -1
- data/lib/starter_web/_data/modules/authentication.yml +1 -1
- data/lib/starter_web/_data/modules/blog_navigator.yml +1 -1
- data/lib/starter_web/_data/modules/carousel.yml +1 -1
- data/lib/starter_web/_data/modules/comments.yml +1 -1
- data/lib/starter_web/_data/modules/cookieconsent.yml +1 -1
- data/lib/starter_web/_data/modules/cookies.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/advertising.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/analytics.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/attics.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/authentication.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/blog_navigator.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/carousel.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/comments.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/cookies.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/dropdowns.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/fab.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/framer.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/{justifiedGallery.yml → gallery.yml} +18 -28
- data/lib/starter_web/_data/modules/defaults/iconPicker.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/lazyLoader.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/lightGallery.yml +8 -6
- data/lib/starter_web/_data/modules/defaults/lightbox.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/log4javascript.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/log4r.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/lunr.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/masonry.yml +53 -13
- data/lib/starter_web/_data/modules/defaults/masterslider.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/navigator.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/particles.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/rangeSlider.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/rtable.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/scroller.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/slick.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/speak2me.yml +8 -5
- data/lib/starter_web/_data/modules/defaults/theme_toggler.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/themer.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/toccer.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/translator.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/waves.yml +1 -1
- data/lib/starter_web/_data/modules/dropdowns.yml +1 -1
- data/lib/starter_web/_data/modules/fab.yml +1 -1
- data/lib/starter_web/_data/modules/framer.yml +1 -1
- data/lib/starter_web/_data/modules/gallery.yml +874 -0
- data/lib/starter_web/_data/modules/iconPicker.yml +1 -1
- data/lib/starter_web/_data/modules/lazyLoader.yml +1 -1
- data/lib/starter_web/_data/modules/lightGallery.yml +8 -5
- data/lib/starter_web/_data/modules/lightbox.yml +1 -1
- data/lib/starter_web/_data/modules/log4javascript.yml +1 -1
- data/lib/starter_web/_data/modules/log4r.yml +1 -1
- data/lib/starter_web/_data/modules/lunr.yml +1 -1
- data/lib/starter_web/_data/modules/masonry.yml +401 -87
- data/lib/starter_web/_data/modules/masterslider.yml +1 -1
- data/lib/starter_web/_data/modules/navigator.yml +1 -1
- data/lib/starter_web/_data/modules/navigator_menu.yml +18 -4
- data/lib/starter_web/_data/modules/nbinteract.yml +1 -1
- data/lib/starter_web/_data/modules/particles.yml +1 -1
- data/lib/starter_web/_data/modules/rangeSlider.yml +1 -1
- data/lib/starter_web/_data/modules/rtable.yml +1 -1
- data/lib/starter_web/_data/modules/scroller.yml +1 -1
- data/lib/starter_web/_data/modules/slick.yml +1 -1
- data/lib/starter_web/_data/modules/speak2me.yml +1 -1
- data/lib/starter_web/_data/modules/theme_toggler.yml +1 -1
- data/lib/starter_web/_data/modules/themer.yml +1 -1
- data/lib/starter_web/_data/modules/toccer.yml +1 -1
- data/lib/starter_web/_data/modules/translator.yml +1 -1
- data/lib/starter_web/_data/modules/waves.yml +1 -1
- data/lib/starter_web/_data/plugins/defaults/feed.yml +1 -1
- data/lib/starter_web/_data/plugins/defaults/paginator.yml +1 -1
- data/lib/starter_web/_data/plugins/defaults/seo-tags.yml +1 -1
- data/lib/starter_web/_data/plugins/defaults/sitemap.yml +1 -1
- data/lib/starter_web/_data/plugins/feed.yml +1 -1
- data/lib/starter_web/_data/plugins/paginator.yml +1 -1
- data/lib/starter_web/_data/plugins/seo-tags.yml +1 -1
- data/lib/starter_web/_data/plugins/sitemap.yml +1 -1
- data/lib/starter_web/_data/private.yml +1 -1
- data/lib/starter_web/_data/resources.yml +190 -118
- data/lib/starter_web/_data/templates/feed.xml +2 -2
- data/lib/starter_web/_data/templates/robots.txt +1 -1
- data/lib/starter_web/_data/templates/seo-tags.html +1 -1
- data/lib/starter_web/_data/templates/sitemap.xml +1 -1
- data/lib/starter_web/_data/utilities/defaults/util_srv.yml +1 -1
- data/lib/starter_web/_data/utilities/util_srv.yml +1 -1
- data/lib/starter_web/_includes/custom/static/bs5_accordion.html +1 -1
- data/lib/starter_web/_includes/custom/templates/bs5_accordion.html +1 -1
- data/lib/starter_web/_includes/custom/templates/collection_panel.html +1 -1
- data/lib/starter_web/_includes/custom/templates/custom_header.html +1 -1
- data/lib/starter_web/_includes/custom/templates/people_panel.html +1 -1
- data/lib/starter_web/_includes/google/static/google_ad__your-slot-id.html +1 -1
- data/lib/starter_web/_includes/google/templates/google_ads.html +1 -1
- data/lib/starter_web/_plugins/asciidoctor/admonition-block-answer.rb +3 -2
- data/lib/starter_web/_plugins/asciidoctor/admonition-block-question.rb +7 -6
- data/lib/starter_web/_plugins/asciidoctor/banner.rb +8 -5
- data/lib/starter_web/_plugins/asciidoctor/callout.rb +10 -8
- data/lib/starter_web/_plugins/asciidoctor/carousel-block.rb +14 -8
- data/lib/starter_web/_plugins/asciidoctor/conum.rb +3 -1
- data/lib/starter_web/_plugins/asciidoctor/dailymotion-block.rb +83 -0
- data/lib/starter_web/_plugins/asciidoctor/fab-icon-inline.rb +8 -5
- data/lib/starter_web/_plugins/asciidoctor/fas-icon-inline.rb +8 -5
- data/lib/starter_web/_plugins/asciidoctor/flag-icon-inline.rb +8 -5
- data/lib/starter_web/_plugins/asciidoctor/gallery-block.rb +50 -44
- data/lib/starter_web/_plugins/asciidoctor/gist-block.rb +56 -52
- data/lib/starter_web/_plugins/asciidoctor/google-ad-block.rb +52 -47
- data/lib/starter_web/_plugins/asciidoctor/iconify-icon-inline.rb +8 -5
- data/lib/starter_web/_plugins/asciidoctor/lightbox-block.rb +88 -82
- data/lib/starter_web/_plugins/asciidoctor/lorem_inline.rb +5 -4
- data/lib/starter_web/_plugins/asciidoctor/masonry-block.rb +13 -7
- data/lib/starter_web/_plugins/asciidoctor/masterslider-block.rb +54 -48
- data/lib/starter_web/_plugins/asciidoctor/mdi-icon-inline.rb +2 -1
- data/lib/starter_web/_plugins/asciidoctor/mdib-icon-inline.rb +2 -1
- data/lib/starter_web/_plugins/asciidoctor/mdil-icon-inline.rb +2 -1
- data/lib/starter_web/_plugins/asciidoctor/panel.rb +9 -5
- data/lib/starter_web/_plugins/asciidoctor/placeholder-inline.rb +4 -3
- data/lib/starter_web/_plugins/asciidoctor/range-slider-block.rb +49 -44
- data/lib/starter_web/_plugins/asciidoctor/shout-block.rb +6 -7
- data/lib/starter_web/_plugins/asciidoctor/slick-block.rb +12 -6
- data/lib/starter_web/_plugins/asciidoctor/textbook-block.rb +9 -5
- data/lib/starter_web/_plugins/asciidoctor/twitter-emoji-inline.rb +4 -1
- data/lib/starter_web/_plugins/asciidoctor/video-block.rb +65 -0
- data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +82 -0
- data/lib/starter_web/_plugins/asciidoctor/vimeo-block.rb +82 -0
- data/lib/starter_web/_plugins/asciidoctor/wistia-block.rb +87 -0
- data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +95 -0
- data/lib/starter_web/_plugins/filter/debug.rb +1 -1
- data/lib/starter_web/_plugins/filter/encodeBase64.rb +1 -1
- data/lib/starter_web/_plugins/filter/encryptAES.rb +1 -1
- data/lib/starter_web/_plugins/filter/filters.rb +1 -1
- data/lib/starter_web/_plugins/filter/liquify.rb +1 -1
- data/lib/starter_web/_plugins/filter/minifyJS.rb +1 -1
- data/lib/starter_web/_plugins/filter/minifyJSON.rb +1 -1
- data/lib/starter_web/_plugins/filter/prettify.rb +1 -1
- data/lib/starter_web/_plugins/filter/xml_prettify.rb +1 -1
- data/lib/starter_web/_plugins/helper/symlink_watcher.rb +1 -1
- data/lib/starter_web/_plugins/i18n/date.rb +1 -1
- data/lib/starter_web/_plugins/index/lunr.rb +2 -2
- data/lib/starter_web/_plugins/seo/j1-feed.rb +1 -1
- data/lib/starter_web/_plugins/seo/j1-seo-tags.rb +1 -1
- data/lib/starter_web/_plugins/seo/j1-sitemap.rb +1 -1
- data/lib/starter_web/assets/images/icons/videojs/videojs-logo.png +0 -0
- data/lib/starter_web/assets/images/icons/videojs/videojs-poster.png +0 -0
- data/lib/starter_web/assets/videos/gallery/_video_james_carpool_caraoke_poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/html5/video1-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/html5/video1.subtitles.vtt +39 -0
- data/lib/starter_web/assets/videos/gallery/html5/video2-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/html5/303/237video2-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video1-poster.1920..jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_adele_last_carpool_caraoke_poster.1920.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_adele_last_carpool_caraoke_poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_gaga-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_james_carpool_caraoke_poster.jpg +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +1 -1
- data/lib/starter_web/config.ru +1 -1
- data/lib/starter_web/dot.gitattributes +1 -1
- data/lib/starter_web/dot.nojekyll +1 -1
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/111_about_the_converter.asciidoc +5 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/112_getting_started.asciidoc +3 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/113_themes.asciidoc +1 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +11 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/100_chapter.asciidoc +27 -11
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/200_chapter.asciidoc +3 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +12 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +14 -7
- data/lib/starter_web/pages/public/features/general.adoc +12 -1
- data/lib/starter_web/pages/public/features/template.adoc +37 -38
- data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_all_books.adoc +4 -3
- data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_biography.adoc +2 -3
- data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_fantasy.adoc +2 -2
- data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_romance.adoc +2 -2
- data/lib/starter_web/pages/public/learn/bookshelf/jekyll_collections.adoc +6 -5
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +1 -0
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/themes_rouge.asciidoc +4 -0
- data/lib/starter_web/pages/public/learn/roundtrip/asciidoc_extensions.adoc +6 -5
- data/lib/starter_web/pages/public/learn/roundtrip/bootstrap_themes.adoc +2 -0
- data/lib/starter_web/pages/public/learn/roundtrip/highlghter_rouge.adoc +7 -2
- data/lib/starter_web/pages/public/learn/roundtrip/icon_fonts.adoc +7 -2
- data/lib/starter_web/pages/public/learn/roundtrip/lunr_search.adoc +12 -3
- data/lib/starter_web/pages/public/learn/roundtrip/modal_extentions.adoc +4 -2
- data/lib/starter_web/pages/public/learn/roundtrip/present_images.adoc +84 -93
- data/lib/starter_web/pages/public/learn/roundtrip/present_videos.adoc +264 -64
- data/lib/starter_web/pages/public/learn/roundtrip/responsive_tables.adoc +5 -2
- data/lib/starter_web/pages/public/learn/roundtrip/typography.adoc +1 -0
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +2 -1
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +3 -1
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +3 -1
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +2 -39
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +2 -2
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +3 -2
- data/lib/starter_web/pages/public/plans/plans.adoc +14 -5
- data/lib/starter_web/pages/public/tools/previewer/_includes/attributes.asciidoc +69 -0
- data/lib/starter_web/pages/public/tools/previewer/_includes/documents/readme +0 -0
- data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +3093 -3104
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- data/lib/starter_web/utilsrv/server.js +1 -1
- metadata +170 -94
- data/assets/data/galleries.json +0 -156
- data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +0 -360
- data/assets/themes/j1/modules/backstretch/js/v2.1.16/backstretch.js +0 -1694
- data/assets/themes/j1/modules/backstretch/js/v2.1.16/backstretch.min.js +0 -19
- data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.map +0 -1
- data/assets/themes/j1/modules/iframeResizer/js/resizer.map +0 -1
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/css/justifiedGallery.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/css/justifiedGallery.min.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/css/theme/uno.css +0 -23
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.3.7.0.js +0 -1229
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.js +0 -1229
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.min.js +0 -8
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/less/.csslintrc +0 -20
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/less/justifiedGallery.less +0 -113
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/css/justifiedGallery.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/css/justifiedGallery.min.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/justifiedGallery.js +0 -1245
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/justifiedGallery.min.js +0 -7
- data/assets/themes/j1/modules/justifiedGallery/css/_archived/justifiedGallery.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/css/_archived/justifiedGallery.min.css +0 -110
- data/assets/themes/j1/modules/lightGallery/css/core/lg-fb-comment-box.css +0 -58
- data/assets/themes/j1/modules/lightGallery/css/core/lg-fb-comment-box.min.css +0 -5
- data/assets/themes/j1/modules/lightGallery/css/core/lg-transitions.css +0 -778
- data/assets/themes/j1/modules/lightGallery/css/core/lg-transitions.min.css +0 -5
- data/assets/themes/j1/modules/lightGallery/css/core/lightgallery.css +0 -981
- data/assets/themes/j1/modules/lightGallery/css/core/lightgallery.min.css +0 -5
- data/assets/themes/j1/modules/lightGallery/css/fonts/lg.eot +0 -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/themes/uno.css +0 -262
- data/assets/themes/j1/modules/lightGallery/css/themes/uno.min.css +0 -15
- data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery.js +0 -1375
- data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/core/lightgallery.js +0 -1362
- data/assets/themes/j1/modules/lightGallery/js/core/lightgallery.min.js +0 -4
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-autoplay.js +0 -206
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-autoplay.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-fullscreen.js +0 -126
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-fullscreen.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-hash.js +0 -101
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-hash.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-pager.js +0 -105
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-pager.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-share.js +0 -107
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-share.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-thumbnail.js +0 -486
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-thumbnail.min.js +0 -7
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-zoom.js +0 -527
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-zoom.min.js +0 -5
- data/assets/themes/j1/modules/msDropdown/js/msDropdown.min.js.map +0 -1
- data/assets/themes/j1/modules/popper/js/popper.min.js.map +0 -1
- data/assets/themes/j1/modules/rangeSlider/js/15.5.1/nouislider.js +0 -2337
- data/assets/themes/j1/modules/rangeSlider/js/15.5.1/nouislider.min.js +0 -1
- data/assets/themes/j1/modules/rangeSlider/js/9.1.0/nouislider.js +0 -2534
- data/assets/themes/j1/modules/slick/lightbox/js/slick-lightbox.min.js.map +0 -1
- data/assets/themes/j1/modules/themeSwitcher/js/_unsued/switcher.1.js +0 -454
- data/assets/themes/j1/modules/vimeo/froogaloop/js/froogaloop2.js +0 -4
- data/assets/themes/j1/modules/vimeo/froogaloop/js/froogaloop2.min.js +0 -4
- data/assets/themes/j1/modules/vimeo/player/js/player.js +0 -2138
- data/assets/themes/j1/modules/vimeo/player/js/player.js.map +0 -1
- data/assets/themes/j1/modules/vimeo/player/js/player.min.js +0 -2
- data/assets/themes/j1/modules/vimeo/player/js/player.min.js.map +0 -1
- data/lib/starter_web/_data/modules/justifiedGallery.yml +0 -556
- data/lib/starter_web/assets/videos/gallery/vk/hai.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/vk/otter.jpg +0 -0
- /data/assets/themes/j1/modules/backstretch/{LICENSE-MIT → LICENSE} +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/animation-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/customize-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/dynamic-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/facebook-icon.svg +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/googleplus-icon.svg +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/html5-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/linked-in.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/module-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/play-button.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/responsive-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/thumb-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/touch-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/twitter-icon.svg +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/twitter.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/video1-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/zoom-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/zoom.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/{css/img → images}/loading.gif +0 -0
- /data/assets/themes/j1/modules/lightGallery/{css/img → img}/video-play.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/{css/img → img}/vimeo-play.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/{css/img → img}/youtube-play.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/js/{modules → plugins}/j1/j1-video.js +0 -0
- /data/assets/themes/j1/modules/lightGallery/js/{modules → plugins}/j1/j1-video.min.js +0 -0
@@ -1,1694 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
# -----------------------------------------------------------------------------
|
3
|
-
# ~/assets/themes/j1/modules/backstretch/js/backstretch.js
|
4
|
-
# Backstretch v.2.1.16 implementation for J1 Theme.
|
5
|
-
#
|
6
|
-
# Product/Info:
|
7
|
-
# https://jekyll.one
|
8
|
-
# http://srobbin.com/jquery-plugins/backstretch/
|
9
|
-
#
|
10
|
-
# Copyright (C) 2023 Juergen Adams
|
11
|
-
# Copyright (C) 2012 Scott Robbin
|
12
|
-
#
|
13
|
-
# J1 Theme is licensed under the MIT License.
|
14
|
-
# See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md
|
15
|
-
# Backstretch is licensed under the MIT License.
|
16
|
-
# See: https://github.com/jquery-backstretch/jquery-backstretch/blob/2.1.16/LICENSE-MIT
|
17
|
-
# -----------------------------------------------------------------------------
|
18
|
-
*/
|
19
|
-
|
20
|
-
// -----------------------------------------------------------------------------
|
21
|
-
// ESLint shimming
|
22
|
-
// -----------------------------------------------------------------------------
|
23
|
-
/* eslint indent: "off" */
|
24
|
-
/* eslint no-unused-vars: "off" */
|
25
|
-
/* eslint no-undef: "off" */
|
26
|
-
/* eslint no-useless-escape: "off" */
|
27
|
-
/* eslint no-prototype-builtins: "off" */
|
28
|
-
/* eslint no-shadow-restricted-names: "off" */
|
29
|
-
// -----------------------------------------------------------------------------
|
30
|
-
|
31
|
-
'use strict';
|
32
|
-
(function ($, window, undefined) {
|
33
|
-
|
34
|
-
/** @const */
|
35
|
-
var YOUTUBE_REGEXP = /^.*(youtu\.be\/|youtube\.com\/v\/|youtube\.com\/embed\/|youtube\.com\/watch\?v=|youtube\.com\/watch\?.*\&v=)([^#\&\?]*).*/i;
|
36
|
-
var logText;
|
37
|
-
|
38
|
-
/* PLUGIN DEFINITION
|
39
|
-
* ========================= */
|
40
|
-
|
41
|
-
$.fn.backstretch = function (images, options) {
|
42
|
-
var args = arguments;
|
43
|
-
// var debug = false;
|
44
|
-
|
45
|
-
/*
|
46
|
-
* Scroll the page one pixel to get the right window height on iOS
|
47
|
-
* Pretty harmless for everyone else
|
48
|
-
*/
|
49
|
-
if ($(window).scrollTop() === 0) {
|
50
|
-
window.scrollTo(0, 0);
|
51
|
-
}
|
52
|
-
|
53
|
-
var returnValues;
|
54
|
-
|
55
|
-
this.each(function (eachIndex) {
|
56
|
-
var $this = $(this),
|
57
|
-
obj = $this.data('backstretch');
|
58
|
-
|
59
|
-
// Do we already have an instance attached to this element?
|
60
|
-
if (obj) {
|
61
|
-
|
62
|
-
// Is this a method they're trying to execute?
|
63
|
-
if (typeof args[0] === 'string' &&
|
64
|
-
typeof obj[args[0]] === 'function') {
|
65
|
-
|
66
|
-
// Call the method
|
67
|
-
var returnValue = obj[args[0]].apply(obj, Array.prototype.slice.call(args, 1));
|
68
|
-
if (returnValue === obj) { // If a method is chaining
|
69
|
-
returnValue = undefined;
|
70
|
-
}
|
71
|
-
if (returnValue !== undefined) {
|
72
|
-
returnValues = returnValues || [];
|
73
|
-
returnValues[eachIndex] = returnValue;
|
74
|
-
}
|
75
|
-
|
76
|
-
return; // Nothing further to do
|
77
|
-
}
|
78
|
-
|
79
|
-
// Merge the old options with the new
|
80
|
-
options = $.extend(obj.options, options);
|
81
|
-
|
82
|
-
// Remove the old instance
|
83
|
-
if (obj.hasOwnProperty('destroy')) {
|
84
|
-
obj.destroy(true);
|
85
|
-
}
|
86
|
-
}
|
87
|
-
|
88
|
-
// We need at least one image
|
89
|
-
if (!images || (images && images.length === 0)) {
|
90
|
-
var cssBackgroundImage = $this.css('background-image');
|
91
|
-
if (cssBackgroundImage && cssBackgroundImage !== 'none') {
|
92
|
-
images = [{
|
93
|
-
url: $this.css('backgroundImage').replace(/url\(|\)|"|'/g, '')
|
94
|
-
}];
|
95
|
-
} else {
|
96
|
-
$.error('No images were supplied for Backstretch, or element must have a CSS-defined background image.');
|
97
|
-
}
|
98
|
-
}
|
99
|
-
|
100
|
-
obj = new Backstretch(this, images, options || {});
|
101
|
-
$this.data('backstretch', obj);
|
102
|
-
});
|
103
|
-
|
104
|
-
return returnValues ? returnValues.length === 1 ? returnValues[0] : returnValues : this;
|
105
|
-
};
|
106
|
-
|
107
|
-
// If no element is supplied, we'll attach to body
|
108
|
-
$.backstretch = function (images, options) {
|
109
|
-
// Return the instance
|
110
|
-
return $('body')
|
111
|
-
.backstretch(images, options)
|
112
|
-
.data('backstretch');
|
113
|
-
};
|
114
|
-
|
115
|
-
// Custom selector
|
116
|
-
$.expr[':'].backstretch = function (elem) {
|
117
|
-
return $(elem).data('backstretch') !== undefined;
|
118
|
-
};
|
119
|
-
|
120
|
-
/* DEFAULTS
|
121
|
-
* ========================= */
|
122
|
-
|
123
|
-
$.fn.backstretch.defaults = {
|
124
|
-
debug: false
|
125
|
-
,
|
126
|
-
duration: 5000 // Amount of time in between slides (if slideshow)
|
127
|
-
,
|
128
|
-
transition: 'fade' // Type of transition between slides
|
129
|
-
,
|
130
|
-
transitionDuration: 0 // Duration of transition between slides
|
131
|
-
,
|
132
|
-
animateFirst: true // Animate the transition of first image of slideshow in?
|
133
|
-
,
|
134
|
-
alignX: 0.5 // The x-alignment for the image, can be 'left'|'center'|'right' or any number between 0.0 and 1.0
|
135
|
-
,
|
136
|
-
alignY: 0.5 // The y-alignment for the image, can be 'top'|'center'|'bottom' or any number between 0.0 and 1.0
|
137
|
-
,
|
138
|
-
paused: false // Whether the images should slide after given duration
|
139
|
-
,
|
140
|
-
start: 0 // Index of the first image to show
|
141
|
-
,
|
142
|
-
preload: 2 // How many images preload at a time?
|
143
|
-
,
|
144
|
-
preloadSize: 1 // How many images can we preload in parallel?
|
145
|
-
,
|
146
|
-
resolutionRefreshRate: 2500 // How long to wait before switching resolution?
|
147
|
-
,
|
148
|
-
resolutionChangeRatioThreshold: 0.1 // How much a change should it be before switching resolution?
|
149
|
-
};
|
150
|
-
|
151
|
-
/* STYLES
|
152
|
-
*
|
153
|
-
* Baked-in styles that we'll apply to our elements.
|
154
|
-
* In an effort to keep the plugin simple, these are not exposed as options.
|
155
|
-
* That said, anyone can override these in their own stylesheet.
|
156
|
-
* ========================= */
|
157
|
-
var styles = {
|
158
|
-
wrap: {
|
159
|
-
left: 0,
|
160
|
-
top: 0,
|
161
|
-
overflow: 'hidden',
|
162
|
-
margin: 0,
|
163
|
-
padding: 0,
|
164
|
-
height: '100%',
|
165
|
-
width: '100%',
|
166
|
-
zIndex: -999999
|
167
|
-
},
|
168
|
-
itemWrapper: {
|
169
|
-
position: 'absolute',
|
170
|
-
display: 'none',
|
171
|
-
margin: 0,
|
172
|
-
padding: 0,
|
173
|
-
border: 'none',
|
174
|
-
width: '100%',
|
175
|
-
height: '100%',
|
176
|
-
zIndex: -999999
|
177
|
-
},
|
178
|
-
item: {
|
179
|
-
position: 'absolute',
|
180
|
-
margin: 0,
|
181
|
-
padding: 0,
|
182
|
-
border: 'none',
|
183
|
-
width: '100%',
|
184
|
-
height: '100%',
|
185
|
-
maxWidth: 'none'
|
186
|
-
}
|
187
|
-
};
|
188
|
-
|
189
|
-
/* Given an array of different options for an image,
|
190
|
-
* choose the optimal image for the container size.
|
191
|
-
*
|
192
|
-
* Given an image template (a string with {{ width }} and/or
|
193
|
-
* {{height}} inside) and a container object, returns the
|
194
|
-
* image url with the exact values for the size of that
|
195
|
-
* container.
|
196
|
-
*
|
197
|
-
* Returns an array of urls optimized for the specified resolution.
|
198
|
-
*
|
199
|
-
*/
|
200
|
-
var optimalSizeImages = (function () {
|
201
|
-
|
202
|
-
/* Sorts the array of image sizes based on width */
|
203
|
-
var widthInsertSort = function (arr) {
|
204
|
-
for (var i = 1; i < arr.length; i++) {
|
205
|
-
var tmp = arr[i],
|
206
|
-
j = i;
|
207
|
-
while (arr[j - 1] && parseInt(arr[j - 1].width, 10) > parseInt(tmp.width, 10)) {
|
208
|
-
arr[j] = arr[j - 1];
|
209
|
-
--j;
|
210
|
-
}
|
211
|
-
arr[j] = tmp;
|
212
|
-
}
|
213
|
-
|
214
|
-
return arr;
|
215
|
-
};
|
216
|
-
|
217
|
-
/* Given an array of various sizes of the same image and a container width,
|
218
|
-
* return the best image.
|
219
|
-
*/
|
220
|
-
var selectBest = function (containerWidth, containerHeight, imageSizes) {
|
221
|
-
|
222
|
-
var devicePixelRatio = window.devicePixelRatio || 1;
|
223
|
-
var deviceOrientation = getDeviceOrientation();
|
224
|
-
var windowOrientation = getWindowOrientation();
|
225
|
-
var wrapperOrientation = (containerHeight > containerWidth) ?
|
226
|
-
'portrait' :
|
227
|
-
(containerWidth > containerHeight ? 'landscape' : 'square');
|
228
|
-
|
229
|
-
var lastAllowedImage = 0;
|
230
|
-
var testWidth;
|
231
|
-
|
232
|
-
for (var j = 0, image; j < imageSizes.length; j++) {
|
233
|
-
|
234
|
-
image = imageSizes[j];
|
235
|
-
|
236
|
-
// In case a new image was pushed in, process it:
|
237
|
-
if (typeof image === 'string') {
|
238
|
-
image = imageSizes[j] = {
|
239
|
-
url: image
|
240
|
-
};
|
241
|
-
}
|
242
|
-
|
243
|
-
if (image.pixelRatio && image.pixelRatio !== 'auto' && parseFloat(image.pixelRatio) !== devicePixelRatio) {
|
244
|
-
// We disallowed choosing this image for current device pixel ratio,
|
245
|
-
// So skip this one.
|
246
|
-
continue;
|
247
|
-
}
|
248
|
-
|
249
|
-
if (image.deviceOrientation && image.deviceOrientation !== deviceOrientation) {
|
250
|
-
// We disallowed choosing this image for current device orientation,
|
251
|
-
// So skip this one.
|
252
|
-
continue;
|
253
|
-
}
|
254
|
-
|
255
|
-
if (image.windowOrientation && image.windowOrientation !== deviceOrientation) {
|
256
|
-
// We disallowed choosing this image for current window orientation,
|
257
|
-
// So skip this one.
|
258
|
-
continue;
|
259
|
-
}
|
260
|
-
|
261
|
-
if (image.orientation && image.orientation !== wrapperOrientation) {
|
262
|
-
// We disallowed choosing this image for current element's orientation,
|
263
|
-
// So skip this one.
|
264
|
-
continue;
|
265
|
-
}
|
266
|
-
|
267
|
-
// Mark this one as the last one we investigated
|
268
|
-
// which does not violate device pixel ratio rules.
|
269
|
-
// We may choose this one later if there's no match.
|
270
|
-
lastAllowedImage = j;
|
271
|
-
|
272
|
-
// For most images, we match the specified width against element width,
|
273
|
-
// And enforcing a limit depending on the "pixelRatio" property if specified.
|
274
|
-
// But if a pixelRatio="auto", then we consider the width as the physical width of the image,
|
275
|
-
// And match it while considering the device's pixel ratio.
|
276
|
-
testWidth = containerWidth;
|
277
|
-
if (image.pixelRatio === 'auto') {
|
278
|
-
containerWidth *= devicePixelRatio;
|
279
|
-
}
|
280
|
-
|
281
|
-
// Stop when the width of the image is larger or equal to the container width
|
282
|
-
if (image.width >= testWidth) {
|
283
|
-
break;
|
284
|
-
}
|
285
|
-
}
|
286
|
-
|
287
|
-
// Use the image located at where we stopped
|
288
|
-
return imageSizes[Math.min(j, lastAllowedImage)];
|
289
|
-
};
|
290
|
-
|
291
|
-
var replaceTagsInUrl = function (url, templateReplacer) {
|
292
|
-
|
293
|
-
if (typeof url === 'string') {
|
294
|
-
url = url.replace(/{{(width|height)}}/g, templateReplacer);
|
295
|
-
} else if (url instanceof Array) {
|
296
|
-
for (var i = 0; i < url.length; i++) {
|
297
|
-
if (url[i].src) {
|
298
|
-
url[i].src = replaceTagsInUrl(url[i].src, templateReplacer);
|
299
|
-
} else {
|
300
|
-
url[i] = replaceTagsInUrl(url[i], templateReplacer);
|
301
|
-
}
|
302
|
-
}
|
303
|
-
}
|
304
|
-
|
305
|
-
return url;
|
306
|
-
};
|
307
|
-
|
308
|
-
return function ($container, images) {
|
309
|
-
var containerWidth = $container.width(),
|
310
|
-
containerHeight = $container.height();
|
311
|
-
|
312
|
-
var chosenImages = [];
|
313
|
-
|
314
|
-
var templateReplacer = function (match, key) {
|
315
|
-
if (key === 'width') {
|
316
|
-
return containerWidth;
|
317
|
-
}
|
318
|
-
if (key === 'height') {
|
319
|
-
return containerHeight;
|
320
|
-
}
|
321
|
-
return match;
|
322
|
-
};
|
323
|
-
|
324
|
-
for (var i = 0; i < images.length; i++) {
|
325
|
-
if ($.isArray(images[i])) {
|
326
|
-
images[i] = widthInsertSort(images[i]);
|
327
|
-
var chosen = selectBest(containerWidth, containerHeight, images[i]);
|
328
|
-
chosenImages.push(chosen);
|
329
|
-
} else {
|
330
|
-
// In case a new image was pushed in, process it:
|
331
|
-
if (typeof images[i] === 'string') {
|
332
|
-
images[i] = {
|
333
|
-
url: images[i]
|
334
|
-
};
|
335
|
-
}
|
336
|
-
|
337
|
-
var item = $.extend({}, images[i]);
|
338
|
-
item.url = replaceTagsInUrl(item.url, templateReplacer);
|
339
|
-
chosenImages.push(item);
|
340
|
-
}
|
341
|
-
}
|
342
|
-
return chosenImages;
|
343
|
-
};
|
344
|
-
|
345
|
-
})();
|
346
|
-
|
347
|
-
var isVideoSource = function (source) {
|
348
|
-
return YOUTUBE_REGEXP.test(source.url) || source.isVideo;
|
349
|
-
};
|
350
|
-
|
351
|
-
/* Preload images */
|
352
|
-
var preload = (function (sources, startAt, count, batchSize, callback) {
|
353
|
-
// Plugin cache
|
354
|
-
var cache = [];
|
355
|
-
|
356
|
-
// Wrapper for cache
|
357
|
-
var caching = function (image) {
|
358
|
-
for (var i = 0; i < cache.length; i++) {
|
359
|
-
if (cache[i].src === image.src) {
|
360
|
-
return cache[i];
|
361
|
-
}
|
362
|
-
}
|
363
|
-
cache.push(image);
|
364
|
-
return image;
|
365
|
-
};
|
366
|
-
|
367
|
-
// Execute callback
|
368
|
-
var exec = function (sources, callback, last) {
|
369
|
-
if (typeof callback === 'function') {
|
370
|
-
callback.call(sources, last);
|
371
|
-
}
|
372
|
-
};
|
373
|
-
|
374
|
-
// Closure to hide cache
|
375
|
-
return function preload(sources, startAt, count, batchSize, callback) {
|
376
|
-
// Check input data
|
377
|
-
if (typeof sources === 'undefined') {
|
378
|
-
return;
|
379
|
-
}
|
380
|
-
if (!$.isArray(sources)) {
|
381
|
-
sources = [sources];
|
382
|
-
}
|
383
|
-
|
384
|
-
if (arguments.length < 5 && typeof arguments[arguments.length - 1] === 'function') {
|
385
|
-
callback = arguments[arguments.length - 1];
|
386
|
-
}
|
387
|
-
|
388
|
-
startAt = (typeof startAt === 'function' || !startAt) ? 0 : startAt;
|
389
|
-
count = (typeof count === 'function' || !count || count < 0) ? sources.length : Math.min(count, sources.length);
|
390
|
-
batchSize = (typeof batchSize === 'function' || !batchSize) ? 1 : batchSize;
|
391
|
-
|
392
|
-
if (startAt >= sources.length) {
|
393
|
-
startAt = 0;
|
394
|
-
count = 0;
|
395
|
-
}
|
396
|
-
if (batchSize < 0) {
|
397
|
-
batchSize = count;
|
398
|
-
}
|
399
|
-
batchSize = Math.min(batchSize, count);
|
400
|
-
|
401
|
-
var next = sources.slice(startAt + batchSize, count - batchSize);
|
402
|
-
sources = sources.slice(startAt, batchSize);
|
403
|
-
count = sources.length;
|
404
|
-
|
405
|
-
// If sources array is empty
|
406
|
-
if (!count) {
|
407
|
-
exec(sources, callback, true);
|
408
|
-
return;
|
409
|
-
}
|
410
|
-
|
411
|
-
// Image loading callback
|
412
|
-
var countLoaded = 0;
|
413
|
-
|
414
|
-
var loaded = function () {
|
415
|
-
countLoaded++;
|
416
|
-
if (countLoaded !== count) {
|
417
|
-
return;
|
418
|
-
}
|
419
|
-
|
420
|
-
exec(sources, callback, !next);
|
421
|
-
preload(next, 0, 0, batchSize, callback);
|
422
|
-
};
|
423
|
-
|
424
|
-
// Loop sources to preload
|
425
|
-
var image;
|
426
|
-
|
427
|
-
for (var i = 0; i < sources.length; i++) {
|
428
|
-
|
429
|
-
if (isVideoSource(sources[i])) {
|
430
|
-
|
431
|
-
// Do not preload videos. There are issues with that.
|
432
|
-
// First - we need to keep an instance of the preloaded and use that exactly, not a copy.
|
433
|
-
// Second - there are memory issues.
|
434
|
-
// If there will be a requirement from users - I'll try to implement this.
|
435
|
-
|
436
|
-
continue;
|
437
|
-
|
438
|
-
} else {
|
439
|
-
|
440
|
-
image = new Image();
|
441
|
-
image.src = sources[i].url;
|
442
|
-
|
443
|
-
image = caching(image);
|
444
|
-
|
445
|
-
if (image.complete) {
|
446
|
-
loaded();
|
447
|
-
} else {
|
448
|
-
$(image).on('load error', loaded);
|
449
|
-
}
|
450
|
-
|
451
|
-
}
|
452
|
-
|
453
|
-
}
|
454
|
-
};
|
455
|
-
})();
|
456
|
-
|
457
|
-
/* Process images array */
|
458
|
-
var processImagesArray = function (images) {
|
459
|
-
var processed = [];
|
460
|
-
for (var i = 0; i < images.length; i++) {
|
461
|
-
if (typeof images[i] === 'string') {
|
462
|
-
processed.push({
|
463
|
-
url: images[i]
|
464
|
-
});
|
465
|
-
} else if ($.isArray(images[i])) {
|
466
|
-
processed.push(processImagesArray(images[i]));
|
467
|
-
} else {
|
468
|
-
processed.push(processOptions(images[i]));
|
469
|
-
}
|
470
|
-
}
|
471
|
-
return processed;
|
472
|
-
};
|
473
|
-
|
474
|
-
/* Process options */
|
475
|
-
var processOptions = function (options, required) {
|
476
|
-
|
477
|
-
// Convert old options
|
478
|
-
|
479
|
-
// centeredX/centeredY are deprecated
|
480
|
-
if (options.centeredX || options.centeredY) {
|
481
|
-
if (window.console && window.console.log) {
|
482
|
-
window.console.log('jquery.backstretch: `centeredX`/`centeredY` is deprecated, please use `alignX`/`alignY`');
|
483
|
-
}
|
484
|
-
if (options.centeredX) {
|
485
|
-
options.alignX = 0.5;
|
486
|
-
}
|
487
|
-
if (options.centeredY) {
|
488
|
-
options.alignY = 0.5;
|
489
|
-
}
|
490
|
-
}
|
491
|
-
|
492
|
-
// Deprecated spec
|
493
|
-
if (options.speed !== undefined) {
|
494
|
-
|
495
|
-
if (window.console && window.console.log) {
|
496
|
-
window.console.log('jquery.backstretch: `speed` is deprecated, please use `transitionDuration`');
|
497
|
-
}
|
498
|
-
|
499
|
-
options.transitionDuration = options.speed;
|
500
|
-
options.transition = 'fade';
|
501
|
-
}
|
502
|
-
|
503
|
-
// Typo
|
504
|
-
if (options.resolutionChangeRatioTreshold !== undefined) {
|
505
|
-
window.console.log('jquery.backstretch: `treshold` is a typo!');
|
506
|
-
options.resolutionChangeRatioThreshold = options.resolutionChangeRatioTreshold;
|
507
|
-
}
|
508
|
-
|
509
|
-
// Current spec that needs processing
|
510
|
-
|
511
|
-
if (options.fadeFirst !== undefined) {
|
512
|
-
options.animateFirst = options.fadeFirst;
|
513
|
-
}
|
514
|
-
|
515
|
-
if (options.fade !== undefined) {
|
516
|
-
options.transitionDuration = options.fade;
|
517
|
-
options.transition = 'fade';
|
518
|
-
}
|
519
|
-
|
520
|
-
if (options.scale) {
|
521
|
-
options.scale = validScale(options.scale);
|
522
|
-
}
|
523
|
-
|
524
|
-
return processAlignOptions(options);
|
525
|
-
};
|
526
|
-
|
527
|
-
/* Process align options */
|
528
|
-
var processAlignOptions = function (options, required) {
|
529
|
-
if (options.alignX === 'left') {
|
530
|
-
options.alignX = 0.0;
|
531
|
-
} else if (options.alignX === 'center') {
|
532
|
-
options.alignX = 0.5;
|
533
|
-
} else if (options.alignX === 'right') {
|
534
|
-
options.alignX = 1.0;
|
535
|
-
} else {
|
536
|
-
if (options.alignX !== undefined || required) {
|
537
|
-
options.alignX = parseFloat(options.alignX);
|
538
|
-
if (isNaN(options.alignX)) {
|
539
|
-
options.alignX = 0.5;
|
540
|
-
}
|
541
|
-
}
|
542
|
-
}
|
543
|
-
|
544
|
-
if (options.alignY === 'top') {
|
545
|
-
options.alignY = 0.0;
|
546
|
-
} else if (options.alignY === 'center') {
|
547
|
-
options.alignY = 0.5;
|
548
|
-
} else if (options.alignY === 'bottom') {
|
549
|
-
options.alignY = 1.0;
|
550
|
-
} else {
|
551
|
-
if (options.alignX !== undefined || required) {
|
552
|
-
options.alignY = parseFloat(options.alignY);
|
553
|
-
if (isNaN(options.alignY)) {
|
554
|
-
options.alignY = 0.5;
|
555
|
-
}
|
556
|
-
}
|
557
|
-
}
|
558
|
-
|
559
|
-
return options;
|
560
|
-
};
|
561
|
-
|
562
|
-
var SUPPORTED_SCALE_OPTIONS = {
|
563
|
-
'cover': 'cover',
|
564
|
-
'fit': 'fit',
|
565
|
-
'fit-smaller': 'fit-smaller',
|
566
|
-
'fill': 'fill'
|
567
|
-
};
|
568
|
-
|
569
|
-
function validScale(scale) {
|
570
|
-
if (!SUPPORTED_SCALE_OPTIONS.hasOwnProperty(scale)) {
|
571
|
-
return 'cover';
|
572
|
-
}
|
573
|
-
return scale;
|
574
|
-
}
|
575
|
-
|
576
|
-
/* CLASS DEFINITION
|
577
|
-
* ========================= */
|
578
|
-
var Backstretch = function (container, images, options) {
|
579
|
-
this.options = $.extend({}, $.fn.backstretch.defaults, options || {});
|
580
|
-
|
581
|
-
this.firstShow = true;
|
582
|
-
|
583
|
-
// Process options
|
584
|
-
processOptions(this.options, true);
|
585
|
-
|
586
|
-
/* In its simplest form, we allow Backstretch to be called on an image path.
|
587
|
-
* e.g. $.backstretch('/path/to/image.jpg')
|
588
|
-
* So, we need to turn this back into an array.
|
589
|
-
*/
|
590
|
-
this.images = processImagesArray($.isArray(images) ? images : [images]);
|
591
|
-
|
592
|
-
/**
|
593
|
-
* Paused-Option
|
594
|
-
*/
|
595
|
-
if (this.options.paused) {
|
596
|
-
this.paused = true;
|
597
|
-
}
|
598
|
-
|
599
|
-
/**
|
600
|
-
* Start-Option (Index)
|
601
|
-
*/
|
602
|
-
if (this.options.start >= this.images.length) {
|
603
|
-
this.options.start = this.images.length - 1;
|
604
|
-
}
|
605
|
-
if (this.options.start < 0) {
|
606
|
-
this.options.start = 0;
|
607
|
-
}
|
608
|
-
|
609
|
-
// Convenience reference to know if the container is body.
|
610
|
-
this.isBody = container === document.body;
|
611
|
-
|
612
|
-
/* We're keeping track of a few different elements
|
613
|
-
*
|
614
|
-
* Container: the element that Backstretch was called on.
|
615
|
-
* Wrap: a DIV that we place the image into, so we can hide the overflow.
|
616
|
-
* Root: Convenience reference to help calculate the correct height.
|
617
|
-
*/
|
618
|
-
var $window = $(window);
|
619
|
-
this.$container = $(container);
|
620
|
-
this.$root = this.isBody ? supportsFixedPosition ? $window : $(document) : this.$container;
|
621
|
-
|
622
|
-
this.originalImages = this.images;
|
623
|
-
this.images = optimalSizeImages(
|
624
|
-
this.options.alwaysTestWindowResolution ? $window : this.$root,
|
625
|
-
this.originalImages);
|
626
|
-
|
627
|
-
/**
|
628
|
-
* Pre-Loading.
|
629
|
-
* This is the first image, so we will preload a minimum of 1 images.
|
630
|
-
*/
|
631
|
-
preload(this.images, this.options.start || 0, this.options.preload || 1);
|
632
|
-
|
633
|
-
// Don't create a new wrap if one already exists (from a previous instance of Backstretch)
|
634
|
-
var $existing = this.$container.children('.backstretch').first();
|
635
|
-
this.$wrap = $existing.length ? $existing :
|
636
|
-
$('<div class="backstretch"></div>')
|
637
|
-
.css(this.options.bypassCss ? {} : styles.wrap)
|
638
|
-
.appendTo(this.$container);
|
639
|
-
|
640
|
-
if (!this.options.bypassCss) {
|
641
|
-
|
642
|
-
// Non-body elements need some style adjustments
|
643
|
-
if (!this.isBody) {
|
644
|
-
// If the container is statically positioned, we need to make it relative,
|
645
|
-
// and if no zIndex is defined, we should set it to zero.
|
646
|
-
var position = this.$container.css('position'),
|
647
|
-
zIndex = this.$container.css('zIndex');
|
648
|
-
|
649
|
-
this.$container.css({
|
650
|
-
position: position === 'static' ? 'relative' : position,
|
651
|
-
zIndex: zIndex === 'auto' ? 0 : zIndex
|
652
|
-
});
|
653
|
-
|
654
|
-
// Needs a higher z-index
|
655
|
-
this.$wrap.css({
|
656
|
-
zIndex: -999998
|
657
|
-
});
|
658
|
-
}
|
659
|
-
|
660
|
-
// Fixed or absolute positioning?
|
661
|
-
this.$wrap.css({
|
662
|
-
position: this.isBody && supportsFixedPosition ? 'fixed' : 'absolute'
|
663
|
-
});
|
664
|
-
|
665
|
-
}
|
666
|
-
|
667
|
-
// Set the first image
|
668
|
-
this.index = this.options.start;
|
669
|
-
this.show(this.index);
|
670
|
-
|
671
|
-
// Listen for resize
|
672
|
-
$window.on('resize.backstretch', $.proxy(this.resize, this))
|
673
|
-
.on('orientationchange.backstretch', $.proxy(function () {
|
674
|
-
// Need to do this in order to get the right window height
|
675
|
-
if (this.isBody && window.pageYOffset === 0) {
|
676
|
-
window.scrollTo(0, 1);
|
677
|
-
this.resize();
|
678
|
-
}
|
679
|
-
}, this));
|
680
|
-
};
|
681
|
-
|
682
|
-
var performTransition = function (options) {
|
683
|
-
|
684
|
-
var transition = options.transition || 'fade';
|
685
|
-
|
686
|
-
// Look for multiple options
|
687
|
-
if (typeof transition === 'string' && transition.indexOf('|') > -1) {
|
688
|
-
transition = transition.split('|');
|
689
|
-
}
|
690
|
-
|
691
|
-
if (transition instanceof Array) {
|
692
|
-
transition = transition[Math.round(Math.random() * (transition.length - 1))];
|
693
|
-
}
|
694
|
-
|
695
|
-
var $new = options['new'];
|
696
|
-
var $old = options['old'] ? options['old'] : $([]);
|
697
|
-
|
698
|
-
switch (transition.toString().toLowerCase()) {
|
699
|
-
|
700
|
-
default:
|
701
|
-
case 'fade':
|
702
|
-
$new.fadeIn({
|
703
|
-
duration: options.duration,
|
704
|
-
complete: options.complete,
|
705
|
-
easing: options.easing || undefined
|
706
|
-
});
|
707
|
-
break;
|
708
|
-
|
709
|
-
case 'fadeinout':
|
710
|
-
case 'fade_in_out':
|
711
|
-
|
712
|
-
var fadeInNew = function () {
|
713
|
-
$new.fadeIn({
|
714
|
-
duration: options.duration / 2,
|
715
|
-
complete: options.complete,
|
716
|
-
easing: options.easing || undefined
|
717
|
-
});
|
718
|
-
};
|
719
|
-
|
720
|
-
if ($old.length) {
|
721
|
-
$old.fadeOut({
|
722
|
-
duration: options.duration / 2,
|
723
|
-
complete: fadeInNew,
|
724
|
-
easing: options.easing || undefined
|
725
|
-
});
|
726
|
-
} else {
|
727
|
-
fadeInNew();
|
728
|
-
}
|
729
|
-
|
730
|
-
break;
|
731
|
-
|
732
|
-
case 'pushleft':
|
733
|
-
case 'push_left':
|
734
|
-
case 'pushright':
|
735
|
-
case 'push_right':
|
736
|
-
case 'pushup':
|
737
|
-
case 'push_up':
|
738
|
-
case 'pushdown':
|
739
|
-
case 'push_down':
|
740
|
-
case 'coverleft':
|
741
|
-
case 'cover_left':
|
742
|
-
case 'coverright':
|
743
|
-
case 'cover_right':
|
744
|
-
case 'coverup':
|
745
|
-
case 'cover_up':
|
746
|
-
case 'coverdown':
|
747
|
-
case 'cover_down':
|
748
|
-
|
749
|
-
var transitionParts = transition.match(/^(cover|push)_?(.*)$/);
|
750
|
-
|
751
|
-
var animProp = transitionParts[2] === 'left' ? 'right' : transitionParts[2] === 'right' ? 'left' : transitionParts[2] === 'down' ? 'top' : transitionParts[2] === 'up' ? 'bottom' : 'right';
|
752
|
-
|
753
|
-
var newCssStart = {
|
754
|
-
'display': ''
|
755
|
-
},
|
756
|
-
newCssAnim = {};
|
757
|
-
newCssStart[animProp] = '-100%';
|
758
|
-
newCssAnim[animProp] = 0;
|
759
|
-
|
760
|
-
$new
|
761
|
-
.css(newCssStart)
|
762
|
-
.animate(newCssAnim, {
|
763
|
-
duration: options.duration,
|
764
|
-
complete: function () {
|
765
|
-
$new.css(animProp, '');
|
766
|
-
options.complete.apply(this, arguments);
|
767
|
-
},
|
768
|
-
easing: options.easing || undefined
|
769
|
-
});
|
770
|
-
|
771
|
-
if (transitionParts[1] === 'push' && $old.length) {
|
772
|
-
var oldCssAnim = {};
|
773
|
-
oldCssAnim[animProp] = '100%';
|
774
|
-
|
775
|
-
$old
|
776
|
-
.animate(oldCssAnim, {
|
777
|
-
duration: options.duration,
|
778
|
-
complete: function () {
|
779
|
-
$old.css('display', 'none');
|
780
|
-
},
|
781
|
-
easing: options.easing || undefined
|
782
|
-
});
|
783
|
-
}
|
784
|
-
|
785
|
-
break;
|
786
|
-
}
|
787
|
-
|
788
|
-
};
|
789
|
-
|
790
|
-
/* PUBLIC METHODS
|
791
|
-
* ========================= */
|
792
|
-
Backstretch.prototype = {
|
793
|
-
|
794
|
-
resize: function () {
|
795
|
-
try {
|
796
|
-
// var debug = false;
|
797
|
-
var logger = log4javascript.getLogger('j1.core.attic');
|
798
|
-
|
799
|
-
// Check for a better suited image after the resize
|
800
|
-
var $resTest = this.options.alwaysTestWindowResolution ? $(window) : this.$root;
|
801
|
-
var newContainerWidth = $resTest.width();
|
802
|
-
var newContainerHeight = $resTest.height();
|
803
|
-
var changeRatioW = newContainerWidth / (this._lastResizeContainerWidth || 0);
|
804
|
-
var changeRatioH = newContainerHeight / (this._lastResizeContainerHeight || 0);
|
805
|
-
var resolutionChangeRatioThreshold = this.options.resolutionChangeRatioThreshold || 0.0;
|
806
|
-
|
807
|
-
// check for big changes in container size
|
808
|
-
if ((newContainerWidth !== this._lastResizeContainerWidth ||
|
809
|
-
newContainerHeight !== this._lastResizeContainerHeight) &&
|
810
|
-
((Math.abs(changeRatioW - 1) >= resolutionChangeRatioThreshold || isNaN(changeRatioW)) ||
|
811
|
-
(Math.abs(changeRatioH - 1) >= resolutionChangeRatioThreshold || isNaN(changeRatioH)))) {
|
812
|
-
|
813
|
-
this._lastResizeContainerWidth = newContainerWidth;
|
814
|
-
this._lastResizeContainerHeight = newContainerHeight;
|
815
|
-
|
816
|
-
// Big change: rebuild the entire images array
|
817
|
-
this.images = optimalSizeImages($resTest, this.originalImages);
|
818
|
-
|
819
|
-
// Preload them (they will be automatically inserted on the next cycle)
|
820
|
-
if (this.options.preload) {
|
821
|
-
preload(this.images, (this.index + 1) % this.images.length, this.options.preload);
|
822
|
-
}
|
823
|
-
|
824
|
-
// In case there is no cycle and the new source is different than the current
|
825
|
-
if (this.images.length === 1 &&
|
826
|
-
this._currentImage.url !== this.images[0].url) {
|
827
|
-
|
828
|
-
// Wait a little an update the image being showed
|
829
|
-
var that = this;
|
830
|
-
clearTimeout(that._selectAnotherResolutionTimeout);
|
831
|
-
that._selectAnotherResolutionTimeout = setTimeout(function () {
|
832
|
-
that.show(0);
|
833
|
-
}, this.options.resolutionRefreshRate);
|
834
|
-
}
|
835
|
-
}
|
836
|
-
|
837
|
-
var bgCSS = {
|
838
|
-
left: 0,
|
839
|
-
top: 0,
|
840
|
-
right: 'auto',
|
841
|
-
bottom: 'auto'
|
842
|
-
}
|
843
|
-
|
844
|
-
,
|
845
|
-
boxWidth = this.isBody ? this.$root.width() : this.$root.innerWidth(),
|
846
|
-
boxHeight = this.isBody ? (window.innerHeight ? window.innerHeight : this.$root.height()) : this.$root.innerHeight()
|
847
|
-
|
848
|
-
,
|
849
|
-
naturalWidth = this.$itemWrapper.data('width'),
|
850
|
-
naturalHeight = this.$itemWrapper.data('height')
|
851
|
-
|
852
|
-
,
|
853
|
-
ratio = (naturalWidth / naturalHeight) || 1
|
854
|
-
|
855
|
-
,
|
856
|
-
alignX = this._currentImage.alignX === undefined ? this.options.alignX : this._currentImage.alignX,
|
857
|
-
alignY = this._currentImage.alignY === undefined ? this.options.alignY : this._currentImage.alignY,
|
858
|
-
scale = validScale(this._currentImage.scale || this.options.scale);
|
859
|
-
|
860
|
-
// jadams, 2017-12-07: Added log for testing
|
861
|
-
if(this.options.debug) {
|
862
|
-
logText = '\n' + 'resize: boxHeight x boxWidth: ' + boxHeight + ' x ' + boxWidth;
|
863
|
-
logger.debug(logText);
|
864
|
-
}
|
865
|
-
|
866
|
-
if ( boxHeight == 0 || boxWidth == 0 ) {
|
867
|
-
logText = '\n' + 'Kacke am Schuh';
|
868
|
-
logger.warn(logText);
|
869
|
-
}
|
870
|
-
|
871
|
-
var width, height;
|
872
|
-
if (scale === 'fit' || scale === 'fit-smaller') {
|
873
|
-
width = naturalWidth;
|
874
|
-
height = naturalHeight;
|
875
|
-
|
876
|
-
if (width > boxWidth ||
|
877
|
-
height > boxHeight ||
|
878
|
-
scale === 'fit-smaller') {
|
879
|
-
var boxRatio = boxWidth / boxHeight;
|
880
|
-
if (boxRatio > ratio) {
|
881
|
-
width = Math.floor(boxHeight * ratio);
|
882
|
-
height = boxHeight;
|
883
|
-
} else if (boxRatio < ratio) {
|
884
|
-
width = boxWidth;
|
885
|
-
height = Math.floor(boxWidth / ratio);
|
886
|
-
} else {
|
887
|
-
width = boxWidth;
|
888
|
-
height = boxHeight;
|
889
|
-
}
|
890
|
-
}
|
891
|
-
} else if (scale === 'fill') {
|
892
|
-
width = boxWidth;
|
893
|
-
height = boxHeight;
|
894
|
-
} else { // 'cover'
|
895
|
-
width = Math.max(boxHeight * ratio, boxWidth);
|
896
|
-
height = Math.max(width / ratio, boxHeight);
|
897
|
-
}
|
898
|
-
|
899
|
-
// Make adjustments based on image ratio
|
900
|
-
bgCSS.top = -(height - boxHeight) * alignY;
|
901
|
-
bgCSS.left = -(width - boxWidth) * alignX;
|
902
|
-
bgCSS.width = width;
|
903
|
-
bgCSS.height = height;
|
904
|
-
|
905
|
-
if (!this.options.bypassCss) {
|
906
|
-
|
907
|
-
this.$wrap
|
908
|
-
.css({
|
909
|
-
width: boxWidth,
|
910
|
-
height: boxHeight
|
911
|
-
})
|
912
|
-
.find('>.backstretch-item').not('.deleteable')
|
913
|
-
.each(function () {
|
914
|
-
var $wrapper = $(this);
|
915
|
-
$wrapper.find('img,video,iframe')
|
916
|
-
.css(bgCSS);
|
917
|
-
});
|
918
|
-
}
|
919
|
-
|
920
|
-
var evt = $.Event('backstretch.resize', {
|
921
|
-
relatedTarget: this.$container[0]
|
922
|
-
});
|
923
|
-
this.$container.trigger(evt, this);
|
924
|
-
|
925
|
-
} catch (err) {
|
926
|
-
// IE7 seems to trigger resize before the image is loaded.
|
927
|
-
// This try/catch block is a hack to let it fail gracefully.
|
928
|
-
logText = 'resize: jadams, IE7 hack to let it fail gracefully: ' + err;
|
929
|
-
logger.warn(logText);
|
930
|
-
}
|
931
|
-
|
932
|
-
return this;
|
933
|
-
}
|
934
|
-
|
935
|
-
// Show the slide at a certain position
|
936
|
-
,
|
937
|
-
show: function (newIndex, overrideOptions) {
|
938
|
-
|
939
|
-
var logger = log4javascript.getLogger('j1.core.attic');
|
940
|
-
|
941
|
-
// Validate index
|
942
|
-
if (Math.abs(newIndex) > this.images.length - 1) {
|
943
|
-
return;
|
944
|
-
}
|
945
|
-
|
946
|
-
// Vars
|
947
|
-
var that = this,
|
948
|
-
$oldItemWrapper = that.$wrap.find('>.backstretch-item').addClass('deleteable'),
|
949
|
-
oldVideoWrapper = that.videoWrapper,
|
950
|
-
evtOptions = {
|
951
|
-
relatedTarget: that.$container[0]
|
952
|
-
};
|
953
|
-
|
954
|
-
// Trigger the "before" event
|
955
|
-
that.$container.trigger($.Event('backstretch.before', evtOptions), [that, newIndex]);
|
956
|
-
|
957
|
-
// Set the new frame index
|
958
|
-
this.index = newIndex;
|
959
|
-
var selectedImage = that.images[newIndex];
|
960
|
-
|
961
|
-
// Pause the slideshow
|
962
|
-
clearTimeout(that._cycleTimeout);
|
963
|
-
|
964
|
-
// New image
|
965
|
-
|
966
|
-
delete that.videoWrapper; // Current item may not be a video
|
967
|
-
|
968
|
-
var isVideo = isVideoSource(selectedImage);
|
969
|
-
if (isVideo) {
|
970
|
-
that.videoWrapper = new VideoWrapper(selectedImage);
|
971
|
-
that.$item = that.videoWrapper.$video.css('pointer-events', 'none');
|
972
|
-
} else {
|
973
|
-
that.$item = $('<img />');
|
974
|
-
}
|
975
|
-
|
976
|
-
that.$itemWrapper = $('<div class="backstretch-item">')
|
977
|
-
.append(that.$item);
|
978
|
-
|
979
|
-
if (this.options.bypassCss) {
|
980
|
-
that.$itemWrapper.css({
|
981
|
-
'display': 'none'
|
982
|
-
});
|
983
|
-
} else {
|
984
|
-
that.$itemWrapper.css(styles.itemWrapper);
|
985
|
-
that.$item.css(styles.item);
|
986
|
-
}
|
987
|
-
|
988
|
-
that.$item.bind(isVideo ? 'canplay' : 'load', function (e) {
|
989
|
-
var $this = $(this),
|
990
|
-
$wrapper = $this.parent(),
|
991
|
-
options = $wrapper.data('options');
|
992
|
-
|
993
|
-
if (overrideOptions) {
|
994
|
-
options = $.extend({}, options, overrideOptions);
|
995
|
-
}
|
996
|
-
|
997
|
-
var imgWidth = this.naturalWidth || this.videoWidth || this.width,
|
998
|
-
imgHeight = this.naturalHeight || this.videoHeight || this.height;
|
999
|
-
|
1000
|
-
// Save the natural dimensions
|
1001
|
-
$wrapper
|
1002
|
-
.data('width', imgWidth)
|
1003
|
-
.data('height', imgHeight);
|
1004
|
-
|
1005
|
-
var getOption = function (opt) {
|
1006
|
-
return options[opt] !== undefined ?
|
1007
|
-
options[opt] :
|
1008
|
-
that.options[opt];
|
1009
|
-
};
|
1010
|
-
|
1011
|
-
var transition = getOption('transition');
|
1012
|
-
var transitionEasing = getOption('transitionEasing');
|
1013
|
-
var transitionDuration = getOption('transitionDuration');
|
1014
|
-
|
1015
|
-
// Show the image, then delete the old one
|
1016
|
-
var bringInNextImage = function () {
|
1017
|
-
|
1018
|
-
if (oldVideoWrapper) {
|
1019
|
-
oldVideoWrapper.stop();
|
1020
|
-
oldVideoWrapper.destroy();
|
1021
|
-
}
|
1022
|
-
|
1023
|
-
$oldItemWrapper.remove();
|
1024
|
-
|
1025
|
-
// Resume the slideshow
|
1026
|
-
if (!that.paused && that.images.length > 1) {
|
1027
|
-
that.cycle();
|
1028
|
-
}
|
1029
|
-
|
1030
|
-
// Now we can clear the background on the element, to spare memory
|
1031
|
-
if (!that.options.bypassCss && !that.isBody) {
|
1032
|
-
// jadams, 2017-09-30: leave background unchanged
|
1033
|
-
//that.$container.css('background-image', 'none');
|
1034
|
-
}
|
1035
|
-
|
1036
|
-
// Trigger the "after" and "show" events
|
1037
|
-
// jadams 2022-07-23: added missing 'before' event
|
1038
|
-
// "show" (as an event) is being deprecated (used only internallly)
|
1039
|
-
// $(['after', 'show']).each(function () {
|
1040
|
-
$(['before', 'after', 'show']).each(function () {
|
1041
|
-
that.$container.trigger($.Event('backstretch.' + this, evtOptions), [that, newIndex]);
|
1042
|
-
});
|
1043
|
-
|
1044
|
-
if (isVideo) {
|
1045
|
-
that.videoWrapper.play();
|
1046
|
-
}
|
1047
|
-
};
|
1048
|
-
|
1049
|
-
if ((that.firstShow && !that.options.animateFirst) || !transitionDuration || !transition) {
|
1050
|
-
// Avoid transition on first show or if there's no transitionDuration value
|
1051
|
-
$wrapper.show();
|
1052
|
-
bringInNextImage();
|
1053
|
-
} else {
|
1054
|
-
|
1055
|
-
performTransition({
|
1056
|
-
'new': $wrapper,
|
1057
|
-
old: $oldItemWrapper,
|
1058
|
-
transition: transition,
|
1059
|
-
duration: transitionDuration,
|
1060
|
-
easing: transitionEasing,
|
1061
|
-
complete: bringInNextImage
|
1062
|
-
});
|
1063
|
-
|
1064
|
-
}
|
1065
|
-
|
1066
|
-
that.firstShow = false;
|
1067
|
-
|
1068
|
-
// jadams, 2017-12-07: Added log for debug mode
|
1069
|
-
var imageWidth = this.naturalWidth || this.videoWidth || this.width;
|
1070
|
-
var imageHeight = this.naturalHeight || this.videoHeight || this.height;
|
1071
|
-
var logText = 'show: imageHeight x imageWidth: ' + imageHeight + ' x ' + imageWidth;
|
1072
|
-
|
1073
|
-
if(that.options.debug) {
|
1074
|
-
logger.debug(logText);
|
1075
|
-
}
|
1076
|
-
|
1077
|
-
// jadams, 2019-08-06: a resize requires a VISIBLE element otherwise
|
1078
|
-
// the calculatiin of the images dimensions will fail.
|
1079
|
-
// As a workaround, wait until the element is visible
|
1080
|
-
// Run resize on the image loaded for re-scaling
|
1081
|
-
var myID = '#' + that.$container['0']['id'];
|
1082
|
-
var isVisible = setInterval(function() {
|
1083
|
-
if ($(myID).is(':visible')) {
|
1084
|
-
// clear interval checking
|
1085
|
-
clearInterval(isVisible);
|
1086
|
-
logger.info('\n' + 'container visible on id: ' + myID);
|
1087
|
-
that.resize();
|
1088
|
-
}
|
1089
|
-
}, 50); // END 'isVisible'
|
1090
|
-
|
1091
|
-
});
|
1092
|
-
|
1093
|
-
that.$itemWrapper.appendTo(that.$wrap);
|
1094
|
-
|
1095
|
-
that.$item.attr('alt', selectedImage.alt || '');
|
1096
|
-
that.$itemWrapper.data('options', selectedImage);
|
1097
|
-
|
1098
|
-
if (!isVideo) {
|
1099
|
-
that.$item.attr('src', selectedImage.url);
|
1100
|
-
}
|
1101
|
-
|
1102
|
-
that._currentImage = selectedImage;
|
1103
|
-
|
1104
|
-
return that;
|
1105
|
-
}
|
1106
|
-
|
1107
|
-
,
|
1108
|
-
current: function () {
|
1109
|
-
return this.index;
|
1110
|
-
}
|
1111
|
-
|
1112
|
-
,
|
1113
|
-
next: function () {
|
1114
|
-
var args = Array.prototype.slice.call(arguments, 0);
|
1115
|
-
args.unshift(this.index < this.images.length - 1 ? this.index + 1 : 0);
|
1116
|
-
return this.show.apply(this, args);
|
1117
|
-
}
|
1118
|
-
|
1119
|
-
,
|
1120
|
-
prev: function () {
|
1121
|
-
var args = Array.prototype.slice.call(arguments, 0);
|
1122
|
-
args.unshift(this.index === 0 ? this.images.length - 1 : this.index - 1);
|
1123
|
-
return this.show.apply(this, args);
|
1124
|
-
}
|
1125
|
-
|
1126
|
-
,
|
1127
|
-
pause: function () {
|
1128
|
-
// Pause the slideshow
|
1129
|
-
this.paused = true;
|
1130
|
-
|
1131
|
-
if (this.videoWrapper) {
|
1132
|
-
this.videoWrapper.pause();
|
1133
|
-
}
|
1134
|
-
|
1135
|
-
return this;
|
1136
|
-
}
|
1137
|
-
|
1138
|
-
,
|
1139
|
-
resume: function () {
|
1140
|
-
// Resume the slideshow
|
1141
|
-
this.paused = false;
|
1142
|
-
|
1143
|
-
if (this.videoWrapper) {
|
1144
|
-
this.videoWrapper.play();
|
1145
|
-
}
|
1146
|
-
|
1147
|
-
this.cycle();
|
1148
|
-
return this;
|
1149
|
-
}
|
1150
|
-
|
1151
|
-
,
|
1152
|
-
cycle: function () {
|
1153
|
-
// Start/resume the slideshow
|
1154
|
-
if (this.images.length > 1) {
|
1155
|
-
// Clear the timeout, just in case
|
1156
|
-
clearTimeout(this._cycleTimeout);
|
1157
|
-
|
1158
|
-
var duration = (this._currentImage && this._currentImage.duration) || this.options.duration;
|
1159
|
-
var isVideo = isVideoSource(this._currentImage);
|
1160
|
-
|
1161
|
-
var callNext = function () {
|
1162
|
-
this.$item.off('.cycle');
|
1163
|
-
|
1164
|
-
// Check for paused slideshow
|
1165
|
-
if (!this.paused) {
|
1166
|
-
this.next();
|
1167
|
-
}
|
1168
|
-
};
|
1169
|
-
|
1170
|
-
// Special video handling
|
1171
|
-
if (isVideo) {
|
1172
|
-
|
1173
|
-
// Leave video at last frame
|
1174
|
-
if (!this._currentImage.loop) {
|
1175
|
-
var lastFrameTimeout = 0;
|
1176
|
-
|
1177
|
-
this.$item
|
1178
|
-
.on('playing.cycle', function () {
|
1179
|
-
var player = $(this).data('player');
|
1180
|
-
|
1181
|
-
// jadams, 2017-10-10: Workaround the wrong handling of the
|
1182
|
-
// HTML5 Audio/Video property .data
|
1183
|
-
// See https://www.w3schools.com/tags/ref_av_dom.asp for more
|
1184
|
-
// details for HTML Audio and Video DOM Reference
|
1185
|
-
|
1186
|
-
// ToDo: In general it should work. To be fixed.
|
1187
|
-
|
1188
|
-
clearTimeout(lastFrameTimeout);
|
1189
|
-
if (typeof player != 'undefined') {
|
1190
|
-
lastFrameTimeout = setTimeout(function () {
|
1191
|
-
player.pause();
|
1192
|
-
player.$video.trigger('ended');
|
1193
|
-
}, (player.getDuration() - player.getCurrentTime()) * 1000);
|
1194
|
-
}
|
1195
|
-
})
|
1196
|
-
.on('ended.cycle', function () {
|
1197
|
-
clearTimeout(lastFrameTimeout);
|
1198
|
-
});
|
1199
|
-
}
|
1200
|
-
|
1201
|
-
// On error go to next
|
1202
|
-
this.$item.on('error.cycle initerror.cycle', $.proxy(callNext, this));
|
1203
|
-
}
|
1204
|
-
|
1205
|
-
if (isVideo && !this._currentImage.duration) {
|
1206
|
-
// It's a video - playing until end
|
1207
|
-
this.$item.on('ended.cycle', $.proxy(callNext, this));
|
1208
|
-
|
1209
|
-
} else {
|
1210
|
-
// Cycling according to specified duration
|
1211
|
-
this._cycleTimeout = setTimeout($.proxy(callNext, this), duration);
|
1212
|
-
}
|
1213
|
-
|
1214
|
-
}
|
1215
|
-
return this;
|
1216
|
-
}
|
1217
|
-
|
1218
|
-
,
|
1219
|
-
destroy: function (preserveBackground) {
|
1220
|
-
// Stop the resize events
|
1221
|
-
$(window).off('resize.backstretch orientationchange.backstretch');
|
1222
|
-
|
1223
|
-
// Stop any videos
|
1224
|
-
if (this.videoWrapper) {
|
1225
|
-
this.videoWrapper.destroy();
|
1226
|
-
}
|
1227
|
-
|
1228
|
-
// Clear the timeout
|
1229
|
-
clearTimeout(this._cycleTimeout);
|
1230
|
-
|
1231
|
-
// Remove Backstretch
|
1232
|
-
if (!preserveBackground) {
|
1233
|
-
this.$wrap.remove();
|
1234
|
-
}
|
1235
|
-
this.$container.removeData('backstretch');
|
1236
|
-
}
|
1237
|
-
};
|
1238
|
-
|
1239
|
-
/**
|
1240
|
-
* Video Abstraction Layer
|
1241
|
-
*
|
1242
|
-
* Static methods:
|
1243
|
-
* > VideoWrapper.loadYoutubeAPI() -> Call in order to load the Youtube API.
|
1244
|
-
* An 'youtube_api_load' event will be triggered on $(window) when the API is loaded.
|
1245
|
-
*
|
1246
|
-
* Generic:
|
1247
|
-
* > player.type -> type of the video
|
1248
|
-
* > player.video / player.$video -> contains the element holding the video
|
1249
|
-
* > player.play() -> plays the video
|
1250
|
-
* > player.pause() -> pauses the video
|
1251
|
-
* > player.setCurrentTime(position) -> seeks to a position by seconds
|
1252
|
-
*
|
1253
|
-
* Youtube:
|
1254
|
-
* > player.ytId will contain the youtube ID if the source is a youtube url
|
1255
|
-
* > player.ytReady is a flag telling whether the youtube source is ready for playback
|
1256
|
-
* */
|
1257
|
-
|
1258
|
-
var VideoWrapper = function () {
|
1259
|
-
this.init.apply(this, arguments);
|
1260
|
-
};
|
1261
|
-
|
1262
|
-
/**
|
1263
|
-
* @param {Object} options
|
1264
|
-
* @param {String|Array<String>|Array<{{src: String, type: String?}}>} options.url
|
1265
|
-
* @param {Boolean} options.loop=false
|
1266
|
-
* @param {Boolean?} options.mute=true
|
1267
|
-
* @param {String?} options.poster
|
1268
|
-
* loop, mute, poster
|
1269
|
-
*/
|
1270
|
-
VideoWrapper.prototype.init = function (options) {
|
1271
|
-
|
1272
|
-
var that = this;
|
1273
|
-
|
1274
|
-
var $video;
|
1275
|
-
|
1276
|
-
var setVideoElement = function () {
|
1277
|
-
that.$video = $video;
|
1278
|
-
that.video = $video[0];
|
1279
|
-
};
|
1280
|
-
|
1281
|
-
// Determine video type
|
1282
|
-
|
1283
|
-
var videoType = 'video';
|
1284
|
-
|
1285
|
-
if (!(options.url instanceof Array) &&
|
1286
|
-
YOUTUBE_REGEXP.test(options.url)) {
|
1287
|
-
videoType = 'youtube';
|
1288
|
-
}
|
1289
|
-
|
1290
|
-
that.type = videoType;
|
1291
|
-
|
1292
|
-
if (videoType === 'youtube') {
|
1293
|
-
|
1294
|
-
// Try to load the API in the meantime
|
1295
|
-
VideoWrapper.loadYoutubeAPI();
|
1296
|
-
|
1297
|
-
that.ytId = options.url.match(YOUTUBE_REGEXP)[2];
|
1298
|
-
var src = 'https://www.youtube.com/embed/' + that.ytId +
|
1299
|
-
'?rel=0&autoplay=0&showinfo=0&controls=0&modestbranding=1' +
|
1300
|
-
'&cc_load_policy=0&disablekb=1&iv_load_policy=3&loop=0' +
|
1301
|
-
'&enablejsapi=1&origin=' + encodeURIComponent(window.location.origin);
|
1302
|
-
|
1303
|
-
that.__ytStartMuted = !!options.mute || options.mute === undefined;
|
1304
|
-
|
1305
|
-
$video = $('<iframe />')
|
1306
|
-
.attr({
|
1307
|
-
'src_to_load': src
|
1308
|
-
})
|
1309
|
-
.css({
|
1310
|
-
'border': 0,
|
1311
|
-
'margin': 0,
|
1312
|
-
'padding': 0
|
1313
|
-
})
|
1314
|
-
.data('player', that);
|
1315
|
-
|
1316
|
-
if (options.loop) {
|
1317
|
-
$video.on('ended.loop', function () {
|
1318
|
-
if (!that.__manuallyStopped) {
|
1319
|
-
that.play();
|
1320
|
-
}
|
1321
|
-
});
|
1322
|
-
}
|
1323
|
-
|
1324
|
-
that.ytReady = false;
|
1325
|
-
|
1326
|
-
setVideoElement();
|
1327
|
-
|
1328
|
-
if (window['YT']) {
|
1329
|
-
that._initYoutube();
|
1330
|
-
$video.trigger('initsuccess');
|
1331
|
-
} else {
|
1332
|
-
$(window).one('youtube_api_load', function () {
|
1333
|
-
that._initYoutube();
|
1334
|
-
$video.trigger('initsuccess');
|
1335
|
-
});
|
1336
|
-
}
|
1337
|
-
|
1338
|
-
} else {
|
1339
|
-
// Traditional <video> tag with multiple sources
|
1340
|
-
|
1341
|
-
$video = $('<video>')
|
1342
|
-
.prop('autoplay', false)
|
1343
|
-
.prop('controls', false)
|
1344
|
-
.prop('loop', !!options.loop)
|
1345
|
-
.prop('muted', !!options.mute || options.mute === undefined)
|
1346
|
-
|
1347
|
-
// Let the first frames be available before playback, as we do transitions
|
1348
|
-
.prop('preload', 'auto')
|
1349
|
-
.prop('poster', options.poster || '');
|
1350
|
-
|
1351
|
-
var sources = (options.url instanceof Array) ? options.url : [options.url];
|
1352
|
-
|
1353
|
-
for (var i = 0; i < sources.length; i++) {
|
1354
|
-
var sourceItem = sources[i];
|
1355
|
-
if (typeof (sourceItem) === 'string') {
|
1356
|
-
sourceItem = {
|
1357
|
-
src: sourceItem
|
1358
|
-
};
|
1359
|
-
}
|
1360
|
-
$('<source>')
|
1361
|
-
.attr('src', sourceItem.src)
|
1362
|
-
// Make sure to not specify type if unknown -
|
1363
|
-
// so the browser will try to autodetect.
|
1364
|
-
.attr('type', sourceItem.type || null)
|
1365
|
-
.appendTo($video);
|
1366
|
-
}
|
1367
|
-
|
1368
|
-
if (!$video[0].canPlayType || !sources.length) {
|
1369
|
-
$video.trigger('initerror');
|
1370
|
-
} else {
|
1371
|
-
$video.trigger('initsuccess');
|
1372
|
-
}
|
1373
|
-
|
1374
|
-
setVideoElement();
|
1375
|
-
}
|
1376
|
-
|
1377
|
-
};
|
1378
|
-
|
1379
|
-
VideoWrapper.prototype._initYoutube = function () {
|
1380
|
-
var that = this;
|
1381
|
-
|
1382
|
-
var YT = window['YT'];
|
1383
|
-
|
1384
|
-
that.$video
|
1385
|
-
.attr('src', that.$video.attr('src_to_load'))
|
1386
|
-
.removeAttr('src_to_load');
|
1387
|
-
|
1388
|
-
// It won't init if it's not in the DOM, so we emulate that
|
1389
|
-
var hasParent = !!that.$video[0].parentNode;
|
1390
|
-
if (!hasParent) {
|
1391
|
-
var $tmpParent = $('<div>').css('display', 'none !important').appendTo(document.body);
|
1392
|
-
that.$video.appendTo($tmpParent);
|
1393
|
-
}
|
1394
|
-
|
1395
|
-
var player = new YT.Player(that.video, {
|
1396
|
-
events: {
|
1397
|
-
'onReady': function () {
|
1398
|
-
|
1399
|
-
if (that.__ytStartMuted) {
|
1400
|
-
player.mute();
|
1401
|
-
}
|
1402
|
-
|
1403
|
-
if (!hasParent) {
|
1404
|
-
// Restore parent to old state - without interrupting any changes
|
1405
|
-
if (that.$video[0].parentNode === $tmpParent[0]) {
|
1406
|
-
that.$video.detach();
|
1407
|
-
}
|
1408
|
-
$tmpParent.remove();
|
1409
|
-
}
|
1410
|
-
|
1411
|
-
that.ytReady = true;
|
1412
|
-
that._updateYoutubeSize();
|
1413
|
-
that.$video.trigger('canplay');
|
1414
|
-
},
|
1415
|
-
'onStateChange': function (event) {
|
1416
|
-
switch (event.data) {
|
1417
|
-
case YT.PlayerState.PLAYING:
|
1418
|
-
that.$video.trigger('playing');
|
1419
|
-
break;
|
1420
|
-
case YT.PlayerState.ENDED:
|
1421
|
-
that.$video.trigger('ended');
|
1422
|
-
break;
|
1423
|
-
case YT.PlayerState.PAUSED:
|
1424
|
-
that.$video.trigger('pause');
|
1425
|
-
break;
|
1426
|
-
case YT.PlayerState.BUFFERING:
|
1427
|
-
that.$video.trigger('waiting');
|
1428
|
-
break;
|
1429
|
-
case YT.PlayerState.CUED:
|
1430
|
-
that.$video.trigger('canplay');
|
1431
|
-
break;
|
1432
|
-
}
|
1433
|
-
},
|
1434
|
-
'onPlaybackQualityChange': function () {
|
1435
|
-
that._updateYoutubeSize();
|
1436
|
-
that.$video.trigger('resize');
|
1437
|
-
},
|
1438
|
-
'onError': function (err) {
|
1439
|
-
that.hasError = true;
|
1440
|
-
that.$video.trigger({
|
1441
|
-
'type': 'error',
|
1442
|
-
'error': err
|
1443
|
-
});
|
1444
|
-
}
|
1445
|
-
}
|
1446
|
-
});
|
1447
|
-
|
1448
|
-
that.ytPlayer = player;
|
1449
|
-
|
1450
|
-
return that;
|
1451
|
-
};
|
1452
|
-
|
1453
|
-
VideoWrapper.prototype._updateYoutubeSize = function () {
|
1454
|
-
var that = this;
|
1455
|
-
|
1456
|
-
switch (that.ytPlayer.getPlaybackQuality() || 'medium') {
|
1457
|
-
case 'small':
|
1458
|
-
that.video.videoWidth = 426;
|
1459
|
-
that.video.videoHeight = 240;
|
1460
|
-
break;
|
1461
|
-
case 'medium':
|
1462
|
-
that.video.videoWidth = 640;
|
1463
|
-
that.video.videoHeight = 360;
|
1464
|
-
break;
|
1465
|
-
default:
|
1466
|
-
case 'large':
|
1467
|
-
that.video.videoWidth = 854;
|
1468
|
-
that.video.videoHeight = 480;
|
1469
|
-
break;
|
1470
|
-
case 'hd720':
|
1471
|
-
that.video.videoWidth = 1280;
|
1472
|
-
that.video.videoHeight = 720;
|
1473
|
-
break;
|
1474
|
-
case 'hd1080':
|
1475
|
-
that.video.videoWidth = 1920;
|
1476
|
-
that.video.videoHeight = 1080;
|
1477
|
-
break;
|
1478
|
-
case 'highres':
|
1479
|
-
that.video.videoWidth = 2560;
|
1480
|
-
that.video.videoHeight = 1440;
|
1481
|
-
break;
|
1482
|
-
}
|
1483
|
-
|
1484
|
-
return that;
|
1485
|
-
};
|
1486
|
-
|
1487
|
-
VideoWrapper.prototype.play = function () {
|
1488
|
-
var that = this;
|
1489
|
-
|
1490
|
-
that.__manuallyStopped = false;
|
1491
|
-
|
1492
|
-
if (that.type === 'youtube') {
|
1493
|
-
if (that.ytReady) {
|
1494
|
-
that.$video.trigger('play');
|
1495
|
-
that.ytPlayer.playVideo();
|
1496
|
-
}
|
1497
|
-
} else {
|
1498
|
-
that.video.play();
|
1499
|
-
}
|
1500
|
-
|
1501
|
-
return that;
|
1502
|
-
};
|
1503
|
-
|
1504
|
-
VideoWrapper.prototype.pause = function () {
|
1505
|
-
var that = this;
|
1506
|
-
|
1507
|
-
that.__manuallyStopped = false;
|
1508
|
-
|
1509
|
-
if (that.type === 'youtube') {
|
1510
|
-
if (that.ytReady) {
|
1511
|
-
that.ytPlayer.pauseVideo();
|
1512
|
-
}
|
1513
|
-
} else {
|
1514
|
-
that.video.pause();
|
1515
|
-
}
|
1516
|
-
|
1517
|
-
return that;
|
1518
|
-
};
|
1519
|
-
|
1520
|
-
VideoWrapper.prototype.stop = function () {
|
1521
|
-
var that = this;
|
1522
|
-
|
1523
|
-
that.__manuallyStopped = true;
|
1524
|
-
|
1525
|
-
if (that.type === 'youtube') {
|
1526
|
-
if (that.ytReady) {
|
1527
|
-
that.ytPlayer.pauseVideo();
|
1528
|
-
that.ytPlayer.seekTo(0);
|
1529
|
-
}
|
1530
|
-
} else {
|
1531
|
-
that.video.pause();
|
1532
|
-
that.video.currentTime = 0;
|
1533
|
-
}
|
1534
|
-
|
1535
|
-
return that;
|
1536
|
-
};
|
1537
|
-
|
1538
|
-
VideoWrapper.prototype.destroy = function () {
|
1539
|
-
var that = this;
|
1540
|
-
|
1541
|
-
if (that.ytPlayer) {
|
1542
|
-
that.ytPlayer.destroy();
|
1543
|
-
}
|
1544
|
-
|
1545
|
-
that.$video.remove();
|
1546
|
-
|
1547
|
-
return that;
|
1548
|
-
};
|
1549
|
-
|
1550
|
-
VideoWrapper.prototype.getCurrentTime = function (seconds) {
|
1551
|
-
var that = this;
|
1552
|
-
|
1553
|
-
if (that.type === 'youtube') {
|
1554
|
-
if (that.ytReady) {
|
1555
|
-
return that.ytPlayer.getCurrentTime();
|
1556
|
-
}
|
1557
|
-
} else {
|
1558
|
-
return that.video.currentTime;
|
1559
|
-
}
|
1560
|
-
|
1561
|
-
return 0;
|
1562
|
-
};
|
1563
|
-
|
1564
|
-
VideoWrapper.prototype.setCurrentTime = function (seconds) {
|
1565
|
-
var that = this;
|
1566
|
-
|
1567
|
-
if (that.type === 'youtube') {
|
1568
|
-
if (that.ytReady) {
|
1569
|
-
that.ytPlayer.seekTo(seconds, true);
|
1570
|
-
}
|
1571
|
-
} else {
|
1572
|
-
that.video.currentTime = seconds;
|
1573
|
-
}
|
1574
|
-
|
1575
|
-
return that;
|
1576
|
-
};
|
1577
|
-
|
1578
|
-
VideoWrapper.prototype.getDuration = function () {
|
1579
|
-
var that = this;
|
1580
|
-
|
1581
|
-
if (that.type === 'youtube') {
|
1582
|
-
if (that.ytReady) {
|
1583
|
-
return that.ytPlayer.getDuration();
|
1584
|
-
}
|
1585
|
-
} else {
|
1586
|
-
return that.video.duration;
|
1587
|
-
}
|
1588
|
-
|
1589
|
-
return 0;
|
1590
|
-
};
|
1591
|
-
|
1592
|
-
/**
|
1593
|
-
* This will load the youtube API (if not loaded yet)
|
1594
|
-
* Use $(window).one('youtube_api_load', ...) to listen for API loaded event
|
1595
|
-
*/
|
1596
|
-
VideoWrapper.loadYoutubeAPI = function () {
|
1597
|
-
if (window['YT']) {
|
1598
|
-
return;
|
1599
|
-
}
|
1600
|
-
if (!$('script[src*=www\\.youtube\\.com\\/iframe_api]').length) {
|
1601
|
-
$('<script type="text/javascript" src="https://www.youtube.com/iframe_api">').appendTo('body');
|
1602
|
-
}
|
1603
|
-
var ytAPILoadInt = setInterval(function () {
|
1604
|
-
if (window['YT'] && window['YT'].loaded) {
|
1605
|
-
$(window).trigger('youtube_api_load');
|
1606
|
-
clearTimeout(ytAPILoadInt);
|
1607
|
-
}
|
1608
|
-
}, 50);
|
1609
|
-
};
|
1610
|
-
|
1611
|
-
var getDeviceOrientation = function () {
|
1612
|
-
|
1613
|
-
if ('matchMedia' in window) {
|
1614
|
-
if (window.matchMedia('(orientation: portrait)').matches) {
|
1615
|
-
return 'portrait';
|
1616
|
-
} else if (window.matchMedia('(orientation: landscape)').matches) {
|
1617
|
-
return 'landscape';
|
1618
|
-
}
|
1619
|
-
}
|
1620
|
-
|
1621
|
-
if (screen.height > screen.width) {
|
1622
|
-
return 'portrait';
|
1623
|
-
}
|
1624
|
-
|
1625
|
-
// Even square devices have orientation,
|
1626
|
-
// but a desktop browser may be too old for `matchMedia`.
|
1627
|
-
// Defaulting to `landscape` for the VERY rare case of a square desktop screen is good enough.
|
1628
|
-
return 'landscape';
|
1629
|
-
};
|
1630
|
-
|
1631
|
-
var getWindowOrientation = function () {
|
1632
|
-
if (window.innerHeight > window.innerWidth) {
|
1633
|
-
return 'portrait';
|
1634
|
-
}
|
1635
|
-
if (window.innerWidth > window.innerHeight) {
|
1636
|
-
return 'landscape';
|
1637
|
-
}
|
1638
|
-
|
1639
|
-
return 'square';
|
1640
|
-
};
|
1641
|
-
|
1642
|
-
/* SUPPORTS FIXED POSITION?
|
1643
|
-
*
|
1644
|
-
* Based on code from jQuery Mobile 1.1.0
|
1645
|
-
* http://jquerymobile.com/
|
1646
|
-
*
|
1647
|
-
* In a nutshell, we need to figure out if fixed positioning is supported.
|
1648
|
-
* Unfortunately, this is very difficult to do on iOS, and usually involves
|
1649
|
-
* injecting content, scrolling the page, etc.. It's ugly.
|
1650
|
-
* jQuery Mobile uses this workaround. It's not ideal, but works.
|
1651
|
-
*
|
1652
|
-
* Modified to detect IE6
|
1653
|
-
* ========================= */
|
1654
|
-
|
1655
|
-
var supportsFixedPosition = (function () {
|
1656
|
-
var ua = navigator.userAgent,
|
1657
|
-
platform = navigator.platform
|
1658
|
-
// Rendering engine is Webkit, and capture major version
|
1659
|
-
,
|
1660
|
-
wkmatch = ua.match(/AppleWebKit\/([0-9]+)/),
|
1661
|
-
wkversion = !!wkmatch && wkmatch[1],
|
1662
|
-
ffmatch = ua.match(/Fennec\/([0-9]+)/),
|
1663
|
-
ffversion = !!ffmatch && ffmatch[1],
|
1664
|
-
operammobilematch = ua.match(/Opera Mobi\/([0-9]+)/),
|
1665
|
-
omversion = !!operammobilematch && operammobilematch[1],
|
1666
|
-
iematch = ua.match(/MSIE ([0-9]+)/),
|
1667
|
-
ieversion = !!iematch && iematch[1];
|
1668
|
-
|
1669
|
-
return !(
|
1670
|
-
// iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
|
1671
|
-
((platform.indexOf('iPhone') > -1 || platform.indexOf('iPad') > -1 || platform.indexOf('iPod') > -1) && wkversion && wkversion < 534) ||
|
1672
|
-
|
1673
|
-
// Opera Mini
|
1674
|
-
(window.operamini && ({}).toString.call(window.operamini) === '[object OperaMini]') ||
|
1675
|
-
(operammobilematch && omversion < 7458) ||
|
1676
|
-
|
1677
|
-
//Android lte 2.1: Platform is Android and Webkit version is less than 533 (Android 2.2)
|
1678
|
-
(ua.indexOf('Android') > -1 && wkversion && wkversion < 533) ||
|
1679
|
-
|
1680
|
-
// Firefox Mobile before 6.0 -
|
1681
|
-
(ffversion && ffversion < 6) ||
|
1682
|
-
|
1683
|
-
// WebOS less than 3
|
1684
|
-
('palmGetResource' in window && wkversion && wkversion < 534) ||
|
1685
|
-
|
1686
|
-
// MeeGo
|
1687
|
-
(ua.indexOf('MeeGo') > -1 && ua.indexOf('NokiaBrowser/8.5.0') > -1) ||
|
1688
|
-
|
1689
|
-
// IE6
|
1690
|
-
(ieversion && ieversion <= 6)
|
1691
|
-
);
|
1692
|
-
}());
|
1693
|
-
|
1694
|
-
}(jQuery, window));
|