j1-template 2021.0.2 → 2021.0.7
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/modules/navigator/generator.html +6 -6
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +11 -11
- data/_includes/themes/j1/procedures/global/attributes_loader.proc +2 -2
- data/_layouts/raw.html +1 -1
- data/assets/data/fam.html +1 -1
- data/assets/data/gallery_customizer.html +1 -1
- data/assets/data/mdi_icons.json +69582 -14640
- data/assets/data/menu.html +32 -3
- data/assets/data/mmenu_toc.html +1 -1
- data/assets/data/quicklinks.html +2 -2
- data/assets/themes/j1/adapter/js/fam.js +2 -2
- data/assets/themes/j1/adapter/js/j1.js +11 -5
- data/assets/themes/j1/adapter/js/mmenu.js +18 -22
- data/assets/themes/j1/adapter/js/{lunr_search.js → quicksearch.js} +11 -11
- data/assets/themes/j1/core/css/animate.min.css +1 -7
- data/assets/themes/j1/core/css/icon-fonts/fontawesome.css +302 -22
- data/assets/themes/j1/core/css/icon-fonts/fontawesome.min.css +1 -1
- data/assets/themes/j1/core/css/icon-fonts/materialdesign.css +12505 -4812
- data/assets/themes/j1/core/css/icon-fonts/materialdesign.min.css +1 -1
- data/assets/themes/j1/core/css/icon-fonts/twemoji.min.css +1 -1
- data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.css +79 -49
- data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.min.css +1 -6
- data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.css +78 -48
- data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.min.css +1 -6
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +124 -52
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +1 -8
- data/assets/themes/j1/core/css/vendor.css +2 -2
- data/assets/themes/j1/core/css/vendor.min.css +1 -1
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/{fa-brands-400.eot → eot/fa-brands-400.eot} +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/{fa-regular-400.eot → eot/fa-regular-400.eot} +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/{fa-solid-900.eot → eot/fa-solid-900.eot} +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-brands-400.woff +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-brands-400.woff2 +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-regular-400.woff +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-regular-400.woff2 +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-solid-900.woff +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/fa-solid-900.woff2 +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/{fa-brands-400.svg → svg/fa-brands-400.svg} +855 -597
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/{fa-regular-400.svg → svg/fa-regular-400.svg} +94 -96
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/{fa-solid-900.svg → svg/fa-solid-900.svg} +1272 -771
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/{fa-brands-400.ttf → ttf/fa-brands-400.ttf} +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/{fa-regular-400.ttf → ttf/fa-regular-400.ttf} +0 -0
- data/assets/themes/j1/core/fonts/fontawesome_5/fonts/{fa-solid-900.ttf → ttf/fa-solid-900.ttf} +0 -0
- data/assets/themes/j1/core/fonts/{materialdesign_icons/fonts → material_design_icons/fonts/_versions/v3.3.92/eot}/materialdesignicons-webfont.eot +0 -0
- data/assets/themes/j1/core/fonts/{materialdesign_icons/fonts → material_design_icons/fonts/_versions/v3.3.92}/materialdesignicons-webfont.woff +0 -0
- data/assets/themes/j1/core/fonts/{materialdesign_icons/fonts → material_design_icons/fonts/_versions/v3.3.92}/materialdesignicons-webfont.woff2 +0 -0
- data/assets/themes/j1/core/fonts/{materialdesign_icons/fonts → material_design_icons/fonts/_versions/v3.3.92/svg}/materialdesignicons-webfont.svg +0 -0
- data/assets/themes/j1/core/fonts/{materialdesign_icons/fonts → material_design_icons/fonts/_versions/v3.3.92/ttf}/materialdesignicons-webfont.ttf +0 -0
- data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/eot/materialdesignicons-webfont.eot +0 -0
- data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/materialdesignicons-webfont.woff +0 -0
- data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/materialdesignicons-webfont.woff2 +0 -0
- data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/preview.html +717 -0
- data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/svg/materialdesignicons-webfont.svg +10188 -0
- data/assets/themes/j1/core/fonts/material_design_icons/fonts/_versions/v5.9.55/ttf/materialdesignicons-webfont.ttf +0 -0
- data/assets/themes/j1/core/fonts/material_design_icons/fonts/eot/materialdesignicons-webfont.eot +0 -0
- data/assets/themes/j1/core/fonts/material_design_icons/fonts/materialdesignicons-webfont.woff +0 -0
- data/assets/themes/j1/core/fonts/material_design_icons/fonts/materialdesignicons-webfont.woff2 +0 -0
- data/assets/themes/j1/core/fonts/material_design_icons/fonts/svg/materialdesignicons-webfont.svg +10188 -0
- data/assets/themes/j1/core/fonts/material_design_icons/fonts/ttf/materialdesignicons-webfont.ttf +0 -0
- data/assets/themes/j1/core/fonts/{materialdesign_icons → material_design_icons}/metadata/icons.json +0 -0
- data/assets/themes/j1/core/fonts/{materialdesign_icons → material_design_icons}/metadata/icons.yml +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Bold.eot → eot/Roboto-Bold.eot} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Light.eot → eot/Roboto-Light.eot} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Medium.eot → eot/Roboto-Medium.eot} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Regular.eot → eot/Roboto-Regular.eot} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Thin.eot → eot/Roboto-Thin.eot} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Black.ttf → ttf/Roboto-Black.ttf} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-BlackItalic.ttf → ttf/Roboto-BlackItalic.ttf} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Bold.ttf → ttf/Roboto-Bold.ttf} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-BoldItalic.ttf → ttf/Roboto-BoldItalic.ttf} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Italic.ttf → ttf/Roboto-Italic.ttf} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Light.ttf → ttf/Roboto-Light.ttf} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-LightItalic.ttf → ttf/Roboto-LightItalic.ttf} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Medium.ttf → ttf/Roboto-Medium.ttf} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-MediumItalic.ttf → ttf/Roboto-MediumItalic.ttf} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Regular.ttf → ttf/Roboto-Regular.ttf} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-Thin.ttf → ttf/Roboto-Thin.ttf} +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/{Roboto-ThinItalic.ttf → ttf/Roboto-ThinItalic.ttf} +0 -0
- data/assets/themes/j1/core/js/template.min.js +23 -1
- data/assets/themes/j1/modules/datatables/css/DataTables-1.10.16/images/sort_asc.png +0 -0
- data/assets/themes/j1/modules/datatables/css/DataTables-1.10.16/images/sort_asc_disabled.png +0 -0
- data/assets/themes/j1/modules/datatables/css/DataTables-1.10.16/images/sort_both.png +0 -0
- data/assets/themes/j1/modules/datatables/css/DataTables-1.10.16/images/sort_desc.png +0 -0
- data/assets/themes/j1/modules/datatables/css/DataTables-1.10.16/images/sort_desc_disabled.png +0 -0
- data/assets/themes/j1/modules/datatables/css/datatables.css +1113 -0
- data/assets/themes/j1/modules/datatables/css/datatables.min.css +136 -0
- data/assets/themes/j1/modules/datatables/css/theme/uno.css +473 -0
- data/assets/themes/j1/modules/datatables/js/datatables.js +95360 -0
- data/assets/themes/j1/modules/datatables/js/datatables.min.js +533 -0
- data/assets/themes/j1/modules/jquery/js/jquery-3.5.1.min.map +1 -0
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/css/justifiedGallery.css +110 -0
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/css/justifiedGallery.min.css +110 -0
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/jquery.justifiedGallery.js +1245 -0
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/jquery.justifiedGallery.min.js +8 -0
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/justifiedGallery.min.zip +0 -0
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/justifiedGallery.zip +0 -0
- data/assets/themes/j1/modules/justifiedGallery/css/_archived/justifiedGallery.css +110 -0
- data/assets/themes/j1/modules/justifiedGallery/css/_archived/justifiedGallery.min.css +110 -0
- data/assets/themes/j1/modules/justifiedGallery/css/justifiedGallery.css +11 -10
- data/assets/themes/j1/modules/justifiedGallery/css/justifiedGallery.min.css +3 -106
- data/assets/themes/j1/modules/justifiedGallery/js/justifiedGallery.js +147 -146
- data/assets/themes/j1/modules/justifiedGallery/js/justifiedGallery.min.js +3 -3
- data/assets/themes/j1/modules/lightGallery/js/core/lightgallery.min.js +1 -2
- data/assets/themes/j1/modules/lightbox/js/lightbox.js +1 -1
- data/assets/themes/j1/modules/lunrSearch/css/{lunr_search.css → quicksearch.css} +0 -0
- data/assets/themes/j1/modules/lunrSearch/css/{lunr_search.min.css → quicksearch.min.css} +0 -0
- data/assets/themes/j1/modules/lunrSearch/js/lunr.language.support.js +304 -0
- data/assets/themes/j1/modules/lunrSearch/js/lunr.language.support.min.js +1 -0
- data/assets/themes/j1/modules/lunrSearch/js/{lunr_search.js → quicksearch.js} +22 -3
- data/assets/themes/j1/modules/lunrSearch/js/quicksearch.min.js +17 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.ar.js +381 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.ar.min.js +1 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.da.js +284 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.da.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.de.js +384 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.de.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.du.js +450 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.du.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.es.js +599 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.es.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.fi.js +541 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.fi.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.fr.js +703 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.fr.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.hu.js +565 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.hu.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.it.js +617 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.it.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.ja.js +188 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.ja.min.js +1 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.jp.js +5 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.jp.min.js +1 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.multi.js +79 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.multi.min.js +1 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.nl.js +448 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.nl.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.no.js +258 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.no.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.pt.js +570 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.pt.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.ro.js +558 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.ro.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.ru.js +391 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.ru.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.sv.js +256 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.sv.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.th.js +97 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.tr.js +1087 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.tr.min.js +18 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.vi.js +84 -0
- data/assets/themes/j1/modules/lunrSearch/languages/lunr.vi.min.js +1 -0
- data/assets/themes/j1/modules/mdiPreviewer/css/previewer.css +20 -5
- data/assets/themes/j1/modules/mdiPreviewer/css/previewer.min.css +1 -1
- data/assets/themes/j1/modules/mdiPreviewer/js/previewer.js +115 -0
- data/assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js +15 -0
- data/assets/themes/j1/modules/mdiPreviewer/js/previewer.new.js +111 -0
- data/assets/themes/j1/modules/mdiPreviewer/js/previewer.old.js +103 -0
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.js +2 -2
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.min.js +3 -3
- data/assets/themes/j1/modules/twemoji/css/picker/twemoji-picker.css +4 -4
- data/assets/themes/j1/modules/twemoji/css/picker/twemoji-picker.min.css +1 -1
- data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.js +46 -45
- data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.min.js +1 -1
- data/lib/j1/commands/generate.rb +3 -2
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +18 -18
- data/lib/starter_web/_config.yml +5 -5
- data/lib/starter_web/_data/apps/light_gallery.yml +1 -1
- data/lib/starter_web/_data/asciidoc2pdf/fonts/ABOUT-mplus1mn-subset +26 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/ABOUT-mplus1p-subset +26 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/ABOUT-notoemoji-subset +3 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/ABOUT-notoserif-subset +26 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/LICENSE-mplus +16 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/LICENSE-notoemoji +201 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/LICENSE-notoserif +201 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/LICENSE-roboto +11 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-Black.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-BlackItalic.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-Bold.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-BoldItalic.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-Italic.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-Light.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-LightItalic.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-Medium.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-MediumItalic.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-Regular.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-Thin.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/Roboto-ThinItalic.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/mplus1mn-bold-subset.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/mplus1mn-bold_italic-subset.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/mplus1mn-italic-subset.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/mplus1mn-regular-subset.ttf +0 -0
- data/{assets/themes/j1/core/fonts/roboto → lib/starter_web/_data/asciidoc2pdf}/fonts/mplus1p-regular-fallback.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/fonts/notoemoji-subset.ttf +0 -0
- data/{assets/themes/j1/core/fonts/roboto → lib/starter_web/_data/asciidoc2pdf}/fonts/notoserif-bold-subset.ttf +0 -0
- data/{assets/themes/j1/core/fonts/roboto → lib/starter_web/_data/asciidoc2pdf}/fonts/notoserif-bold_italic-subset.ttf +0 -0
- data/{assets/themes/j1/core/fonts/roboto → lib/starter_web/_data/asciidoc2pdf}/fonts/notoserif-italic-subset.ttf +0 -0
- data/{assets/themes/j1/core/fonts/roboto → lib/starter_web/_data/asciidoc2pdf}/fonts/notoserif-regular-subset.ttf +0 -0
- data/lib/starter_web/_data/asciidoc2pdf/themes/base-theme.yml +130 -0
- data/lib/starter_web/_data/asciidoc2pdf/themes/default-for-print-theme.yml +36 -0
- data/lib/starter_web/_data/asciidoc2pdf/themes/default-for-print-with-fallback-font-theme.yml +15 -0
- data/lib/starter_web/_data/asciidoc2pdf/themes/default-theme.yml +298 -0
- data/lib/starter_web/_data/asciidoc2pdf/themes/default-with-fallback-font-theme.yml +21 -0
- data/lib/starter_web/_data/asciidoc2pdf/themes/j1-theme.yml +352 -0
- data/lib/starter_web/_data/j1_config.yml +3 -3
- data/lib/starter_web/_data/modules/defaults/navigator.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/quicksearch.yml +82 -0
- data/lib/starter_web/_data/modules/defaults/toccer.yml +1 -1
- data/lib/starter_web/_data/modules/navigator.yml +4 -6
- data/lib/starter_web/_data/modules/navigator_menu.yml +17 -66
- data/lib/starter_web/_data/modules/{lunr_search.yml → quicksearch.yml} +3 -3
- data/lib/starter_web/_data/modules/themer.yml +1 -1
- data/lib/starter_web/_data/resources.yml +34 -60
- data/lib/starter_web/_includes/attributes.asciidoc +297 -95
- data/lib/starter_web/_includes/tables/jekyll_variables.asciidoc +1 -1
- data/lib/starter_web/_includes/tables/template_variables.asciidoc +1 -1
- data/lib/starter_web/_plugins/asciidoctor-extensions/fab-icon-inline.rb +1 -1
- data/lib/starter_web/_plugins/lunr_index.rb +38 -8
- data/lib/starter_web/_plugins/minifyJS.rb +3 -0
- data/lib/starter_web/assets/images/modules/attics/machine-generator-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/modules-apps-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/no-time-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/responsive-text-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/scalable/d1.svg +1 -1
- data/lib/starter_web/assets/images/pages/panels/modules-apps-1920x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/panels/no-time-1920x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/panels/the-place-1920x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_icon-800x200.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_icon.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_input-800x200.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_input.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_results_jekyll-.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/600_quicksearch/quicksearch_results_jekyll.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/annie-spratt-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/antonino-visalli-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/humble-lamb-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/library-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/romain-vignes-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/skeleton/sigmund-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/1280px-PDCA_Process.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/annie-spratt-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/deming-cycle.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/humble-lamb-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/john-schnobrich-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/sigmund-1920x1280.jpg +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1-template.adoc.erb +10 -13
- data/lib/starter_web/collections/posts/public/featured/_posts/{2018-05-01-confusion-about-base-url.adoc → 2020-04-01-confusion-about-base-url.adoc} +7 -5
- data/lib/starter_web/collections/posts/public/featured/_posts/{2019-05-01-top-open-source-static-site-generators.adoc → 2020-05-01-top-open-source-static-site-generators.adoc} +16 -14
- data/lib/starter_web/collections/posts/public/featured/_posts/{2019-06-01-about-cookies.adoc → 2020-06-01-about-cookies.adoc} +10 -24
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +7 -18
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +7 -17
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +7 -17
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +7 -17
- data/{assets/themes/j1/modules/mdiPreviewer/js → lib/starter_web/collections/posts/public/series/_posts/_includes/documents}/readme +0 -0
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +5 -4
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +13 -3
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +13 -3
- data/lib/starter_web/dot.gitattributes +2 -16
- data/lib/starter_web/favicon.ico +0 -0
- data/lib/starter_web/index.html +1 -1
- data/lib/starter_web/package.json +8 -8
- data/lib/starter_web/pages/protected/site_search.adoc +2 -7
- data/lib/starter_web/pages/public/about/about_site.adoc +1877 -9
- data/lib/starter_web/pages/public/about/become_a_patron.adoc +26 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/blindtext.asciidoc +11 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/font_icons.asciidoc +23 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/gallery.asciidoc +5 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/lightbox.asciidoc +7 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/documents/chapter_document.asciidoc +9 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/documents/entry_document.asciidoc +3 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/images/image.asciidoc +6 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_2_column.asciidoc +12 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_2_column_options.asciidoc +30 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_3_column.asciidoc +16 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_4_column.asciidoc +25 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/000_intro.adoc +61 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/100_chapter.adoc +58 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/200_chapter.adoc +59 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/900_references.adoc +68 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/attributes.asciidoc +68 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/000_intro.asciidoc +33 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter.asciidoc +7 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter/100_chapter_document.asciidoc +21 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter/110_chapter_document.asciidoc +36 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/200_chapter.asciidoc +5 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/200_chapter/200_chapter_document.asciidoc +53 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references.asciidoc +23 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/000_intro.asciidoc +23 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/100_chapter_document.asciidoc +33 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/200_chapter_document.asciidoc +26 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/900_sources.asciidoc +81 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/tables/110_material_design_icons.asciidoc +102 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/a2p.bat +28 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/a2p.sh +26 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.a2p +114 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +128 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.pdf +5440 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/100_chapter.asciidoc +60 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/200_chapter.asciidoc +59 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/attributes.asciidoc +63 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/100_chapter.asciidoc +53 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/200_chapter.asciidoc +53 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/tables/110_material_design_icons.asciidoc +102 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +84 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +236 -0
- data/lib/starter_web/pages/public/blog/navigator/archive.html +2 -0
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +3 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +2 -0
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +2 -0
- data/lib/starter_web/pages/public/blog/navigator/index.html +2 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +8 -4
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +3 -4
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +2 -270
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +168 -85
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +6 -9
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +5 -6
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +2 -55
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +113 -57
- data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +433 -0
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +4 -1
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/{410_table_3_column.asciidoc → 410_table_bs_modal_examples.asciidoc} +0 -0
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/tables/bs_modal_examples.asciidoc +47 -0
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +2 -2
- data/lib/starter_web/pages/public/legal/en/000_copyright.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/100_impress.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/200_terms_of_use.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/400_license_agreement.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/500_support.adoc +1 -1
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +16 -5
- data/lib/starter_web/pages/public/previewer/_includes/attributes.asciidoc +5 -81
- data/lib/starter_web/pages/public/previewer/_includes/documents/rouge/100_language_examples.asciidoc +119 -0
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/100_absolute_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/110_bs_grid_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/120_relative_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/200_rotate.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/300_flip.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/400_spin_pulsed.asciidoc +4 -4
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/500_bw_color_palette.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/510_bs_color_palette.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/600_md_color_palette.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/601_md_color_palette_indigo.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/602_md_color_palette_pink.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/rouge/200_rouge_attributes.asciidoc +41 -0
- data/lib/starter_web/pages/public/previewer/_includes/tables/rouge/300_supported_languages.asciidoc +857 -0
- data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/100_bs_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/100_relative_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/200_rotate.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/300_flip.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/400_spin_pulsed.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +116 -78
- data/lib/starter_web/pages/public/previewer/iframer.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/justified_gallery.html +1 -1
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +42 -109
- data/lib/starter_web/pages/public/previewer/rouge.adoc +74 -352
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +3 -3
- data/lib/starter_web/utilsrv/_defaults/package.json +2 -2
- data/lib/starter_web/utilsrv/package.json +3 -3
- metadata +235 -80
- data/assets/themes/j1/core/fonts/materialdesign_icons/license.md +0 -97
- data/assets/themes/j1/core/fonts/roboto/fonts/OpenSansEmoji.ttf +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/mplus1mn-bold-ascii.ttf +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/mplus1mn-bold_italic-ascii.ttf +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/mplus1mn-italic-ascii.ttf +0 -0
- data/assets/themes/j1/core/fonts/roboto/fonts/mplus1mn-regular-ascii-conums.ttf +0 -0
- data/assets/themes/j1/modules/lunrSearch/js/lunr_search.min.js +0 -17
- data/assets/themes/j1/modules/twemoji/js/LICENSE +0 -21
- data/lib/starter_web/_data/modules/defaults/lunr_search.yml +0 -171
- data/lib/starter_web/_plugins/simple_search_filter.rb +0 -32
- data/lib/starter_web/collections/posts/public/featured/_posts/_includes/documents/unsplash-badge.asciidoc +0 -31
- data/lib/starter_web/collections/posts/public/series/_posts/_includes/documents/100-docker-using-shared-folders.asciidoc +0 -430
- data/lib/starter_web/collections/posts/public/series/_posts/_includes/documents/loop.sh +0 -28
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/100_meet_and_greet_jekyll.adoc +0 -79
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/200_preparations.adoc +0 -77
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/300_first_awesome_web.adoc +0 -75
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/attributes.asciidoc +0 -176
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/documents/100_meet_and_greet_jekyll.asciidoc +0 -31
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/documents/200_preparations.asciidoc +0 -14
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/documents/300_first_awesome_web.asciidoc +0 -11
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/parts.asciidoc +0 -193
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/tables/debug_variables.asciidoc +0 -47
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/tables/readme +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/600_lunr.adoc +0 -236
- data/lib/starter_web/pages/public/learn/roundtrip/610_fam.adoc +0 -294
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/tables/readme +0 -0
data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/jquery.justifiedGallery.min.js
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
/*!
|
2
|
+
* justifiedGallery - v3.8.0
|
3
|
+
* http://miromannino.github.io/Justified-Gallery/
|
4
|
+
* Copyright (c) 2020 Miro Mannino
|
5
|
+
* Licensed under the MIT license.
|
6
|
+
*/
|
7
|
+
|
8
|
+
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(l){var r=function(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:l('<div class="jg-spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t};r.prototype.getSuffix=function(t,i){var e,s;for(e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},r.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},r.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},r.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)){if(0===this.settings.sizeRangeSuffixes[i].length)continue;if(this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i]}return""},r.prototype.newSrc=function(t,i,e,s){var n;if(this.settings.thumbnailPath)n=this.settings.thumbnailPath(t,i,e,s);else{var r=t.match(this.settings.extension),o=null!==r?r[0]:"";n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+o}return n},r.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("jg-entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},r.prototype.extractImgSrcFromImage=function(t){var i=t.data("safe-src"),e="data-safe-src";return void 0===i&&(i=t.attr("src"),e="src"),t.data("jg.originalSrc",i),t.data("jg.src",i),t.data("jg.originalSrcLoc",e),i},r.prototype.imgFromEntry=function(t){var i=t.find(this.settings.imgSelector);return 0===i.length?null:i},r.prototype.captionFromEntry=function(t){var i=t.find("> .jg-caption");return 0===i.length?null:i},r.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o=this.imgFromEntry(t);if(null!==o){o.css("width",s),o.css("height",n),o.css("margin-left",-Math.round(s/2)),o.css("margin-top",-Math.round(n/2));var a=o.data("jg.src");if(a){a=this.newSrc(a,s,n,o[0]),o.one("error",function(){this.resetImgSrc(o)});var h=function(){o.attr("src",a)};"skipped"===t.data("jg.loaded")&&a?this.onImageEvent(a,function(){this.showImg(t,h),t.data("jg.loaded",!0)}.bind(this)):this.showImg(t,h)}}else this.showImg(t);this.displayEntryCaption(t)},r.prototype.displayEntryCaption=function(t){var i=this.imgFromEntry(t);if(null!==i&&this.settings.captions){var e=this.captionFromEntry(t);if(null===e){var s=i.attr("alt");this.isValidCaption(s)||(s=t.attr("title")),this.isValidCaption(s)&&(e=l('<div class="jg-caption">'+s+"</div>"),t.append(e),t.data("jg.createdCaption",!0))}null!==e&&(this.settings.cssAnimation||e.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))}else this.removeCaptionEventsHandlers(t)},r.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},r.prototype.onEntryMouseEnterForCaption=function(t){var i=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?i.addClass("jg-caption-visible").removeClass("jg-caption-hidden"):i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},r.prototype.onEntryMouseLeaveForCaption=function(t){var i=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?i.removeClass("jg-caption-visible").removeClass("jg-caption-hidden"):i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},r.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:l.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:l.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},r.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},r.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},r.prototype.prepareBuildingRow=function(t,i){var e,s,n,r,o,a=!0,h=0,g=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,l=g/this.buildingRow.aspectRatio,u=this.settings.rowHeight,d=this.buildingRow.width/g>this.settings.justifyThreshold;if(i||t&&"hide"===this.settings.lastRow&&!d){for(e=0;e<this.buildingRow.entriesBuff.length;e++)s=this.buildingRow.entriesBuff[e],this.settings.cssAnimation?s.removeClass("jg-entry-visible"):(s.stop().fadeTo(0,.1),s.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!d&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(a=!1,0<this.rows&&(a=(u=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/g>this.settings.justifyThreshold)),e=0;e<this.buildingRow.entriesBuff.length;e++)n=(s=this.buildingRow.entriesBuff[e]).data("jg.width")/s.data("jg.height"),o=a?(r=e===this.buildingRow.entriesBuff.length-1?g:l*n,l):(r=u*n,u),g-=Math.round(r),s.data("jg.jwidth",Math.round(r)),s.data("jg.jheight",Math.ceil(o)),(0===e||o<h)&&(h=o);return this.buildingRow.height=h,a},r.prototype.flushRow=function(t,i){var e,s,n,r=this.settings,o=this.border;if(s=this.prepareBuildingRow(t,i),i||t&&"hide"===r.lastRow&&-1===s)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===r.lastRow||"right"===r.lastRow)){var a=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*r.margins;for(n=0;n<this.buildingRow.entriesBuff.length;n++)a-=(e=this.buildingRow.entriesBuff[n]).data("jg.jwidth");"center"===r.lastRow?o+=Math.round(a/2):"right"===r.lastRow&&(o+=a)}var h=this.buildingRow.entriesBuff.length-1;for(n=0;n<=h;n++)e=this.buildingRow.entriesBuff[this.settings.rtl?h-n:n],this.displayEntry(e,o,this.offY,e.data("jg.jwidth"),e.data("jg.jheight"),this.buildingRow.height),o+=e.data("jg.jwidth")+r.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=r.rowHeight&&s)&&(this.offY+=this.buildingRow.height+r.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;r.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},r.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},r.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},r.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(l.proxy(function(){if(this.$gallery.is(":visible")){var t=parseFloat(this.$gallery.width());Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0))}},this),this.settings.refreshTime)},r.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},r.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},r.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},r.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},r.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},r.prototype.getSelectorWithoutSpinner=function(){return this.settings.selector+", div:not(.jg-spinner)"},r.prototype.getAllEntries=function(){var t=this.getSelectorWithoutSpinner();return this.$gallery.children(t).toArray()},r.prototype.updateEntries=function(t){var i;if(t&&null!=this.lastFetchedEntry){var e=this.getSelectorWithoutSpinner();i=l(this.lastFetchedEntry).nextAll(e).toArray()}else this.entries=[],i=this.getAllEntries();return 0<i.length&&(l.isFunction(this.settings.sort)?i=this.sortArray(i):this.settings.randomize&&(i=this.shuffleArray(i)),this.lastFetchedEntry=i[i.length-1],this.settings.filter?i=this.filterArray(i):this.resetFilters(i)),this.entries=this.entries.concat(i),!0},r.prototype.insertToGallery=function(t){var i=this;l.each(t,function(){l(this).appendTo(i.$gallery)})},r.prototype.shuffleArray=function(t){var i,e,s;for(i=t.length-1;0<i;i--)e=Math.floor(Math.random()*(i+1)),s=t[i],t[i]=t[e],t[e]=s;return this.insertToGallery(t),t},r.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},r.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)l(t[i]).removeClass("jg-filtered")},r.prototype.filterArray=function(t){var e=this.settings;if("string"===l.type(e.filter))return t.filter(function(t){var i=l(t);return i.is(e.filter)?(i.removeClass("jg-filtered"),!0):(i.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(l.isFunction(e.filter)){for(var i=t.filter(e.filter),s=0;s<t.length;s++)-1===i.indexOf(t[s])?l(t[s]).addClass("jg-filtered").removeClass("jg-visible"):l(t[s]).removeClass("jg-filtered");return i}},r.prototype.resetImgSrc=function(t){"src"===t.data("jg.originalSrcLoc")?t.attr("src",t.data("jg.originalSrc")):t.attr("src","")},r.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),this.stopImgAnalyzerStarter(),l.each(this.getAllEntries(),l.proxy(function(t,i){var e=l(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry jg-filtered jg-entry-visible");var s=this.imgFromEntry(e);s&&(s.css("width",""),s.css("height",""),s.css("margin-left",""),s.css("margin-top",""),this.resetImgSrc(s),s.data("jg.originalSrc",void 0),s.data("jg.originalSrcLoc",void 0),s.data("jg.src",void 0)),this.removeCaptionEventsHandlers(e);var n=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==n&&n.remove()):null!==n&&n.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0),this.settings.triggerEvent.call(this,"jg.destroy")},r.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=l(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i,s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t)}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.setGalleryFinalHeight(this.galleryHeightToSet),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete")},r.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},r.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},r.prototype.onImageEvent=function(t,i,e){if(i||e){var s=new Image,n=l(s);i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t}},r.prototype.init=function(){var a=!1,h=!1,g=this;l.each(this.entries,function(t,i){var e=l(i),s=g.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==g.settings.rel&&e.attr("rel",g.settings.rel),null!==g.settings.target&&e.attr("target",g.settings.target),null!==s){var n=g.extractImgSrcFromImage(s);if(!1===g.settings.waitThumbnailsLoad||!n){var r=parseFloat(s.attr("width")),o=parseFloat(s.attr("height"));if("svg"===s.prop("tagName")&&(r=parseFloat(s[0].getBBox().width),o=parseFloat(s[0].getBBox().height)),!isNaN(r)&&!isNaN(o))return e.data("jg.width",r),e.data("jg.height",o),e.data("jg.loaded","skipped"),h=!0,g.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),a=!0,g.isSpinnerActive()||g.startLoadingSpinnerAnimation(),g.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),g.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),g.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),a||h||this.startImgAnalyzer(!1),this.checkWidth()},r.prototype.checkOrConvertNumber=function(t,i){if("string"===l.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==l.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},r.prototype.checkSizeRangesSuffixes=function(){if("object"!==l.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t=[];for(var i in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&t.push(i);for(var e={0:""},s=0;s<t.length;s++)if("string"===l.type(t[s]))try{e[parseInt(t[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[t[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[t[s]]=this.settings.sizeRangeSuffixes[t[s]];this.settings.sizeRangeSuffixes=e},r.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===l.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==l.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},r.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border"),this.checkOrConvertNumber(this.settings,"maxRowsCount");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==l.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==l.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==l.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==l.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!l.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!l.isFunction(this.settings.filter)&&"string"!==l.type(this.settings.filter))throw"filter must be false, a string or a filter function"},r.prototype.retrieveSuffixRanges=function(){var t=[];for(var i in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&t.push(parseInt(i,10));return t.sort(function(t,i){return i<t?1:t<i?-1:0}),t},r.prototype.updateSettings=function(t){this.settings=l.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},r.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,maxRowsCount:0,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a",imgSelector:"> img, > a > img, > svg, > a > svg",triggerEvent:function(t){this.$gallery.trigger(t)}},l.fn.justifiedGallery=function(n){return this.each(function(t,i){var e=l(i);e.addClass("justified-gallery");var s=e.data("jg.controller");if(void 0===s){if(null!=n&&"object"!==l.type(n)){if("destroy"===n)return;throw"The argument must be an object"}s=new r(e,l.extend({},r.prototype.defaults,n)),e.data("jg.controller",s)}else if("norewind"===n);else{if("destroy"===n)return void s.destroy();s.updateSettings(n),s.rewind()}s.updateEntries("norewind"===n)&&s.init()})}});
|
Binary file
|
Binary file
|
@@ -0,0 +1,110 @@
|
|
1
|
+
/*!
|
2
|
+
* justifiedGallery - v4.0.0-alpha
|
3
|
+
* http://miromannino.github.io/Justified-Gallery/
|
4
|
+
* Copyright (c) 2019 Miro Mannino
|
5
|
+
* Licensed under the MIT license.
|
6
|
+
*/
|
7
|
+
.justified-gallery {
|
8
|
+
width: 100%;
|
9
|
+
position: relative;
|
10
|
+
overflow: hidden;
|
11
|
+
}
|
12
|
+
.justified-gallery > a,
|
13
|
+
.justified-gallery > div,
|
14
|
+
.justified-gallery > figure {
|
15
|
+
position: absolute;
|
16
|
+
display: inline-block;
|
17
|
+
overflow: hidden;
|
18
|
+
/* background: #888888; To have gray placeholders while the gallery is loading with waitThumbnailsLoad = false */
|
19
|
+
filter: "alpha(opacity=10)";
|
20
|
+
opacity: 0.1;
|
21
|
+
margin: 0;
|
22
|
+
padding: 0;
|
23
|
+
}
|
24
|
+
.justified-gallery > a > img,
|
25
|
+
.justified-gallery > div > img,
|
26
|
+
.justified-gallery > figure > img,
|
27
|
+
.justified-gallery > a > a > img,
|
28
|
+
.justified-gallery > div > a > img,
|
29
|
+
.justified-gallery > figure > a > img,
|
30
|
+
.justified-gallery > a > svg,
|
31
|
+
.justified-gallery > div > svg,
|
32
|
+
.justified-gallery > figure > svg,
|
33
|
+
.justified-gallery > a > a > svg,
|
34
|
+
.justified-gallery > div > a > svg,
|
35
|
+
.justified-gallery > figure > a > svg {
|
36
|
+
position: absolute;
|
37
|
+
top: 50%;
|
38
|
+
left: 50%;
|
39
|
+
margin: 0;
|
40
|
+
padding: 0;
|
41
|
+
border: none;
|
42
|
+
filter: "alpha(opacity=0)";
|
43
|
+
opacity: 0;
|
44
|
+
}
|
45
|
+
.justified-gallery > a > .caption,
|
46
|
+
.justified-gallery > div > .caption,
|
47
|
+
.justified-gallery > figure > .caption {
|
48
|
+
display: none;
|
49
|
+
position: absolute;
|
50
|
+
bottom: 0;
|
51
|
+
padding: 5px;
|
52
|
+
background-color: #000000;
|
53
|
+
left: 0;
|
54
|
+
right: 0;
|
55
|
+
margin: 0;
|
56
|
+
color: white;
|
57
|
+
font-size: 12px;
|
58
|
+
font-weight: 300;
|
59
|
+
font-family: sans-serif;
|
60
|
+
}
|
61
|
+
.justified-gallery > a > .caption.caption-visible,
|
62
|
+
.justified-gallery > div > .caption.caption-visible,
|
63
|
+
.justified-gallery > figure > .caption.caption-visible {
|
64
|
+
display: initial;
|
65
|
+
filter: "alpha(opacity=70)";
|
66
|
+
opacity: 0.7;
|
67
|
+
-webkit-transition: opacity 500ms ease-in;
|
68
|
+
-moz-transition: opacity 500ms ease-in;
|
69
|
+
-o-transition: opacity 500ms ease-in;
|
70
|
+
transition: opacity 500ms ease-in;
|
71
|
+
}
|
72
|
+
.justified-gallery > .jg-entry-visible {
|
73
|
+
filter: "alpha(opacity=100)";
|
74
|
+
opacity: 1;
|
75
|
+
background: none;
|
76
|
+
}
|
77
|
+
.justified-gallery > .jg-entry-visible > img,
|
78
|
+
.justified-gallery > .jg-entry-visible > a > img,
|
79
|
+
.justified-gallery > .jg-entry-visible > svg,
|
80
|
+
.justified-gallery > .jg-entry-visible > a > svg {
|
81
|
+
filter: "alpha(opacity=100)";
|
82
|
+
opacity: 1;
|
83
|
+
-webkit-transition: opacity 500ms ease-in;
|
84
|
+
-moz-transition: opacity 500ms ease-in;
|
85
|
+
-o-transition: opacity 500ms ease-in;
|
86
|
+
transition: opacity 500ms ease-in;
|
87
|
+
}
|
88
|
+
.justified-gallery > .jg-filtered {
|
89
|
+
display: none;
|
90
|
+
}
|
91
|
+
.justified-gallery > .spinner {
|
92
|
+
position: absolute;
|
93
|
+
bottom: 0;
|
94
|
+
margin-left: -24px;
|
95
|
+
padding: 10px 0 10px 0;
|
96
|
+
left: 50%;
|
97
|
+
filter: "alpha(opacity=100)";
|
98
|
+
opacity: 1;
|
99
|
+
overflow: initial;
|
100
|
+
}
|
101
|
+
.justified-gallery > .spinner > span {
|
102
|
+
display: inline-block;
|
103
|
+
filter: "alpha(opacity=0)";
|
104
|
+
opacity: 0;
|
105
|
+
width: 8px;
|
106
|
+
height: 8px;
|
107
|
+
margin: 0 4px 0 4px;
|
108
|
+
background-color: #000;
|
109
|
+
border-radius: 6px;
|
110
|
+
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
/*!
|
2
|
+
* justifiedGallery - v4.0.0-alpha
|
3
|
+
* http://miromannino.github.io/Justified-Gallery/
|
4
|
+
* Copyright (c) 2019 Miro Mannino
|
5
|
+
* Licensed under the MIT license.
|
6
|
+
*/
|
7
|
+
.justified-gallery {
|
8
|
+
width: 100%;
|
9
|
+
position: relative;
|
10
|
+
overflow: hidden;
|
11
|
+
}
|
12
|
+
.justified-gallery > a,
|
13
|
+
.justified-gallery > div,
|
14
|
+
.justified-gallery > figure {
|
15
|
+
position: absolute;
|
16
|
+
display: inline-block;
|
17
|
+
overflow: hidden;
|
18
|
+
/* background: #888888; To have gray placeholders while the gallery is loading with waitThumbnailsLoad = false */
|
19
|
+
filter: "alpha(opacity=10)";
|
20
|
+
opacity: 0.1;
|
21
|
+
margin: 0;
|
22
|
+
padding: 0;
|
23
|
+
}
|
24
|
+
.justified-gallery > a > img,
|
25
|
+
.justified-gallery > div > img,
|
26
|
+
.justified-gallery > figure > img,
|
27
|
+
.justified-gallery > a > a > img,
|
28
|
+
.justified-gallery > div > a > img,
|
29
|
+
.justified-gallery > figure > a > img,
|
30
|
+
.justified-gallery > a > svg,
|
31
|
+
.justified-gallery > div > svg,
|
32
|
+
.justified-gallery > figure > svg,
|
33
|
+
.justified-gallery > a > a > svg,
|
34
|
+
.justified-gallery > div > a > svg,
|
35
|
+
.justified-gallery > figure > a > svg {
|
36
|
+
position: absolute;
|
37
|
+
top: 50%;
|
38
|
+
left: 50%;
|
39
|
+
margin: 0;
|
40
|
+
padding: 0;
|
41
|
+
border: none;
|
42
|
+
filter: "alpha(opacity=0)";
|
43
|
+
opacity: 0;
|
44
|
+
}
|
45
|
+
.justified-gallery > a > .caption,
|
46
|
+
.justified-gallery > div > .caption,
|
47
|
+
.justified-gallery > figure > .caption {
|
48
|
+
display: none;
|
49
|
+
position: absolute;
|
50
|
+
bottom: 0;
|
51
|
+
padding: 5px;
|
52
|
+
background-color: #000000;
|
53
|
+
left: 0;
|
54
|
+
right: 0;
|
55
|
+
margin: 0;
|
56
|
+
color: white;
|
57
|
+
font-size: 12px;
|
58
|
+
font-weight: 300;
|
59
|
+
font-family: sans-serif;
|
60
|
+
}
|
61
|
+
.justified-gallery > a > .caption.caption-visible,
|
62
|
+
.justified-gallery > div > .caption.caption-visible,
|
63
|
+
.justified-gallery > figure > .caption.caption-visible {
|
64
|
+
display: initial;
|
65
|
+
filter: "alpha(opacity=70)";
|
66
|
+
opacity: 0.7;
|
67
|
+
-webkit-transition: opacity 500ms ease-in;
|
68
|
+
-moz-transition: opacity 500ms ease-in;
|
69
|
+
-o-transition: opacity 500ms ease-in;
|
70
|
+
transition: opacity 500ms ease-in;
|
71
|
+
}
|
72
|
+
.justified-gallery > .jg-entry-visible {
|
73
|
+
filter: "alpha(opacity=100)";
|
74
|
+
opacity: 1;
|
75
|
+
background: none;
|
76
|
+
}
|
77
|
+
.justified-gallery > .jg-entry-visible > img,
|
78
|
+
.justified-gallery > .jg-entry-visible > a > img,
|
79
|
+
.justified-gallery > .jg-entry-visible > svg,
|
80
|
+
.justified-gallery > .jg-entry-visible > a > svg {
|
81
|
+
filter: "alpha(opacity=100)";
|
82
|
+
opacity: 1;
|
83
|
+
-webkit-transition: opacity 500ms ease-in;
|
84
|
+
-moz-transition: opacity 500ms ease-in;
|
85
|
+
-o-transition: opacity 500ms ease-in;
|
86
|
+
transition: opacity 500ms ease-in;
|
87
|
+
}
|
88
|
+
.justified-gallery > .jg-filtered {
|
89
|
+
display: none;
|
90
|
+
}
|
91
|
+
.justified-gallery > .spinner {
|
92
|
+
position: absolute;
|
93
|
+
bottom: 0;
|
94
|
+
margin-left: -24px;
|
95
|
+
padding: 10px 0 10px 0;
|
96
|
+
left: 50%;
|
97
|
+
filter: "alpha(opacity=100)";
|
98
|
+
opacity: 1;
|
99
|
+
overflow: initial;
|
100
|
+
}
|
101
|
+
.justified-gallery > .spinner > span {
|
102
|
+
display: inline-block;
|
103
|
+
filter: "alpha(opacity=0)";
|
104
|
+
opacity: 0;
|
105
|
+
width: 8px;
|
106
|
+
height: 8px;
|
107
|
+
margin: 0 4px 0 4px;
|
108
|
+
background-color: #000;
|
109
|
+
border-radius: 6px;
|
110
|
+
}
|
@@ -1,9 +1,10 @@
|
|
1
1
|
/*!
|
2
|
-
* justifiedGallery -
|
2
|
+
* justifiedGallery - v3.8.1
|
3
3
|
* http://miromannino.github.io/Justified-Gallery/
|
4
|
-
* Copyright (c)
|
4
|
+
* Copyright (c) 2020 Miro Mannino
|
5
5
|
* Licensed under the MIT license.
|
6
6
|
*/
|
7
|
+
|
7
8
|
.justified-gallery {
|
8
9
|
width: 100%;
|
9
10
|
position: relative;
|
@@ -42,9 +43,9 @@
|
|
42
43
|
filter: "alpha(opacity=0)";
|
43
44
|
opacity: 0;
|
44
45
|
}
|
45
|
-
.justified-gallery > a > .caption,
|
46
|
-
.justified-gallery > div > .caption,
|
47
|
-
.justified-gallery > figure > .caption {
|
46
|
+
.justified-gallery > a > .jg-caption,
|
47
|
+
.justified-gallery > div > .jg-caption,
|
48
|
+
.justified-gallery > figure > .jg-caption {
|
48
49
|
display: none;
|
49
50
|
position: absolute;
|
50
51
|
bottom: 0;
|
@@ -58,9 +59,9 @@
|
|
58
59
|
font-weight: 300;
|
59
60
|
font-family: sans-serif;
|
60
61
|
}
|
61
|
-
.justified-gallery > a > .caption.caption-visible,
|
62
|
-
.justified-gallery > div > .caption.caption-visible,
|
63
|
-
.justified-gallery > figure > .caption.caption-visible {
|
62
|
+
.justified-gallery > a > .jg-caption.jg-caption-visible,
|
63
|
+
.justified-gallery > div > .jg-caption.jg-caption-visible,
|
64
|
+
.justified-gallery > figure > .jg-caption.jg-caption-visible {
|
64
65
|
display: initial;
|
65
66
|
filter: "alpha(opacity=70)";
|
66
67
|
opacity: 0.7;
|
@@ -88,7 +89,7 @@
|
|
88
89
|
.justified-gallery > .jg-filtered {
|
89
90
|
display: none;
|
90
91
|
}
|
91
|
-
.justified-gallery > .spinner {
|
92
|
+
.justified-gallery > .jg-spinner {
|
92
93
|
position: absolute;
|
93
94
|
bottom: 0;
|
94
95
|
margin-left: -24px;
|
@@ -98,7 +99,7 @@
|
|
98
99
|
opacity: 1;
|
99
100
|
overflow: initial;
|
100
101
|
}
|
101
|
-
.justified-gallery > .spinner > span {
|
102
|
+
.justified-gallery > .jg-spinner > span {
|
102
103
|
display: inline-block;
|
103
104
|
filter: "alpha(opacity=0)";
|
104
105
|
opacity: 0;
|
@@ -1,110 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* justifiedGallery -
|
2
|
+
* justifiedGallery - v3.8.1
|
3
3
|
* http://miromannino.github.io/Justified-Gallery/
|
4
|
-
* Copyright (c)
|
4
|
+
* Copyright (c) 2020 Miro Mannino
|
5
5
|
* Licensed under the MIT license.
|
6
6
|
*/
|
7
|
-
.justified-gallery {
|
8
|
-
width: 100%;
|
9
|
-
position: relative;
|
10
|
-
overflow: hidden;
|
11
|
-
}
|
12
|
-
.justified-gallery > a,
|
13
|
-
.justified-gallery > div,
|
14
|
-
.justified-gallery > figure {
|
15
|
-
position: absolute;
|
16
|
-
display: inline-block;
|
17
|
-
overflow: hidden;
|
18
|
-
/* background: #888888; To have gray placeholders while the gallery is loading with waitThumbnailsLoad = false */
|
19
|
-
filter: "alpha(opacity=10)";
|
20
|
-
opacity: 0.1;
|
21
|
-
margin: 0;
|
22
|
-
padding: 0;
|
23
|
-
}
|
24
|
-
.justified-gallery > a > img,
|
25
|
-
.justified-gallery > div > img,
|
26
|
-
.justified-gallery > figure > img,
|
27
|
-
.justified-gallery > a > a > img,
|
28
|
-
.justified-gallery > div > a > img,
|
29
|
-
.justified-gallery > figure > a > img,
|
30
|
-
.justified-gallery > a > svg,
|
31
|
-
.justified-gallery > div > svg,
|
32
|
-
.justified-gallery > figure > svg,
|
33
|
-
.justified-gallery > a > a > svg,
|
34
|
-
.justified-gallery > div > a > svg,
|
35
|
-
.justified-gallery > figure > a > svg {
|
36
|
-
position: absolute;
|
37
|
-
top: 50%;
|
38
|
-
left: 50%;
|
39
|
-
margin: 0;
|
40
|
-
padding: 0;
|
41
|
-
border: none;
|
42
|
-
filter: "alpha(opacity=0)";
|
43
|
-
opacity: 0;
|
44
|
-
}
|
45
|
-
.justified-gallery > a > .caption,
|
46
|
-
.justified-gallery > div > .caption,
|
47
|
-
.justified-gallery > figure > .caption {
|
48
|
-
display: none;
|
49
|
-
position: absolute;
|
50
|
-
bottom: 0;
|
51
|
-
padding: 5px;
|
52
|
-
background-color: #000000;
|
53
|
-
left: 0;
|
54
|
-
right: 0;
|
55
|
-
margin: 0;
|
56
|
-
color: white;
|
57
|
-
font-size: 12px;
|
58
|
-
font-weight: 300;
|
59
|
-
font-family: sans-serif;
|
60
|
-
}
|
61
|
-
.justified-gallery > a > .caption.caption-visible,
|
62
|
-
.justified-gallery > div > .caption.caption-visible,
|
63
|
-
.justified-gallery > figure > .caption.caption-visible {
|
64
|
-
display: initial;
|
65
|
-
filter: "alpha(opacity=70)";
|
66
|
-
opacity: 0.7;
|
67
|
-
-webkit-transition: opacity 500ms ease-in;
|
68
|
-
-moz-transition: opacity 500ms ease-in;
|
69
|
-
-o-transition: opacity 500ms ease-in;
|
70
|
-
transition: opacity 500ms ease-in;
|
71
|
-
}
|
72
|
-
.justified-gallery > .jg-entry-visible {
|
73
|
-
filter: "alpha(opacity=100)";
|
74
|
-
opacity: 1;
|
75
|
-
background: none;
|
76
|
-
}
|
77
|
-
.justified-gallery > .jg-entry-visible > img,
|
78
|
-
.justified-gallery > .jg-entry-visible > a > img,
|
79
|
-
.justified-gallery > .jg-entry-visible > svg,
|
80
|
-
.justified-gallery > .jg-entry-visible > a > svg {
|
81
|
-
filter: "alpha(opacity=100)";
|
82
|
-
opacity: 1;
|
83
|
-
-webkit-transition: opacity 500ms ease-in;
|
84
|
-
-moz-transition: opacity 500ms ease-in;
|
85
|
-
-o-transition: opacity 500ms ease-in;
|
86
|
-
transition: opacity 500ms ease-in;
|
87
|
-
}
|
88
|
-
.justified-gallery > .jg-filtered {
|
89
|
-
display: none;
|
90
|
-
}
|
91
|
-
.justified-gallery > .spinner {
|
92
|
-
position: absolute;
|
93
|
-
bottom: 0;
|
94
|
-
margin-left: -24px;
|
95
|
-
padding: 10px 0 10px 0;
|
96
|
-
left: 50%;
|
97
|
-
filter: "alpha(opacity=100)";
|
98
|
-
opacity: 1;
|
99
|
-
overflow: initial;
|
100
|
-
}
|
101
|
-
.justified-gallery > .spinner > span {
|
102
|
-
display: inline-block;
|
103
|
-
filter: "alpha(opacity=0)";
|
104
|
-
opacity: 0;
|
105
|
-
width: 8px;
|
106
|
-
height: 8px;
|
107
|
-
margin: 0 4px 0 4px;
|
108
|
-
background-color: #000;
|
109
|
-
border-radius: 6px;
|
110
|
-
}
|
7
|
+
.justified-gallery{width:100%;position:relative;overflow:hidden}.justified-gallery>a,.justified-gallery>div,.justified-gallery>figure{position:absolute;display:inline-block;overflow:hidden;filter:"alpha(opacity=10)";opacity:.1;margin:0;padding:0}.justified-gallery>a>img,.justified-gallery>div>img,.justified-gallery>figure>img,.justified-gallery>a>a>img,.justified-gallery>div>a>img,.justified-gallery>figure>a>img,.justified-gallery>a>svg,.justified-gallery>div>svg,.justified-gallery>figure>svg,.justified-gallery>a>a>svg,.justified-gallery>div>a>svg,.justified-gallery>figure>a>svg{position:absolute;top:50%;left:50%;margin:0;padding:0;border:0;filter:"alpha(opacity=0)";opacity:0}.justified-gallery>a>.jg-caption,.justified-gallery>div>.jg-caption,.justified-gallery>figure>.jg-caption{display:none;position:absolute;bottom:0;padding:5px;background-color:#000;left:0;right:0;margin:0;color:white;font-size:12px;font-weight:300;font-family:sans-serif}.justified-gallery>a>.jg-caption.jg-caption-visible,.justified-gallery>div>.jg-caption.jg-caption-visible,.justified-gallery>figure>.jg-caption.jg-caption-visible{display:initial;filter:"alpha(opacity=70)";opacity:.7;-webkit-transition:opacity 500ms ease-in;-moz-transition:opacity 500ms ease-in;-o-transition:opacity 500ms ease-in;transition:opacity 500ms ease-in}.justified-gallery>.jg-entry-visible{filter:"alpha(opacity=100)";opacity:1;background:0}.justified-gallery>.jg-entry-visible>img,.justified-gallery>.jg-entry-visible>a>img,.justified-gallery>.jg-entry-visible>svg,.justified-gallery>.jg-entry-visible>a>svg{filter:"alpha(opacity=100)";opacity:1;-webkit-transition:opacity 500ms ease-in;-moz-transition:opacity 500ms ease-in;-o-transition:opacity 500ms ease-in;transition:opacity 500ms ease-in}.justified-gallery>.jg-filtered{display:none}.justified-gallery>.jg-spinner{position:absolute;bottom:0;margin-left:-24px;padding:10px 0 10px 0;left:50%;filter:"alpha(opacity=100)";opacity:1;overflow:initial}.justified-gallery>.jg-spinner>span{display:inline-block;filter:"alpha(opacity=0)";opacity:0;width:8px;height:8px;margin:0 4px 0 4px;background-color:#000;border-radius:6px}
|
@@ -1,9 +1,10 @@
|
|
1
1
|
/*!
|
2
|
-
* justifiedGallery -
|
2
|
+
* justifiedGallery - v3.8.1
|
3
3
|
* http://miromannino.github.io/Justified-Gallery/
|
4
|
-
* Copyright (c)
|
4
|
+
* Copyright (c) 2020 Miro Mannino
|
5
5
|
* Licensed under the MIT license.
|
6
6
|
*/
|
7
|
+
|
7
8
|
(function (factory) {
|
8
9
|
if (typeof define === 'function' && define.amd) {
|
9
10
|
// AMD. Register as an anonymous module.
|
@@ -40,10 +41,10 @@
|
|
40
41
|
* @constructor
|
41
42
|
*/
|
42
43
|
var JustifiedGallery = function ($gallery, settings) {
|
43
|
-
|
44
|
+
|
44
45
|
this.settings = settings;
|
45
46
|
this.checkSettings();
|
46
|
-
|
47
|
+
|
47
48
|
this.imgAnalyzerTimeout = null;
|
48
49
|
this.entries = null;
|
49
50
|
this.buildingRow = {
|
@@ -73,9 +74,9 @@
|
|
73
74
|
this.checkWidthIntervalId = null;
|
74
75
|
this.galleryWidth = $gallery.width();
|
75
76
|
this.$gallery = $gallery;
|
76
|
-
|
77
|
+
|
77
78
|
};
|
78
|
-
|
79
|
+
|
79
80
|
/** @returns {String} the best suffix given the width and the height */
|
80
81
|
JustifiedGallery.prototype.getSuffix = function (width, height) {
|
81
82
|
var longestSide, i;
|
@@ -87,7 +88,7 @@
|
|
87
88
|
}
|
88
89
|
return this.settings.sizeRangeSuffixes[this.suffixRanges[i - 1]];
|
89
90
|
};
|
90
|
-
|
91
|
+
|
91
92
|
/**
|
92
93
|
* Remove the suffix from the string
|
93
94
|
*
|
@@ -96,14 +97,14 @@
|
|
96
97
|
JustifiedGallery.prototype.removeSuffix = function (str, suffix) {
|
97
98
|
return str.substring(0, str.length - suffix.length);
|
98
99
|
};
|
99
|
-
|
100
|
+
|
100
101
|
/**
|
101
102
|
* @returns {boolean} a boolean to say if the suffix is contained in the str or not
|
102
103
|
*/
|
103
104
|
JustifiedGallery.prototype.endsWith = function (str, suffix) {
|
104
105
|
return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
105
106
|
};
|
106
|
-
|
107
|
+
|
107
108
|
/**
|
108
109
|
* Get the used suffix of a particular url
|
109
110
|
*
|
@@ -119,7 +120,7 @@
|
|
119
120
|
}
|
120
121
|
return '';
|
121
122
|
};
|
122
|
-
|
123
|
+
|
123
124
|
/**
|
124
125
|
* Given an image src, with the width and the height, returns the new image src with the
|
125
126
|
* best suffix to show the best quality thumbnail.
|
@@ -128,7 +129,7 @@
|
|
128
129
|
*/
|
129
130
|
JustifiedGallery.prototype.newSrc = function (imageSrc, imgWidth, imgHeight, image) {
|
130
131
|
var newImageSrc;
|
131
|
-
|
132
|
+
|
132
133
|
if (this.settings.thumbnailPath) {
|
133
134
|
newImageSrc = this.settings.thumbnailPath(imageSrc, imgWidth, imgHeight, image);
|
134
135
|
} else {
|
@@ -138,10 +139,10 @@
|
|
138
139
|
newImageSrc = this.removeSuffix(newImageSrc, this.getUsedSuffix(newImageSrc));
|
139
140
|
newImageSrc += this.getSuffix(imgWidth, imgHeight) + ext;
|
140
141
|
}
|
141
|
-
|
142
|
+
|
142
143
|
return newImageSrc;
|
143
144
|
};
|
144
|
-
|
145
|
+
|
145
146
|
/**
|
146
147
|
* Shows the images that is in the given entry
|
147
148
|
*
|
@@ -157,7 +158,7 @@
|
|
157
158
|
$entry.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration, 1.0, callback);
|
158
159
|
}
|
159
160
|
};
|
160
|
-
|
161
|
+
|
161
162
|
/**
|
162
163
|
* Extract the image src form the image, looking from the 'safe-src', and if it can't be found, from the
|
163
164
|
* 'src' attribute. It saves in the image data the 'jg.originalSrc' field, with the extracted src.
|
@@ -177,19 +178,19 @@
|
|
177
178
|
$image.data('jg.originalSrcLoc', imageSrcLoc); // this is saved for the destroy method
|
178
179
|
return imageSrc;
|
179
180
|
};
|
180
|
-
|
181
|
+
|
181
182
|
/** @returns {jQuery} the image in the given entry */
|
182
183
|
JustifiedGallery.prototype.imgFromEntry = function ($entry) {
|
183
184
|
var $img = $entry.find(this.settings.imgSelector);
|
184
185
|
return $img.length === 0 ? null : $img;
|
185
186
|
};
|
186
|
-
|
187
|
+
|
187
188
|
/** @returns {jQuery} the caption in the given entry */
|
188
189
|
JustifiedGallery.prototype.captionFromEntry = function ($entry) {
|
189
190
|
var $caption = $entry.find('> .caption');
|
190
191
|
return $caption.length === 0 ? null : $caption;
|
191
192
|
};
|
192
|
-
|
193
|
+
|
193
194
|
/**
|
194
195
|
* Display the entry
|
195
196
|
*
|
@@ -205,29 +206,29 @@
|
|
205
206
|
$entry.height(rowHeight);
|
206
207
|
$entry.css('top', y);
|
207
208
|
$entry.css('left', x);
|
208
|
-
|
209
|
+
|
209
210
|
var $image = this.imgFromEntry($entry);
|
210
211
|
if ($image !== null) {
|
211
212
|
$image.css('width', imgWidth);
|
212
213
|
$image.css('height', imgHeight);
|
213
214
|
$image.css('margin-left', - imgWidth / 2);
|
214
215
|
$image.css('margin-top', - imgHeight / 2);
|
215
|
-
|
216
|
+
|
216
217
|
// Image reloading for an high quality of thumbnails
|
217
218
|
var imageSrc = $image.data('jg.src');
|
218
219
|
if (imageSrc) {
|
219
220
|
imageSrc = this.newSrc(imageSrc, imgWidth, imgHeight, $image[0]);
|
220
|
-
|
221
|
+
|
221
222
|
$image.one('error', function () {
|
222
223
|
this.resetImgSrc($image); //revert to the original thumbnail
|
223
224
|
});
|
224
|
-
|
225
|
+
|
225
226
|
var loadNewImage = function () {
|
226
|
-
// if (imageSrc !== newImageSrc) {
|
227
|
+
// if (imageSrc !== newImageSrc) {
|
227
228
|
$image.attr('src', imageSrc);
|
228
229
|
// }
|
229
230
|
};
|
230
|
-
|
231
|
+
|
231
232
|
if ($entry.data('jg.loaded') === 'skipped') {
|
232
233
|
this.onImageEvent(imageSrc, (function() {
|
233
234
|
this.showImg($entry, loadNewImage); //load the new image after the fadeIn
|
@@ -236,16 +237,16 @@
|
|
236
237
|
} else {
|
237
238
|
this.showImg($entry, loadNewImage); //load the new image after the fadeIn
|
238
239
|
}
|
239
|
-
|
240
|
+
|
240
241
|
}
|
241
|
-
|
242
|
+
|
242
243
|
} else {
|
243
244
|
this.showImg($entry);
|
244
245
|
}
|
245
|
-
|
246
|
+
|
246
247
|
this.displayEntryCaption($entry);
|
247
248
|
};
|
248
|
-
|
249
|
+
|
249
250
|
/**
|
250
251
|
* Display the entry caption. If the caption element doesn't exists, it creates the caption using the 'alt'
|
251
252
|
* or the 'title' attributes.
|
@@ -256,7 +257,7 @@
|
|
256
257
|
var $image = this.imgFromEntry($entry);
|
257
258
|
if ($image !== null && this.settings.captions) {
|
258
259
|
var $imgCaption = this.captionFromEntry($entry);
|
259
|
-
|
260
|
+
|
260
261
|
// Create it if it doesn't exists
|
261
262
|
if ($imgCaption === null) {
|
262
263
|
var caption = $image.attr('alt');
|
@@ -267,7 +268,7 @@
|
|
267
268
|
$entry.data('jg.createdCaption', true);
|
268
269
|
}
|
269
270
|
}
|
270
|
-
|
271
|
+
|
271
272
|
// Create events (we check again the $imgCaption because it can be still inexistent)
|
272
273
|
if ($imgCaption !== null) {
|
273
274
|
if (!this.settings.cssAnimation) $imgCaption.stop().fadeTo(0, this.settings.captionSettings.nonVisibleOpacity);
|
@@ -277,7 +278,7 @@
|
|
277
278
|
this.removeCaptionEventsHandlers($entry);
|
278
279
|
}
|
279
280
|
};
|
280
|
-
|
281
|
+
|
281
282
|
/**
|
282
283
|
* Validates the caption
|
283
284
|
*
|
@@ -287,7 +288,7 @@
|
|
287
288
|
JustifiedGallery.prototype.isValidCaption = function (caption) {
|
288
289
|
return (typeof caption !== 'undefined' && caption.length > 0);
|
289
290
|
};
|
290
|
-
|
291
|
+
|
291
292
|
/**
|
292
293
|
* The callback for the event 'mouseenter'. It assumes that the event currentTarget is an entry.
|
293
294
|
* It shows the caption using jQuery (or using CSS if it is configured so)
|
@@ -303,7 +304,7 @@
|
|
303
304
|
this.settings.captionSettings.visibleOpacity);
|
304
305
|
}
|
305
306
|
};
|
306
|
-
|
307
|
+
|
307
308
|
/**
|
308
309
|
* The callback for the event 'mouseleave'. It assumes that the event currentTarget is an entry.
|
309
310
|
* It hides the caption using jQuery (or using CSS if it is configured so)
|
@@ -319,7 +320,7 @@
|
|
319
320
|
this.settings.captionSettings.nonVisibleOpacity);
|
320
321
|
}
|
321
322
|
};
|
322
|
-
|
323
|
+
|
323
324
|
/**
|
324
325
|
* Add the handlers of the entry for the caption
|
325
326
|
*
|
@@ -337,7 +338,7 @@
|
|
337
338
|
$entry.data('jg.captionMouseEvents', captionMouseEvents);
|
338
339
|
}
|
339
340
|
};
|
340
|
-
|
341
|
+
|
341
342
|
/**
|
342
343
|
* Remove the handlers of the entry for the caption
|
343
344
|
*
|
@@ -351,7 +352,7 @@
|
|
351
352
|
$entry.removeData('jg.captionMouseEvents');
|
352
353
|
}
|
353
354
|
};
|
354
|
-
|
355
|
+
|
355
356
|
/**
|
356
357
|
* Clear the building row data to be used for a new row
|
357
358
|
*/
|
@@ -360,7 +361,7 @@
|
|
360
361
|
this.buildingRow.aspectRatio = 0;
|
361
362
|
this.buildingRow.width = 0;
|
362
363
|
};
|
363
|
-
|
364
|
+
|
364
365
|
/**
|
365
366
|
* Justify the building row, preparing it to
|
366
367
|
*
|
@@ -375,7 +376,7 @@
|
|
375
376
|
var rowHeight = availableWidth / this.buildingRow.aspectRatio;
|
376
377
|
var defaultRowHeight = this.settings.rowHeight;
|
377
378
|
var justifiable = this.buildingRow.width / availableWidth > this.settings.justifyThreshold;
|
378
|
-
|
379
|
+
|
379
380
|
//Skip the last row if we can't justify it and the lastRow == 'hide'
|
380
381
|
if (isLastRow && this.settings.lastRow === 'hide' && !justifiable) {
|
381
382
|
for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
|
@@ -389,21 +390,21 @@
|
|
389
390
|
}
|
390
391
|
return -1;
|
391
392
|
}
|
392
|
-
|
393
|
+
|
393
394
|
// With lastRow = nojustify, justify if is justificable (the images will not become too big)
|
394
395
|
if (isLastRow && !justifiable && this.settings.lastRow !== 'justify' && this.settings.lastRow !== 'hide') {
|
395
396
|
justify = false;
|
396
|
-
|
397
|
+
|
397
398
|
if (this.rows > 0) {
|
398
399
|
defaultRowHeight = (this.offY - this.border - this.settings.margins * this.rows) / this.rows;
|
399
400
|
justify = defaultRowHeight * this.buildingRow.aspectRatio / availableWidth > this.settings.justifyThreshold;
|
400
401
|
}
|
401
402
|
}
|
402
|
-
|
403
|
+
|
403
404
|
for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
|
404
405
|
$entry = this.buildingRow.entriesBuff[i];
|
405
406
|
imgAspectRatio = $entry.data('jg.width') / $entry.data('jg.height');
|
406
|
-
|
407
|
+
|
407
408
|
if (justify) {
|
408
409
|
newImgW = (i === this.buildingRow.entriesBuff.length - 1) ? availableWidth : rowHeight * imgAspectRatio;
|
409
410
|
newImgH = rowHeight;
|
@@ -411,17 +412,17 @@
|
|
411
412
|
newImgW = defaultRowHeight * imgAspectRatio;
|
412
413
|
newImgH = defaultRowHeight;
|
413
414
|
}
|
414
|
-
|
415
|
+
|
415
416
|
availableWidth -= Math.round(newImgW);
|
416
417
|
$entry.data('jg.jwidth', Math.round(newImgW));
|
417
418
|
$entry.data('jg.jheight', Math.ceil(newImgH));
|
418
419
|
if (i === 0 || minHeight > newImgH) minHeight = newImgH;
|
419
420
|
}
|
420
|
-
|
421
|
+
|
421
422
|
this.buildingRow.height = minHeight;
|
422
423
|
return justify;
|
423
424
|
};
|
424
|
-
|
425
|
+
|
425
426
|
/**
|
426
427
|
* Flush a row: justify it, modify the gallery height accordingly to the row height
|
427
428
|
*
|
@@ -430,43 +431,43 @@
|
|
430
431
|
JustifiedGallery.prototype.flushRow = function (isLastRow) {
|
431
432
|
var settings = this.settings;
|
432
433
|
var $entry, buildingRowRes, offX = this.border, i;
|
433
|
-
|
434
|
+
|
434
435
|
buildingRowRes = this.prepareBuildingRow(isLastRow);
|
435
436
|
if (isLastRow && settings.lastRow === 'hide' && buildingRowRes === -1) {
|
436
437
|
this.clearBuildingRow();
|
437
438
|
return;
|
438
439
|
}
|
439
|
-
|
440
|
+
|
440
441
|
if(this.maxRowHeight) {
|
441
442
|
if(this.maxRowHeight < this.buildingRow.height) this.buildingRow.height = this.maxRowHeight;
|
442
443
|
}
|
443
|
-
|
444
|
+
|
444
445
|
//Align last (unjustified) row
|
445
446
|
if (isLastRow && (settings.lastRow === 'center' || settings.lastRow === 'right')) {
|
446
447
|
var availableWidth = this.galleryWidth - 2 * this.border - (this.buildingRow.entriesBuff.length - 1) * settings.margins;
|
447
|
-
|
448
|
+
|
448
449
|
for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
|
449
450
|
$entry = this.buildingRow.entriesBuff[i];
|
450
451
|
availableWidth -= $entry.data('jg.jwidth');
|
451
452
|
}
|
452
|
-
|
453
|
+
|
453
454
|
if (settings.lastRow === 'center')
|
454
455
|
offX += availableWidth / 2;
|
455
456
|
else if (settings.lastRow === 'right')
|
456
457
|
offX += availableWidth;
|
457
458
|
}
|
458
|
-
|
459
|
+
|
459
460
|
var lastEntryIdx = this.buildingRow.entriesBuff.length - 1;
|
460
461
|
for (i = 0; i <= lastEntryIdx; i++) {
|
461
462
|
$entry = this.buildingRow.entriesBuff[ this.settings.rtl ? lastEntryIdx - i : i ];
|
462
463
|
this.displayEntry($entry, offX, this.offY, $entry.data('jg.jwidth'), $entry.data('jg.jheight'), this.buildingRow.height);
|
463
464
|
offX += $entry.data('jg.jwidth') + settings.margins;
|
464
465
|
}
|
465
|
-
|
466
|
+
|
466
467
|
//Gallery Height
|
467
468
|
this.galleryHeightToSet = this.offY + this.buildingRow.height + this.border;
|
468
469
|
this.setGalleryTempHeight(this.galleryHeightToSet + this.getSpinnerHeight());
|
469
|
-
|
470
|
+
|
470
471
|
if (!isLastRow || (this.buildingRow.height <= settings.rowHeight && buildingRowRes)) {
|
471
472
|
//Ready for a new row
|
472
473
|
this.offY += this.buildingRow.height + settings.margins;
|
@@ -475,63 +476,63 @@
|
|
475
476
|
this.settings.triggerEvent.call(this, 'jg.rowflush');
|
476
477
|
}
|
477
478
|
};
|
478
|
-
|
479
|
-
|
479
|
+
|
480
|
+
|
480
481
|
// Scroll position not restoring: https://github.com/miromannino/Justified-Gallery/issues/221
|
481
482
|
var galleryPrevStaticHeight = 0;
|
482
|
-
|
483
|
+
|
483
484
|
JustifiedGallery.prototype.rememberGalleryHeight = function () {
|
484
485
|
galleryPrevStaticHeight = this.$gallery.height();
|
485
486
|
this.$gallery.height(galleryPrevStaticHeight);
|
486
487
|
};
|
487
|
-
|
488
|
+
|
488
489
|
// grow only
|
489
490
|
JustifiedGallery.prototype.setGalleryTempHeight = function (height) {
|
490
491
|
galleryPrevStaticHeight = Math.max(height, galleryPrevStaticHeight);
|
491
492
|
this.$gallery.height(galleryPrevStaticHeight);
|
492
493
|
};
|
493
|
-
|
494
|
+
|
494
495
|
JustifiedGallery.prototype.setGalleryFinalHeight = function (height) {
|
495
496
|
galleryPrevStaticHeight = height;
|
496
497
|
this.$gallery.height(height);
|
497
498
|
};
|
498
|
-
|
499
|
+
|
499
500
|
/**
|
500
501
|
* Checks the width of the gallery container, to know if a new justification is needed
|
501
502
|
*/
|
502
503
|
JustifiedGallery.prototype.checkWidth = function () {
|
503
504
|
this.checkWidthIntervalId = setInterval($.proxy(function () {
|
504
|
-
|
505
|
+
|
505
506
|
// if the gallery is not currently visible, abort.
|
506
507
|
if (!this.$gallery.is(":visible")) return;
|
507
|
-
|
508
|
+
|
508
509
|
var galleryWidth = parseFloat(this.$gallery.width());
|
509
510
|
if (Math.abs(galleryWidth - this.galleryWidth) > this.settings.refreshSensitivity) {
|
510
511
|
this.galleryWidth = galleryWidth;
|
511
512
|
this.rewind();
|
512
|
-
|
513
|
+
|
513
514
|
this.rememberGalleryHeight();
|
514
|
-
|
515
|
+
|
515
516
|
// Restart to analyze
|
516
517
|
this.startImgAnalyzer(true);
|
517
518
|
}
|
518
519
|
}, this), this.settings.refreshTime);
|
519
520
|
};
|
520
|
-
|
521
|
+
|
521
522
|
/**
|
522
523
|
* @returns {boolean} a boolean saying if the spinner is active or not
|
523
524
|
*/
|
524
525
|
JustifiedGallery.prototype.isSpinnerActive = function () {
|
525
526
|
return this.spinner.intervalId !== null;
|
526
527
|
};
|
527
|
-
|
528
|
+
|
528
529
|
/**
|
529
530
|
* @returns {int} the spinner height
|
530
531
|
*/
|
531
532
|
JustifiedGallery.prototype.getSpinnerHeight = function () {
|
532
533
|
return this.spinner.$el.innerHeight();
|
533
534
|
};
|
534
|
-
|
535
|
+
|
535
536
|
/**
|
536
537
|
* Stops the spinner animation and modify the gallery height to exclude the spinner
|
537
538
|
*/
|
@@ -541,7 +542,7 @@
|
|
541
542
|
this.setGalleryTempHeight(this.$gallery.height() - this.getSpinnerHeight());
|
542
543
|
this.spinner.$el.detach();
|
543
544
|
};
|
544
|
-
|
545
|
+
|
545
546
|
/**
|
546
547
|
* Starts the spinner animation
|
547
548
|
*/
|
@@ -560,7 +561,7 @@
|
|
560
561
|
spinnerContext.phase = (spinnerContext.phase + 1) % ($spinnerPoints.length * 2);
|
561
562
|
}, spinnerContext.timeSlot);
|
562
563
|
};
|
563
|
-
|
564
|
+
|
564
565
|
/**
|
565
566
|
* Rewind the image analysis to start from the first entry.
|
566
567
|
*/
|
@@ -571,14 +572,14 @@
|
|
571
572
|
this.rows = 0;
|
572
573
|
this.clearBuildingRow();
|
573
574
|
};
|
574
|
-
|
575
|
+
|
575
576
|
/**
|
576
577
|
* @returns {Array} all entries matched by `settings.selector`
|
577
578
|
*/
|
578
579
|
JustifiedGallery.prototype.getAllEntries = function () {
|
579
580
|
return this.$gallery.children(this.settings.selector).toArray();
|
580
581
|
};
|
581
|
-
|
582
|
+
|
582
583
|
/**
|
583
584
|
* Update the entries searching it from the justified gallery HTML element
|
584
585
|
*
|
@@ -587,16 +588,16 @@
|
|
587
588
|
*/
|
588
589
|
JustifiedGallery.prototype.updateEntries = function (norewind) {
|
589
590
|
var newEntries;
|
590
|
-
|
591
|
+
|
591
592
|
if (norewind && this.lastFetchedEntry != null) {
|
592
593
|
newEntries = $(this.lastFetchedEntry).nextAll(this.settings.selector).toArray();
|
593
594
|
} else {
|
594
595
|
this.entries = [];
|
595
596
|
newEntries = this.getAllEntries();
|
596
597
|
}
|
597
|
-
|
598
|
+
|
598
599
|
if (newEntries.length > 0) {
|
599
|
-
|
600
|
+
|
600
601
|
// Sort or randomize
|
601
602
|
if ($.isFunction(this.settings.sort)) {
|
602
603
|
newEntries = this.sortArray(newEntries);
|
@@ -604,20 +605,20 @@
|
|
604
605
|
newEntries = this.shuffleArray(newEntries);
|
605
606
|
}
|
606
607
|
this.lastFetchedEntry = newEntries[newEntries.length - 1];
|
607
|
-
|
608
|
+
|
608
609
|
// Filter
|
609
610
|
if (this.settings.filter) {
|
610
611
|
newEntries = this.filterArray(newEntries);
|
611
612
|
} else {
|
612
613
|
this.resetFilters(newEntries);
|
613
614
|
}
|
614
|
-
|
615
|
+
|
615
616
|
}
|
616
|
-
|
617
|
+
|
617
618
|
this.entries = this.entries.concat(newEntries);
|
618
619
|
return true;
|
619
620
|
};
|
620
|
-
|
621
|
+
|
621
622
|
/**
|
622
623
|
* Apply the entries order to the DOM, iterating the entries and appending the images
|
623
624
|
*
|
@@ -629,7 +630,7 @@
|
|
629
630
|
$(this).appendTo(that.$gallery);
|
630
631
|
});
|
631
632
|
};
|
632
|
-
|
633
|
+
|
633
634
|
/**
|
634
635
|
* Shuffle the array using the Fisher-Yates shuffle algorithm
|
635
636
|
*
|
@@ -647,7 +648,7 @@
|
|
647
648
|
this.insertToGallery(a);
|
648
649
|
return a;
|
649
650
|
};
|
650
|
-
|
651
|
+
|
651
652
|
/**
|
652
653
|
* Sort the array using settings.comparator as comparator
|
653
654
|
*
|
@@ -659,7 +660,7 @@
|
|
659
660
|
this.insertToGallery(a);
|
660
661
|
return a;
|
661
662
|
};
|
662
|
-
|
663
|
+
|
663
664
|
/**
|
664
665
|
* Reset the filters removing the 'jg-filtered' class from all the entries
|
665
666
|
*
|
@@ -668,7 +669,7 @@
|
|
668
669
|
JustifiedGallery.prototype.resetFilters = function (a) {
|
669
670
|
for (var i = 0; i < a.length; i++) $(a[i]).removeClass('jg-filtered');
|
670
671
|
};
|
671
|
-
|
672
|
+
|
672
673
|
/**
|
673
674
|
* Filter the entries considering theirs classes (if a string has been passed) or using a function for filtering.
|
674
675
|
*
|
@@ -702,7 +703,7 @@
|
|
702
703
|
return filteredArr;
|
703
704
|
}
|
704
705
|
};
|
705
|
-
|
706
|
+
|
706
707
|
/**
|
707
708
|
* Revert the image src to the default value.
|
708
709
|
*/
|
@@ -713,7 +714,7 @@
|
|
713
714
|
$img.attr('src', '');
|
714
715
|
}
|
715
716
|
}
|
716
|
-
|
717
|
+
|
717
718
|
/**
|
718
719
|
* Destroy the Justified Gallery instance.
|
719
720
|
*
|
@@ -726,11 +727,11 @@
|
|
726
727
|
JustifiedGallery.prototype.destroy = function () {
|
727
728
|
clearInterval(this.checkWidthIntervalId);
|
728
729
|
this.stopImgAnalyzerStarter();
|
729
|
-
|
730
|
+
|
730
731
|
// Get fresh entries list since filtered entries are absent in `this.entries`
|
731
732
|
$.each(this.getAllEntries(), $.proxy(function(_, entry) {
|
732
733
|
var $entry = $(entry);
|
733
|
-
|
734
|
+
|
734
735
|
// Reset entry style
|
735
736
|
$entry.css('width', '');
|
736
737
|
$entry.css('height', '');
|
@@ -738,7 +739,7 @@
|
|
738
739
|
$entry.css('left', '');
|
739
740
|
$entry.data('jg.loaded', undefined);
|
740
741
|
$entry.removeClass('jg-entry jg-filtered jg-entry-visible');
|
741
|
-
|
742
|
+
|
742
743
|
// Reset image style
|
743
744
|
var $img = this.imgFromEntry($entry);
|
744
745
|
if ($img) {
|
@@ -751,7 +752,7 @@
|
|
751
752
|
$img.data('jg.originalSrcLoc', undefined);
|
752
753
|
$img.data('jg.src', undefined);
|
753
754
|
}
|
754
|
-
|
755
|
+
|
755
756
|
// Remove caption
|
756
757
|
this.removeCaptionEventsHandlers($entry);
|
757
758
|
var $caption = this.captionFromEntry($entry);
|
@@ -762,15 +763,15 @@
|
|
762
763
|
} else {
|
763
764
|
if ($caption !== null) $caption.fadeTo(0, 1);
|
764
765
|
}
|
765
|
-
|
766
|
+
|
766
767
|
}, this));
|
767
|
-
|
768
|
+
|
768
769
|
this.$gallery.css('height', '');
|
769
770
|
this.$gallery.removeClass('justified-gallery');
|
770
771
|
this.$gallery.data('jg.controller', undefined);
|
771
772
|
this.settings.triggerEvent.call(this, 'jg.destroy');
|
772
773
|
};
|
773
|
-
|
774
|
+
|
774
775
|
/**
|
775
776
|
* Analyze the images and builds the rows. It returns if it found an image that is not loaded.
|
776
777
|
*
|
@@ -783,15 +784,15 @@
|
|
783
784
|
var availableWidth = this.galleryWidth - 2 * this.border - (
|
784
785
|
(this.buildingRow.entriesBuff.length - 1) * this.settings.margins);
|
785
786
|
var imgAspectRatio = $entry.data('jg.width') / $entry.data('jg.height');
|
786
|
-
|
787
|
+
|
787
788
|
this.buildingRow.entriesBuff.push($entry);
|
788
789
|
this.buildingRow.aspectRatio += imgAspectRatio;
|
789
790
|
this.buildingRow.width += imgAspectRatio * this.settings.rowHeight;
|
790
791
|
this.lastAnalyzedIndex = i;
|
791
|
-
|
792
|
+
|
792
793
|
if (availableWidth / (this.buildingRow.aspectRatio + imgAspectRatio) < this.settings.rowHeight) {
|
793
794
|
this.flushRow(false);
|
794
|
-
|
795
|
+
|
795
796
|
if(++this.yield.flushed >= this.yield.every) {
|
796
797
|
this.startImgAnalyzer(isForResize);
|
797
798
|
return;
|
@@ -801,25 +802,25 @@
|
|
801
802
|
return;
|
802
803
|
}
|
803
804
|
}
|
804
|
-
|
805
|
+
|
805
806
|
// Last row flush (the row is not full)
|
806
807
|
if (this.buildingRow.entriesBuff.length > 0) this.flushRow(true);
|
807
|
-
|
808
|
+
|
808
809
|
if (this.isSpinnerActive()) {
|
809
810
|
this.stopLoadingSpinnerAnimation();
|
810
811
|
}
|
811
|
-
|
812
|
+
|
812
813
|
/* Stop, if there is, the timeout to start the analyzeImages.
|
813
814
|
This is because an image can be set loaded, and the timeout can be set,
|
814
815
|
but this image can be analyzed yet.
|
815
816
|
*/
|
816
817
|
this.stopImgAnalyzerStarter();
|
817
|
-
|
818
|
+
|
818
819
|
//On complete callback
|
819
820
|
this.settings.triggerEvent.call(this, isForResize ? 'jg.resize' : 'jg.complete');
|
820
821
|
this.setGalleryFinalHeight(this.galleryHeightToSet);
|
821
822
|
};
|
822
|
-
|
823
|
+
|
823
824
|
/**
|
824
825
|
* Stops any ImgAnalyzer starter (that has an assigned timeout)
|
825
826
|
*/
|
@@ -830,7 +831,7 @@
|
|
830
831
|
this.imgAnalyzerTimeout = null;
|
831
832
|
}
|
832
833
|
};
|
833
|
-
|
834
|
+
|
834
835
|
/**
|
835
836
|
* Starts the image analyzer. It is not immediately called to let the browser to update the view
|
836
837
|
*
|
@@ -843,7 +844,7 @@
|
|
843
844
|
that.analyzeImages(isForResize);
|
844
845
|
}, 0.001); // we can't start it immediately due to a IE different behaviour
|
845
846
|
};
|
846
|
-
|
847
|
+
|
847
848
|
/**
|
848
849
|
* Checks if the image is loaded or not using another image object. We cannot use the 'complete' image property,
|
849
850
|
* because some browsers, with a 404 set complete = true.
|
@@ -854,7 +855,7 @@
|
|
854
855
|
*/
|
855
856
|
JustifiedGallery.prototype.onImageEvent = function (imageSrc, onLoad, onError) {
|
856
857
|
if (!onLoad && !onError) return;
|
857
|
-
|
858
|
+
|
858
859
|
var memImage = new Image();
|
859
860
|
var $memImage = $(memImage);
|
860
861
|
if (onLoad) {
|
@@ -871,7 +872,7 @@
|
|
871
872
|
}
|
872
873
|
memImage.src = imageSrc;
|
873
874
|
};
|
874
|
-
|
875
|
+
|
875
876
|
/**
|
876
877
|
* Init of Justified Gallery controlled
|
877
878
|
* It analyzes all the entries starting theirs loading and calling the image analyzer (that works with loaded images)
|
@@ -881,23 +882,23 @@
|
|
881
882
|
$.each(this.entries, function (index, entry) {
|
882
883
|
var $entry = $(entry);
|
883
884
|
var $image = that.imgFromEntry($entry);
|
884
|
-
|
885
|
+
|
885
886
|
$entry.addClass('jg-entry');
|
886
|
-
|
887
|
+
|
887
888
|
if ($entry.data('jg.loaded') !== true && $entry.data('jg.loaded') !== 'skipped') {
|
888
|
-
|
889
|
+
|
889
890
|
// Link Rel global overwrite
|
890
891
|
if (that.settings.rel !== null) $entry.attr('rel', that.settings.rel);
|
891
|
-
|
892
|
+
|
892
893
|
// Link Target global overwrite
|
893
894
|
if (that.settings.target !== null) $entry.attr('target', that.settings.target);
|
894
|
-
|
895
|
+
|
895
896
|
if ($image !== null) {
|
896
|
-
|
897
|
+
|
897
898
|
// Image src
|
898
899
|
var imageSrc = that.extractImgSrcFromImage($image);
|
899
|
-
|
900
|
-
/* If we have the height and the width, we don't wait that the image is loaded,
|
900
|
+
|
901
|
+
/* If we have the height and the width, we don't wait that the image is loaded,
|
901
902
|
but we start directly with the justification */
|
902
903
|
if (that.settings.waitThumbnailsLoad === false || !imageSrc) {
|
903
904
|
var width = parseFloat($image.attr('width'));
|
@@ -915,13 +916,13 @@
|
|
915
916
|
return true; // continue
|
916
917
|
}
|
917
918
|
}
|
918
|
-
|
919
|
+
|
919
920
|
$entry.data('jg.loaded', false);
|
920
921
|
imagesToLoad = true;
|
921
|
-
|
922
|
+
|
922
923
|
// Spinner start
|
923
924
|
if (!that.isSpinnerActive()) that.startLoadingSpinnerAnimation();
|
924
|
-
|
925
|
+
|
925
926
|
that.onImageEvent(imageSrc, function (loadImg) { // image loaded
|
926
927
|
$entry.data('jg.width', loadImg.width);
|
927
928
|
$entry.data('jg.height', loadImg.height);
|
@@ -931,21 +932,21 @@
|
|
931
932
|
$entry.data('jg.loaded', 'error');
|
932
933
|
that.startImgAnalyzer(false);
|
933
934
|
});
|
934
|
-
|
935
|
+
|
935
936
|
} else {
|
936
937
|
$entry.data('jg.loaded', true);
|
937
938
|
$entry.data('jg.width', $entry.width() | parseFloat($entry.css('width')) | 1);
|
938
939
|
$entry.data('jg.height', $entry.height() | parseFloat($entry.css('height')) | 1);
|
939
940
|
}
|
940
|
-
|
941
|
+
|
941
942
|
}
|
942
|
-
|
943
|
+
|
943
944
|
});
|
944
|
-
|
945
|
+
|
945
946
|
if (!imagesToLoad && !skippedImages) this.startImgAnalyzer(false);
|
946
947
|
this.checkWidth();
|
947
948
|
};
|
948
|
-
|
949
|
+
|
949
950
|
/**
|
950
951
|
* Checks that it is a valid number. If a string is passed it is converted to a number
|
951
952
|
*
|
@@ -956,14 +957,14 @@
|
|
956
957
|
if ($.type(settingContainer[settingName]) === 'string') {
|
957
958
|
settingContainer[settingName] = parseFloat(settingContainer[settingName]);
|
958
959
|
}
|
959
|
-
|
960
|
+
|
960
961
|
if ($.type(settingContainer[settingName]) === 'number') {
|
961
962
|
if (isNaN(settingContainer[settingName])) throw 'invalid number for ' + settingName;
|
962
963
|
} else {
|
963
964
|
throw settingName + ' must be a number';
|
964
965
|
}
|
965
966
|
};
|
966
|
-
|
967
|
+
|
967
968
|
/**
|
968
969
|
* Checks the sizeRangeSuffixes and, if necessary, converts
|
969
970
|
* its keys from string (e.g. old settings with 'lt100') to int.
|
@@ -972,12 +973,12 @@
|
|
972
973
|
if ($.type(this.settings.sizeRangeSuffixes) !== 'object') {
|
973
974
|
throw 'sizeRangeSuffixes must be defined and must be an object';
|
974
975
|
}
|
975
|
-
|
976
|
+
|
976
977
|
var suffixRanges = [];
|
977
978
|
for (var rangeIdx in this.settings.sizeRangeSuffixes) {
|
978
979
|
if (this.settings.sizeRangeSuffixes.hasOwnProperty(rangeIdx)) suffixRanges.push(rangeIdx);
|
979
980
|
}
|
980
|
-
|
981
|
+
|
981
982
|
var newSizeRngSuffixes = {0: ''};
|
982
983
|
for (var i = 0; i < suffixRanges.length; i++) {
|
983
984
|
if ($.type(suffixRanges[i]) === 'string') {
|
@@ -991,10 +992,10 @@
|
|
991
992
|
newSizeRngSuffixes[suffixRanges[i]] = this.settings.sizeRangeSuffixes[suffixRanges[i]];
|
992
993
|
}
|
993
994
|
}
|
994
|
-
|
995
|
+
|
995
996
|
this.settings.sizeRangeSuffixes = newSizeRngSuffixes;
|
996
997
|
};
|
997
|
-
|
998
|
+
|
998
999
|
/**
|
999
1000
|
* check and convert the maxRowHeight setting
|
1000
1001
|
* requires rowHeight to be already set
|
@@ -1004,7 +1005,7 @@
|
|
1004
1005
|
JustifiedGallery.prototype.retrieveMaxRowHeight = function () {
|
1005
1006
|
var newMaxRowHeight = null;
|
1006
1007
|
var rowHeight = this.settings.rowHeight;
|
1007
|
-
|
1008
|
+
|
1008
1009
|
if ($.type(this.settings.maxRowHeight) === 'string') {
|
1009
1010
|
if (this.settings.maxRowHeight.match(/^[0-9]+%$/)) {
|
1010
1011
|
newMaxRowHeight = rowHeight * parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1]) / 100;
|
@@ -1018,26 +1019,26 @@
|
|
1018
1019
|
} else {
|
1019
1020
|
throw 'maxRowHeight must be a number or a percentage';
|
1020
1021
|
}
|
1021
|
-
|
1022
|
+
|
1022
1023
|
// check if the converted value is not a number
|
1023
1024
|
if (isNaN(newMaxRowHeight)) throw 'invalid number for maxRowHeight';
|
1024
|
-
|
1025
|
+
|
1025
1026
|
// check values, maxRowHeight must be >= rowHeight
|
1026
1027
|
if (newMaxRowHeight < rowHeight) newMaxRowHeight = rowHeight;
|
1027
|
-
|
1028
|
+
|
1028
1029
|
return newMaxRowHeight;
|
1029
1030
|
};
|
1030
|
-
|
1031
|
+
|
1031
1032
|
/**
|
1032
1033
|
* Checks the settings
|
1033
1034
|
*/
|
1034
1035
|
JustifiedGallery.prototype.checkSettings = function () {
|
1035
1036
|
this.checkSizeRangesSuffixes();
|
1036
|
-
|
1037
|
+
|
1037
1038
|
this.checkOrConvertNumber(this.settings, 'rowHeight');
|
1038
1039
|
this.checkOrConvertNumber(this.settings, 'margins');
|
1039
1040
|
this.checkOrConvertNumber(this.settings, 'border');
|
1040
|
-
|
1041
|
+
|
1041
1042
|
var lastRowModes = [
|
1042
1043
|
'justify',
|
1043
1044
|
'nojustify',
|
@@ -1049,7 +1050,7 @@
|
|
1049
1050
|
if (lastRowModes.indexOf(this.settings.lastRow) === -1) {
|
1050
1051
|
throw 'lastRow must be one of: ' + lastRowModes.join(', ');
|
1051
1052
|
}
|
1052
|
-
|
1053
|
+
|
1053
1054
|
this.checkOrConvertNumber(this.settings, 'justifyThreshold');
|
1054
1055
|
if (this.settings.justifyThreshold < 0 || this.settings.justifyThreshold > 1) {
|
1055
1056
|
throw 'justifyThreshold must be in the interval [0,1]';
|
@@ -1057,38 +1058,38 @@
|
|
1057
1058
|
if ($.type(this.settings.cssAnimation) !== 'boolean') {
|
1058
1059
|
throw 'cssAnimation must be a boolean';
|
1059
1060
|
}
|
1060
|
-
|
1061
|
+
|
1061
1062
|
if ($.type(this.settings.captions) !== 'boolean') throw 'captions must be a boolean';
|
1062
1063
|
this.checkOrConvertNumber(this.settings.captionSettings, 'animationDuration');
|
1063
|
-
|
1064
|
+
|
1064
1065
|
this.checkOrConvertNumber(this.settings.captionSettings, 'visibleOpacity');
|
1065
1066
|
if (this.settings.captionSettings.visibleOpacity < 0 ||
|
1066
1067
|
this.settings.captionSettings.visibleOpacity > 1) {
|
1067
1068
|
throw 'captionSettings.visibleOpacity must be in the interval [0, 1]';
|
1068
1069
|
}
|
1069
|
-
|
1070
|
+
|
1070
1071
|
this.checkOrConvertNumber(this.settings.captionSettings, 'nonVisibleOpacity');
|
1071
1072
|
if (this.settings.captionSettings.nonVisibleOpacity < 0 ||
|
1072
1073
|
this.settings.captionSettings.nonVisibleOpacity > 1) {
|
1073
1074
|
throw 'captionSettings.nonVisibleOpacity must be in the interval [0, 1]';
|
1074
1075
|
}
|
1075
|
-
|
1076
|
+
|
1076
1077
|
this.checkOrConvertNumber(this.settings, 'imagesAnimationDuration');
|
1077
1078
|
this.checkOrConvertNumber(this.settings, 'refreshTime');
|
1078
1079
|
this.checkOrConvertNumber(this.settings, 'refreshSensitivity');
|
1079
1080
|
if ($.type(this.settings.randomize) !== 'boolean') throw 'randomize must be a boolean';
|
1080
1081
|
if ($.type(this.settings.selector) !== 'string') throw 'selector must be a string';
|
1081
|
-
|
1082
|
+
|
1082
1083
|
if (this.settings.sort !== false && !$.isFunction(this.settings.sort)) {
|
1083
1084
|
throw 'sort must be false or a comparison function';
|
1084
1085
|
}
|
1085
|
-
|
1086
|
+
|
1086
1087
|
if (this.settings.filter !== false && !$.isFunction(this.settings.filter) &&
|
1087
1088
|
$.type(this.settings.filter) !== 'string') {
|
1088
1089
|
throw 'filter must be false, a string or a filter function';
|
1089
1090
|
}
|
1090
1091
|
};
|
1091
|
-
|
1092
|
+
|
1092
1093
|
/**
|
1093
1094
|
* It brings all the indexes from the sizeRangeSuffixes and it orders them. They are then sorted and returned.
|
1094
1095
|
* @returns {Array} sorted suffix ranges
|
@@ -1101,7 +1102,7 @@
|
|
1101
1102
|
suffixRanges.sort(function (a, b) { return a > b ? 1 : a < b ? -1 : 0; });
|
1102
1103
|
return suffixRanges;
|
1103
1104
|
};
|
1104
|
-
|
1105
|
+
|
1105
1106
|
/**
|
1106
1107
|
* Update the existing settings only changing some of them
|
1107
1108
|
*
|
@@ -1111,14 +1112,14 @@
|
|
1111
1112
|
// In this case Justified Gallery has been called again changing only some options
|
1112
1113
|
this.settings = $.extend({}, this.settings, newSettings);
|
1113
1114
|
this.checkSettings();
|
1114
|
-
|
1115
|
+
|
1115
1116
|
// As reported in the settings: negative value = same as margins, 0 = disabled
|
1116
1117
|
this.border = this.settings.border >= 0 ? this.settings.border : this.settings.margins;
|
1117
|
-
|
1118
|
+
|
1118
1119
|
this.maxRowHeight = this.retrieveMaxRowHeight();
|
1119
1120
|
this.suffixRanges = this.retrieveSuffixRanges();
|
1120
1121
|
};
|
1121
|
-
|
1122
|
+
|
1122
1123
|
JustifiedGallery.prototype.defaults = {
|
1123
1124
|
sizeRangeSuffixes: { }, /* e.g. Flickr configuration
|
1124
1125
|
{
|
@@ -1139,9 +1140,9 @@
|
|
1139
1140
|
// can't exceed 3 * rowHeight)
|
1140
1141
|
margins: 1,
|
1141
1142
|
border: -1, // negative value = same as margins, 0 = disabled, any other value to set the border
|
1142
|
-
|
1143
|
+
|
1143
1144
|
lastRow: 'nojustify', // … which is the same as 'left', or can be 'justify', 'center', 'right' or 'hide'
|
1144
|
-
|
1145
|
+
|
1145
1146
|
justifyThreshold: 0.90, /* if row width / available space > 0.90 it will be always justified
|
1146
1147
|
* (i.e. lastRow setting is not considered) */
|
1147
1148
|
waitThumbnailsLoad: true,
|
@@ -1177,7 +1178,7 @@
|
|
1177
1178
|
this.$gallery.trigger(event); // Consider that 'this' is this set to the JustifiedGallery object, so it can
|
1178
1179
|
} // access to fields such as $gallery, useful to trigger events with jQuery.
|
1179
1180
|
};
|
1180
|
-
|
1181
|
+
|
1181
1182
|
|
1182
1183
|
/**
|
1183
1184
|
* Justified Gallery plugin for jQuery
|
@@ -1226,4 +1227,4 @@
|
|
1226
1227
|
});
|
1227
1228
|
};
|
1228
1229
|
|
1229
|
-
}));
|
1230
|
+
}));
|