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
@@ -34,11 +34,12 @@ regenerate: true
|
|
34
34
|
-------------------------------------------------------------------------------- {% endcomment %}
|
35
35
|
{% assign template_config = site.data.j1_config %}
|
36
36
|
{% assign apps = site.data.apps %}
|
37
|
+
{% assign modules = site.data.modules %}
|
37
38
|
|
38
39
|
{% comment %} Set config data
|
39
40
|
-------------------------------------------------------------------------------- {% endcomment %}
|
40
|
-
{% assign jf_gallery_defaults =
|
41
|
-
{% assign jf_gallery_settings =
|
41
|
+
{% assign jf_gallery_defaults = modules.defaults.justifiedGallery.defaults %}
|
42
|
+
{% assign jf_gallery_settings = modules.justifiedGallery.settings %}
|
42
43
|
|
43
44
|
{% comment %} Set config options
|
44
45
|
-------------------------------------------------------------------------------- {% endcomment %}
|
@@ -114,28 +115,34 @@ j1.adapter.justifiedGallery = (function (j1, window) {
|
|
114
115
|
_this = j1.adapter.justifiedGallery;
|
115
116
|
logger = log4javascript.getLogger('j1.adapter.justifiedGallery');
|
116
117
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
118
|
+
var dependencies_met_j1_finished= setInterval(function() {
|
119
|
+
if (j1.getState() == 'finished') {
|
120
|
+
// initialize state flag
|
121
|
+
_this.setState('started');
|
122
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
123
|
+
logger.info('\n' + 'module is being initialized');
|
124
|
+
|
125
|
+
{% comment %} Load module config from yml data
|
126
|
+
---------------------------------------------------------------------- {% endcomment %}
|
127
|
+
// Load module DEFAULTS|CONFIG
|
128
|
+
//
|
129
|
+
/* eslint-disable */
|
130
|
+
moduleOptions = $.extend({}, {{jf_gallery_options | replace: '=>', ':' | replace: 'nil', '""'}});
|
131
|
+
/* eslint-enable */
|
132
|
+
|
133
|
+
if (typeof settings !== 'undefined') {
|
134
|
+
moduleOptions = j1.mergeData(moduleOptions, settings);
|
135
|
+
}
|
136
|
+
|
137
|
+
_this.initialize(moduleOptions);
|
138
|
+
|
139
|
+
_this.setState('finished');
|
140
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
141
|
+
logger.info('\n' + 'module initialized successfully');
|
142
|
+
|
143
|
+
clearInterval(dependencies_met_j1_finished);
|
144
|
+
}
|
145
|
+
}, 25);
|
139
146
|
},
|
140
147
|
|
141
148
|
// -----------------------------------------------------------------------
|
@@ -145,7 +152,7 @@ j1.adapter.justifiedGallery = (function (j1, window) {
|
|
145
152
|
logger = log4javascript.getLogger('j1.adapter.justifiedGallery');
|
146
153
|
|
147
154
|
_this.setState('running');
|
148
|
-
logger.
|
155
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
149
156
|
|
150
157
|
{% for item in jf_gallery_options.galleries %}
|
151
158
|
{% if item.gallery.enabled %}
|
@@ -157,7 +164,7 @@ j1.adapter.justifiedGallery = (function (j1, window) {
|
|
157
164
|
{% assign gallery_title = item.gallery.title %}
|
158
165
|
{% assign gallery_type = item.gallery.type %}
|
159
166
|
{% assign lightbox = item.gallery.lightbox_options.lightbox %}
|
160
|
-
{% assign
|
167
|
+
{% assign theme = item.gallery.theme %}
|
161
168
|
{% assign show_delay = 250 %}
|
162
169
|
|
163
170
|
{% if lightbox == "lg" %}
|
@@ -180,6 +187,7 @@ j1.adapter.justifiedGallery = (function (j1, window) {
|
|
180
187
|
{% endif %}
|
181
188
|
|
182
189
|
{% if item.gallery.show_delay %} {% assign show_delay = item.gallery.show_delay %} {% endif %}
|
190
|
+
{% if item.gallery.theme %} {% assign theme = item.gallery.theme %} {% endif %}
|
183
191
|
{% if lb_options.mode %} {% assign lb_mode = lb_options.mode %} {% endif %}
|
184
192
|
{% if lb_options.cssEasing %} {% assign lb_cssEasing = lb_options.cssEasing %} {% endif %}
|
185
193
|
{% if lb_options.thumbnails %} {% assign lb_thumbnails = lb_options.thumbnails %} {% endif %}
|
@@ -219,7 +227,6 @@ j1.adapter.justifiedGallery = (function (j1, window) {
|
|
219
227
|
|
220
228
|
for (var i in data['{{item.gallery.id}}']) {
|
221
229
|
var img = data['{{item.gallery.id}}'][i].img;
|
222
|
-
// var img = data['{{item.gallery.id}}'][i].image_path + '/' + data['{{item.gallery.id}}'][i].poster;
|
223
230
|
var captions_gallery = data['{{item.gallery.id}}'][i].captions_gallery;
|
224
231
|
var captions_lightbox = data['{{item.gallery.id}}'][i].captions_lightbox;
|
225
232
|
var lightbox = '{{lightbox}}';
|
@@ -240,6 +247,7 @@ j1.adapter.justifiedGallery = (function (j1, window) {
|
|
240
247
|
{% elsif gallery_type == "video-html5" or gallery_type == "video-online" %}
|
241
248
|
|
242
249
|
// Collect html5 video gallery data from data file (xhr_data_path)
|
250
|
+
//
|
243
251
|
$.getJSON('{{jf_gallery_options.xhr_data_path}}', function (data) {
|
244
252
|
var play_button = '/assets/themes/j1/modules/lightGallery/css/themes/icons/play-button.png';
|
245
253
|
var content = '';
|
@@ -249,12 +257,13 @@ j1.adapter.justifiedGallery = (function (j1, window) {
|
|
249
257
|
{% endif %}
|
250
258
|
|
251
259
|
for (var i in data['{{item.gallery.id}}']) {
|
252
|
-
// var img = data['{{item.gallery.id}}'][i].img;
|
253
260
|
var img = data['{{item.gallery.id}}'][i].image_path + '/' + data['{{item.gallery.id}}'][i].poster;
|
254
261
|
var captions_gallery = data['{{item.gallery.id}}'][i].captions_gallery;
|
255
262
|
var captions_lightbox = data['{{item.gallery.id}}'][i].captions_lightbox;
|
256
263
|
var video_id = data['{{item.gallery.id}}'][i].video_id;
|
257
264
|
var video = data['{{item.gallery.id}}'][i].video;
|
265
|
+
var theme = data['{{item.gallery.id}}'][i].theme;
|
266
|
+
var player_params = data['{{item.gallery.id}}'][i].player_params;
|
258
267
|
var lightbox = '{{lightbox}}';
|
259
268
|
|
260
269
|
if (captions_lightbox != null && lightbox == 'lg') {
|
@@ -263,7 +272,8 @@ j1.adapter.justifiedGallery = (function (j1, window) {
|
|
263
272
|
content += ' data-html="#' +video_id+ '">' + '\n';
|
264
273
|
{% endif %}
|
265
274
|
{% if gallery_type == "video-online" %}
|
266
|
-
content += ' data-src="' +video+ '"
|
275
|
+
content += ' data-src="' +video+ '"';
|
276
|
+
content += ' data-options="' +player_params+ '"' + '>' + '\n';
|
267
277
|
{% endif %}
|
268
278
|
content += 'href="' +img+ '">' + '\n';
|
269
279
|
content += '<img src="' +img+ '" img alt="' +captions_lightbox+ '">' + '\n';
|
@@ -278,6 +288,8 @@ j1.adapter.justifiedGallery = (function (j1, window) {
|
|
278
288
|
|
279
289
|
} // END for
|
280
290
|
|
291
|
+
// hidden container for the video-js player
|
292
|
+
//
|
281
293
|
var hidden_video_div = '';
|
282
294
|
for (var i in data['{{item.gallery.id}}']) {
|
283
295
|
var video = data['{{item.gallery.id}}'][i].video_path + '/' + data['{{item.gallery.id}}'][i].video;
|
@@ -286,7 +298,7 @@ j1.adapter.justifiedGallery = (function (j1, window) {
|
|
286
298
|
var video_id = data['{{item.gallery.id}}'][i].video_id;
|
287
299
|
var video_type = video.substr(video.lastIndexOf('.') + 1);
|
288
300
|
hidden_video_div += '<div style="display:none;" id="' +video_id+ '">' + '\n';
|
289
|
-
hidden_video_div += ' <video class="lg-video-object lg-html5 video-js vjs-
|
301
|
+
hidden_video_div += ' <video class="lg-video-object lg-html5 video-js vjs-theme-{{theme}}"' + '\n';
|
290
302
|
hidden_video_div += ' poster="' +poster+ '" controls="" preload="none">' + '\n';
|
291
303
|
hidden_video_div += ' <source src="' +video+ '" type="video/' +video_type+ '">' + '\n';
|
292
304
|
hidden_video_div += ' Your browser does not support HTML5 video.' + '\n';
|
@@ -46,8 +46,8 @@ regenerate: true
|
|
46
46
|
|
47
47
|
{% comment %} Set config data
|
48
48
|
-------------------------------------------------------------------------------- {% endcomment %}
|
49
|
-
{% assign jf_gallery_defaults =
|
50
|
-
{% assign jf_gallery_settings =
|
49
|
+
{% assign jf_gallery_defaults = modules.defaults.justifiedGallery.defaults %}
|
50
|
+
{% assign jf_gallery_settings = modules.justifiedGallery.settings %}
|
51
51
|
{% assign gallery_customizer_defaults = apps.defaults.justifiedGalleryCustomizer.defaults %}
|
52
52
|
{% assign gallery_customizer_settings = apps.justifiedGalleryCustomizer.settings %}
|
53
53
|
|
@@ -125,11 +125,6 @@ j1.adapter.justifiedGalleryCustomizer = (function (j1, window) {
|
|
125
125
|
_this = j1.adapter.justifiedGalleryCustomizer;
|
126
126
|
logger = log4javascript.getLogger('j1.adapter.justifiedGalleryCustomizer');
|
127
127
|
|
128
|
-
// initialize state flag
|
129
|
-
_this.setState('started');
|
130
|
-
logger.info('\n' + 'state: ' + _this.getState());
|
131
|
-
logger.info('\n' + 'module is being initialized');
|
132
|
-
|
133
128
|
{% comment %} Load gallery config from yml data
|
134
129
|
-------------------------------------------------------------------------- {% endcomment %}
|
135
130
|
/* eslint-disable */
|
@@ -152,7 +147,7 @@ j1.adapter.justifiedGalleryCustomizer = (function (j1, window) {
|
|
152
147
|
// initializer
|
153
148
|
// -----------------------------------------------------------------------
|
154
149
|
var dependencies_met_data_loaded = setInterval(function() {
|
155
|
-
if (j1.xhrDOMState['#customizer'] == 'success' && j1.adapter.
|
150
|
+
if (j1.getState() == 'finished' && j1.xhrDOMState['#customizer'] == 'success' && j1.adapter.justifiedGallery.getState() == 'finished') {
|
156
151
|
var galleryId = '#jg_customizer';
|
157
152
|
var $formId = $('#jg-customizer-form');
|
158
153
|
var $instance = $('#jg_customizer');
|
@@ -162,118 +157,136 @@ j1.adapter.justifiedGalleryCustomizer = (function (j1, window) {
|
|
162
157
|
var kbdDelay = 750;
|
163
158
|
var imageHeightMin = 100;
|
164
159
|
|
165
|
-
logger.info('\n' + '
|
160
|
+
logger.info('\n' + 'module is being initialized');
|
161
|
+
|
162
|
+
// initialize state flag
|
163
|
+
_this.setState('started');
|
164
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
165
|
+
|
166
|
+
logger.info('\n' + 'loading HTML portion of the customizer finished on id: #' + customizerOptions.xhr_container_id);
|
166
167
|
|
167
168
|
// -------------------------------------------------------------------
|
168
169
|
// load gallery data
|
170
|
+
//
|
169
171
|
j1.adapter.justifiedGallery.initialize(galleryOptions);
|
170
172
|
|
171
|
-
|
172
|
-
|
173
|
+
// -------------------------------------------------------------------
|
174
|
+
// initialize customizer ui
|
175
|
+
//
|
173
176
|
if ($formId.length) {
|
174
|
-
var
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
177
|
+
var dependencies_met_sliders_loaded = setInterval(function() {
|
178
|
+
if (j1.adapter.rangeSlider.getState() == 'finished') {
|
179
|
+
logger.info('\n' + 'initialize customizer ui');
|
180
|
+
|
181
|
+
rangeRowHeigth.noUiSlider.on('update', function (values, handle) {
|
182
|
+
$instance.justifiedGallery({rowHeight: values[handle]});
|
183
|
+
});
|
184
|
+
rangeThumbSpacing.noUiSlider.on('update', function (values, handle) {
|
185
|
+
$instance.justifiedGallery({margins: values[handle]});
|
186
|
+
});
|
187
|
+
rangeGalleryPadding.noUiSlider.on('update', function (values, handle) {
|
188
|
+
$instance.justifiedGallery({border: values[handle]});
|
189
|
+
});
|
190
|
+
|
191
|
+
$('input:checkbox[name="captions"]').on('click', function (e) {
|
192
|
+
var value = $(this).is(':checked');
|
193
|
+
|
194
|
+
$instance.justifiedGallery({captions: value});
|
195
|
+
if(environment === 'development') {
|
196
|
+
logText = '\n' + 'gallery on ID ' +galleryId+ ' changed captions to: ' +value;
|
197
|
+
logger.info(logText);
|
198
|
+
}
|
199
|
+
e.stopPropagation();
|
200
|
+
});
|
201
|
+
|
202
|
+
$('input:checkbox[name="random"]').on('click', function (e) {
|
203
|
+
var value = $(this).is(':checked');
|
204
|
+
|
205
|
+
$instance.justifiedGallery({randomize: value});
|
206
|
+
if(environment === 'development') {
|
207
|
+
logText = '\n' + 'gallery on ID ' +galleryId+ ' changed randomize to: ' +value;
|
208
|
+
logger.info(logText);
|
209
|
+
}
|
210
|
+
e.stopPropagation();
|
211
|
+
});
|
212
|
+
|
213
|
+
$('input:checkbox[name="justify_last_row"]').on('click', function (e) {
|
214
|
+
var value = $(this).is(':checked');
|
215
|
+
|
216
|
+
if (value == true) {
|
217
|
+
value = 'justify';
|
218
|
+
$instance.justifiedGallery({lastRow: value});
|
219
|
+
} else {
|
220
|
+
value = 'nojustify';
|
221
|
+
$instance.justifiedGallery({lastRow: value});
|
222
|
+
}
|
223
|
+
if(environment === 'development') {
|
224
|
+
logText = '\n' + 'gallery on ID ' +galleryId+ ' changed lastRow to: ' +value;
|
225
|
+
logger.info(logText);
|
226
|
+
}
|
227
|
+
e.stopPropagation();
|
228
|
+
});
|
229
|
+
|
230
|
+
$('input:checkbox[name="hide_last_row"]').on('click', function (e) {
|
231
|
+
var value = $(this).is(':checked');
|
232
|
+
|
233
|
+
if (value == true) {
|
234
|
+
value = 'hide';
|
235
|
+
$instance.justifiedGallery({lastRow: value});
|
236
|
+
} else {
|
237
|
+
value = 'nojustify';
|
238
|
+
$instance.justifiedGallery({lastRow: value});
|
239
|
+
}
|
240
|
+
if(environment === 'development') {
|
241
|
+
logText = '\n' + 'gallery on ID ' +galleryId+ ' changed lastRow to: ' +value;
|
242
|
+
logger.info(logText);
|
243
|
+
}
|
244
|
+
e.stopPropagation();
|
245
|
+
});
|
246
|
+
|
247
|
+
$('#jg-customizer-form button[name="reset-defaults"]').on('click', function (e) {
|
248
|
+
|
249
|
+
rangeRowHeigth.noUiSlider.set(customizerOptions.gallery_settings.rowHeight);
|
250
|
+
rangeThumbSpacing.noUiSlider.set(customizerOptions.gallery_settings.margins);
|
251
|
+
rangeGalleryPadding.noUiSlider.set(customizerOptions.gallery_settings.border);
|
252
|
+
|
253
|
+
$('input:checkbox[name="captions"]').val('on').filter('[value="on"]').prop('checked', customizerOptions.gallery_settings.captions);
|
254
|
+
$('input:checkbox[name="random"]').val('off').filter('[value="off"]').prop('checked', customizerOptions.gallery_settings.randomize);
|
255
|
+
$('input:checkbox[name="justify_last_row"]').val('on').filter('[value="on"]').prop('checked', customizerOptions.gallery_settings.justifyLastRow);
|
256
|
+
$('input:checkbox[name="hide_last_row"]').val('off').filter('[value="off"]').prop('checked', customizerOptions.gallery_settings.hideLastRow);
|
257
|
+
|
258
|
+
// -----------------------------------------------------------
|
259
|
+
// set gallery options
|
260
|
+
//
|
261
|
+
$instance.justifiedGallery({
|
262
|
+
rowHeight: customizerOptions.gallery_settings.rowHeight,
|
263
|
+
maxRowHeight: customizerOptions.gallery_settings.maxRowHeight,
|
264
|
+
lastRow: customizerOptions.gallery_settings.lastRow,
|
265
|
+
margins: customizerOptions.gallery_settings.margins,
|
266
|
+
border: customizerOptions.gallery_settings.border,
|
267
|
+
randomize: customizerOptions.gallery_settings.randomize,
|
268
|
+
sort: customizerOptions.gallery_settings.sort,
|
269
|
+
refreshTime: customizerOptions.gallery_settings.refreshTime,
|
270
|
+
refreshSensitivity: customizerOptions.gallery_settings.refreshSensitivity,
|
271
|
+
justifyThreshold: customizerOptions.gallery_settings.justifyThreshold,
|
272
|
+
captions: customizerOptions.gallery_settings.captions
|
273
|
+
});
|
274
|
+
|
275
|
+
if(environment === 'development') {
|
276
|
+
logText = '\n' + 'gallery on ID ' +galleryId+ ' reset to default values';
|
277
|
+
logger.info(logText);
|
278
|
+
}
|
279
|
+
e.stopPropagation();
|
280
|
+
});
|
281
|
+
clearInterval(dependencies_met_sliders_loaded);
|
234
282
|
}
|
235
|
-
|
236
|
-
|
237
|
-
logger.info(logText);
|
238
|
-
}
|
239
|
-
e.stopPropagation();
|
240
|
-
});
|
241
|
-
|
242
|
-
$('#jg-customizer-form button[name="reset-defaults"]').on('click', function (e) {
|
243
|
-
|
244
|
-
rangeRowHeigth.noUiSlider.set(customizerOptions.gallery_settings.rowHeight);
|
245
|
-
rangeThumbSpacing.noUiSlider.set(customizerOptions.gallery_settings.margins);
|
246
|
-
rangeGalleryPadding.noUiSlider.set(customizerOptions.gallery_settings.border);
|
247
|
-
|
248
|
-
$('input:checkbox[name="captions"]').val('on').filter('[value="on"]').prop('checked', customizerOptions.gallery_settings.captions);
|
249
|
-
$('input:checkbox[name="random"]').val('off').filter('[value="off"]').prop('checked', customizerOptions.gallery_settings.randomize);
|
250
|
-
$('input:checkbox[name="justify_last_row"]').val('on').filter('[value="on"]').prop('checked', customizerOptions.gallery_settings.justifyLastRow);
|
251
|
-
$('input:checkbox[name="hide_last_row"]').val('off').filter('[value="off"]').prop('checked', customizerOptions.gallery_settings.hideLastRow);
|
252
|
-
|
253
|
-
$instance.justifiedGallery({
|
254
|
-
rowHeight: customizerOptions.gallery_settings.rowHeight,
|
255
|
-
maxRowHeight: customizerOptions.gallery_settings.maxRowHeight,
|
256
|
-
lastRow: customizerOptions.gallery_settings.lastRow,
|
257
|
-
margins: customizerOptions.gallery_settings.margins,
|
258
|
-
border: customizerOptions.gallery_settings.border,
|
259
|
-
randomize: customizerOptions.gallery_settings.randomize,
|
260
|
-
sort: customizerOptions.gallery_settings.sort,
|
261
|
-
refreshTime: customizerOptions.gallery_settings.refreshTime,
|
262
|
-
refreshSensitivity: customizerOptions.gallery_settings.refreshSensitivity,
|
263
|
-
justifyThreshold: customizerOptions.gallery_settings.justifyThreshold,
|
264
|
-
captions: customizerOptions.gallery_settings.captions
|
265
|
-
});
|
266
|
-
|
267
|
-
if(environment === 'development') {
|
268
|
-
logText = '\n' + 'gallery on ID ' +galleryId+ ' reset to default values';
|
269
|
-
logger.info(logText);
|
270
|
-
}
|
271
|
-
e.stopPropagation();
|
272
|
-
});
|
273
|
-
|
274
|
-
} // END form events
|
283
|
+
}, 25);
|
284
|
+
} // END if formId (customizer ui)
|
275
285
|
|
286
|
+
// -----------------------------------------------------------
|
287
|
+
// set drawer events (button toggler)
|
276
288
|
// See: https://jsfiddle.net/prathviraj080/vbbbw46a/1/
|
289
|
+
//
|
277
290
|
$('button.drawer-toggler').click(function(){
|
278
291
|
$('button.drawer-toggler span.mdi').toggleClass('mdi-menu mdi-close');
|
279
292
|
});
|
@@ -282,9 +295,9 @@ j1.adapter.justifiedGalleryCustomizer = (function (j1, window) {
|
|
282
295
|
});
|
283
296
|
|
284
297
|
_this.setState('finished');
|
285
|
-
logger.
|
298
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
286
299
|
logger.info('\n' + 'initializing module finished');
|
287
|
-
logger.
|
300
|
+
logger.debug('\n' + 'met dependencies for: loadHTML');
|
288
301
|
clearInterval(dependencies_met_data_loaded);
|
289
302
|
} // END dependencies_met_data_loaded
|
290
303
|
}, 25);
|
@@ -36,12 +36,12 @@ regenerate: false
|
|
36
36
|
{% comment %} Set config files
|
37
37
|
-------------------------------------------------------------------------------- {% endcomment %}
|
38
38
|
{% assign template_config = site.data.j1_config %}
|
39
|
-
{% assign
|
39
|
+
{% assign modules = site.data.modules %}
|
40
40
|
|
41
41
|
{% comment %} Set config data
|
42
42
|
-------------------------------------------------------------------------------- {% endcomment %}
|
43
|
-
{% assign lightbox_defaults =
|
44
|
-
{% assign lightbox_settings =
|
43
|
+
{% assign lightbox_defaults = modules.defaults.lightbox.defaults %}
|
44
|
+
{% assign lightbox_settings = modules.lightbox.settings %}
|
45
45
|
|
46
46
|
{% comment %} Set config options
|
47
47
|
-------------------------------------------------------------------------------- {% endcomment %}
|
@@ -118,33 +118,37 @@ j1.adapter.lightbox = (function (j1, window) {
|
|
118
118
|
_this = j1.adapter.lightbox;
|
119
119
|
logger = log4javascript.getLogger('j1.adapter.lightbox');
|
120
120
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
121
|
+
var dependencies_met_j1_finished = setInterval(function() {
|
122
|
+
if (j1.getState() == 'finished') {
|
123
|
+
|
124
|
+
_this.setState('started');
|
125
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
126
|
+
logger.info('\n' + 'module is being initialized');
|
127
|
+
|
128
|
+
/* eslint-disable */
|
129
|
+
lightbox.option({
|
130
|
+
alwaysShowNavOnTouchDevices: {{ lightbox_options.alwaysShowNavOnTouchDevices | json }},
|
131
|
+
albumLabel: {{ lightbox_options.albumLabel | json }},
|
132
|
+
disableScrolling: {{ lightbox_options.disableScrolling | json }},
|
133
|
+
fadeDuration: {{ lightbox_options.fadeDuration | json }},
|
134
|
+
fitImagesInViewport: {{ lightbox_options.fitImagesInViewport | json }},
|
135
|
+
imageFadeDuration: {{ lightbox_options.imageFadeDuration | json }},
|
136
|
+
maxWidth: {{ lightbox_options.maxWidth | json }},
|
137
|
+
maxHeight: {{ lightbox_options.maxHeight | json }},
|
138
|
+
positionFromTop: {{ lightbox_options.positionFromTop | json }},
|
139
|
+
resizeDuration: {{ lightbox_options.resizeDuration | json }},
|
140
|
+
showImageNumberLabel: {{ lightbox_options.showImageNumberLabel | json }},
|
141
|
+
wrapAround: {{ lightbox_options.wrapAround | json }}
|
142
|
+
});
|
143
|
+
/* eslint-enable */
|
144
|
+
|
145
|
+
_this.setState('finished');
|
146
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
147
|
+
logger.info('\n' + 'initializing module finished');
|
148
|
+
|
149
|
+
clearInterval(dependencies_met_j1_finished);
|
150
|
+
} // END dependencies_met_j1_finished
|
151
|
+
}, 25);
|
148
152
|
}, // END init lightbox
|
149
153
|
|
150
154
|
// -------------------------------------------------------------------------
|
@@ -202,7 +202,7 @@ j1.adapter.logger = (function (j1, window) {
|
|
202
202
|
|
203
203
|
if (user_session.mode !== 'na') {
|
204
204
|
clearInterval(dependencies_met_mode_detected);
|
205
|
-
logger.
|
205
|
+
logger.debug('\n' + 'met dependencies for: mode detected');
|
206
206
|
appDetected = user_session.mode === 'app' ? true : false;
|
207
207
|
|
208
208
|
if (appDetected) {
|
@@ -287,7 +287,7 @@ j1.adapter.logger = (function (j1, window) {
|
|
287
287
|
}
|
288
288
|
|
289
289
|
_this.setState('finished');
|
290
|
-
logger.
|
290
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
291
291
|
logger.info('\n' + 'module initialized successfully');
|
292
292
|
|
293
293
|
return true;
|
@@ -6,7 +6,7 @@ regenerate: true
|
|
6
6
|
|
7
7
|
{% comment %}
|
8
8
|
# -----------------------------------------------------------------------------
|
9
|
-
# ~/assets/themes/j1/adapter/js/
|
9
|
+
# ~/assets/themes/j1/adapter/js/lunr.js
|
10
10
|
# Liquid template to adapt Lunr for J1 TemplATE
|
11
11
|
#
|
12
12
|
# Product/Info:
|
@@ -38,12 +38,12 @@ regenerate: true
|
|
38
38
|
{% assign environment = site.environment %}
|
39
39
|
{% assign template_version = site.version %}
|
40
40
|
|
41
|
-
{% assign
|
42
|
-
{% assign
|
41
|
+
{% assign lunr_search_defaults = modules.defaults.lunr.defaults %}
|
42
|
+
{% assign lunr_search_settings = modules.lunr.settings %}
|
43
43
|
|
44
44
|
{% comment %} Set config options
|
45
45
|
-------------------------------------------------------------------------------- {% endcomment %}
|
46
|
-
{% assign lunr_search_options =
|
46
|
+
{% assign lunr_search_options = lunr_search_defaults | merge: lunr_search_settings %}
|
47
47
|
|
48
48
|
{% assign production = false %}
|
49
49
|
{% if environment == 'prod' or environment == 'production' %}
|
@@ -52,8 +52,8 @@ regenerate: true
|
|
52
52
|
|
53
53
|
/*
|
54
54
|
# -----------------------------------------------------------------------------
|
55
|
-
# ~/assets/themes/j1/adapter/js/
|
56
|
-
# J1 Adapter for J1
|
55
|
+
# ~/assets/themes/j1/adapter/js/lunr.js
|
56
|
+
# J1 Adapter for J1 Lunr
|
57
57
|
#
|
58
58
|
# Product/Info:
|
59
59
|
# https://jekyll.one
|
@@ -73,7 +73,7 @@ regenerate: true
|
|
73
73
|
/* eslint indent: "off" */
|
74
74
|
// -----------------------------------------------------------------------------
|
75
75
|
'use strict';
|
76
|
-
j1.adapter.
|
76
|
+
j1.adapter.lunr = (function (j1, window) {
|
77
77
|
|
78
78
|
{% comment %} Set global variables
|
79
79
|
------------------------------------------------------------------------------ {% endcomment %}
|
@@ -101,20 +101,15 @@ j1.adapter.quicksearch = (function (j1, window) {
|
|
101
101
|
// Default module settings
|
102
102
|
// -----------------------------------------------------------------------
|
103
103
|
var settings = $.extend({
|
104
|
-
module_name: 'j1.adapter.
|
104
|
+
module_name: 'j1.adapter.lunr',
|
105
105
|
generated: '{{site.time}}'
|
106
106
|
}, options);
|
107
107
|
|
108
108
|
// -----------------------------------------------------------------------
|
109
109
|
// Global variable settings
|
110
110
|
// -----------------------------------------------------------------------
|
111
|
-
_this = j1.adapter.
|
112
|
-
logger = log4javascript.getLogger('j1.adapter.
|
113
|
-
|
114
|
-
// initialize state flag
|
115
|
-
_this.setState('started');
|
116
|
-
logger.info('\n' + 'state: ' + _this.getState());
|
117
|
-
logger.info('\n' + 'module is being initialized');
|
111
|
+
_this = j1.adapter.lunr;
|
112
|
+
logger = log4javascript.getLogger('j1.adapter.lunr');
|
118
113
|
|
119
114
|
// -----------------------------------------------------------------------
|
120
115
|
// options loader
|
@@ -125,12 +120,14 @@ j1.adapter.quicksearch = (function (j1, window) {
|
|
125
120
|
// -----------------------------------------------------------------------
|
126
121
|
// lunr_search initializer
|
127
122
|
// -----------------------------------------------------------------------
|
128
|
-
var log_text = '\n' + 'module is being initialized';
|
129
|
-
logger.info(log_text);
|
130
|
-
|
131
123
|
var dependencies_met_j1_finished = setInterval(function() {
|
132
124
|
if (j1.getState() == 'finished') {
|
133
125
|
|
126
|
+
// initialize state flag
|
127
|
+
_this.setState('started');
|
128
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
129
|
+
logger.info('\n' + 'module is being initialized');
|
130
|
+
|
134
131
|
$(searchOptions.search_input).lunrSearch({
|
135
132
|
index_file: searchOptions.index_file,
|
136
133
|
results: searchOptions.results,
|
@@ -140,7 +137,8 @@ j1.adapter.quicksearch = (function (j1, window) {
|
|
140
137
|
});
|
141
138
|
|
142
139
|
_this.setState('finished');
|
143
|
-
logger.
|
140
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
141
|
+
logger.info('\n' + 'initializing module finished');
|
144
142
|
|
145
143
|
clearInterval(dependencies_met_j1_finished);
|
146
144
|
} // END dependencies_met_j1_finished
|