j1-template 2023.9.2 → 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +159 -19
- 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 +1 -1
- 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/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 +49 -40
- 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 +1 -1
- 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,1229 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* justifiedGallery - v4.0.0-alpha
|
3
|
-
* http://miromannino.github.io/Justified-Gallery/
|
4
|
-
* Copyright (C) 2022 Miro Mannino
|
5
|
-
* Licensed under the MIT license.
|
6
|
-
*/
|
7
|
-
(function (factory) {
|
8
|
-
if (typeof define === 'function' && define.amd) {
|
9
|
-
// AMD. Register as an anonymous module.
|
10
|
-
define(['jquery'], factory);
|
11
|
-
} else if (typeof module === 'object' && module.exports) {
|
12
|
-
// Node/CommonJS
|
13
|
-
module.exports = function( root, jQuery ) {
|
14
|
-
if ( jQuery === undefined ) {
|
15
|
-
// require('jQuery') returns a factory that requires window to
|
16
|
-
// build a jQuery instance, we normalize how we use modules
|
17
|
-
// that require this pattern but the window provided is a noop
|
18
|
-
// if it's defined (how jquery works)
|
19
|
-
if ( typeof window !== 'undefined' ) {
|
20
|
-
jQuery = require('jquery');
|
21
|
-
}
|
22
|
-
else {
|
23
|
-
jQuery = require('jquery')(root);
|
24
|
-
}
|
25
|
-
}
|
26
|
-
factory(jQuery);
|
27
|
-
return jQuery;
|
28
|
-
};
|
29
|
-
} else {
|
30
|
-
// Browser globals
|
31
|
-
factory(jQuery);
|
32
|
-
}
|
33
|
-
}(function ($) {
|
34
|
-
|
35
|
-
/**
|
36
|
-
* Justified Gallery controller constructor
|
37
|
-
*
|
38
|
-
* @param $gallery the gallery to build
|
39
|
-
* @param settings the settings (the defaults are in JustifiedGallery.defaults)
|
40
|
-
* @constructor
|
41
|
-
*/
|
42
|
-
var JustifiedGallery = function ($gallery, settings) {
|
43
|
-
|
44
|
-
this.settings = settings;
|
45
|
-
this.checkSettings();
|
46
|
-
|
47
|
-
this.imgAnalyzerTimeout = null;
|
48
|
-
this.entries = null;
|
49
|
-
this.buildingRow = {
|
50
|
-
entriesBuff : [],
|
51
|
-
width : 0,
|
52
|
-
height : 0,
|
53
|
-
aspectRatio : 0
|
54
|
-
};
|
55
|
-
this.lastFetchedEntry = null;
|
56
|
-
this.lastAnalyzedIndex = -1;
|
57
|
-
this.yield = {
|
58
|
-
every : 2, // do a flush every n flushes (must be greater than 1)
|
59
|
-
flushed : 0 // flushed rows without a yield
|
60
|
-
};
|
61
|
-
this.border = settings.border >= 0 ? settings.border : settings.margins;
|
62
|
-
this.maxRowHeight = this.retrieveMaxRowHeight();
|
63
|
-
this.suffixRanges = this.retrieveSuffixRanges();
|
64
|
-
this.offY = this.border;
|
65
|
-
this.rows = 0;
|
66
|
-
this.spinner = {
|
67
|
-
phase : 0,
|
68
|
-
timeSlot : 150,
|
69
|
-
$el : $('<div class="spinner"><span></span><span></span><span></span></div>'),
|
70
|
-
intervalId : null
|
71
|
-
};
|
72
|
-
this.scrollBarOn = false;
|
73
|
-
this.checkWidthIntervalId = null;
|
74
|
-
this.galleryWidth = $gallery.width();
|
75
|
-
this.$gallery = $gallery;
|
76
|
-
|
77
|
-
};
|
78
|
-
|
79
|
-
/** @returns {String} the best suffix given the width and the height */
|
80
|
-
JustifiedGallery.prototype.getSuffix = function (width, height) {
|
81
|
-
var longestSide, i;
|
82
|
-
longestSide = (width > height) ? width : height;
|
83
|
-
for (i = 0; i < this.suffixRanges.length; i++) {
|
84
|
-
if (longestSide <= this.suffixRanges[i]) {
|
85
|
-
return this.settings.sizeRangeSuffixes[this.suffixRanges[i]];
|
86
|
-
}
|
87
|
-
}
|
88
|
-
return this.settings.sizeRangeSuffixes[this.suffixRanges[i - 1]];
|
89
|
-
};
|
90
|
-
|
91
|
-
/**
|
92
|
-
* Remove the suffix from the string
|
93
|
-
*
|
94
|
-
* @returns {string} a new string without the suffix
|
95
|
-
*/
|
96
|
-
JustifiedGallery.prototype.removeSuffix = function (str, suffix) {
|
97
|
-
return str.substring(0, str.length - suffix.length);
|
98
|
-
};
|
99
|
-
|
100
|
-
/**
|
101
|
-
* @returns {boolean} a boolean to say if the suffix is contained in the str or not
|
102
|
-
*/
|
103
|
-
JustifiedGallery.prototype.endsWith = function (str, suffix) {
|
104
|
-
return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
105
|
-
};
|
106
|
-
|
107
|
-
/**
|
108
|
-
* Get the used suffix of a particular url
|
109
|
-
*
|
110
|
-
* @param str
|
111
|
-
* @returns {String} return the used suffix
|
112
|
-
*/
|
113
|
-
JustifiedGallery.prototype.getUsedSuffix = function (str) {
|
114
|
-
for (var si in this.settings.sizeRangeSuffixes) {
|
115
|
-
if (this.settings.sizeRangeSuffixes.hasOwnProperty(si)) {
|
116
|
-
if (this.settings.sizeRangeSuffixes[si].length === 0) continue;
|
117
|
-
if (this.endsWith(str, this.settings.sizeRangeSuffixes[si])) return this.settings.sizeRangeSuffixes[si];
|
118
|
-
}
|
119
|
-
}
|
120
|
-
return '';
|
121
|
-
};
|
122
|
-
|
123
|
-
/**
|
124
|
-
* Given an image src, with the width and the height, returns the new image src with the
|
125
|
-
* best suffix to show the best quality thumbnail.
|
126
|
-
*
|
127
|
-
* @returns {String} the suffix to use
|
128
|
-
*/
|
129
|
-
JustifiedGallery.prototype.newSrc = function (imageSrc, imgWidth, imgHeight, image) {
|
130
|
-
var newImageSrc;
|
131
|
-
|
132
|
-
if (this.settings.thumbnailPath) {
|
133
|
-
newImageSrc = this.settings.thumbnailPath(imageSrc, imgWidth, imgHeight, image);
|
134
|
-
} else {
|
135
|
-
var matchRes = imageSrc.match(this.settings.extension);
|
136
|
-
var ext = (matchRes !== null) ? matchRes[0] : '';
|
137
|
-
newImageSrc = imageSrc.replace(this.settings.extension, '');
|
138
|
-
newImageSrc = this.removeSuffix(newImageSrc, this.getUsedSuffix(newImageSrc));
|
139
|
-
newImageSrc += this.getSuffix(imgWidth, imgHeight) + ext;
|
140
|
-
}
|
141
|
-
|
142
|
-
return newImageSrc;
|
143
|
-
};
|
144
|
-
|
145
|
-
/**
|
146
|
-
* Shows the images that is in the given entry
|
147
|
-
*
|
148
|
-
* @param $entry the entry
|
149
|
-
* @param callback the callback that is called when the show animation is finished
|
150
|
-
*/
|
151
|
-
JustifiedGallery.prototype.showImg = function ($entry, callback) {
|
152
|
-
if (this.settings.cssAnimation) {
|
153
|
-
$entry.addClass('jg-entry-visible');
|
154
|
-
if (callback) callback();
|
155
|
-
} else {
|
156
|
-
$entry.stop().fadeTo(this.settings.imagesAnimationDuration, 1.0, callback);
|
157
|
-
$entry.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration, 1.0, callback);
|
158
|
-
}
|
159
|
-
};
|
160
|
-
|
161
|
-
/**
|
162
|
-
* Extract the image src form the image, looking from the 'safe-src', and if it can't be found, from the
|
163
|
-
* 'src' attribute. It saves in the image data the 'jg.originalSrc' field, with the extracted src.
|
164
|
-
*
|
165
|
-
* @param $image the image to analyze
|
166
|
-
* @returns {String} the extracted src
|
167
|
-
*/
|
168
|
-
JustifiedGallery.prototype.extractImgSrcFromImage = function ($image) {
|
169
|
-
var imageSrc = $image.data('safe-src');
|
170
|
-
var imageSrcLoc = 'date-safe-src';
|
171
|
-
if (typeof imageSrc === 'undefined') {
|
172
|
-
imageSrc = $image.attr('src');
|
173
|
-
imageSrcLoc = 'src';
|
174
|
-
}
|
175
|
-
$image.data('jg.originalSrc', imageSrc); // this is saved for the destroy method
|
176
|
-
$image.data('jg.src', imageSrc); // this will change overtime
|
177
|
-
$image.data('jg.originalSrcLoc', imageSrcLoc); // this is saved for the destroy method
|
178
|
-
return imageSrc;
|
179
|
-
};
|
180
|
-
|
181
|
-
/** @returns {jQuery} the image in the given entry */
|
182
|
-
JustifiedGallery.prototype.imgFromEntry = function ($entry) {
|
183
|
-
var $img = $entry.find(this.settings.imgSelector);
|
184
|
-
return $img.length === 0 ? null : $img;
|
185
|
-
};
|
186
|
-
|
187
|
-
/** @returns {jQuery} the caption in the given entry */
|
188
|
-
JustifiedGallery.prototype.captionFromEntry = function ($entry) {
|
189
|
-
var $caption = $entry.find('> .caption');
|
190
|
-
return $caption.length === 0 ? null : $caption;
|
191
|
-
};
|
192
|
-
|
193
|
-
/**
|
194
|
-
* Display the entry
|
195
|
-
*
|
196
|
-
* @param {jQuery} $entry the entry to display
|
197
|
-
* @param {int} x the x position where the entry must be positioned
|
198
|
-
* @param y the y position where the entry must be positioned
|
199
|
-
* @param imgWidth the image width
|
200
|
-
* @param imgHeight the image height
|
201
|
-
* @param rowHeight the row height of the row that owns the entry
|
202
|
-
*/
|
203
|
-
JustifiedGallery.prototype.displayEntry = function ($entry, x, y, imgWidth, imgHeight, rowHeight) {
|
204
|
-
$entry.width(imgWidth);
|
205
|
-
$entry.height(rowHeight);
|
206
|
-
$entry.css('top', y);
|
207
|
-
$entry.css('left', x);
|
208
|
-
|
209
|
-
var $image = this.imgFromEntry($entry);
|
210
|
-
if ($image !== null) {
|
211
|
-
$image.css('width', imgWidth);
|
212
|
-
$image.css('height', imgHeight);
|
213
|
-
$image.css('margin-left', - imgWidth / 2);
|
214
|
-
$image.css('margin-top', - imgHeight / 2);
|
215
|
-
|
216
|
-
// Image reloading for an high quality of thumbnails
|
217
|
-
var imageSrc = $image.data('jg.src');
|
218
|
-
if (imageSrc) {
|
219
|
-
imageSrc = this.newSrc(imageSrc, imgWidth, imgHeight, $image[0]);
|
220
|
-
|
221
|
-
$image.one('error', function () {
|
222
|
-
this.resetImgSrc($image); //revert to the original thumbnail
|
223
|
-
});
|
224
|
-
|
225
|
-
var loadNewImage = function () {
|
226
|
-
// if (imageSrc !== newImageSrc) {
|
227
|
-
$image.attr('src', imageSrc);
|
228
|
-
// }
|
229
|
-
};
|
230
|
-
|
231
|
-
if ($entry.data('jg.loaded') === 'skipped') {
|
232
|
-
this.onImageEvent(imageSrc, (function() {
|
233
|
-
this.showImg($entry, loadNewImage); //load the new image after the fadeIn
|
234
|
-
$entry.data('jg.loaded', true);
|
235
|
-
}).bind(this));
|
236
|
-
} else {
|
237
|
-
this.showImg($entry, loadNewImage); //load the new image after the fadeIn
|
238
|
-
}
|
239
|
-
|
240
|
-
}
|
241
|
-
|
242
|
-
} else {
|
243
|
-
this.showImg($entry);
|
244
|
-
}
|
245
|
-
|
246
|
-
this.displayEntryCaption($entry);
|
247
|
-
};
|
248
|
-
|
249
|
-
/**
|
250
|
-
* Display the entry caption. If the caption element doesn't exists, it creates the caption using the 'alt'
|
251
|
-
* or the 'title' attributes.
|
252
|
-
*
|
253
|
-
* @param {jQuery} $entry the entry to process
|
254
|
-
*/
|
255
|
-
JustifiedGallery.prototype.displayEntryCaption = function ($entry) {
|
256
|
-
var $image = this.imgFromEntry($entry);
|
257
|
-
if ($image !== null && this.settings.captions) {
|
258
|
-
var $imgCaption = this.captionFromEntry($entry);
|
259
|
-
|
260
|
-
// Create it if it doesn't exists
|
261
|
-
if ($imgCaption === null) {
|
262
|
-
var caption = $image.attr('alt');
|
263
|
-
if (!this.isValidCaption(caption)) caption = $entry.attr('title');
|
264
|
-
if (this.isValidCaption(caption)) { // Create only we found something
|
265
|
-
$imgCaption = $('<div class="caption">' + caption + '</div>');
|
266
|
-
$entry.append($imgCaption);
|
267
|
-
$entry.data('jg.createdCaption', true);
|
268
|
-
}
|
269
|
-
}
|
270
|
-
|
271
|
-
// Create events (we check again the $imgCaption because it can be still inexistent)
|
272
|
-
if ($imgCaption !== null) {
|
273
|
-
if (!this.settings.cssAnimation) $imgCaption.stop().fadeTo(0, this.settings.captionSettings.nonVisibleOpacity);
|
274
|
-
this.addCaptionEventsHandlers($entry);
|
275
|
-
}
|
276
|
-
} else {
|
277
|
-
this.removeCaptionEventsHandlers($entry);
|
278
|
-
}
|
279
|
-
};
|
280
|
-
|
281
|
-
/**
|
282
|
-
* Validates the caption
|
283
|
-
*
|
284
|
-
* @param caption The caption that should be validated
|
285
|
-
* @return {boolean} Validation result
|
286
|
-
*/
|
287
|
-
JustifiedGallery.prototype.isValidCaption = function (caption) {
|
288
|
-
return (typeof caption !== 'undefined' && caption.length > 0);
|
289
|
-
};
|
290
|
-
|
291
|
-
/**
|
292
|
-
* The callback for the event 'mouseenter'. It assumes that the event currentTarget is an entry.
|
293
|
-
* It shows the caption using jQuery (or using CSS if it is configured so)
|
294
|
-
*
|
295
|
-
* @param {Event} eventObject the event object
|
296
|
-
*/
|
297
|
-
JustifiedGallery.prototype.onEntryMouseEnterForCaption = function (eventObject) {
|
298
|
-
var $caption = this.captionFromEntry($(eventObject.currentTarget));
|
299
|
-
if (this.settings.cssAnimation) {
|
300
|
-
$caption.addClass('caption-visible').removeClass('caption-hidden');
|
301
|
-
} else {
|
302
|
-
$caption.stop().fadeTo(this.settings.captionSettings.animationDuration,
|
303
|
-
this.settings.captionSettings.visibleOpacity);
|
304
|
-
}
|
305
|
-
};
|
306
|
-
|
307
|
-
/**
|
308
|
-
* The callback for the event 'mouseleave'. It assumes that the event currentTarget is an entry.
|
309
|
-
* It hides the caption using jQuery (or using CSS if it is configured so)
|
310
|
-
*
|
311
|
-
* @param {Event} eventObject the event object
|
312
|
-
*/
|
313
|
-
JustifiedGallery.prototype.onEntryMouseLeaveForCaption = function (eventObject) {
|
314
|
-
var $caption = this.captionFromEntry($(eventObject.currentTarget));
|
315
|
-
if (this.settings.cssAnimation) {
|
316
|
-
$caption.removeClass('caption-visible').removeClass('caption-hidden');
|
317
|
-
} else {
|
318
|
-
$caption.stop().fadeTo(this.settings.captionSettings.animationDuration,
|
319
|
-
this.settings.captionSettings.nonVisibleOpacity);
|
320
|
-
}
|
321
|
-
};
|
322
|
-
|
323
|
-
/**
|
324
|
-
* Add the handlers of the entry for the caption
|
325
|
-
*
|
326
|
-
* @param $entry the entry to modify
|
327
|
-
*/
|
328
|
-
JustifiedGallery.prototype.addCaptionEventsHandlers = function ($entry) {
|
329
|
-
var captionMouseEvents = $entry.data('jg.captionMouseEvents');
|
330
|
-
if (typeof captionMouseEvents === 'undefined') {
|
331
|
-
captionMouseEvents = {
|
332
|
-
mouseenter: $.proxy(this.onEntryMouseEnterForCaption, this),
|
333
|
-
mouseleave: $.proxy(this.onEntryMouseLeaveForCaption, this)
|
334
|
-
};
|
335
|
-
$entry.on('mouseenter', undefined, undefined, captionMouseEvents.mouseenter);
|
336
|
-
$entry.on('mouseleave', undefined, undefined, captionMouseEvents.mouseleave);
|
337
|
-
$entry.data('jg.captionMouseEvents', captionMouseEvents);
|
338
|
-
}
|
339
|
-
};
|
340
|
-
|
341
|
-
/**
|
342
|
-
* Remove the handlers of the entry for the caption
|
343
|
-
*
|
344
|
-
* @param $entry the entry to modify
|
345
|
-
*/
|
346
|
-
JustifiedGallery.prototype.removeCaptionEventsHandlers = function ($entry) {
|
347
|
-
var captionMouseEvents = $entry.data('jg.captionMouseEvents');
|
348
|
-
if (typeof captionMouseEvents !== 'undefined') {
|
349
|
-
$entry.off('mouseenter', undefined, captionMouseEvents.mouseenter);
|
350
|
-
$entry.off('mouseleave', undefined, captionMouseEvents.mouseleave);
|
351
|
-
$entry.removeData('jg.captionMouseEvents');
|
352
|
-
}
|
353
|
-
};
|
354
|
-
|
355
|
-
/**
|
356
|
-
* Clear the building row data to be used for a new row
|
357
|
-
*/
|
358
|
-
JustifiedGallery.prototype.clearBuildingRow = function () {
|
359
|
-
this.buildingRow.entriesBuff = [];
|
360
|
-
this.buildingRow.aspectRatio = 0;
|
361
|
-
this.buildingRow.width = 0;
|
362
|
-
};
|
363
|
-
|
364
|
-
/**
|
365
|
-
* Justify the building row, preparing it to
|
366
|
-
*
|
367
|
-
* @param isLastRow
|
368
|
-
* @returns a boolean to know if the row has been justified or not
|
369
|
-
*/
|
370
|
-
JustifiedGallery.prototype.prepareBuildingRow = function (isLastRow) {
|
371
|
-
var i, $entry, imgAspectRatio, newImgW, newImgH, justify = true;
|
372
|
-
var minHeight = 0;
|
373
|
-
var availableWidth = this.galleryWidth - 2 * this.border - (
|
374
|
-
(this.buildingRow.entriesBuff.length - 1) * this.settings.margins);
|
375
|
-
var rowHeight = availableWidth / this.buildingRow.aspectRatio;
|
376
|
-
var defaultRowHeight = this.settings.rowHeight;
|
377
|
-
var justifiable = this.buildingRow.width / availableWidth > this.settings.justifyThreshold;
|
378
|
-
|
379
|
-
//Skip the last row if we can't justify it and the lastRow == 'hide'
|
380
|
-
if (isLastRow && this.settings.lastRow === 'hide' && !justifiable) {
|
381
|
-
for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
|
382
|
-
$entry = this.buildingRow.entriesBuff[i];
|
383
|
-
if (this.settings.cssAnimation)
|
384
|
-
$entry.removeClass('jg-entry-visible');
|
385
|
-
else {
|
386
|
-
$entry.stop().fadeTo(0, 0.1);
|
387
|
-
$entry.find('> img, > a > img').fadeTo(0, 0);
|
388
|
-
}
|
389
|
-
}
|
390
|
-
return -1;
|
391
|
-
}
|
392
|
-
|
393
|
-
// With lastRow = nojustify, justify if is justificable (the images will not become too big)
|
394
|
-
if (isLastRow && !justifiable && this.settings.lastRow !== 'justify' && this.settings.lastRow !== 'hide') {
|
395
|
-
justify = false;
|
396
|
-
|
397
|
-
if (this.rows > 0) {
|
398
|
-
defaultRowHeight = (this.offY - this.border - this.settings.margins * this.rows) / this.rows;
|
399
|
-
justify = defaultRowHeight * this.buildingRow.aspectRatio / availableWidth > this.settings.justifyThreshold;
|
400
|
-
}
|
401
|
-
}
|
402
|
-
|
403
|
-
for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
|
404
|
-
$entry = this.buildingRow.entriesBuff[i];
|
405
|
-
imgAspectRatio = $entry.data('jg.width') / $entry.data('jg.height');
|
406
|
-
|
407
|
-
if (justify) {
|
408
|
-
newImgW = (i === this.buildingRow.entriesBuff.length - 1) ? availableWidth : rowHeight * imgAspectRatio;
|
409
|
-
newImgH = rowHeight;
|
410
|
-
} else {
|
411
|
-
newImgW = defaultRowHeight * imgAspectRatio;
|
412
|
-
newImgH = defaultRowHeight;
|
413
|
-
}
|
414
|
-
|
415
|
-
availableWidth -= Math.round(newImgW);
|
416
|
-
$entry.data('jg.jwidth', Math.round(newImgW));
|
417
|
-
$entry.data('jg.jheight', Math.ceil(newImgH));
|
418
|
-
if (i === 0 || minHeight > newImgH) minHeight = newImgH;
|
419
|
-
}
|
420
|
-
|
421
|
-
this.buildingRow.height = minHeight;
|
422
|
-
return justify;
|
423
|
-
};
|
424
|
-
|
425
|
-
/**
|
426
|
-
* Flush a row: justify it, modify the gallery height accordingly to the row height
|
427
|
-
*
|
428
|
-
* @param isLastRow
|
429
|
-
*/
|
430
|
-
JustifiedGallery.prototype.flushRow = function (isLastRow) {
|
431
|
-
var settings = this.settings;
|
432
|
-
var $entry, buildingRowRes, offX = this.border, i;
|
433
|
-
|
434
|
-
buildingRowRes = this.prepareBuildingRow(isLastRow);
|
435
|
-
if (isLastRow && settings.lastRow === 'hide' && buildingRowRes === -1) {
|
436
|
-
this.clearBuildingRow();
|
437
|
-
return;
|
438
|
-
}
|
439
|
-
|
440
|
-
if(this.maxRowHeight) {
|
441
|
-
if(this.maxRowHeight < this.buildingRow.height) this.buildingRow.height = this.maxRowHeight;
|
442
|
-
}
|
443
|
-
|
444
|
-
//Align last (unjustified) row
|
445
|
-
if (isLastRow && (settings.lastRow === 'center' || settings.lastRow === 'right')) {
|
446
|
-
var availableWidth = this.galleryWidth - 2 * this.border - (this.buildingRow.entriesBuff.length - 1) * settings.margins;
|
447
|
-
|
448
|
-
for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
|
449
|
-
$entry = this.buildingRow.entriesBuff[i];
|
450
|
-
availableWidth -= $entry.data('jg.jwidth');
|
451
|
-
}
|
452
|
-
|
453
|
-
if (settings.lastRow === 'center')
|
454
|
-
offX += availableWidth / 2;
|
455
|
-
else if (settings.lastRow === 'right')
|
456
|
-
offX += availableWidth;
|
457
|
-
}
|
458
|
-
|
459
|
-
var lastEntryIdx = this.buildingRow.entriesBuff.length - 1;
|
460
|
-
for (i = 0; i <= lastEntryIdx; i++) {
|
461
|
-
$entry = this.buildingRow.entriesBuff[ this.settings.rtl ? lastEntryIdx - i : i ];
|
462
|
-
this.displayEntry($entry, offX, this.offY, $entry.data('jg.jwidth'), $entry.data('jg.jheight'), this.buildingRow.height);
|
463
|
-
offX += $entry.data('jg.jwidth') + settings.margins;
|
464
|
-
}
|
465
|
-
|
466
|
-
//Gallery Height
|
467
|
-
this.galleryHeightToSet = this.offY + this.buildingRow.height + this.border;
|
468
|
-
this.setGalleryTempHeight(this.galleryHeightToSet + this.getSpinnerHeight());
|
469
|
-
|
470
|
-
if (!isLastRow || (this.buildingRow.height <= settings.rowHeight && buildingRowRes)) {
|
471
|
-
//Ready for a new row
|
472
|
-
this.offY += this.buildingRow.height + settings.margins;
|
473
|
-
this.rows += 1;
|
474
|
-
this.clearBuildingRow();
|
475
|
-
this.settings.triggerEvent.call(this, 'jg.rowflush');
|
476
|
-
}
|
477
|
-
};
|
478
|
-
|
479
|
-
|
480
|
-
// Scroll position not restoring: https://github.com/miromannino/Justified-Gallery/issues/221
|
481
|
-
var galleryPrevStaticHeight = 0;
|
482
|
-
|
483
|
-
JustifiedGallery.prototype.rememberGalleryHeight = function () {
|
484
|
-
galleryPrevStaticHeight = this.$gallery.height();
|
485
|
-
this.$gallery.height(galleryPrevStaticHeight);
|
486
|
-
};
|
487
|
-
|
488
|
-
// grow only
|
489
|
-
JustifiedGallery.prototype.setGalleryTempHeight = function (height) {
|
490
|
-
galleryPrevStaticHeight = Math.max(height, galleryPrevStaticHeight);
|
491
|
-
this.$gallery.height(galleryPrevStaticHeight);
|
492
|
-
};
|
493
|
-
|
494
|
-
JustifiedGallery.prototype.setGalleryFinalHeight = function (height) {
|
495
|
-
galleryPrevStaticHeight = height;
|
496
|
-
this.$gallery.height(height);
|
497
|
-
};
|
498
|
-
|
499
|
-
/**
|
500
|
-
* Checks the width of the gallery container, to know if a new justification is needed
|
501
|
-
*/
|
502
|
-
JustifiedGallery.prototype.checkWidth = function () {
|
503
|
-
this.checkWidthIntervalId = setInterval($.proxy(function () {
|
504
|
-
|
505
|
-
// if the gallery is not currently visible, abort.
|
506
|
-
if (!this.$gallery.is(":visible")) return;
|
507
|
-
|
508
|
-
var galleryWidth = parseFloat(this.$gallery.width());
|
509
|
-
if (Math.abs(galleryWidth - this.galleryWidth) > this.settings.refreshSensitivity) {
|
510
|
-
this.galleryWidth = galleryWidth;
|
511
|
-
this.rewind();
|
512
|
-
|
513
|
-
this.rememberGalleryHeight();
|
514
|
-
|
515
|
-
// Restart to analyze
|
516
|
-
this.startImgAnalyzer(true);
|
517
|
-
}
|
518
|
-
}, this), this.settings.refreshTime);
|
519
|
-
};
|
520
|
-
|
521
|
-
/**
|
522
|
-
* @returns {boolean} a boolean saying if the spinner is active or not
|
523
|
-
*/
|
524
|
-
JustifiedGallery.prototype.isSpinnerActive = function () {
|
525
|
-
return this.spinner.intervalId !== null;
|
526
|
-
};
|
527
|
-
|
528
|
-
/**
|
529
|
-
* @returns {int} the spinner height
|
530
|
-
*/
|
531
|
-
JustifiedGallery.prototype.getSpinnerHeight = function () {
|
532
|
-
return this.spinner.$el.innerHeight();
|
533
|
-
};
|
534
|
-
|
535
|
-
/**
|
536
|
-
* Stops the spinner animation and modify the gallery height to exclude the spinner
|
537
|
-
*/
|
538
|
-
JustifiedGallery.prototype.stopLoadingSpinnerAnimation = function () {
|
539
|
-
clearInterval(this.spinner.intervalId);
|
540
|
-
this.spinner.intervalId = null;
|
541
|
-
this.setGalleryTempHeight(this.$gallery.height() - this.getSpinnerHeight());
|
542
|
-
this.spinner.$el.detach();
|
543
|
-
};
|
544
|
-
|
545
|
-
/**
|
546
|
-
* Starts the spinner animation
|
547
|
-
*/
|
548
|
-
JustifiedGallery.prototype.startLoadingSpinnerAnimation = function () {
|
549
|
-
var spinnerContext = this.spinner;
|
550
|
-
var $spinnerPoints = spinnerContext.$el.find('span');
|
551
|
-
clearInterval(spinnerContext.intervalId);
|
552
|
-
this.$gallery.append(spinnerContext.$el);
|
553
|
-
this.setGalleryTempHeight(this.offY + this.buildingRow.height + this.getSpinnerHeight());
|
554
|
-
spinnerContext.intervalId = setInterval(function () {
|
555
|
-
if (spinnerContext.phase < $spinnerPoints.length) {
|
556
|
-
$spinnerPoints.eq(spinnerContext.phase).fadeTo(spinnerContext.timeSlot, 1);
|
557
|
-
} else {
|
558
|
-
$spinnerPoints.eq(spinnerContext.phase - $spinnerPoints.length).fadeTo(spinnerContext.timeSlot, 0);
|
559
|
-
}
|
560
|
-
spinnerContext.phase = (spinnerContext.phase + 1) % ($spinnerPoints.length * 2);
|
561
|
-
}, spinnerContext.timeSlot);
|
562
|
-
};
|
563
|
-
|
564
|
-
/**
|
565
|
-
* Rewind the image analysis to start from the first entry.
|
566
|
-
*/
|
567
|
-
JustifiedGallery.prototype.rewind = function () {
|
568
|
-
this.lastFetchedEntry = null;
|
569
|
-
this.lastAnalyzedIndex = -1;
|
570
|
-
this.offY = this.border;
|
571
|
-
this.rows = 0;
|
572
|
-
this.clearBuildingRow();
|
573
|
-
};
|
574
|
-
|
575
|
-
/**
|
576
|
-
* @returns {Array} all entries matched by `settings.selector`
|
577
|
-
*/
|
578
|
-
JustifiedGallery.prototype.getAllEntries = function () {
|
579
|
-
return this.$gallery.children(this.settings.selector).toArray();
|
580
|
-
};
|
581
|
-
|
582
|
-
/**
|
583
|
-
* Update the entries searching it from the justified gallery HTML element
|
584
|
-
*
|
585
|
-
* @param norewind if norewind only the new entries will be changed (i.e. randomized, sorted or filtered)
|
586
|
-
* @returns {boolean} true if some entries has been founded
|
587
|
-
*/
|
588
|
-
JustifiedGallery.prototype.updateEntries = function (norewind) {
|
589
|
-
var newEntries;
|
590
|
-
|
591
|
-
if (norewind && this.lastFetchedEntry != null) {
|
592
|
-
newEntries = $(this.lastFetchedEntry).nextAll(this.settings.selector).toArray();
|
593
|
-
} else {
|
594
|
-
this.entries = [];
|
595
|
-
newEntries = this.getAllEntries();
|
596
|
-
}
|
597
|
-
|
598
|
-
if (newEntries.length > 0) {
|
599
|
-
|
600
|
-
// Sort or randomize
|
601
|
-
if ($.isFunction(this.settings.sort)) {
|
602
|
-
newEntries = this.sortArray(newEntries);
|
603
|
-
} else if (this.settings.randomize) {
|
604
|
-
newEntries = this.shuffleArray(newEntries);
|
605
|
-
}
|
606
|
-
this.lastFetchedEntry = newEntries[newEntries.length - 1];
|
607
|
-
|
608
|
-
// Filter
|
609
|
-
if (this.settings.filter) {
|
610
|
-
newEntries = this.filterArray(newEntries);
|
611
|
-
} else {
|
612
|
-
this.resetFilters(newEntries);
|
613
|
-
}
|
614
|
-
|
615
|
-
}
|
616
|
-
|
617
|
-
this.entries = this.entries.concat(newEntries);
|
618
|
-
return true;
|
619
|
-
};
|
620
|
-
|
621
|
-
/**
|
622
|
-
* Apply the entries order to the DOM, iterating the entries and appending the images
|
623
|
-
*
|
624
|
-
* @param entries the entries that has been modified and that must be re-ordered in the DOM
|
625
|
-
*/
|
626
|
-
JustifiedGallery.prototype.insertToGallery = function (entries) {
|
627
|
-
var that = this;
|
628
|
-
$.each(entries, function () {
|
629
|
-
$(this).appendTo(that.$gallery);
|
630
|
-
});
|
631
|
-
};
|
632
|
-
|
633
|
-
/**
|
634
|
-
* Shuffle the array using the Fisher-Yates shuffle algorithm
|
635
|
-
*
|
636
|
-
* @param a the array to shuffle
|
637
|
-
* @return the shuffled array
|
638
|
-
*/
|
639
|
-
JustifiedGallery.prototype.shuffleArray = function (a) {
|
640
|
-
var i, j, temp;
|
641
|
-
for (i = a.length - 1; i > 0; i--) {
|
642
|
-
j = Math.floor(Math.random() * (i + 1));
|
643
|
-
temp = a[i];
|
644
|
-
a[i] = a[j];
|
645
|
-
a[j] = temp;
|
646
|
-
}
|
647
|
-
this.insertToGallery(a);
|
648
|
-
return a;
|
649
|
-
};
|
650
|
-
|
651
|
-
/**
|
652
|
-
* Sort the array using settings.comparator as comparator
|
653
|
-
*
|
654
|
-
* @param a the array to sort (it is sorted)
|
655
|
-
* @return the sorted array
|
656
|
-
*/
|
657
|
-
JustifiedGallery.prototype.sortArray = function (a) {
|
658
|
-
a.sort(this.settings.sort);
|
659
|
-
this.insertToGallery(a);
|
660
|
-
return a;
|
661
|
-
};
|
662
|
-
|
663
|
-
/**
|
664
|
-
* Reset the filters removing the 'jg-filtered' class from all the entries
|
665
|
-
*
|
666
|
-
* @param a the array to reset
|
667
|
-
*/
|
668
|
-
JustifiedGallery.prototype.resetFilters = function (a) {
|
669
|
-
for (var i = 0; i < a.length; i++) $(a[i]).removeClass('jg-filtered');
|
670
|
-
};
|
671
|
-
|
672
|
-
/**
|
673
|
-
* Filter the entries considering theirs classes (if a string has been passed) or using a function for filtering.
|
674
|
-
*
|
675
|
-
* @param a the array to filter
|
676
|
-
* @return the filtered array
|
677
|
-
*/
|
678
|
-
JustifiedGallery.prototype.filterArray = function (a) {
|
679
|
-
var settings = this.settings;
|
680
|
-
if ($.type(settings.filter) === 'string') {
|
681
|
-
// Filter only keeping the entries passed in the string
|
682
|
-
return a.filter(function (el) {
|
683
|
-
var $el = $(el);
|
684
|
-
if ($el.is(settings.filter)) {
|
685
|
-
$el.removeClass('jg-filtered');
|
686
|
-
return true;
|
687
|
-
} else {
|
688
|
-
$el.addClass('jg-filtered').removeClass('jg-visible');
|
689
|
-
return false;
|
690
|
-
}
|
691
|
-
});
|
692
|
-
} else if ($.isFunction(settings.filter)) {
|
693
|
-
// Filter using the passed function
|
694
|
-
var filteredArr = a.filter(settings.filter);
|
695
|
-
for (var i = 0; i < a.length; i++) {
|
696
|
-
if (filteredArr.indexOf(a[i]) === -1) {
|
697
|
-
$(a[i]).addClass('jg-filtered').removeClass('jg-visible');
|
698
|
-
} else {
|
699
|
-
$(a[i]).removeClass('jg-filtered');
|
700
|
-
}
|
701
|
-
}
|
702
|
-
return filteredArr;
|
703
|
-
}
|
704
|
-
};
|
705
|
-
|
706
|
-
/**
|
707
|
-
* Revert the image src to the default value.
|
708
|
-
*/
|
709
|
-
JustifiedGallery.prototype.resetImgSrc = function ($img) {
|
710
|
-
if ($img.data('jg.originalSrcLoc') == 'src') {
|
711
|
-
$img.attr('src', $img.data('jg.originalSrc'));
|
712
|
-
} else {
|
713
|
-
$img.attr('src', '');
|
714
|
-
}
|
715
|
-
}
|
716
|
-
|
717
|
-
/**
|
718
|
-
* Destroy the Justified Gallery instance.
|
719
|
-
*
|
720
|
-
* It clears all the css properties added in the style attributes. We doesn't backup the original
|
721
|
-
* values for those css attributes, because it costs (performance) and because in general one
|
722
|
-
* shouldn't use the style attribute for an uniform set of images (where we suppose the use of
|
723
|
-
* classes). Creating a backup is also difficult because JG could be called multiple times and
|
724
|
-
* with different style attributes.
|
725
|
-
*/
|
726
|
-
JustifiedGallery.prototype.destroy = function () {
|
727
|
-
clearInterval(this.checkWidthIntervalId);
|
728
|
-
this.stopImgAnalyzerStarter();
|
729
|
-
|
730
|
-
// Get fresh entries list since filtered entries are absent in `this.entries`
|
731
|
-
$.each(this.getAllEntries(), $.proxy(function(_, entry) {
|
732
|
-
var $entry = $(entry);
|
733
|
-
|
734
|
-
// Reset entry style
|
735
|
-
$entry.css('width', '');
|
736
|
-
$entry.css('height', '');
|
737
|
-
$entry.css('top', '');
|
738
|
-
$entry.css('left', '');
|
739
|
-
$entry.data('jg.loaded', undefined);
|
740
|
-
$entry.removeClass('jg-entry jg-filtered jg-entry-visible');
|
741
|
-
|
742
|
-
// Reset image style
|
743
|
-
var $img = this.imgFromEntry($entry);
|
744
|
-
if ($img) {
|
745
|
-
$img.css('width', '');
|
746
|
-
$img.css('height', '');
|
747
|
-
$img.css('margin-left', '');
|
748
|
-
$img.css('margin-top', '');
|
749
|
-
this.resetImgSrc($img);
|
750
|
-
$img.data('jg.originalSrc', undefined);
|
751
|
-
$img.data('jg.originalSrcLoc', undefined);
|
752
|
-
$img.data('jg.src', undefined);
|
753
|
-
}
|
754
|
-
|
755
|
-
// Remove caption
|
756
|
-
this.removeCaptionEventsHandlers($entry);
|
757
|
-
var $caption = this.captionFromEntry($entry);
|
758
|
-
if ($entry.data('jg.createdCaption')) {
|
759
|
-
// remove also the caption element (if created by jg)
|
760
|
-
$entry.data('jg.createdCaption', undefined);
|
761
|
-
if ($caption !== null) $caption.remove();
|
762
|
-
} else {
|
763
|
-
if ($caption !== null) $caption.fadeTo(0, 1);
|
764
|
-
}
|
765
|
-
|
766
|
-
}, this));
|
767
|
-
|
768
|
-
this.$gallery.css('height', '');
|
769
|
-
this.$gallery.removeClass('justified-gallery');
|
770
|
-
this.$gallery.data('jg.controller', undefined);
|
771
|
-
this.settings.triggerEvent.call(this, 'jg.destroy');
|
772
|
-
};
|
773
|
-
|
774
|
-
/**
|
775
|
-
* Analyze the images and builds the rows. It returns if it found an image that is not loaded.
|
776
|
-
*
|
777
|
-
* @param isForResize if the image analyzer is called for resizing or not, to call a different callback at the end
|
778
|
-
*/
|
779
|
-
JustifiedGallery.prototype.analyzeImages = function (isForResize) {
|
780
|
-
for (var i = this.lastAnalyzedIndex + 1; i < this.entries.length; i++) {
|
781
|
-
var $entry = $(this.entries[i]);
|
782
|
-
if ($entry.data('jg.loaded') === true || $entry.data('jg.loaded') === 'skipped') {
|
783
|
-
var availableWidth = this.galleryWidth - 2 * this.border - (
|
784
|
-
(this.buildingRow.entriesBuff.length - 1) * this.settings.margins);
|
785
|
-
var imgAspectRatio = $entry.data('jg.width') / $entry.data('jg.height');
|
786
|
-
|
787
|
-
this.buildingRow.entriesBuff.push($entry);
|
788
|
-
this.buildingRow.aspectRatio += imgAspectRatio;
|
789
|
-
this.buildingRow.width += imgAspectRatio * this.settings.rowHeight;
|
790
|
-
this.lastAnalyzedIndex = i;
|
791
|
-
|
792
|
-
if (availableWidth / (this.buildingRow.aspectRatio + imgAspectRatio) < this.settings.rowHeight) {
|
793
|
-
this.flushRow(false);
|
794
|
-
|
795
|
-
if(++this.yield.flushed >= this.yield.every) {
|
796
|
-
this.startImgAnalyzer(isForResize);
|
797
|
-
return;
|
798
|
-
}
|
799
|
-
}
|
800
|
-
} else if ($entry.data('jg.loaded') !== 'error') {
|
801
|
-
return;
|
802
|
-
}
|
803
|
-
}
|
804
|
-
|
805
|
-
// Last row flush (the row is not full)
|
806
|
-
if (this.buildingRow.entriesBuff.length > 0) this.flushRow(true);
|
807
|
-
|
808
|
-
if (this.isSpinnerActive()) {
|
809
|
-
this.stopLoadingSpinnerAnimation();
|
810
|
-
}
|
811
|
-
|
812
|
-
/* Stop, if there is, the timeout to start the analyzeImages.
|
813
|
-
This is because an image can be set loaded, and the timeout can be set,
|
814
|
-
but this image can be analyzed yet.
|
815
|
-
*/
|
816
|
-
this.stopImgAnalyzerStarter();
|
817
|
-
|
818
|
-
//On complete callback
|
819
|
-
this.settings.triggerEvent.call(this, isForResize ? 'jg.resize' : 'jg.complete');
|
820
|
-
this.setGalleryFinalHeight(this.galleryHeightToSet);
|
821
|
-
};
|
822
|
-
|
823
|
-
/**
|
824
|
-
* Stops any ImgAnalyzer starter (that has an assigned timeout)
|
825
|
-
*/
|
826
|
-
JustifiedGallery.prototype.stopImgAnalyzerStarter = function () {
|
827
|
-
this.yield.flushed = 0;
|
828
|
-
if (this.imgAnalyzerTimeout !== null) {
|
829
|
-
clearTimeout(this.imgAnalyzerTimeout);
|
830
|
-
this.imgAnalyzerTimeout = null;
|
831
|
-
}
|
832
|
-
};
|
833
|
-
|
834
|
-
/**
|
835
|
-
* Starts the image analyzer. It is not immediately called to let the browser to update the view
|
836
|
-
*
|
837
|
-
* @param isForResize specifies if the image analyzer must be called for resizing or not
|
838
|
-
*/
|
839
|
-
JustifiedGallery.prototype.startImgAnalyzer = function (isForResize) {
|
840
|
-
var that = this;
|
841
|
-
this.stopImgAnalyzerStarter();
|
842
|
-
this.imgAnalyzerTimeout = setTimeout(function () {
|
843
|
-
that.analyzeImages(isForResize);
|
844
|
-
}, 0.001); // we can't start it immediately due to a IE different behaviour
|
845
|
-
};
|
846
|
-
|
847
|
-
/**
|
848
|
-
* Checks if the image is loaded or not using another image object. We cannot use the 'complete' image property,
|
849
|
-
* because some browsers, with a 404 set complete = true.
|
850
|
-
*
|
851
|
-
* @param imageSrc the image src to load
|
852
|
-
* @param onLoad callback that is called when the image has been loaded
|
853
|
-
* @param onError callback that is called in case of an error
|
854
|
-
*/
|
855
|
-
JustifiedGallery.prototype.onImageEvent = function (imageSrc, onLoad, onError) {
|
856
|
-
if (!onLoad && !onError) return;
|
857
|
-
|
858
|
-
var memImage = new Image();
|
859
|
-
var $memImage = $(memImage);
|
860
|
-
if (onLoad) {
|
861
|
-
$memImage.one('load', function () {
|
862
|
-
$memImage.off('load error');
|
863
|
-
onLoad(memImage);
|
864
|
-
});
|
865
|
-
}
|
866
|
-
if (onError) {
|
867
|
-
$memImage.one('error', function() {
|
868
|
-
$memImage.off('load error');
|
869
|
-
onError(memImage);
|
870
|
-
});
|
871
|
-
}
|
872
|
-
memImage.src = imageSrc;
|
873
|
-
};
|
874
|
-
|
875
|
-
/**
|
876
|
-
* Init of Justified Gallery controlled
|
877
|
-
* It analyzes all the entries starting theirs loading and calling the image analyzer (that works with loaded images)
|
878
|
-
*/
|
879
|
-
JustifiedGallery.prototype.init = function () {
|
880
|
-
var imagesToLoad = false, skippedImages = false, that = this;
|
881
|
-
$.each(this.entries, function (index, entry) {
|
882
|
-
var $entry = $(entry);
|
883
|
-
var $image = that.imgFromEntry($entry);
|
884
|
-
|
885
|
-
$entry.addClass('jg-entry');
|
886
|
-
|
887
|
-
if ($entry.data('jg.loaded') !== true && $entry.data('jg.loaded') !== 'skipped') {
|
888
|
-
|
889
|
-
// Link Rel global overwrite
|
890
|
-
if (that.settings.rel !== null) $entry.attr('rel', that.settings.rel);
|
891
|
-
|
892
|
-
// Link Target global overwrite
|
893
|
-
if (that.settings.target !== null) $entry.attr('target', that.settings.target);
|
894
|
-
|
895
|
-
if ($image !== null) {
|
896
|
-
|
897
|
-
// Image src
|
898
|
-
var imageSrc = that.extractImgSrcFromImage($image);
|
899
|
-
|
900
|
-
/* If we have the height and the width, we don't wait that the image is loaded,
|
901
|
-
but we start directly with the justification */
|
902
|
-
if (that.settings.waitThumbnailsLoad === false || !imageSrc) {
|
903
|
-
var width = parseFloat($image.attr('width'));
|
904
|
-
var height = parseFloat($image.attr('height'));
|
905
|
-
if ($image.prop('tagName') === 'svg') {
|
906
|
-
width = parseFloat($image[0].getBBox().width);
|
907
|
-
height = parseFloat($image[0].getBBox().height);
|
908
|
-
}
|
909
|
-
if (!isNaN(width) && !isNaN(height)) {
|
910
|
-
$entry.data('jg.width', width);
|
911
|
-
$entry.data('jg.height', height);
|
912
|
-
$entry.data('jg.loaded', 'skipped');
|
913
|
-
skippedImages = true;
|
914
|
-
that.startImgAnalyzer(false);
|
915
|
-
return true; // continue
|
916
|
-
}
|
917
|
-
}
|
918
|
-
|
919
|
-
$entry.data('jg.loaded', false);
|
920
|
-
imagesToLoad = true;
|
921
|
-
|
922
|
-
// Spinner start
|
923
|
-
if (!that.isSpinnerActive()) that.startLoadingSpinnerAnimation();
|
924
|
-
|
925
|
-
that.onImageEvent(imageSrc, function (loadImg) { // image loaded
|
926
|
-
$entry.data('jg.width', loadImg.width);
|
927
|
-
$entry.data('jg.height', loadImg.height);
|
928
|
-
$entry.data('jg.loaded', true);
|
929
|
-
that.startImgAnalyzer(false);
|
930
|
-
}, function () { // image load error
|
931
|
-
$entry.data('jg.loaded', 'error');
|
932
|
-
that.startImgAnalyzer(false);
|
933
|
-
});
|
934
|
-
|
935
|
-
} else {
|
936
|
-
$entry.data('jg.loaded', true);
|
937
|
-
$entry.data('jg.width', $entry.width() | parseFloat($entry.css('width')) | 1);
|
938
|
-
$entry.data('jg.height', $entry.height() | parseFloat($entry.css('height')) | 1);
|
939
|
-
}
|
940
|
-
|
941
|
-
}
|
942
|
-
|
943
|
-
});
|
944
|
-
|
945
|
-
if (!imagesToLoad && !skippedImages) this.startImgAnalyzer(false);
|
946
|
-
this.checkWidth();
|
947
|
-
};
|
948
|
-
|
949
|
-
/**
|
950
|
-
* Checks that it is a valid number. If a string is passed it is converted to a number
|
951
|
-
*
|
952
|
-
* @param settingContainer the object that contains the setting (to allow the conversion)
|
953
|
-
* @param settingName the setting name
|
954
|
-
*/
|
955
|
-
JustifiedGallery.prototype.checkOrConvertNumber = function (settingContainer, settingName) {
|
956
|
-
if ($.type(settingContainer[settingName]) === 'string') {
|
957
|
-
settingContainer[settingName] = parseFloat(settingContainer[settingName]);
|
958
|
-
}
|
959
|
-
|
960
|
-
if ($.type(settingContainer[settingName]) === 'number') {
|
961
|
-
if (isNaN(settingContainer[settingName])) throw 'invalid number for ' + settingName;
|
962
|
-
} else {
|
963
|
-
throw settingName + ' must be a number';
|
964
|
-
}
|
965
|
-
};
|
966
|
-
|
967
|
-
/**
|
968
|
-
* Checks the sizeRangeSuffixes and, if necessary, converts
|
969
|
-
* its keys from string (e.g. old settings with 'lt100') to int.
|
970
|
-
*/
|
971
|
-
JustifiedGallery.prototype.checkSizeRangesSuffixes = function () {
|
972
|
-
if ($.type(this.settings.sizeRangeSuffixes) !== 'object') {
|
973
|
-
throw 'sizeRangeSuffixes must be defined and must be an object';
|
974
|
-
}
|
975
|
-
|
976
|
-
var suffixRanges = [];
|
977
|
-
for (var rangeIdx in this.settings.sizeRangeSuffixes) {
|
978
|
-
if (this.settings.sizeRangeSuffixes.hasOwnProperty(rangeIdx)) suffixRanges.push(rangeIdx);
|
979
|
-
}
|
980
|
-
|
981
|
-
var newSizeRngSuffixes = {0: ''};
|
982
|
-
for (var i = 0; i < suffixRanges.length; i++) {
|
983
|
-
if ($.type(suffixRanges[i]) === 'string') {
|
984
|
-
try {
|
985
|
-
var numIdx = parseInt(suffixRanges[i].replace(/^[a-z]+/, ''), 10);
|
986
|
-
newSizeRngSuffixes[numIdx] = this.settings.sizeRangeSuffixes[suffixRanges[i]];
|
987
|
-
} catch (e) {
|
988
|
-
throw 'sizeRangeSuffixes keys must contains correct numbers (' + e + ')';
|
989
|
-
}
|
990
|
-
} else {
|
991
|
-
newSizeRngSuffixes[suffixRanges[i]] = this.settings.sizeRangeSuffixes[suffixRanges[i]];
|
992
|
-
}
|
993
|
-
}
|
994
|
-
|
995
|
-
this.settings.sizeRangeSuffixes = newSizeRngSuffixes;
|
996
|
-
};
|
997
|
-
|
998
|
-
/**
|
999
|
-
* check and convert the maxRowHeight setting
|
1000
|
-
* requires rowHeight to be already set
|
1001
|
-
* TODO: should be always called when only rowHeight is changed
|
1002
|
-
* @return number or null
|
1003
|
-
*/
|
1004
|
-
JustifiedGallery.prototype.retrieveMaxRowHeight = function () {
|
1005
|
-
var newMaxRowHeight = null;
|
1006
|
-
var rowHeight = this.settings.rowHeight;
|
1007
|
-
|
1008
|
-
if ($.type(this.settings.maxRowHeight) === 'string') {
|
1009
|
-
if (this.settings.maxRowHeight.match(/^[0-9]+%$/)) {
|
1010
|
-
newMaxRowHeight = rowHeight * parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1]) / 100;
|
1011
|
-
} else {
|
1012
|
-
newMaxRowHeight = parseFloat(this.settings.maxRowHeight);
|
1013
|
-
}
|
1014
|
-
} else if ($.type(this.settings.maxRowHeight) === 'number') {
|
1015
|
-
newMaxRowHeight = this.settings.maxRowHeight;
|
1016
|
-
} else if (this.settings.maxRowHeight === false || this.settings.maxRowHeight == null) {
|
1017
|
-
return null;
|
1018
|
-
} else {
|
1019
|
-
throw 'maxRowHeight must be a number or a percentage';
|
1020
|
-
}
|
1021
|
-
|
1022
|
-
// check if the converted value is not a number
|
1023
|
-
if (isNaN(newMaxRowHeight)) throw 'invalid number for maxRowHeight';
|
1024
|
-
|
1025
|
-
// check values, maxRowHeight must be >= rowHeight
|
1026
|
-
if (newMaxRowHeight < rowHeight) newMaxRowHeight = rowHeight;
|
1027
|
-
|
1028
|
-
return newMaxRowHeight;
|
1029
|
-
};
|
1030
|
-
|
1031
|
-
/**
|
1032
|
-
* Checks the settings
|
1033
|
-
*/
|
1034
|
-
JustifiedGallery.prototype.checkSettings = function () {
|
1035
|
-
this.checkSizeRangesSuffixes();
|
1036
|
-
|
1037
|
-
this.checkOrConvertNumber(this.settings, 'rowHeight');
|
1038
|
-
this.checkOrConvertNumber(this.settings, 'margins');
|
1039
|
-
this.checkOrConvertNumber(this.settings, 'border');
|
1040
|
-
|
1041
|
-
var lastRowModes = [
|
1042
|
-
'justify',
|
1043
|
-
'nojustify',
|
1044
|
-
'left',
|
1045
|
-
'center',
|
1046
|
-
'right',
|
1047
|
-
'hide'
|
1048
|
-
];
|
1049
|
-
if (lastRowModes.indexOf(this.settings.lastRow) === -1) {
|
1050
|
-
throw 'lastRow must be one of: ' + lastRowModes.join(', ');
|
1051
|
-
}
|
1052
|
-
|
1053
|
-
this.checkOrConvertNumber(this.settings, 'justifyThreshold');
|
1054
|
-
if (this.settings.justifyThreshold < 0 || this.settings.justifyThreshold > 1) {
|
1055
|
-
throw 'justifyThreshold must be in the interval [0,1]';
|
1056
|
-
}
|
1057
|
-
if ($.type(this.settings.cssAnimation) !== 'boolean') {
|
1058
|
-
throw 'cssAnimation must be a boolean';
|
1059
|
-
}
|
1060
|
-
|
1061
|
-
if ($.type(this.settings.captions) !== 'boolean') throw 'captions must be a boolean';
|
1062
|
-
this.checkOrConvertNumber(this.settings.captionSettings, 'animationDuration');
|
1063
|
-
|
1064
|
-
this.checkOrConvertNumber(this.settings.captionSettings, 'visibleOpacity');
|
1065
|
-
if (this.settings.captionSettings.visibleOpacity < 0 ||
|
1066
|
-
this.settings.captionSettings.visibleOpacity > 1) {
|
1067
|
-
throw 'captionSettings.visibleOpacity must be in the interval [0, 1]';
|
1068
|
-
}
|
1069
|
-
|
1070
|
-
this.checkOrConvertNumber(this.settings.captionSettings, 'nonVisibleOpacity');
|
1071
|
-
if (this.settings.captionSettings.nonVisibleOpacity < 0 ||
|
1072
|
-
this.settings.captionSettings.nonVisibleOpacity > 1) {
|
1073
|
-
throw 'captionSettings.nonVisibleOpacity must be in the interval [0, 1]';
|
1074
|
-
}
|
1075
|
-
|
1076
|
-
this.checkOrConvertNumber(this.settings, 'imagesAnimationDuration');
|
1077
|
-
this.checkOrConvertNumber(this.settings, 'refreshTime');
|
1078
|
-
this.checkOrConvertNumber(this.settings, 'refreshSensitivity');
|
1079
|
-
if ($.type(this.settings.randomize) !== 'boolean') throw 'randomize must be a boolean';
|
1080
|
-
if ($.type(this.settings.selector) !== 'string') throw 'selector must be a string';
|
1081
|
-
|
1082
|
-
if (this.settings.sort !== false && !$.isFunction(this.settings.sort)) {
|
1083
|
-
throw 'sort must be false or a comparison function';
|
1084
|
-
}
|
1085
|
-
|
1086
|
-
if (this.settings.filter !== false && !$.isFunction(this.settings.filter) &&
|
1087
|
-
$.type(this.settings.filter) !== 'string') {
|
1088
|
-
throw 'filter must be false, a string or a filter function';
|
1089
|
-
}
|
1090
|
-
};
|
1091
|
-
|
1092
|
-
/**
|
1093
|
-
* It brings all the indexes from the sizeRangeSuffixes and it orders them. They are then sorted and returned.
|
1094
|
-
* @returns {Array} sorted suffix ranges
|
1095
|
-
*/
|
1096
|
-
JustifiedGallery.prototype.retrieveSuffixRanges = function () {
|
1097
|
-
var suffixRanges = [];
|
1098
|
-
for (var rangeIdx in this.settings.sizeRangeSuffixes) {
|
1099
|
-
if (this.settings.sizeRangeSuffixes.hasOwnProperty(rangeIdx)) suffixRanges.push(parseInt(rangeIdx, 10));
|
1100
|
-
}
|
1101
|
-
suffixRanges.sort(function (a, b) { return a > b ? 1 : a < b ? -1 : 0; });
|
1102
|
-
return suffixRanges;
|
1103
|
-
};
|
1104
|
-
|
1105
|
-
/**
|
1106
|
-
* Update the existing settings only changing some of them
|
1107
|
-
*
|
1108
|
-
* @param newSettings the new settings (or a subgroup of them)
|
1109
|
-
*/
|
1110
|
-
JustifiedGallery.prototype.updateSettings = function (newSettings) {
|
1111
|
-
// In this case Justified Gallery has been called again changing only some options
|
1112
|
-
this.settings = $.extend({}, this.settings, newSettings);
|
1113
|
-
this.checkSettings();
|
1114
|
-
|
1115
|
-
// As reported in the settings: negative value = same as margins, 0 = disabled
|
1116
|
-
this.border = this.settings.border >= 0 ? this.settings.border : this.settings.margins;
|
1117
|
-
|
1118
|
-
this.maxRowHeight = this.retrieveMaxRowHeight();
|
1119
|
-
this.suffixRanges = this.retrieveSuffixRanges();
|
1120
|
-
};
|
1121
|
-
|
1122
|
-
JustifiedGallery.prototype.defaults = {
|
1123
|
-
sizeRangeSuffixes: { }, /* e.g. Flickr configuration
|
1124
|
-
{
|
1125
|
-
100: '_t', // used when longest is less than 100px
|
1126
|
-
240: '_m', // used when longest is between 101px and 240px
|
1127
|
-
320: '_n', // ...
|
1128
|
-
500: '',
|
1129
|
-
640: '_z',
|
1130
|
-
1024: '_b' // used as else case because it is the last
|
1131
|
-
}
|
1132
|
-
*/
|
1133
|
-
thumbnailPath: undefined, /* If defined, sizeRangeSuffixes is not used, and this function is used to determine the
|
1134
|
-
path relative to a specific thumbnail size. The function should accept respectively three arguments:
|
1135
|
-
current path, width and height */
|
1136
|
-
rowHeight: 120, // required? required to be > 0?
|
1137
|
-
maxRowHeight: false, // false or negative value to deactivate. Positive number to express the value in pixels,
|
1138
|
-
// A string '[0-9]+%' to express in percentage (e.g. 300% means that the row height
|
1139
|
-
// can't exceed 3 * rowHeight)
|
1140
|
-
margins: 1,
|
1141
|
-
border: -1, // negative value = same as margins, 0 = disabled, any other value to set the border
|
1142
|
-
|
1143
|
-
lastRow: 'nojustify', // … which is the same as 'left', or can be 'justify', 'center', 'right' or 'hide'
|
1144
|
-
|
1145
|
-
justifyThreshold: 0.90, /* if row width / available space > 0.90 it will be always justified
|
1146
|
-
* (i.e. lastRow setting is not considered) */
|
1147
|
-
waitThumbnailsLoad: true,
|
1148
|
-
captions: true,
|
1149
|
-
cssAnimation: true,
|
1150
|
-
imagesAnimationDuration: 500, // ignored with css animations
|
1151
|
-
captionSettings: { // ignored with css animations
|
1152
|
-
animationDuration: 500,
|
1153
|
-
visibleOpacity: 0.7,
|
1154
|
-
nonVisibleOpacity: 0.0
|
1155
|
-
},
|
1156
|
-
rel: null, // rewrite the rel of each analyzed links
|
1157
|
-
target: null, // rewrite the target of all links
|
1158
|
-
extension: /\.[^.\\/]+$/, // regexp to capture the extension of an image
|
1159
|
-
refreshTime: 200, // time interval (in ms) to check if the page changes its width
|
1160
|
-
refreshSensitivity: 0, // change in width allowed (in px) without re-building the gallery
|
1161
|
-
randomize: false,
|
1162
|
-
rtl: false, // right-to-left mode
|
1163
|
-
sort: false, /*
|
1164
|
-
- false: to do not sort
|
1165
|
-
- function: to sort them using the function as comparator (see Array.prototype.sort())
|
1166
|
-
*/
|
1167
|
-
filter: false, /*
|
1168
|
-
- false, null or undefined: for a disabled filter
|
1169
|
-
- a string: an entry is kept if entry.is(filter string) returns true
|
1170
|
-
see jQuery's .is() function for further information
|
1171
|
-
- a function: invoked with arguments (entry, index, array). Return true to keep the entry, false otherwise.
|
1172
|
-
It follows the specifications of the Array.prototype.filter() function of JavaScript.
|
1173
|
-
*/
|
1174
|
-
selector: 'a, div:not(.spinner)', // The selector that is used to know what are the entries of the gallery
|
1175
|
-
imgSelector: '> img, > a > img, > svg, > a > svg', // The selector that is used to know what are the images of each entry
|
1176
|
-
triggerEvent: function (event) { // This is called to trigger events, the default behavior is to call $.trigger
|
1177
|
-
this.$gallery.trigger(event); // Consider that 'this' is this set to the JustifiedGallery object, so it can
|
1178
|
-
} // access to fields such as $gallery, useful to trigger events with jQuery.
|
1179
|
-
};
|
1180
|
-
|
1181
|
-
|
1182
|
-
/**
|
1183
|
-
* Justified Gallery plugin for jQuery
|
1184
|
-
*
|
1185
|
-
* Events
|
1186
|
-
* - jg.complete : called when all the gallery has been created
|
1187
|
-
* - jg.resize : called when the gallery has been resized
|
1188
|
-
* - jg.rowflush : when a new row appears
|
1189
|
-
*
|
1190
|
-
* @param arg the action (or the settings) passed when the plugin is called
|
1191
|
-
* @returns {*} the object itself
|
1192
|
-
*/
|
1193
|
-
$.fn.justifiedGallery = function (arg) {
|
1194
|
-
return this.each(function (index, gallery) {
|
1195
|
-
|
1196
|
-
var $gallery = $(gallery);
|
1197
|
-
$gallery.addClass('justified-gallery');
|
1198
|
-
|
1199
|
-
var controller = $gallery.data('jg.controller');
|
1200
|
-
if (typeof controller === 'undefined') {
|
1201
|
-
// Create controller and assign it to the object data
|
1202
|
-
if (typeof arg !== 'undefined' && arg !== null && $.type(arg) !== 'object') {
|
1203
|
-
if (arg === 'destroy') return; // Just a call to an unexisting object
|
1204
|
-
throw 'The argument must be an object';
|
1205
|
-
}
|
1206
|
-
controller = new JustifiedGallery($gallery, $.extend({}, JustifiedGallery.prototype.defaults, arg));
|
1207
|
-
$gallery.data('jg.controller', controller);
|
1208
|
-
} else if (arg === 'norewind') {
|
1209
|
-
// In this case we don't rewind: we analyze only the latest images (e.g. to complete the last unfinished row
|
1210
|
-
// ... left to be more readable
|
1211
|
-
} else if (arg === 'destroy') {
|
1212
|
-
controller.destroy();
|
1213
|
-
return;
|
1214
|
-
} else {
|
1215
|
-
// In this case Justified Gallery has been called again changing only some options
|
1216
|
-
controller.updateSettings(arg);
|
1217
|
-
controller.rewind();
|
1218
|
-
}
|
1219
|
-
|
1220
|
-
// Update the entries list
|
1221
|
-
if (!controller.updateEntries(arg === 'norewind')) return;
|
1222
|
-
|
1223
|
-
// Init justified gallery
|
1224
|
-
controller.init();
|
1225
|
-
|
1226
|
-
});
|
1227
|
-
};
|
1228
|
-
|
1229
|
-
}));
|