j1_template_mde 2018.4.32 → 2018.4.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/j1/version.rb +1 -1
  3. data/lib/starter_web/Gemfile +1 -1
  4. data/lib/starter_web/_config.yml +1 -2
  5. data/lib/starter_web/_data/modules/j1_cookie_consent.yml +0 -2
  6. data/lib/starter_web/assets/images/pages/roundtrip/package.json +1 -1
  7. data/lib/starter_web/assets/themes/j1/core/js/adapter/algolia.js +3 -2
  8. data/lib/starter_web/assets/themes/j1/core/js/adapter/back2top.js +13 -6
  9. data/lib/starter_web/assets/themes/j1/core/js/adapter/bs_gallery.js +207 -203
  10. data/lib/starter_web/assets/themes/j1/core/js/adapter/cookie_consent.js +27 -18
  11. data/lib/starter_web/assets/themes/j1/core/js/adapter/custom.js +8 -5
  12. data/lib/starter_web/assets/themes/j1/core/js/adapter/iframer.js +5 -3
  13. data/lib/starter_web/assets/themes/j1/core/js/adapter/lightbox.js +3 -2
  14. data/lib/starter_web/assets/themes/j1/core/js/adapter/logger.js +5 -3
  15. data/lib/starter_web/assets/themes/j1/core/js/adapter/master_header.js +17 -12
  16. data/lib/starter_web/assets/themes/j1/core/js/adapter/navigator.js +33 -25
  17. data/lib/starter_web/assets/themes/j1/core/js/adapter/scroller.js +7 -4
  18. data/lib/starter_web/assets/themes/j1/core/js/adapter/searcher.js +48 -44
  19. data/lib/starter_web/assets/themes/j1/core/js/adapter/stickybits.js +7 -4
  20. data/lib/starter_web/assets/themes/j1/core/js/adapter/switcher.js +8 -4
  21. data/lib/starter_web/assets/themes/j1/core/js/adapter/template.js +139 -142
  22. data/lib/starter_web/assets/themes/j1/core/js/adapter/toccer.js +201 -191
  23. data/lib/starter_web/assets/themes/j1/core/js/template.js +1 -1
  24. data/lib/starter_web/assets/themes/j1/core/js/template.js.map +1 -1
  25. data/lib/starter_web/assets/themes/j1/core/js/template.min.js +1 -1
  26. data/lib/starter_web/collections/posts/private/series/_posts/2018-11-01-docker-using-shared-folders.adoc +2 -1
  27. data/lib/starter_web/collections/posts/public/featured/_posts/{2019-04-12-about-cookies.adoc → 2019-04-22-about-cookies.adoc} +1 -1
  28. data/lib/starter_web/package.json +1 -1
  29. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4e73b02fca715662577367a96ab2d23950dd96a
4
- data.tar.gz: f529656d2069e574f0b0da6dbe0e435a6ef444c7
3
+ metadata.gz: da893f9221e682e33237bee43ab33b89bda07797
4
+ data.tar.gz: fadefec42806b1051a4b8393f248cd35706f363e
5
5
  SHA512:
6
- metadata.gz: dd328c9301135fb93f04f593c91beb6a3fa1951aa16f5b3f84aa5d27780148bbffc293bc4e9a8e72e92902d8cf4594194d4d9e9470c0f32eb970789886b6218b
7
- data.tar.gz: 5dad23f336048836b7a31181f2559627ead781620f05d7ead51f8d30cf1b0e12f4f6fd766257e2aba40d9e2e87a21f49c6d13fa7bd4cde72006091be64570f0e
6
+ metadata.gz: cfb075c946c4d8c3a66c457fe62936f22ccdfba2f77cca61992f2571e4b592943ba22efe33aeb87564eac3c42c0dbb0ade17c73d542f4d2d222ea8be65a820c4
7
+ data.tar.gz: e4442c5b327bee06d78fa2e9ded48446ed9f756d5f1ef358f1f96cbc18312e7fab8773070adf5bf146170c3319172467e8afd82edefdd3e609c757988d7be5c2
@@ -1,3 +1,3 @@
1
1
  module J1
2
- VERSION = '2018.4.32'
2
+ VERSION = '2018.4.33'
3
3
  end
@@ -46,7 +46,7 @@ gem 'jekyll', '~> 3.8.5'
46
46
  # Theme Rubies
47
47
  # Default: J1 Template
48
48
  #
49
- gem 'j1_template_mde', '~> 2018.4.32'
49
+ gem 'j1_template_mde', '~> 2018.4.33'
50
50
 
51
51
  # --------------------------------------------------------------------
52
52
  # PRODUCTION: Gem needed for the Jekyll and J1 prod environment
@@ -60,7 +60,7 @@ environment: development
60
60
  # anything here because version information is bumped-in by
61
61
  # the build process
62
62
  #
63
- version: 2018.4.32
63
+ version: 2018.4.33
64
64
 
65
65
 
66
66
  # ==============================================================================
@@ -547,7 +547,6 @@ algolia:
547
547
  j1_auth:
548
548
  enabled: false
549
549
  ssl: false
550
- update_user_state: true
551
550
 
552
551
  content:
553
552
  public:
@@ -15,7 +15,6 @@
15
15
  # Cookie Consent default settings
16
16
  #
17
17
  defaults:
18
- update_user_state: false
19
18
  modal_html_data_path: /assets/data/cookie_consent/index.html
20
19
  modal_type: full
21
20
  modal_position: top
@@ -55,7 +54,6 @@ defaults:
55
54
  #
56
55
  consent:
57
56
  enabled: true
58
- update_user_state: false
59
57
 
60
58
  policy_about: >
61
59
  This website uses cookies to ensure vistors get the best experience
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "web",
4
- "version": "2018.4.32",
4
+ "version": "2018.4.33",
5
5
  "description": "Web/Content sources for J1 Starter",
6
6
  "main": "_config.yml",
7
7
  "config": {
@@ -50,7 +50,7 @@ regenerate: true
50
50
  j1.Algolia = (function (j1, window) {
51
51
 
52
52
  var environment = '{{environment}}'; // Set environment
53
- var state = 'unknown';
53
+ var state = 'not_started';
54
54
  var logger;
55
55
  var logText;
56
56
 
@@ -225,6 +225,7 @@ j1.Algolia = (function (j1, window) {
225
225
  logger.info("J1 Algolia Seach NOT enabled");
226
226
  }
227
227
 
228
+ return;
228
229
  }, // end init
229
230
 
230
231
  // -------------------------------------------------------------------------
@@ -232,8 +233,8 @@ j1.Algolia = (function (j1, window) {
232
233
  // -------------------------------------------------------------------------
233
234
  state: function () {
234
235
  return state;
235
-
236
236
  } // end state
237
+
237
238
  }; // end return
238
239
 
239
240
  })(j1, window);
@@ -76,8 +76,9 @@ regenerate: true
76
76
  {% comment %} Main
77
77
  --------------------------------------------------------------- {% endcomment %}
78
78
  j1.Back2Top = (function (j1, window) {
79
+
79
80
  var environment = '{{environment}}'; // Set environment
80
- var state = 'unknown';
81
+ var state = 'not_started';
81
82
  var logger;
82
83
  var logText;
83
84
 
@@ -96,7 +97,9 @@ j1.Back2Top = (function (j1, window) {
96
97
  state = 'finished';
97
98
  logger.info('state: ' + state); // Set|Log status
98
99
  logger.info("J1 Back2Top successfully initialized");
99
- },
100
+
101
+ return;
102
+ }, // END init
100
103
 
101
104
  // -------------------------------------------------------------------------
102
105
  // Set Back2Top options
@@ -113,26 +116,30 @@ j1.Back2Top = (function (j1, window) {
113
116
  controlOffsetY: {{ back2top_config.controlOffsetY | json }},
114
117
  anchorKeyword: {{ back2top_config.anchorKeyword | json }},
115
118
  });
116
- },
119
+
120
+ return;
121
+ }, // END back2TopInit
117
122
 
118
123
  // -------------------------------------------------------------------------
119
124
  // Set dynamic styles for Back2Top
120
125
  // -------------------------------------------------------------------------
121
126
  setCss: function () {
127
+
122
128
  $('head').append("<style>#topcontrol { background: {{background_color}}; }</style>");
123
129
  $('head').append("<style>#topcontrol:hover { background: {{active_color}}; }</style>");
124
130
  $('head').append("<style>#topcontrol:after { content: \"\\{{ back2top_icon }}\"; font-family: {{ back2top_icon_family }}; }</style>");
125
- },
131
+
132
+ return;
133
+ }, // END setCss
126
134
 
127
135
  // -------------------------------------------------------------------------
128
136
  // returns the current (processing) state of the module
129
137
  // -------------------------------------------------------------------------
130
138
  state: function () {
131
139
  return state;
132
- }
140
+ } // END setCss
133
141
 
134
142
  }; // end return
135
-
136
143
  })(j1, window);
137
144
 
138
145
  {% endcapture %}
@@ -59,223 +59,227 @@ regenerate: true
59
59
  {% comment %} Main
60
60
  --------------------------------------------------------------- {% endcomment %}
61
61
  j1.BsGallery = (function (j1, window) {
62
+
62
63
  var environment = '{{environment}}'; // Set environment
63
- var state = 'unknown';
64
+ var state = 'not_started';
64
65
  var logger;
65
66
  var logText;
66
67
 
67
68
  return {
68
- // Initialize
69
- init: function ( options ) {
70
- logger = log4javascript.getLogger("j1.BSGallery.adapter");
71
-
72
- this.settings = $.extend({}, options);
73
-
74
- {% if environment == 'development' %}
75
- logText = 'start gallery initialization';
76
- logger.info(logText);
77
- state = 'started';
78
- logger.info('state: ' + state); // Set|Log status
79
- {% endif %}
80
-
81
- this.lgInit();
82
-
83
- },
84
-
85
- // ---------------------------------------------------------------------
86
- // Load AJAX data and initialize the gallery
87
- // ---------------------------------------------------------------------
88
- // ToDo:
89
- lgInit: function () {
90
- logger = log4javascript.getLogger("j1.LightGallery.lgInit");
91
-
92
- {% for item in config.galleries %}
93
- {% if item.gallery.enabled %}
94
-
95
- {% comment %} Set (<DIV>|<UL>) container id for the placement of HTML markup {% endcomment %}
96
- {% assign container_id = item.gallery.id %}
97
- {% capture gallery_id %}{{item.gallery.id}}_ul{% endcapture %}
98
- {% capture bs_gallery_class %}bsg_{{item.gallery.id}}{% endcapture %}
99
-
100
- {% comment %} Initialize J1 base gallery options {% endcomment %}
101
- {% assign css_classes = item.gallery.css_classes %}
102
- {% assign gallery_title = item.gallery.title %}
103
- {% assign gallery_type = item.gallery.type %}
104
- {% assign thumb_items = item.gallery.thumb_items %}
105
- {% assign thumb_spacing = item.gallery.thumb_spacing %}
106
- {% assign thumb_bordered = item.gallery.thumb_bordered %}
107
- {% assign thumb_animate = item.gallery.thumb_animate %}
108
-
109
- {% comment %} // Calculate BS grid size for the thumbnails {% endcomment %}
110
- {% assign column_width_md = 12 | divided_by:thumb_items %}
111
-
112
- // Create an gallery instance if {{ container_id }} exists
113
- if ( $('#{{ container_id }}').length ) {
114
-
115
- {% if environment == 'development' %}
116
- logText = 'gallery on ID #{{ container_id }} is being initialized';
117
- logger.info(logText);
118
- state = 'running';
119
- logger.info('state: ' + state); // Set|Log status
120
- {% endif %}
121
-
122
- // Place HTML markup for the title
123
- {% if gallery_title %}
124
- var gallery_title = '<div class="bs-gallery-title">{{gallery_title}}</div>';
125
- $('#{{ container_id }}').before( gallery_title );
69
+ // Initialize
70
+ init: function ( options ) {
71
+ logger = log4javascript.getLogger("j1.BSGallery.adapter");
72
+
73
+ this.settings = $.extend({}, options);
74
+
75
+ {% if environment == 'development' %}
76
+ logText = 'start gallery initialization';
77
+ logger.info(logText);
78
+ state = 'started';
79
+ logger.info('state: ' + state); // Set|Log status
80
+ {% endif %}
81
+
82
+ this.lgInit();
83
+
84
+ return;
85
+ }, // END init
86
+
87
+ // ---------------------------------------------------------------------
88
+ // Load AJAX data and initialize the gallery
89
+ // ---------------------------------------------------------------------
90
+ // ToDo:
91
+ lgInit: function () {
92
+
93
+ logger = log4javascript.getLogger("j1.LightGallery.lgInit");
94
+
95
+ {% for item in config.galleries %}
96
+ {% if item.gallery.enabled %}
97
+
98
+ {% comment %} Set (<DIV>|<UL>) container id for the placement of HTML markup {% endcomment %}
99
+ {% assign container_id = item.gallery.id %}
100
+ {% capture gallery_id %}{{item.gallery.id}}_ul{% endcapture %}
101
+ {% capture bs_gallery_class %}bsg_{{item.gallery.id}}{% endcapture %}
102
+
103
+ {% comment %} Initialize J1 base gallery options {% endcomment %}
104
+ {% assign css_classes = item.gallery.css_classes %}
105
+ {% assign gallery_title = item.gallery.title %}
106
+ {% assign gallery_type = item.gallery.type %}
107
+ {% assign thumb_items = item.gallery.thumb_items %}
108
+ {% assign thumb_spacing = item.gallery.thumb_spacing %}
109
+ {% assign thumb_bordered = item.gallery.thumb_bordered %}
110
+ {% assign thumb_animate = item.gallery.thumb_animate %}
111
+
112
+ {% comment %} // Calculate BS grid size for the thumbnails {% endcomment %}
113
+ {% assign column_width_md = 12 | divided_by:thumb_items %}
114
+
115
+ // Create an gallery instance if {{ container_id }} exists
116
+ if ( $('#{{ container_id }}').length ) {
117
+
118
+ {% if environment == 'development' %}
119
+ logText = 'gallery on ID #{{ container_id }} is being initialized';
120
+ logger.info(logText);
121
+ state = 'running';
122
+ logger.info('state: ' + state); // Set|Log status
123
+ {% endif %}
124
+
125
+ // Place HTML markup for the title
126
+ {% if gallery_title %}
127
+ var gallery_title = '<div class="bs-gallery-title">{{gallery_title}}</div>';
128
+ $('#{{ container_id }}').before( gallery_title );
129
+ {% endif %}
130
+
131
+ $('#{{ container_id }}').addClass("lightgallery ");
132
+
133
+ {% if thumb_animate %}
134
+ // Add animation
135
+ $('#{{ container_id }}').addClass("lg-animate");
136
+ // $('#{{ container_id }}').removeClass("lg-animate");
137
+ {% endif %}
138
+
139
+ // Calculate individual CSS styles for gallery thumbnails
140
+ var style = '';
141
+ style += '<style> \n';
142
+ style += 'a.lg-thumbnail-{{container_id}}{margin-left: {{thumb_spacing}}px;margin-bottom: {{thumb_spacing}}px;} \n';
143
+ {% if thumb_bordered %}
144
+ style += 'a.lg-thumbnail-{{container_id}}:hover,a.lg-thumbnail-{{container_id}}:focus,a.lg-thumbnail-{{container_id}}.active{border-color:#204a87} \n';
145
+ style += '.lg-thumbnail-{{container_id}}>img,.lg-thumbnail-{{container_id}} a>img{display:block;max-width:100%;height:auto} \n';
146
+ style += '.img-lg-thumbnail-{{container_id}}{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:2px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto} \n';
147
+ style += '.lg-thumbnail-{{container_id}}{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:2px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out} \n';
148
+ style += '.lg-thumbnail-{{container_id}}>img,.lg-thumbnail-{{container_id}} a>img{margin-left:auto;margin-right:auto} \n';
149
+ {% endif %}
150
+ style += '</style> \n';
151
+ $('head').append( style );
152
+
153
+ {% if gallery_type == "image" %}
154
+ // Collect image gallery data from data file (jsonPath)
155
+ $.getJSON( '{{config.jsonPath}}', function (data) {
156
+ var content = '';
157
+ //content += '<ul id="{{ gallery_id }}" class="row {{ css_classes }} bs-gallery-gutter list-unstyled">' + '\n';
158
+ content += '<ul id="{{ gallery_id }}" class="row bs-gallery {{ css_classes }} bs-gallery-gutter list-unstyled">' + '\n';
159
+
160
+ for ( var i in data["{{item.gallery.id}}"] ) {
161
+ var img = data["{{item.gallery.id}}"][i].img;
162
+ var caption = data["{{item.gallery.id}}"][i].caption;
163
+
164
+ content += '<li class="col-xs-6 col-sm-4 col-md-{{column_width_md}}" ' +
165
+ 'data-src="' +img+ '" ' +
166
+ 'data-sub-html="' +caption+ '">' +
167
+ {% if thumb_bordered %}
168
+ '<a href="#" class="lg-thumbnail-{{container_id}}">' +
169
+ {% else %}
170
+ '<a href="#" class="lg-thumbnail lg-thumbnail-{{container_id}}">' +
171
+ {% endif %}
172
+ '<img class="img-fluid j1-lg-magnifier" src="' +img+ '">' +
173
+ '</a>' +
174
+ '</li>'
175
+ } // end for
176
+ content += '</ul> </div> </div>';
177
+ {% elsif gallery_type == "video-html5" or gallery_type == "video-online" %}
178
+
179
+ var play_button = '/assets/themes/j1/extensions/light_gallery/img/icons/play-button.png';
180
+
181
+ // Collect html5 video gallery data from data file (jsonPath)
182
+ $.getJSON( '{{config.jsonPath}}', function (data) {
183
+
184
+ {% if gallery_type == "video-html5" %}
185
+ var hidden_video_div = '';
186
+ for ( var i in data["{{item.gallery.id}}"] ) {
187
+ var video = data["{{item.gallery.id}}"][i].video_path + '/' + data["{{item.gallery.id}}"][i].video;
188
+ var poster = data["{{item.gallery.id}}"][i].image_path + '/' + data["{{item.gallery.id}}"][i].poster;
189
+ var caption = data["{{item.gallery.id}}"][i].captions_lightbox;
190
+ var video_id = data["{{item.gallery.id}}"][i].video_id;
191
+ var video_type = video.substr(video.lastIndexOf('.') + 1);
192
+ hidden_video_div += '<div style="display:none;" id="' +video_id+ '">' + '\n';
193
+ hidden_video_div += ' <video class="lg-video-object lg-html5 video-js vjs-default-skin"' + '\n';
194
+ hidden_video_div += ' poster="' +poster+ '" controls="" preload="none">' + '\n';
195
+ hidden_video_div += ' <source src="' +video+ '" type="video/' +video_type+ '">' + '\n';
196
+ hidden_video_div += ' Your browser does not support HTML5 video.' + '\n';
197
+ hidden_video_div += ' </video>' + '\n';
198
+ hidden_video_div += '</div>' + '\n';
199
+ }
200
+ $('#{{ container_id }}').before( hidden_video_div );
126
201
  {% endif %}
127
202
 
128
- $('#{{ container_id }}').addClass("lightgallery ");
203
+ //var content = '<ul id="{{ gallery_id }}" class="row {{ css_classes }} bs-gallery-gutter list-unstyled">' + '\n';
204
+ var content = '<ul id="{{ gallery_id }}" class="{{bs_gallery_class}} row {{ css_classes }} bs-gallery-gutter list-unstyled">' + '\n';
205
+ for ( var i in data["{{item.gallery.id}}"] ) {
206
+ {% if gallery_type == "video-html5" %}
207
+ var video_id = data["{{item.gallery.id}}"][i].video_id;
208
+ {% endif %}
209
+ {% if gallery_type == "video-online" %}
210
+ var video = data["{{item.gallery.id}}"][i].video;
211
+ {% endif %}
212
+ var poster = data["{{item.gallery.id}}"][i].image_path + '/' + data["{{item.gallery.id}}"][i].poster;
213
+ var caption = data["{{item.gallery.id}}"][i].captions_lightbox;
214
+
215
+ //content += ' <li class="col-xs-6 col-sm-4 col-md-{{column_width_md}}" ' + '\n';
216
+ content += ' <li class="lightgallery"' + '\n';
217
+ content += ' data-sub-html="' +caption+ '" ' + '\n';
218
+ content += ' data-poster="' +poster+ '" ' + '\n';
219
+ {% if gallery_type == "video-html5" %}
220
+ content += ' data-html="#' +video_id+ '">' + '\n';
221
+ {% endif %}
222
+ {% if gallery_type == "video-online" %}
223
+ content += ' data-src="' +video+ '">' + '\n';
224
+ {% endif %}
225
+ {% if thumb_bordered %}
226
+ content += ' <a href="#" class="lg-thumbnail-{{container_id}}">' + '\n';
227
+ {% else %}
228
+ content += ' <a href="#" class="lg-thumbnail lg-thumbnail-{{container_id}}">' + '\n';
229
+ {% endif %}
230
+ content += ' <img class="img-gallery" src="' +poster+ '">' + '\n';
231
+ content += ' <img class="img-overlay" src="' +play_button+ '">' + '\n';
232
+ content += ' </a>' + '\n';
233
+ content += ' </li>' + '\n';
234
+ }
235
+ content += '</ul>';
236
+ {% endif %}
237
+ // Place HTML markup
238
+ $("#{{ container_id }}").html(content);
239
+ // Initialize|Run the gallery using individual gallery options
240
+ $("#{{ gallery_id }}").lightGallery({
241
+ {% for option in item.gallery.options %}
242
+ {{ option[0] | json }}: {{ option[1] | json }},
243
+ {% endfor %}
244
+ });
245
+
246
+ //Run bsGallery (delayed: {{ show_delay }} ms)
247
+ setTimeout(function() {
248
+ // Hide HTML markup while bsGallery is rendering
249
+ //$("#{{ gallery_id }}").hide();
250
+ $('ul.{{bs_gallery_class}}').bsGallery({
251
+ "classes" : "col-md-{{column_width_md}}",
252
+ "hasModal" : false
253
+ });
254
+ //$("#{{ gallery_id }}").show();
255
+ }, {{ show_delay }});
129
256
 
130
- {% if thumb_animate %}
131
- // Add animation
132
- $('#{{ container_id }}').addClass("lg-animate");
133
- // $('#{{ container_id }}').removeClass("lg-animate");
134
- {% endif %}
257
+ // Initialize instance variable of lightGallery (for later access)
258
+ j1["{{gallery_id}}"] = $('#{{ gallery_id }}').data('lightGallery');
135
259
 
136
- // Calculate individual CSS styles for gallery thumbnails
137
- var style = '';
138
- style += '<style> \n';
139
- style += 'a.lg-thumbnail-{{container_id}}{margin-left: {{thumb_spacing}}px;margin-bottom: {{thumb_spacing}}px;} \n';
140
- {% if thumb_bordered %}
141
- style += 'a.lg-thumbnail-{{container_id}}:hover,a.lg-thumbnail-{{container_id}}:focus,a.lg-thumbnail-{{container_id}}.active{border-color:#204a87} \n';
142
- style += '.lg-thumbnail-{{container_id}}>img,.lg-thumbnail-{{container_id}} a>img{display:block;max-width:100%;height:auto} \n';
143
- style += '.img-lg-thumbnail-{{container_id}}{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:2px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto} \n';
144
- style += '.lg-thumbnail-{{container_id}}{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:2px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out} \n';
145
- style += '.lg-thumbnail-{{container_id}}>img,.lg-thumbnail-{{container_id}} a>img{margin-left:auto;margin-right:auto} \n';
146
- {% endif %}
147
- style += '</style> \n';
148
- $('head').append( style );
149
-
150
- {% if gallery_type == "image" %}
151
- // Collect image gallery data from data file (jsonPath)
152
- $.getJSON( '{{config.jsonPath}}', function (data) {
153
- var content = '';
154
- //content += '<ul id="{{ gallery_id }}" class="row {{ css_classes }} bs-gallery-gutter list-unstyled">' + '\n';
155
- content += '<ul id="{{ gallery_id }}" class="row bs-gallery {{ css_classes }} bs-gallery-gutter list-unstyled">' + '\n';
156
-
157
- for ( var i in data["{{item.gallery.id}}"] ) {
158
- var img = data["{{item.gallery.id}}"][i].img;
159
- var caption = data["{{item.gallery.id}}"][i].caption;
160
-
161
- content += '<li class="col-xs-6 col-sm-4 col-md-{{column_width_md}}" ' +
162
- 'data-src="' +img+ '" ' +
163
- 'data-sub-html="' +caption+ '">' +
164
- {% if thumb_bordered %}
165
- '<a href="#" class="lg-thumbnail-{{container_id}}">' +
166
- {% else %}
167
- '<a href="#" class="lg-thumbnail lg-thumbnail-{{container_id}}">' +
168
- {% endif %}
169
- '<img class="img-fluid j1-lg-magnifier" src="' +img+ '">' +
170
- '</a>' +
171
- '</li>'
172
- } // end for
173
- content += '</ul> </div> </div>';
174
- {% elsif gallery_type == "video-html5" or gallery_type == "video-online" %}
175
-
176
- var play_button = '/assets/themes/j1/extensions/light_gallery/img/icons/play-button.png';
177
-
178
- // Collect html5 video gallery data from data file (jsonPath)
179
- $.getJSON( '{{config.jsonPath}}', function (data) {
180
-
181
- {% if gallery_type == "video-html5" %}
182
- var hidden_video_div = '';
183
- for ( var i in data["{{item.gallery.id}}"] ) {
184
- var video = data["{{item.gallery.id}}"][i].video_path + '/' + data["{{item.gallery.id}}"][i].video;
185
- var poster = data["{{item.gallery.id}}"][i].image_path + '/' + data["{{item.gallery.id}}"][i].poster;
186
- var caption = data["{{item.gallery.id}}"][i].captions_lightbox;
187
- var video_id = data["{{item.gallery.id}}"][i].video_id;
188
- var video_type = video.substr(video.lastIndexOf('.') + 1);
189
- hidden_video_div += '<div style="display:none;" id="' +video_id+ '">' + '\n';
190
- hidden_video_div += ' <video class="lg-video-object lg-html5 video-js vjs-default-skin"' + '\n';
191
- hidden_video_div += ' poster="' +poster+ '" controls="" preload="none">' + '\n';
192
- hidden_video_div += ' <source src="' +video+ '" type="video/' +video_type+ '">' + '\n';
193
- hidden_video_div += ' Your browser does not support HTML5 video.' + '\n';
194
- hidden_video_div += ' </video>' + '\n';
195
- hidden_video_div += '</div>' + '\n';
196
- }
197
- $('#{{ container_id }}').before( hidden_video_div );
260
+ {% if environment == 'development' %}
261
+ logText = 'LightGallery on ID #{{ container_id }} initializing completed';
262
+ logger.info(logText);
263
+ state = 'completed';
264
+ logger.info('state: ' + state); // Set|Log status
198
265
  {% endif %}
199
266
 
200
- //var content = '<ul id="{{ gallery_id }}" class="row {{ css_classes }} bs-gallery-gutter list-unstyled">' + '\n';
201
- var content = '<ul id="{{ gallery_id }}" class="{{bs_gallery_class}} row {{ css_classes }} bs-gallery-gutter list-unstyled">' + '\n';
202
- for ( var i in data["{{item.gallery.id}}"] ) {
203
- {% if gallery_type == "video-html5" %}
204
- var video_id = data["{{item.gallery.id}}"][i].video_id;
205
- {% endif %}
206
- {% if gallery_type == "video-online" %}
207
- var video = data["{{item.gallery.id}}"][i].video;
208
- {% endif %}
209
- var poster = data["{{item.gallery.id}}"][i].image_path + '/' + data["{{item.gallery.id}}"][i].poster;
210
- var caption = data["{{item.gallery.id}}"][i].captions_lightbox;
211
-
212
- //content += ' <li class="col-xs-6 col-sm-4 col-md-{{column_width_md}}" ' + '\n';
213
- content += ' <li class="lightgallery"' + '\n';
214
- content += ' data-sub-html="' +caption+ '" ' + '\n';
215
- content += ' data-poster="' +poster+ '" ' + '\n';
216
- {% if gallery_type == "video-html5" %}
217
- content += ' data-html="#' +video_id+ '">' + '\n';
218
- {% endif %}
219
- {% if gallery_type == "video-online" %}
220
- content += ' data-src="' +video+ '">' + '\n';
221
- {% endif %}
222
- {% if thumb_bordered %}
223
- content += ' <a href="#" class="lg-thumbnail-{{container_id}}">' + '\n';
224
- {% else %}
225
- content += ' <a href="#" class="lg-thumbnail lg-thumbnail-{{container_id}}">' + '\n';
226
- {% endif %}
227
- content += ' <img class="img-gallery" src="' +poster+ '">' + '\n';
228
- content += ' <img class="img-overlay" src="' +play_button+ '">' + '\n';
229
- content += ' </a>' + '\n';
230
- content += ' </li>' + '\n';
231
- }
232
- content += '</ul>';
233
- {% endif %}
234
- // Place HTML markup
235
- $("#{{ container_id }}").html(content);
236
- // Initialize|Run the gallery using individual gallery options
237
- $("#{{ gallery_id }}").lightGallery({
238
- {% for option in item.gallery.options %}
239
- {{ option[0] | json }}: {{ option[1] | json }},
240
- {% endfor %}
241
- });
267
+ });
268
+ } //end gallery
269
+ {% endif %} {% comment %} end if enabled {% endcomment %}
270
+ {% endfor %}
242
271
 
243
- //Run bsGallery (delayed: {{ show_delay }} ms)
244
- setTimeout(function() {
245
- // Hide HTML markup while bsGallery is rendering
246
- //$("#{{ gallery_id }}").hide();
247
- $('ul.{{bs_gallery_class}}').bsGallery({
248
- "classes" : "col-md-{{column_width_md}}",
249
- "hasModal" : false
250
- });
251
- //$("#{{ gallery_id }}").show();
252
- }, {{ show_delay }});
253
-
254
- // Initialize instance variable of lightGallery (for later access)
255
- j1["{{gallery_id}}"] = $('#{{ gallery_id }}').data('lightGallery');
256
-
257
- {% if environment == 'development' %}
258
- logText = 'LightGallery on ID #{{ container_id }} initializing completed';
259
- logger.info(logText);
260
- state = 'completed';
261
- logger.info('state: ' + state); // Set|Log status
262
- {% endif %}
263
-
264
- });
265
- } //end gallery
266
- {% endif %} {% comment %} end if enabled {% endcomment %}
267
- {% endfor %}
268
- }, // end function lgInit
269
-
270
- // -------------------------------------------------------------------------
271
- // returns the current (processing) state of the module
272
- // -------------------------------------------------------------------------
273
- state: function () {
274
- return state;
275
- }
272
+ return;
273
+ }, // END lgInit
276
274
 
277
- }; // end return
275
+ // -------------------------------------------------------------------------
276
+ // returns the current (processing) state of the module
277
+ // -------------------------------------------------------------------------
278
+ state: function () {
279
+ return state;
280
+ } // END state
278
281
 
282
+ }; // end return
279
283
  })(j1, window);
280
284
 
281
285
  {% endcapture %}