j1-template 2022.1.0 → 2022.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/layouts/content_generator_article_navigator.html +4 -5
- data/_includes/themes/j1/layouts/content_generator_blog_archive.html +4 -5
- data/_includes/themes/j1/layouts/content_generator_news_panel_posts.html +35 -19
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.0.proc +129 -0
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.1.proc +113 -0
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +3 -3
- data/_includes/themes/j1/procedures/global/create_word_cloud.proc +1 -5
- data/_includes/themes/j1/procedures/posts/collate_timeline.proc +29 -7
- data/_includes/themes/j1/procedures/posts/pager.proc +2 -3
- data/assets/data/carousel.json +2 -2
- data/assets/data/galleries.json +17 -5
- data/assets/data/gallery_customizer.html +4 -5
- data/assets/data/j1_config.json +42 -0
- data/assets/data/panel.html +17 -0
- data/assets/data/quicklinks.html +4 -4
- data/assets/themes/j1/adapter/js/advertising.js +2 -2
- data/assets/themes/j1/adapter/js/algolia.js +5 -5
- data/assets/themes/j1/adapter/js/analytics.js +1 -1
- data/assets/themes/j1/adapter/js/asciidoctor.js +2 -2
- data/assets/themes/j1/adapter/js/attic.js +5 -5
- data/assets/themes/j1/adapter/js/bmd.js +12 -12
- data/assets/themes/j1/adapter/js/carousel.js +40 -30
- data/assets/themes/j1/adapter/js/clipboard.js +2 -2
- data/assets/themes/j1/adapter/js/comments.js +2 -2
- data/assets/themes/j1/adapter/js/cookieConsent.js +2 -2
- data/assets/themes/j1/adapter/js/customFunctions.js +2 -2
- data/assets/themes/j1/adapter/js/customModule.js +2 -2
- data/assets/themes/j1/adapter/js/dropdowns.js +2 -2
- data/assets/themes/j1/adapter/js/fab.js +4 -4
- data/assets/themes/j1/adapter/js/framer.js +2 -2
- data/assets/themes/j1/adapter/js/j1.js +9 -9
- data/assets/themes/j1/adapter/js/justifiedGallery.js +42 -30
- data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +126 -113
- data/assets/themes/j1/adapter/js/lightbox.js +34 -30
- data/assets/themes/j1/adapter/js/logger.js +2 -2
- data/assets/themes/j1/adapter/js/{quicksearch.js → lunr.js} +17 -19
- data/assets/themes/j1/adapter/js/mmenu.js +7 -7
- data/assets/themes/j1/adapter/js/navigator.js +5 -5
- data/assets/themes/j1/adapter/js/rangeSlider.js +96 -83
- data/assets/themes/j1/adapter/js/rouge.js +26 -22
- data/assets/themes/j1/adapter/js/rtable.js +2 -2
- data/assets/themes/j1/adapter/js/rtextResizer.js +6 -22
- data/assets/themes/j1/adapter/js/scroller.js +2 -2
- data/assets/themes/j1/adapter/js/themer.js +3 -3
- data/assets/themes/j1/adapter/js/toccer.js +5 -5
- data/assets/themes/j1/adapter/js/translator.js +2 -2
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +19 -6
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +2 -2
- data/assets/themes/j1/core/css/vendor.css +2 -3
- data/assets/themes/j1/core/css/vendor.min.css +1 -1
- data/assets/themes/j1/core/js/template.js +1 -6
- data/assets/themes/j1/core/js/template.min.js +1 -6
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery-x.js +1 -1
- data/assets/themes/j1/modules/lightGallery/js/core/lightgallery.js +1 -1
- data/assets/themes/j1/modules/lightGallery/js/modules/j1/j1-x-video.js +28 -12
- data/assets/themes/j1/modules/lightGallery/js/modules/j1/j1-x-video.min.js +1 -1
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-thumbnail.js +1 -1
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-thumbnail.min.js +1 -2
- data/assets/themes/j1/modules/lightbox/css/theme/uno.min.css +1 -11
- data/assets/themes/j1/modules/{lunrSearch/css/quicksearch.css → lunr/css/j1.css} +2 -2
- data/assets/themes/j1/modules/lunr/css/j1.min.css +15 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/js/dateformat.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/js/dateformat.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch/js/quicksearch.js → lunr/js/j1.js} +11 -8
- data/assets/themes/j1/modules/{lunrSearch/js/quicksearch.min.js → lunr/js/j1.min.js} +1 -1
- data/assets/themes/j1/modules/{lunrSearch → lunr}/js/lunr.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/js/lunr.language.support.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/js/lunr.language.support.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/js/lunr.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/js/mustache.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/js/mustache.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/js/uri.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/js/uri.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.ar.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.ar.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.da.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.da.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.de.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.de.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.du.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.du.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.es.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.es.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.fi.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.fi.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.fr.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.fr.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.hu.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.hu.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.it.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.it.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.ja.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.ja.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.jp.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.jp.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.multi.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.multi.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.nl.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.nl.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.no.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.no.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.pt.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.pt.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.ro.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.ro.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.ru.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.ru.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.sv.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.sv.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.th.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.tr.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.tr.min.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.vi.js +0 -0
- data/assets/themes/j1/modules/{lunrSearch → lunr}/languages/lunr.vi.min.js +0 -0
- data/assets/themes/j1/modules/mmenuLight/css/mmenu-light.min.css +2 -375
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.css +14 -5
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.min.css +2 -179
- data/assets/themes/j1/modules/msDropdown/css/msDropdown.min.css +1 -12
- data/assets/themes/j1/modules/msDropdown/css/themes/uno/msDropdown.css +3 -1
- data/assets/themes/j1/modules/msDropdown/css/themes/uno/msDropdown.min.css +23 -0
- data/assets/themes/j1/modules/videojs/css/video-js.css +6 -2
- data/assets/themes/j1/modules/videojs/css/video-js.min.css +1 -1
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +68 -95
- data/lib/starter_web/_data/apps/defaults/justifiedGalleryCustomizer.yml +168 -0
- data/lib/starter_web/_data/blocks/panel.yml +2 -0
- data/lib/starter_web/_data/j1_config.yml +33 -1
- data/lib/starter_web/_data/layouts/app.yml +11 -6
- data/lib/starter_web/_data/layouts/article_navigator.yml +8 -3
- data/lib/starter_web/_data/layouts/blog_archive.yml +8 -3
- data/lib/starter_web/_data/layouts/collection.yml +14 -21
- data/lib/starter_web/_data/layouts/default.yml +11 -36
- data/lib/starter_web/_data/layouts/home.yml +14 -22
- data/lib/starter_web/_data/layouts/news_panel_posts.yml +8 -3
- data/lib/starter_web/_data/layouts/page.yml +8 -14
- data/lib/starter_web/_data/layouts/post.yml +8 -3
- data/lib/starter_web/_data/layouts/raw.yml +14 -9
- data/lib/starter_web/_data/{builder → modules}/blog_navigator.yml +4 -4
- data/lib/starter_web/_data/{apps → modules}/carousel.yml +2 -2
- data/lib/starter_web/_data/{builder → modules}/defaults/blog_navigator.yml +4 -5
- data/lib/starter_web/_data/{apps → modules}/defaults/carousel.yml +1 -1
- data/lib/starter_web/_data/{apps → modules}/defaults/justifiedGallery.yml +1 -1
- data/lib/starter_web/_data/{apps → modules}/defaults/lightGallery.yml +1 -1
- data/lib/starter_web/_data/{apps → modules}/defaults/lightbox.yml +2 -2
- data/lib/starter_web/_data/modules/defaults/{quicksearch.yml → lunr.yml} +6 -15
- data/lib/starter_web/_data/modules/defaults/navigator.yml +1 -1
- data/lib/starter_web/_data/{apps → modules}/justifiedGallery.yml +101 -50
- data/lib/starter_web/_data/{apps → modules}/lightGallery.yml +1 -1
- data/lib/starter_web/_data/{apps → modules}/lightbox.yml +2 -2
- data/lib/starter_web/_data/modules/{quicksearch.yml → lunr.yml} +4 -7
- data/lib/starter_web/_data/modules/navigator_menu.yml +1 -1
- data/lib/starter_web/_data/modules/rangeSlider.yml +2 -2
- data/lib/starter_web/_data/resources.yml +20 -21
- data/lib/starter_web/_includes/attributes.asciidoc +16 -3
- data/lib/starter_web/_plugins/asciidoctor-extensions/lightbox-block.rb +6 -4
- data/lib/starter_web/_plugins/filters.rb +53 -0
- data/lib/starter_web/_plugins/lunr_index.rb +11 -6
- data/lib/starter_web/assets/images/modules/attics/joanna-kosinska-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/dailymotion/meditation.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/dailymotion/pilates.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/html5/video1.mp4 +0 -0
- data/lib/starter_web/assets/videos/gallery/html5/video2.mp4 +0 -0
- data/lib/starter_web/assets/videos/gallery/vk/hai.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/vk/otter.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/voice_kids_de_2021/battle.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/voice_kids_de_2021/ben.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/voice_kids_de_2021/constance.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/voice_kids_de_2021/elisa.jpg +0 -0
- data/lib/starter_web/collections/asciidoc_skeletons/simple-post/{yyyy-mm-dd-your-post-name.adoc → _posts/yyyy-mm-dd-your-post-name.asciidoc} +26 -12
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-02-01-site-generators.adoc +2 -2
- data/lib/starter_web/collections/posts/public/featured/_posts/2022-02-28-about-j1.adoc +1 -1
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-wiki-series.adoc +2 -2
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-wiki-series.adoc +2 -2
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-wiki-series.adoc +2 -2
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/_blog/navigator/archive/categoryview.html +254 -0
- data/lib/starter_web/pages/public/_blog/navigator/archive/dateview.html +238 -0
- data/lib/starter_web/pages/public/_blog/navigator/archive/tagview.html +283 -0
- data/lib/starter_web/pages/public/_blog/navigator/archive.html +204 -0
- data/lib/starter_web/pages/public/_blog/navigator/index.html +53 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/000_intro.adoc +2 -4
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/100_converter.adoc +15 -3
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/200_themes.adoc +15 -3
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +5 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +5 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +5 -7
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +33 -12
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +30 -11
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +28 -11
- data/lib/starter_web/pages/public/blog/navigator/archive.html +29 -11
- data/lib/starter_web/pages/public/blog/navigator/index.html +2 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +13 -17
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +99 -16
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +74 -74
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +7 -13
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +2 -2
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +91 -77
- data/assets/themes/j1/modules/lunrSearch/css/quicksearch.min.css +0 -32
- data/lib/starter_web/_data/layouts/home.ads.yml +0 -262
- data/lib/starter_web/_data/layouts/home.no-ads.yml +0 -262
- data/lib/starter_web/_data/pages/builder.yml +0 -87
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.ads.asciidoc +0 -265
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.base.asciidoc +0 -237
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.comments.asciidoc +0 -237
@@ -27,7 +27,6 @@
|
|
27
27
|
var defaults = {
|
28
28
|
videoMaxWidth: '855px',
|
29
29
|
autoplayFirstVideo: true,
|
30
|
-
|
31
30
|
youtubePlayerParams: false,
|
32
31
|
tiktokPlayerParams: false,
|
33
32
|
youpornPlayerParams: false,
|
@@ -86,6 +85,7 @@
|
|
86
85
|
var autoplay = 1;
|
87
86
|
var a = '';
|
88
87
|
var isVideo = this.core.isVideo(src, index) || {};
|
88
|
+
var videoOptions;
|
89
89
|
|
90
90
|
// Enable autoplay based on setting for first video if poster doesn't exist
|
91
91
|
if (noPoster) {
|
@@ -98,20 +98,36 @@
|
|
98
98
|
|
99
99
|
// jadams
|
100
100
|
if (isVideo.youtube) {
|
101
|
+
// jadams
|
102
|
+
var videoOptions = false;
|
103
|
+
|
104
|
+
a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
|
105
|
+
var options = this.core.$items[index].dataset.options;
|
106
|
+
if (options !== 'undefined' && options.length) {
|
107
|
+
options = options.replace(/ /g, "");
|
108
|
+
var pairs = options.split(','); // create an array of 'key=value' pairs
|
109
|
+
// var obj = pairs.reduce((obj, data) => { // transform array in an object of 'key=value' pairs
|
110
|
+
var obj = pairs.reduce(function (obj, data) { // transform array in an object of 'key=value' pairs
|
111
|
+
let [k, v] = data.split(':') // split each pair into key/value
|
112
|
+
obj[k] = v // add key-value pair to the object
|
113
|
+
return obj
|
114
|
+
}, {});
|
115
|
+
videoOptions = obj;
|
116
|
+
}
|
117
|
+
|
118
|
+
if (this.core.s.youtubePlayerParams) {
|
119
|
+
a = a + '&' + $.param(this.core.s.youtubePlayerParams);
|
120
|
+
} else if (videoOptions) {
|
121
|
+
a = a + '&' + $.param(videoOptions);
|
122
|
+
}
|
123
|
+
video = '<iframe class="lg-video-object lg-youtube ' + addClass + '" width="560" height="315" src="//www.youtube.com/embed/' + isVideo.youtube[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
101
124
|
|
102
|
-
a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
|
103
|
-
if (this.core.s.youtubePlayerParams) {
|
104
|
-
a = a + '&' + $.param(this.core.s.youtubePlayerParams);
|
105
|
-
}
|
106
|
-
|
107
|
-
video = '<iframe class="lg-video-object lg-youtube ' + addClass + '" width="560" height="315" src="//www.youtube.com/embed/' + isVideo.youtube[1] + a + '" frameborder="0" allowfullscreen></iframe>';
|
108
|
-
// jadams
|
109
125
|
} else if (isVideo.tiktok) {
|
110
|
-
|
126
|
+
// jadams
|
111
127
|
a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
|
112
|
-
|
113
|
-
|
114
|
-
|
128
|
+
// if (this.core.s.youtubePlayerParams) {
|
129
|
+
// a = a + '&' + this.core.s.youtubePlayerParams);
|
130
|
+
// }
|
115
131
|
// video = '<iframe loading="lazy" class="lg-video-object lg-youtube lg-tiktok' + addClass + '" width="340" height="700" src="https://www.tiktok.com/embed/' + isVideo.tiktok[2] + a + '" frameborder="0" scrolling=no allow="fullscreen"></iframe>';
|
116
132
|
// video = '<iframe class="lg-video-object lg-youtube ' + addClass + '" width="560" height="315" src="https://www.tiktok.com/embed/' + isVideo.tiktok[2] + a + '" frameborder="0" scrolling=no allowfullscreen name="yp_embed_video" frameborder="0"></iframe>';
|
117
133
|
// video = '<iframe loading="lazy" class="lg-video-object lg-tiktok ' + addClass + '" width="340" height="700" src="https://www.tiktok.com/embed/' + isVideo.tiktok[2] + '" frameborder="0" scrolling=no allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="allowfullscreen" name="yp_embed_video" frameborder="0"></iframe>';
|
@@ -4,4 +4,4 @@
|
|
4
4
|
* http://sachinchoolur.github.io/lightGallery
|
5
5
|
* Copyright (C) 2017 Sachin N; Licensed GPLv3 */
|
6
6
|
|
7
|
-
(function(a,b){if(typeof define==="function"&&define.amd){define(["jquery"],function(c){return(b(c))})}else{if(typeof exports==="object"){module.exports=b(require("jquery"))}else{b(jQuery)}}}(this,function(a){(function(){var f={videoMaxWidth:"855px",autoplayFirstVideo:true,youtubePlayerParams:false,vimeoPlayerParams:false,dailymotionPlayerParams:false,vkPlayerParams:false,videojs:false,videojsOptions:{}};var c=function(g){this.core=a(g).data("lightGallery");this.$el=a(g);this.core.s=a.extend({},f,this.core.s);this.videoLoaded=false;this.init();return this};c.prototype.init=function(){var g=this;g.core.$el.on("hasVideo.lg.tm",e.bind(this));g.core.$el.on("onAferAppendSlide.lg.tm",b.bind(this));if(g.core.doCss()&&(g.core.$items.length>1)&&(g.core.s.enableSwipe||g.core.s.enableDrag)){g.core.$el.on("onSlideClick.lg.tm",function(){var h=g.core.$slide.eq(g.core.index);g.loadVideoOnclick(h)})}else{g.core.$slide.on("click.lg",function(){g.loadVideoOnclick(a(this))})}g.core.$el.on("onBeforeSlide.lg.tm",d.bind(this));g.core.$el.on("onAfterSlide.lg.tm",function(i,h){g.core.$slide.eq(h).removeClass("lg-video-playing")})};c.prototype.loadVideo=function(h,
|
7
|
+
(function(a,b){if(typeof define==="function"&&define.amd){define(["jquery"],function(c){return(b(c))})}else{if(typeof exports==="object"){module.exports=b(require("jquery"))}else{b(jQuery)}}}(this,function(a){(function(){var f={videoMaxWidth:"855px",autoplayFirstVideo:true,youtubePlayerParams:false,tiktokPlayerParams:false,youpornPlayerParams:false,vimeoPlayerParams:false,dailymotionPlayerParams:false,vkPlayerParams:false,videojs:false,videojsOptions:{}};var c=function(g){this.core=a(g).data("lightGallery");this.$el=a(g);this.core.s=a.extend({},f,this.core.s);this.videoLoaded=false;this.init();return this};c.prototype.init=function(){var g=this;g.core.$el.on("hasVideo.lg.tm",e.bind(this));g.core.$el.on("onAferAppendSlide.lg.tm",b.bind(this));if(g.core.doCss()&&(g.core.$items.length>1)&&(g.core.s.enableSwipe||g.core.s.enableDrag)){g.core.$el.on("onSlideClick.lg.tm",function(){var h=g.core.$slide.eq(g.core.index);g.loadVideoOnclick(h)})}else{g.core.$slide.on("click.lg",function(){g.loadVideoOnclick(a(this))})}g.core.$el.on("onBeforeSlide.lg.tm",d.bind(this));g.core.$el.on("onAfterSlide.lg.tm",function(i,h){g.core.$slide.eq(h).removeClass("lg-video-playing")})};c.prototype.loadVideo=function(h,s,q,r,p){var j="";var m=1;var t="";var g=this.core.isVideo(h,r)||{};var o;if(q){if(this.videoLoaded){m=0}else{m=this.core.s.autoplayFirstVideo?1:0}}if(g.youtube){var o=false;t="?wmode=opaque&autoplay="+m+"&enablejsapi=1";var u=this.core.$items[r].dataset.options;if(u!=="undefined"&&u.length){u=u.replace(/ /g,"");var i=u.split(",");var n=i.reduce(function(x,w){let[k,v]=w.split(":");x[k]=v;return x},{});o=n}if(this.core.s.youtubePlayerParams){t=t+"&"+a.param(this.core.s.youtubePlayerParams)}else{if(o){t=t+"&"+a.param(o)}}j='<iframe class="lg-video-object lg-youtube '+s+'" width="560" height="315" src="//www.youtube.com/embed/'+g.youtube[1]+t+'" frameborder="0" allowfullscreen></iframe>'}else{if(g.tiktok){t="?wmode=opaque&autoplay="+m+"&enablejsapi=1";j='<iframe class="lg-video-object lg-tiktok '+s+'" height="700" width="340" src="https://www.tiktok.com/embed/'+g.tiktok[2]+'" frameborder="0" scrolling="no" allow="allowfullscreen"></iframe>'}else{if(g.youporn){t="?wmode=opaque&autoplay="+m+"&enablejsapi=1";if(this.core.s.youtubePlayerParams){t=t+"&"+a.param(this.core.s.youtubePlayerParams)}j='<iframe class="lg-video-object lg-youtube '+s+'" width="560" height="315" src="https://www.youporn.com/embed/'+g.youporn[1]+t+'" frameborder="0" scrolling=no allowfullscreen name="yp_embed_video" frameborder="0"></iframe>'}else{if(g.vimeo){t="?autoplay="+m+"&api=1";if(this.core.s.vimeoPlayerParams){t=t+"&"+a.param(this.core.s.vimeoPlayerParams)}j='<iframe class="lg-video-object lg-vimeo '+s+'" width="560" height="315" src="//player.vimeo.com/video/'+g.vimeo[1]+t+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'}else{if(g.dailymotion){t="?wmode=opaque&autoplay="+m+"&api=postMessage";if(this.core.s.dailymotionPlayerParams){t=t+"&"+a.param(this.core.s.dailymotionPlayerParams)}j='<iframe class="lg-video-object lg-dailymotion '+s+'" width="560" height="315" src="//www.dailymotion.com/embed/video/'+g.dailymotion[1]+t+'" frameborder="0" allowfullscreen></iframe>'}else{if(g.html5){var l=p.substring(0,1);if(l==="."||l==="#"){p=a(p).html()}j=p}else{if(g.vk){t="&autoplay="+m;if(this.core.s.vkPlayerParams){t=t+"&"+a.param(this.core.s.vkPlayerParams)}j='<iframe class="lg-video-object lg-vk '+s+'" width="560" height="315" src="http://vk.com/video_ext.php?'+g.vk[1]+t+'" frameborder="0" allowfullscreen></iframe>'}}}}}}}return j};c.prototype.loadVideoOnclick=function(r){var n=this;if(r.find(".lg-object").hasClass("lg-has-poster")&&r.find(".lg-object").is(":visible")){if(!r.hasClass("lg-has-video")){r.addClass("lg-video-playing lg-has-video");var l;var j;var q=function(u,s){r.find(".lg-video").append(n.loadVideo(u,"",false,n.core.index,s));if(s){if(n.core.s.videojs){try{videojs(n.core.$slide.eq(n.core.index).find(".lg-html5").get(0),n.core.s.videojsOptions,function(){this.play()})}catch(t){console.error("Make sure you have included videojs")}}else{n.core.$slide.eq(n.core.index).find(".lg-html5").get(0).play()}}};if(n.core.s.dynamic){l=n.core.s.dynamicEl[n.core.index].src;j=n.core.s.dynamicEl[n.core.index].html;q(l,j)}else{l=n.core.$items.eq(n.core.index).attr("href")||n.core.$items.eq(n.core.index).attr("data-src");j=n.core.$items.eq(n.core.index).attr("data-html");q(l,j)}var i=r.find(".lg-object");r.find(".lg-video").append(i);if(!r.find(".lg-video-object").hasClass("lg-html5")){r.removeClass("lg-complete");r.find(".lg-video-object").on("load.lg error.lg",function(){r.addClass("lg-complete")})}}else{var p=r.find(".lg-youtube").get(0);var m=r.find(".lg-vimeo").get(0);var h=r.find(".lg-dailymotion").get(0);var g=r.find(".lg-html5").get(0);if(p){p.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}else{if(m){try{$f(m).api("play")}catch(o){console.error("Make sure you have included froogaloop2 js")}}else{if(h){h.contentWindow.postMessage("play","*")}else{if(g){if(n.core.s.videojs){try{videojs(g).play()}catch(o){console.error("Make sure you have included videojs")}}else{g.play()}}}}}r.addClass("lg-video-playing")}}};c.prototype.destroy=function(){this.videoLoaded=false};function e(i,g,l,h){var m=this;m.core.$slide.eq(g).find(".lg-video").append(m.loadVideo(l,"lg-object",true,g,h));if(h){if(m.core.s.videojs){try{videojs(m.core.$slide.eq(g).find(".lg-html5").get(0),m.core.s.videojsOptions,function(){if(!m.videoLoaded&&m.core.s.autoplayFirstVideo){this.play()}})}catch(j){console.error("Make sure you have included videojs")}}else{if(!m.videoLoaded&&m.core.s.autoplayFirstVideo){m.core.$slide.eq(g).find(".lg-html5").get(0).play()}}}}function b(h,g){var i=this.core.$slide.eq(g).find(".lg-video-cont");if(!i.hasClass("lg-has-iframe")){i.css("max-width",this.core.s.videoMaxWidth);this.videoLoaded=true}}function d(h,m,p){var o=this;var s=o.core.$slide.eq(m);var r=s.find(".lg-youtube").get(0);var n=s.find(".lg-vimeo").get(0);var i=s.find(".lg-dailymotion").get(0);var t=s.find(".lg-vk").get(0);var g=s.find(".lg-html5").get(0);if(r){r.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}else{if(n){try{$f(n).api("pause")}catch(q){console.error("Make sure you have included froogaloop2 js")}}else{if(i){i.contentWindow.postMessage("pause","*")}else{if(g){if(o.core.s.videojs){try{videojs(g).pause()}catch(q){console.error("Make sure you have included videojs")}}else{g.pause()}}}}}if(t){a(t).attr("src",a(t).attr("src").replace("&autoplay","&noplay"))}var l;if(o.core.s.dynamic){l=o.core.s.dynamicEl[p].src}else{l=o.core.$items.eq(p).attr("href")||o.core.$items.eq(p).attr("data-src")}var j=o.core.isVideo(l,p)||{};if(j.youtube||j.tiktok||j.youporn||j.vimeo||j.dailymotion||j.vk){o.core.$outer.addClass("lg-hide-download")}}a.fn.lightGallery.modules.video=c})()}));
|
@@ -193,7 +193,7 @@
|
|
193
193
|
|
194
194
|
if (_this.core.s.dynamic) {
|
195
195
|
for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
|
196
|
-
getThumb(_this.core.s.dynamicEl[i].src, _this.core.s.dynamicEl[i].thumb, i);
|
196
|
+
getThumb(_this.core.s.dynamicEl[i].src, _this.core.s.dynamicEl[i].thumb, i, null);
|
197
197
|
}
|
198
198
|
} else {
|
199
199
|
_this.core.$items.each(function(i) {
|
@@ -4,5 +4,4 @@
|
|
4
4
|
/*! lg-thumbnail - v1.1.0 - 2017-08-08
|
5
5
|
* http://sachinchoolur.github.io/lightGallery
|
6
6
|
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
7
|
-
|
8
|
-
(function(a,b){if(typeof define==="function"&&define.amd){define(["jquery"],function(c){return(b(c))})}else{if(typeof exports==="object"){module.exports=b(require("jquery"))}else{b(jQuery)}}}(this,function(a){(function(){var b={thumbnail:true,animateThumb:true,currentPagerPosition:"middle",thumbWidth:100,thumbHeight:"80px",thumbContHeight:100,thumbMargin:5,exThumbImage:false,showThumbByDefault:true,toogleThumb:true,pullCaptionUp:true,enableThumbDrag:true,enableThumbSwipe:true,swipeThreshold:50,loadYoutubeThumbnail:true,youtubeThumbSize:1,loadVimeoThumbnail:true,vimeoThumbSize:"thumbnail_small",loadDailymotionThumbnail:true};var c=function(d){this.core=a(d).data("lightGallery");this.core.s=a.extend({},b,this.core.s);this.$el=a(d);this.$thumbOuter=null;this.thumbOuterWidth=0;this.thumbTotalWidth=(this.core.$items.length*(this.core.s.thumbWidth+this.core.s.thumbMargin));this.thumbIndex=this.core.index;if(this.core.s.animateThumb){this.core.s.thumbHeight="100%"}this.left=0;this.init();return this};c.prototype.init=function(){var d=this;if(this.core.s.thumbnail&&this.core.$items.length>1){if(this.core.s.showThumbByDefault){setTimeout(function(){d.core.$outer.addClass("lg-thumb-open")},700)}if(this.core.s.pullCaptionUp){this.core.$outer.addClass("lg-pull-caption-up")}this.build();if(this.core.s.animateThumb&&this.core.doCss()){if(this.core.s.enableThumbDrag){this.enableThumbDrag()}if(this.core.s.enableThumbSwipe){this.enableThumbSwipe()}this.thumbClickable=false}else{this.thumbClickable=true}this.toogle();this.thumbkeyPress()}};c.prototype.build=function(){var k=this;var g="";var d="";var j;var f='<div class="lg-thumb-outer"><div class="lg-thumb lg-group"></div></div>';switch(this.core.s.vimeoThumbSize){case"thumbnail_large":d="640";break;case"thumbnail_medium":d="200x150";break;case"thumbnail_small":d="100x75"}k.core.$outer.addClass("lg-has-thumb");k.core.$outer.find(".lg").append(f);k.$thumbOuter=k.core.$outer.find(".lg-thumb-outer");k.thumbOuterWidth=k.$thumbOuter.width();if(k.core.s.animateThumb){k.core.$outer.find(".lg-thumb").css({width:k.thumbTotalWidth+"px",position:"relative"})}if(this.core.s.animateThumb){k.$thumbOuter.css("height",k.core.s.thumbContHeight+"px")}function h(p,i,l){var n=k.core.isVideo(p,l)||{};var o;var m="";if(n.youtube||n.vimeo||n.dailymotion){if(n.youtube){if(k.core.s.loadYoutubeThumbnail){o=i}else{o=i}}else{if(n.vimeo){if(k.core.s.loadVimeoThumbnail){o=i}else{o=i}}else{if(n.dailymotion){if(k.core.s.loadDailymotionThumbnail){o=i}else{o=i}}}}}else{o=i}g+='<div class="lg-thumb-item" style="width:'+k.core.s.thumbWidth+"px; height: "+k.core.s.thumbHeight+"; margin-right: "+k.core.s.thumbMargin+'px"><img src="'+o+'" /></div>';m=""}if(k.core.s.dynamic){for(var e=0;e<k.core.s.dynamicEl.length;e++){h(k.core.s.dynamicEl[e].src,k.core.s.dynamicEl[e].thumb,e)}}else{k.core.$items.each(function(l){if(!k.core.s.exThumbImage){h(a(this).attr("href")||a(this).attr("data-src"),a(this).find("img").attr("src"),l)}else{h(a(this).attr("href")||a(this).attr("data-src"),a(this).attr(k.core.s.exThumbImage),l)}})}k.core.$outer.find(".lg-thumb").html(g);j=k.core.$outer.find(".lg-thumb-item");j.each(function(){var l=a(this);var i=l.attr("data-vimeo-id");if(i){a.getJSON("//www.vimeo.com/api/v2/video/"+i+".json?callback=?",{format:"json"},function(m){l.find("img").attr("src",m[0][k.core.s.vimeoThumbSize])})}});j.eq(k.core.index).addClass("active");k.core.$el.on("onBeforeSlide.lg.tm",function(){j.removeClass("active");j.eq(k.core.index).addClass("active")});j.on("click.lg touchend.lg",function(){var i=a(this);setTimeout(function(){if((k.thumbClickable&&!k.core.lgBusy)||!k.core.doCss()){k.core.index=i.index();k.core.slide(k.core.index,false,true,false)}},50)});k.core.$el.on("onBeforeSlide.lg.tm",function(){k.animateThumb(k.core.index)});a(window).on("resize.lg.thumb orientationchange.lg.thumb",function(){setTimeout(function(){k.animateThumb(k.core.index);k.thumbOuterWidth=k.$thumbOuter.width()},200)})};c.prototype.setTranslate=function(d){this.core.$outer.find(".lg-thumb").css({transform:"translate3d(-"+(d)+"px, 0px, 0px)"})};c.prototype.animateThumb=function(e){var f=this.core.$outer.find(".lg-thumb");if(this.core.s.animateThumb){var d;switch(this.core.s.currentPagerPosition){case"left":d=0;break;case"middle":d=(this.thumbOuterWidth/2)-(this.core.s.thumbWidth/2);break;case"right":d=this.thumbOuterWidth-this.core.s.thumbWidth}this.left=((this.core.s.thumbWidth+this.core.s.thumbMargin)*e-1)-d;if(this.left>(this.thumbTotalWidth-this.thumbOuterWidth)){this.left=this.thumbTotalWidth-this.thumbOuterWidth}if(this.left<0){this.left=0}if(this.core.lGalleryOn){if(!f.hasClass("on")){this.core.$outer.find(".lg-thumb").css("transition-duration",this.core.s.speed+"ms")}if(!this.core.doCss()){f.animate({left:-this.left+"px"},this.core.s.speed)}}else{if(!this.core.doCss()){f.css("left",-this.left+"px")}}this.setTranslate(this.left)}};c.prototype.enableThumbDrag=function(){var i=this;var g=0;var e=0;var d=false;var f=false;var h=0;i.$thumbOuter.addClass("lg-grab");i.core.$outer.find(".lg-thumb").on("mousedown.lg.thumb",function(j){if(i.thumbTotalWidth>i.thumbOuterWidth){j.preventDefault();g=j.pageX;d=true;i.core.$outer.scrollLeft+=1;i.core.$outer.scrollLeft-=1;i.thumbClickable=false;i.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing")}});a(window).on("mousemove.lg.thumb",function(j){if(d){h=i.left;f=true;e=j.pageX;i.$thumbOuter.addClass("lg-dragging");h=h-(e-g);if(h>(i.thumbTotalWidth-i.thumbOuterWidth)){h=i.thumbTotalWidth-i.thumbOuterWidth}if(h<0){h=0}i.setTranslate(h)}});a(window).on("mouseup.lg.thumb",function(){if(f){f=false;i.$thumbOuter.removeClass("lg-dragging");i.left=h;if(Math.abs(e-g)<i.core.s.swipeThreshold){i.thumbClickable=true}}else{i.thumbClickable=true}if(d){d=false;i.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")}})};c.prototype.enableThumbSwipe=function(){var h=this;var f=0;var d=0;var e=false;var g=0;h.core.$outer.find(".lg-thumb").on("touchstart.lg",function(i){if(h.thumbTotalWidth>h.thumbOuterWidth){i.preventDefault();f=i.originalEvent.targetTouches[0].pageX;h.thumbClickable=false}});h.core.$outer.find(".lg-thumb").on("touchmove.lg",function(i){if(h.thumbTotalWidth>h.thumbOuterWidth){i.preventDefault();d=i.originalEvent.targetTouches[0].pageX;e=true;h.$thumbOuter.addClass("lg-dragging");g=h.left;g=g-(d-f);if(g>(h.thumbTotalWidth-h.thumbOuterWidth)){g=h.thumbTotalWidth-h.thumbOuterWidth}if(g<0){g=0}h.setTranslate(g)}});h.core.$outer.find(".lg-thumb").on("touchend.lg",function(){if(h.thumbTotalWidth>h.thumbOuterWidth){if(e){e=false;h.$thumbOuter.removeClass("lg-dragging");if(Math.abs(d-f)<h.core.s.swipeThreshold){h.thumbClickable=true}h.left=g}else{h.thumbClickable=true}}else{h.thumbClickable=true}})};c.prototype.toogle=function(){var d=this;if(d.core.s.toogleThumb){d.core.$outer.addClass("lg-can-toggle");d.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>');d.core.$outer.find(".lg-toogle-thumb").on("click.lg",function(){d.core.$outer.toggleClass("lg-thumb-open")})}};c.prototype.thumbkeyPress=function(){var d=this;a(window).on("keydown.lg.thumb",function(f){if(f.keyCode===38){f.preventDefault();d.core.$outer.addClass("lg-thumb-open")}else{if(f.keyCode===40){f.preventDefault();d.core.$outer.removeClass("lg-thumb-open")}}})};c.prototype.destroy=function(){if(this.core.s.thumbnail&&this.core.$items.length>1){a(window).off("resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb");this.$thumbOuter.remove();this.core.$outer.removeClass("lg-has-thumb")}};a.fn.lightGallery.modules.Thumbnail=c})()}));
|
7
|
+
(function(a,b){if(typeof define==="function"&&define.amd){define(["jquery"],function(c){return(b(c))})}else{if(typeof exports==="object"){module.exports=b(require("jquery"))}else{b(jQuery)}}}(this,function(a){(function(){var b={thumbnail:true,animateThumb:true,currentPagerPosition:"middle",thumbWidth:100,thumbHeight:"80px",thumbContHeight:100,thumbMargin:5,exThumbImage:false,showThumbByDefault:true,toogleThumb:true,pullCaptionUp:true,enableThumbDrag:true,enableThumbSwipe:true,swipeThreshold:50,loadYoutubeThumbnail:true,youtubeThumbSize:1,loadVimeoThumbnail:true,vimeoThumbSize:"thumbnail_small",loadDailymotionThumbnail:true};var c=function(d){this.core=a(d).data("lightGallery");this.core.s=a.extend({},b,this.core.s);this.$el=a(d);this.$thumbOuter=null;this.thumbOuterWidth=0;this.thumbTotalWidth=(this.core.$items.length*(this.core.s.thumbWidth+this.core.s.thumbMargin));this.thumbIndex=this.core.index;if(this.core.s.animateThumb){this.core.s.thumbHeight="100%"}this.left=0;this.init();return this};c.prototype.init=function(){var d=this;if(this.core.s.thumbnail&&this.core.$items.length>1){if(this.core.s.showThumbByDefault){setTimeout(function(){d.core.$outer.addClass("lg-thumb-open")},700)}if(this.core.s.pullCaptionUp){this.core.$outer.addClass("lg-pull-caption-up")}this.build();if(this.core.s.animateThumb&&this.core.doCss()){if(this.core.s.enableThumbDrag){this.enableThumbDrag()}if(this.core.s.enableThumbSwipe){this.enableThumbSwipe()}this.thumbClickable=false}else{this.thumbClickable=true}this.toogle();this.thumbkeyPress()}};c.prototype.build=function(){var k=this;var g="";var d="";var j;var f='<div class="lg-thumb-outer"><div class="lg-thumb lg-group"></div></div>';switch(this.core.s.vimeoThumbSize){case"thumbnail_large":d="640";break;case"thumbnail_medium":d="200x150";break;case"thumbnail_small":d="100x75"}k.core.$outer.addClass("lg-has-thumb");k.core.$outer.find(".lg").append(f);k.$thumbOuter=k.core.$outer.find(".lg-thumb-outer");k.thumbOuterWidth=k.$thumbOuter.width();if(k.core.s.animateThumb){k.core.$outer.find(".lg-thumb").css({width:k.thumbTotalWidth+"px",position:"relative"})}if(this.core.s.animateThumb){k.$thumbOuter.css("height",k.core.s.thumbContHeight+"px")}function h(p,i,l){var n=k.core.isVideo(p,l)||{};var o;var m="";if(n.youtube||n.vimeo||n.dailymotion){if(n.youtube){if(k.core.s.loadYoutubeThumbnail){o=i}else{o=i}}else{if(n.vimeo){if(k.core.s.loadVimeoThumbnail){o=i}else{o=i}}else{if(n.dailymotion){if(k.core.s.loadDailymotionThumbnail){o=i}else{o=i}}}}}else{o=i}g+='<div class="lg-thumb-item" style="width:'+k.core.s.thumbWidth+"px; height: "+k.core.s.thumbHeight+"; margin-right: "+k.core.s.thumbMargin+'px"><img src="'+o+'" /></div>';m=""}if(k.core.s.dynamic){for(var e=0;e<k.core.s.dynamicEl.length;e++){h(k.core.s.dynamicEl[e].src,k.core.s.dynamicEl[e].thumb,e,null)}}else{k.core.$items.each(function(l){if(!k.core.s.exThumbImage){h(a(this).attr("href")||a(this).attr("data-src"),a(this).find("img").attr("src"),l)}else{h(a(this).attr("href")||a(this).attr("data-src"),a(this).attr(k.core.s.exThumbImage),l)}})}k.core.$outer.find(".lg-thumb").html(g);j=k.core.$outer.find(".lg-thumb-item");j.each(function(){var l=a(this);var i=l.attr("data-vimeo-id");if(i){a.getJSON("//www.vimeo.com/api/v2/video/"+i+".json?callback=?",{format:"json"},function(m){l.find("img").attr("src",m[0][k.core.s.vimeoThumbSize])})}});j.eq(k.core.index).addClass("active");k.core.$el.on("onBeforeSlide.lg.tm",function(){j.removeClass("active");j.eq(k.core.index).addClass("active")});j.on("click.lg touchend.lg",function(){var i=a(this);setTimeout(function(){if((k.thumbClickable&&!k.core.lgBusy)||!k.core.doCss()){k.core.index=i.index();k.core.slide(k.core.index,false,true,false)}},50)});k.core.$el.on("onBeforeSlide.lg.tm",function(){k.animateThumb(k.core.index)});a(window).on("resize.lg.thumb orientationchange.lg.thumb",function(){setTimeout(function(){k.animateThumb(k.core.index);k.thumbOuterWidth=k.$thumbOuter.width()},200)})};c.prototype.setTranslate=function(d){this.core.$outer.find(".lg-thumb").css({transform:"translate3d(-"+(d)+"px, 0px, 0px)"})};c.prototype.animateThumb=function(e){var f=this.core.$outer.find(".lg-thumb");if(this.core.s.animateThumb){var d;switch(this.core.s.currentPagerPosition){case"left":d=0;break;case"middle":d=(this.thumbOuterWidth/2)-(this.core.s.thumbWidth/2);break;case"right":d=this.thumbOuterWidth-this.core.s.thumbWidth}this.left=((this.core.s.thumbWidth+this.core.s.thumbMargin)*e-1)-d;if(this.left>(this.thumbTotalWidth-this.thumbOuterWidth)){this.left=this.thumbTotalWidth-this.thumbOuterWidth}if(this.left<0){this.left=0}if(this.core.lGalleryOn){if(!f.hasClass("on")){this.core.$outer.find(".lg-thumb").css("transition-duration",this.core.s.speed+"ms")}if(!this.core.doCss()){f.animate({left:-this.left+"px"},this.core.s.speed)}}else{if(!this.core.doCss()){f.css("left",-this.left+"px")}}this.setTranslate(this.left)}};c.prototype.enableThumbDrag=function(){var i=this;var g=0;var e=0;var d=false;var f=false;var h=0;i.$thumbOuter.addClass("lg-grab");i.core.$outer.find(".lg-thumb").on("mousedown.lg.thumb",function(j){if(i.thumbTotalWidth>i.thumbOuterWidth){j.preventDefault();g=j.pageX;d=true;i.core.$outer.scrollLeft+=1;i.core.$outer.scrollLeft-=1;i.thumbClickable=false;i.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing")}});a(window).on("mousemove.lg.thumb",function(j){if(d){h=i.left;f=true;e=j.pageX;i.$thumbOuter.addClass("lg-dragging");h=h-(e-g);if(h>(i.thumbTotalWidth-i.thumbOuterWidth)){h=i.thumbTotalWidth-i.thumbOuterWidth}if(h<0){h=0}i.setTranslate(h)}});a(window).on("mouseup.lg.thumb",function(){if(f){f=false;i.$thumbOuter.removeClass("lg-dragging");i.left=h;if(Math.abs(e-g)<i.core.s.swipeThreshold){i.thumbClickable=true}}else{i.thumbClickable=true}if(d){d=false;i.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")}})};c.prototype.enableThumbSwipe=function(){var h=this;var f=0;var d=0;var e=false;var g=0;h.core.$outer.find(".lg-thumb").on("touchstart.lg",function(i){if(h.thumbTotalWidth>h.thumbOuterWidth){i.preventDefault();f=i.originalEvent.targetTouches[0].pageX;h.thumbClickable=false}});h.core.$outer.find(".lg-thumb").on("touchmove.lg",function(i){if(h.thumbTotalWidth>h.thumbOuterWidth){i.preventDefault();d=i.originalEvent.targetTouches[0].pageX;e=true;h.$thumbOuter.addClass("lg-dragging");g=h.left;g=g-(d-f);if(g>(h.thumbTotalWidth-h.thumbOuterWidth)){g=h.thumbTotalWidth-h.thumbOuterWidth}if(g<0){g=0}h.setTranslate(g)}});h.core.$outer.find(".lg-thumb").on("touchend.lg",function(){if(h.thumbTotalWidth>h.thumbOuterWidth){if(e){e=false;h.$thumbOuter.removeClass("lg-dragging");if(Math.abs(d-f)<h.core.s.swipeThreshold){h.thumbClickable=true}h.left=g}else{h.thumbClickable=true}}else{h.thumbClickable=true}})};c.prototype.toogle=function(){var d=this;if(d.core.s.toogleThumb){d.core.$outer.addClass("lg-can-toggle");d.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>');d.core.$outer.find(".lg-toogle-thumb").on("click.lg",function(){d.core.$outer.toggleClass("lg-thumb-open")})}};c.prototype.thumbkeyPress=function(){var d=this;a(window).on("keydown.lg.thumb",function(f){if(f.keyCode===38){f.preventDefault();d.core.$outer.addClass("lg-thumb-open")}else{if(f.keyCode===40){f.preventDefault();d.core.$outer.removeClass("lg-thumb-open")}}})};c.prototype.destroy=function(){if(this.core.s.thumbnail&&this.core.$items.length>1){a(window).off("resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb");this.$thumbOuter.remove();this.core.$outer.removeClass("lg-has-thumb")}};a.fn.lightGallery.modules.Thumbnail=c})()}));
|
@@ -12,14 +12,4 @@
|
|
12
12
|
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
13
13
|
# -----------------------------------------------------------------------------
|
14
14
|
*/
|
15
|
-
|
16
|
-
/* Reduced image border|color changed */
|
17
|
-
.lightbox .lb-image {
|
18
|
-
border-radius: 1px;
|
19
|
-
border: 1px solid lightgrey;
|
20
|
-
}
|
21
|
-
|
22
|
-
/* Removed invalid|unneeded attributes */
|
23
|
-
.lb-outerContainer {
|
24
|
-
zoom: unset;
|
25
|
-
}
|
15
|
+
.lightbox .lb-image{border-radius:1px;border:1px solid lightgrey}.lb-outerContainer{zoom:unset}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
# -----------------------------------------------------------------------------
|
3
|
-
# ~/assets/themes/j1/modules/
|
4
|
-
# Provides styles for J1 Module
|
3
|
+
# ~/assets/themes/j1/modules/lunr/css/j1.css
|
4
|
+
# Provides styles for J1 Module lunr (result styles)
|
5
5
|
#
|
6
6
|
# Product/Info:
|
7
7
|
# http://jekyll.one
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
# -----------------------------------------------------------------------------
|
3
|
+
# ~/assets/themes/j1/modules/lunr/css/j1.min.css
|
4
|
+
# Provides styles for J1 Module lunr (result styles)
|
5
|
+
#
|
6
|
+
# Product/Info:
|
7
|
+
# http://jekyll.one
|
8
|
+
#
|
9
|
+
# Copyright (C) 2022 Juergen Adams
|
10
|
+
#
|
11
|
+
# J1 Template is licensed under the MIT License
|
12
|
+
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
13
|
+
# -----------------------------------------------------------------------------
|
14
|
+
*/
|
15
|
+
.search-results{max-height:450px;width:98%;background-color:unset;overflow-y:scroll!important;margin-top:.25rem;margin-bottom:.25rem}p.result-item-text{font-size:.875rem;margin-bottom:.5rem;text-align:justify;line-height:1.25rem}
|
File without changes
|
File without changes
|
@@ -148,20 +148,23 @@
|
|
148
148
|
|
149
149
|
$results.show();
|
150
150
|
|
151
|
-
//
|
152
|
-
//
|
153
|
-
// logic), some cleanups are needed after results generated.
|
154
|
-
//
|
151
|
+
// Because search results are generated by MustacheJS (no logic
|
152
|
+
// available), some cleanups are needed AFTER results generated.
|
155
153
|
if (docs.length > 0) {
|
156
|
-
var logger
|
157
|
-
var log_text
|
154
|
+
var logger = log4javascript.getLogger('j1.lunr');
|
155
|
+
var log_text = '\n' + 'post cleanup of tags and categories';
|
156
|
+
var sr_categories;
|
157
|
+
var sr_tags;
|
158
|
+
|
158
159
|
logger.info(log_text);
|
160
|
+
|
161
|
+
// Remove unwanted trailing (dot) delimiters
|
159
162
|
$('.sr-tags').each(function() {
|
160
|
-
|
163
|
+
sr_tags = $(this).html().replace(/^\s+(.*)(\s+·\s+$)/, "$1");
|
161
164
|
$(this).text(sr_tags);
|
162
165
|
});
|
163
166
|
$('.sr-categories').each(function() {
|
164
|
-
|
167
|
+
sr_categories = $(this).html().replace(/^(.*)(\s+·\s+$)/, "$1");
|
165
168
|
$(this).text(sr_categories);
|
166
169
|
});
|
167
170
|
}
|
@@ -14,4 +14,4 @@
|
|
14
14
|
# TODO:
|
15
15
|
# -----------------------------------------------------------------------------
|
16
16
|
*/
|
17
|
-
"use strict";(function(c){var b=function(e){var f;var g=Array.prototype.slice;return function(){var i=g.call(arguments),h=this;clearTimeout(f);f=setTimeout(function(){e.apply(h,i)},100)}};var d=function(e){var f=e.match(/(\d+)/g);return new Date(f[0],f[1]-1,f[2])};var a=(function(){function e(g,f){this.$elem=g;this.$results=c(f.results);this.indexData=f.index_file;this.template=this.compileTemplate(c(f.template));this.titleMsg=f.titleMsg;this.emptyMsg=f.emptyMsg;this.onAfterResultShow=f.onAfterResultShow;this.initialize()}e.prototype.initialize=function(){var f=this;this.loadIndexData(function(g){f.docs=c.map(g.docs,f.createEntry);f.index=lunr.Index.load(g.index);f.populateSearchFromQuery();f.bindKeypress()})};e.prototype.compileTemplate=function(f){var g=f.text();Mustache.parse(g);return function(h,i){return Mustache.render(g,h,i)}};e.prototype.loadIndexData=function(f){c.getJSON(this.indexData,f)};e.prototype.createEntry=function(g,f){var h=c.extend({id:f+1},g);if(g.date){c.extend(h,{date:d(g.date),pubdate:function(){return dateFormat(d(g.date),"yyyy-mm-dd")},displaydate:function(){return dateFormat(d(g.date),"mmm dd, yyyy")}})}return h};e.prototype.bindKeypress=function(){var f=this;var g=this.$elem.val();this.$elem.bind("keyup",b(function(){var h=f.$elem.val();if(h!==g){f.search(h)}g=h}))};e.prototype.search=function(g){var h=this.docs;if(g.length<3){this.$results.hide().empty()}else{var f=c.map(this.index.search(g),function(i){return c.grep(h,function(j){return j.id===parseInt(i.ref,10)})[0]});this.displayResults(f);this.onAfterResultShow()}};e.prototype.displayResults=function(
|
17
|
+
"use strict";(function(c){var b=function(e){var f;var g=Array.prototype.slice;return function(){var i=g.call(arguments),h=this;clearTimeout(f);f=setTimeout(function(){e.apply(h,i)},100)}};var d=function(e){var f=e.match(/(\d+)/g);return new Date(f[0],f[1]-1,f[2])};var a=(function(){function e(g,f){this.$elem=g;this.$results=c(f.results);this.indexData=f.index_file;this.template=this.compileTemplate(c(f.template));this.titleMsg=f.titleMsg;this.emptyMsg=f.emptyMsg;this.onAfterResultShow=f.onAfterResultShow;this.initialize()}e.prototype.initialize=function(){var f=this;this.loadIndexData(function(g){f.docs=c.map(g.docs,f.createEntry);f.index=lunr.Index.load(g.index);f.populateSearchFromQuery();f.bindKeypress()})};e.prototype.compileTemplate=function(f){var g=f.text();Mustache.parse(g);return function(h,i){return Mustache.render(g,h,i)}};e.prototype.loadIndexData=function(f){c.getJSON(this.indexData,f)};e.prototype.createEntry=function(g,f){var h=c.extend({id:f+1},g);if(g.date){c.extend(h,{date:d(g.date),pubdate:function(){return dateFormat(d(g.date),"yyyy-mm-dd")},displaydate:function(){return dateFormat(d(g.date),"mmm dd, yyyy")}})}return h};e.prototype.bindKeypress=function(){var f=this;var g=this.$elem.val();this.$elem.bind("keyup",b(function(){var h=f.$elem.val();if(h!==g){f.search(h)}g=h}))};e.prototype.search=function(g){var h=this.docs;if(g.length<3){this.$results.hide().empty()}else{var f=c.map(this.index.search(g),function(i){return c.grep(h,function(j){return j.id===parseInt(i.ref,10)})[0]});this.displayResults(f);this.onAfterResultShow()}};e.prototype.displayResults=function(k){var g=this.$results;g.empty();if(k.length===0){g.append(this.emptyMsg)}else{if(this.titleMsg&&0!==this.titleMsg.length){g.append(this.titleMsg)}g.append(this.template({docs:k}))}g.show();if(k.length>0){var i=log4javascript.getLogger("j1.searcher");var h="\ncleanup tags and categories";var f;var j;i.info(h);c(".sr-tags").each(function(){j=c(this).html().replace(/^\s+(.*)(\s+·\s+$)/,"$1");c(this).text(j)});c(".sr-categories").each(function(){f=c(this).html().replace(/^(.*)(\s+·\s+$)/,"$1");c(this).text(f)})}};e.prototype.populateSearchFromQuery=function(){var f=new URI(window.location.search.toString());var g=f.search(true);if(g.hasOwnProperty("q")){this.$elem.val(g.q);this.search(g.q.toString())}};return e})();c.fn.lunrSearch=function(e){e=c.extend({},c.fn.lunrSearch.defaults,e);new a(this,e);return this};c.fn.lunrSearch.defaults={index_file:" /assets/data/lunr-index.json",results:"#search-results",template:"#search-results-template",titleMsg:"<h1>Search results<h1>",emptyMsg:"<p>Nothing found.</p>",onAfterResultShow:function(){}}})(jQuery);
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|