j1-template 2021.1.12 → 2021.1.17
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/blocks/footer/boxes/issue.proc +28 -5
- data/_includes/themes/j1/blocks/footer/boxes/legal_statements.proc +66 -23
- data/_includes/themes/j1/blocks/footer/boxes/links_box.proc +0 -1
- data/_includes/themes/j1/blocks/footer/boxes/news_box.proc +16 -1
- data/_includes/themes/j1/layouts/content_generator_app.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_blog_archive.html +197 -219
- data/_includes/themes/j1/layouts/content_generator_collection.html +4 -2
- data/_includes/themes/j1/layouts/content_generator_page.html +4 -1
- data/_includes/themes/j1/layouts/content_generator_post.html +31 -23
- data/_includes/themes/j1/layouts/content_generator_raw.html +1 -1
- data/_includes/themes/j1/layouts/layout_metadata_generator.html +82 -4
- data/_includes/themes/j1/modules/connectors/comment/commento.html +31 -0
- data/_includes/themes/j1/modules/connectors/comment/custom-provider.html +7 -8
- data/_includes/themes/j1/modules/connectors/comment/disqus.html +12 -54
- data/_includes/themes/j1/modules/connectors/comment/facebook.html +7 -8
- data/_includes/themes/j1/modules/connectors/comment/hyvor.html +33 -0
- data/_includes/themes/j1/modules/connectors/comment/just-comments.html +31 -0
- data/_includes/themes/j1/modules/connectors/comments +3 -0
- data/_includes/themes/j1/procedures/posts/collate_timeline.proc +27 -5
- data/_includes/themes/j1/procedures/posts/pager.proc +123 -0
- data/_layouts/default.html +52 -1
- data/assets/data/cookieconsent.html +0 -2
- data/assets/data/disqus.js +81 -0
- data/assets/data/hyvor.js +72 -0
- data/assets/data/menu.html +1 -1
- data/assets/data/mmenu_toc.html +20 -1
- data/assets/data/panel.html +28 -7
- data/assets/error_pages/HTTP204.html +2 -1
- data/assets/error_pages/HTTP400.html +2 -1
- data/assets/error_pages/HTTP401.html +2 -1
- data/assets/error_pages/HTTP403.html +2 -1
- data/assets/error_pages/HTTP404.html +2 -1
- data/assets/error_pages/HTTP444.html +93 -0
- data/assets/error_pages/HTTP500.html +2 -1
- data/assets/error_pages/HTTP501.html +2 -1
- data/assets/error_pages/HTTP502.html +2 -1
- data/assets/error_pages/HTTP503.html +2 -1
- data/assets/themes/j1/adapter/js/algolia.js +10 -10
- data/assets/themes/j1/adapter/js/asciidoctor.js +6 -6
- data/assets/themes/j1/adapter/js/attic.js +17 -17
- data/assets/themes/j1/adapter/js/bmd.js +6 -6
- data/assets/themes/j1/adapter/js/carousel.js +10 -10
- data/assets/themes/j1/adapter/js/clipboard.js +10 -10
- data/assets/themes/j1/adapter/js/cookieConsent.js +54 -27
- data/assets/themes/j1/adapter/js/fam.js +34 -34
- data/assets/themes/j1/adapter/js/framer.js +6 -6
- data/assets/themes/j1/adapter/js/j1.js +444 -259
- data/assets/themes/j1/adapter/js/justifiedGallery.js +11 -11
- data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +19 -19
- data/assets/themes/j1/adapter/js/lightbox.js +6 -6
- data/assets/themes/j1/adapter/js/logger.js +7 -7
- data/assets/themes/j1/adapter/js/mmenu.js +25 -25
- data/assets/themes/j1/adapter/js/navigator.js +55 -48
- data/assets/themes/j1/adapter/js/quicksearch.js +6 -6
- data/assets/themes/j1/adapter/js/rouge.js +7 -7
- data/assets/themes/j1/adapter/js/rtable.js +6 -6
- data/assets/themes/j1/adapter/js/themer.js +35 -41
- data/assets/themes/j1/adapter/js/toccer.js +9 -9
- data/assets/themes/j1/modules/backstretch/js/backstretch.js +3 -3
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +27 -20
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js +2 -2
- data/assets/themes/j1/modules/lunrSearch/js/quicksearch.js +1 -1
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.js +74 -55
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.min.js +75 -57
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +4 -5
- data/lib/starter_web/_config.yml +42 -24
- data/lib/starter_web/_data/blocks/footer.yml +52 -20
- data/lib/starter_web/_data/blocks/panel.yml +4 -4
- data/lib/starter_web/_data/builder/blog_navigator.yml +9 -192
- data/lib/starter_web/_data/builder/defaults/blog_navigator.yml +389 -0
- data/lib/starter_web/_data/j1_config.yml +66 -41
- data/lib/starter_web/_data/locales/be.yml +269 -0
- data/lib/starter_web/_data/locales/cs.yml +218 -0
- data/lib/starter_web/_data/locales/da.yml +213 -0
- data/lib/starter_web/_data/locales/de.yml +222 -0
- data/lib/starter_web/_data/locales/el.yml +215 -0
- data/lib/starter_web/_data/locales/en.yml +215 -0
- data/lib/starter_web/_data/locales/es.yml +219 -0
- data/lib/starter_web/_data/locales/et.yml +207 -0
- data/lib/starter_web/_data/locales/fi.yml +211 -0
- data/lib/starter_web/_data/locales/fr.yml +219 -0
- data/lib/starter_web/_data/locales/hr.yml +240 -0
- data/lib/starter_web/_data/locales/hu.yml +196 -0
- data/lib/starter_web/_data/locales/it.yml +215 -0
- data/lib/starter_web/_data/locales/lv.yml +233 -0
- data/lib/starter_web/_data/locales/nl.yml +213 -0
- data/lib/starter_web/_data/locales/pl.yml +241 -0
- data/lib/starter_web/_data/locales/pt.yml +217 -0
- data/lib/starter_web/_data/locales/readme +4 -0
- data/lib/starter_web/_data/locales/ro.yml +209 -0
- data/lib/starter_web/_data/locales/ru.yml +269 -0
- data/lib/starter_web/_data/locales/sk.yml +211 -0
- data/lib/starter_web/_data/locales/sl.yml +209 -0
- data/lib/starter_web/_data/locales/sv.yml +207 -0
- data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +10 -10
- data/lib/starter_web/_data/modules/defaults/themer.yml +1 -0
- data/lib/starter_web/_data/modules/themer.yml +1 -0
- data/lib/starter_web/_data/plugins/defaults/paginator.yml +7 -6
- data/lib/starter_web/_data/plugins/paginator.yml +3 -0
- data/lib/starter_web/_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/_plugins/date-i18n.rb +67 -0
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/assets/images/modules/attics/markus-spiske-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/matthew-dockery-1920x1280.jpg +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/2020-01-01-about-cookies.adoc +1 -1
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-03-01-site-generators.adoc +1 -1
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-03-03-about-j1.adoc +1 -1
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +2 -2
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +2 -2
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +2 -2
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +2 -2
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +1 -1
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +1 -1
- data/lib/starter_web/index.html +3 -3
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +3 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +3 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +3 -0
- data/lib/starter_web/pages/public/blog/navigator/archive.html +80 -12
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +94 -26
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +81 -12
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +95 -37
- data/lib/starter_web/pages/public/blog/navigator/index.html +4 -0
- data/lib/starter_web/pages/public/cookieConsent.adoc +3 -0
- data/lib/starter_web/pages/public/learn/quickstart.adoc +473 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +2 -1
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +0 -2
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +0 -2
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +0 -1
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +0 -1
- data/lib/starter_web/pages/public/legal/de/100_copyright.adoc +116 -0
- data/lib/starter_web/pages/public/legal/de/100_impress.adoc +94 -0
- data/lib/starter_web/pages/public/legal/de/300_privacy.adoc +320 -0
- data/lib/starter_web/pages/public/legal/de/400_comment_policy.adoc +123 -0
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +3 -1
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +3 -1
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +81 -20
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +34 -16
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +41 -4
- data/_includes/themes/j1/procedures/global/pager.proc +0 -79
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.org.asciidoc +0 -244
@@ -121,8 +121,8 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
121
121
|
_this['frontmatterOptions'] = frontmatterOptions;
|
122
122
|
|
123
123
|
_this.setState('started');
|
124
|
-
logger.info('state: ' + _this.getState());
|
125
|
-
logger.info('module is being initialized');
|
124
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
125
|
+
logger.info('\n' + 'module is being initialized');
|
126
126
|
|
127
127
|
_this.loadHeader(frontmatterOptions);
|
128
128
|
}, // END init
|
@@ -183,7 +183,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
183
183
|
-------------------------------------------------------------------- {% endcomment %}
|
184
184
|
$(window).on('backstretch.before', function (e, instance, index) {
|
185
185
|
_this.setState('backstretch_before');
|
186
|
-
logger.debug('state: ' + _this.getState());
|
186
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
187
187
|
});
|
188
188
|
|
189
189
|
{% comment %} Add a caption (c) or badge (b) if configured
|
@@ -192,8 +192,8 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
192
192
|
$(window).on('backstretch.after', function (e, instance, index) {
|
193
193
|
logText ='add caption text';
|
194
194
|
_this.setState('backstretch_after');
|
195
|
-
logger.debug('state: ' + status);
|
196
|
-
logger.debug(logText);
|
195
|
+
logger.debug('\n' + 'state: ' + status);
|
196
|
+
// logger.debug(logText);
|
197
197
|
|
198
198
|
if (typeof atticOptions.slides[index].caption != 'undefined') {
|
199
199
|
var cText = atticOptions.slides[index].caption.text;
|
@@ -233,8 +233,8 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
233
233
|
}
|
234
234
|
}
|
235
235
|
_this.setState('finished');
|
236
|
-
logger.info('state: ' + _this.getState());
|
237
|
-
logger.info('module initialized successfully');
|
236
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
237
|
+
logger.info('\n' + 'module initialized successfully');
|
238
238
|
});
|
239
239
|
|
240
240
|
{% comment %} Detect how show should run (only once|infinite loop)
|
@@ -242,7 +242,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
242
242
|
{% if image_loop %}
|
243
243
|
$(window).on('backstretch.before', function (e, instance, index) {
|
244
244
|
_this.setState('backstretch_before_image_loop');
|
245
|
-
logger.debug('state: ' + _this.getState());
|
245
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
246
246
|
// remove class for the backstretch_intro background
|
247
247
|
if (index === backstretch_instance_data.images.length -1) {
|
248
248
|
$('.backstretch').removeClass(atticOptions.spinner);
|
@@ -251,7 +251,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
251
251
|
{% else %}
|
252
252
|
$(window).on('backstretch.before', function (e, instance, index) {
|
253
253
|
_this.setState('backstretch_before_image_once');
|
254
|
-
logger.debug('state: ' + _this.getState());
|
254
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
255
255
|
// Stop the slideshow after reached the last image
|
256
256
|
if (index === backstretch_instance_data.images.length -1) {
|
257
257
|
$('#{{attic_id}}').backstretch('pause');
|
@@ -494,18 +494,18 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
494
494
|
$('head').append(attic_opacity);
|
495
495
|
|
496
496
|
_this.setState('initialized');
|
497
|
-
logger.info('state: ' + _this.getState());
|
497
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
498
498
|
|
499
499
|
{% comment %} Run the image header if any
|
500
500
|
-------------------------------------------------------------------- {% endcomment %}
|
501
501
|
if (typeof atticOptions.slides != 'undefined') {
|
502
502
|
// Load the image header if the page is ready (visible)
|
503
503
|
$(function() {
|
504
|
-
// logger.debug('Load image header on: ' + {{attic_id}});
|
505
|
-
logger.debug('Load image header');
|
504
|
+
// logger.debug('\n' + 'Load image header on: ' + {{attic_id}});
|
505
|
+
logger.debug('\n' + 'Load image header');
|
506
506
|
{{attic_id}}(atticOptions);
|
507
507
|
_this.setState('completed');
|
508
|
-
logger.info('state: ' + _this.getState());
|
508
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
509
509
|
});
|
510
510
|
}
|
511
511
|
} // END if header id found in page
|
@@ -515,8 +515,8 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
515
515
|
// NO header found in page
|
516
516
|
if ($('#no_header').length) {
|
517
517
|
_this.setState('completed');
|
518
|
-
logger.info('state: ' + _this.getState());
|
519
|
-
logger.warn('
|
518
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
519
|
+
logger.warn('\n' + 'no header configured or found in page');
|
520
520
|
}
|
521
521
|
|
522
522
|
return true;
|
@@ -529,7 +529,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
529
529
|
messageHandler: function (sender, message) {
|
530
530
|
var json_message = JSON.stringify(message, undefined, 2);
|
531
531
|
|
532
|
-
logText = 'received message from ' + sender + ': ' + json_message;
|
532
|
+
logText = '\n' + 'received message from ' + sender + ': ' + json_message;
|
533
533
|
logger.debug(logText);
|
534
534
|
|
535
535
|
// -----------------------------------------------------------------------
|
@@ -537,7 +537,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
537
537
|
// -----------------------------------------------------------------------
|
538
538
|
if (message.type === 'command' && message.action === 'module_initialized') {
|
539
539
|
status = 'completed';
|
540
|
-
logger.info(message.text);
|
540
|
+
logger.info('\n' + message.text);
|
541
541
|
}
|
542
542
|
|
543
543
|
//
|
@@ -79,8 +79,8 @@ j1.adapter['bmd'] = (function (j1, window) {
|
|
79
79
|
|
80
80
|
// initialize state flag
|
81
81
|
_this.setState('started');
|
82
|
-
logger.info('state: ' + _this.getState());
|
83
|
-
logger.info('module is being initialized');
|
82
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
83
|
+
logger.info('\n' + 'module is being initialized');
|
84
84
|
|
85
85
|
// -----------------------------------------------------------------------
|
86
86
|
// Default module settings
|
@@ -93,7 +93,7 @@ j1.adapter['bmd'] = (function (j1, window) {
|
|
93
93
|
// -----------------------------------------------------------------------
|
94
94
|
// BMD initializer
|
95
95
|
// -----------------------------------------------------------------------
|
96
|
-
var log_text = 'BMD is being initialized';
|
96
|
+
var log_text = '\n' + 'BMD is being initialized';
|
97
97
|
logger.info(log_text);
|
98
98
|
|
99
99
|
var dependencies_met_j1_finished = setInterval(function() {
|
@@ -101,7 +101,7 @@ j1.adapter['bmd'] = (function (j1, window) {
|
|
101
101
|
$('body').bootstrapMaterialDesign();
|
102
102
|
|
103
103
|
_this.setState('finished');
|
104
|
-
logger.info('state: ' + _this.getState());
|
104
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
105
105
|
|
106
106
|
clearInterval(dependencies_met_j1_finished);
|
107
107
|
} // END dependencies_met_j1_finished
|
@@ -116,7 +116,7 @@ j1.adapter['bmd'] = (function (j1, window) {
|
|
116
116
|
messageHandler: function (sender, message) {
|
117
117
|
var json_message = JSON.stringify(message, undefined, 2);
|
118
118
|
|
119
|
-
logText = 'received message from ' + sender + ': ' + json_message;
|
119
|
+
logText = '\n' + 'received message from ' + sender + ': ' + json_message;
|
120
120
|
logger.debug(logText);
|
121
121
|
|
122
122
|
// -----------------------------------------------------------------------
|
@@ -126,7 +126,7 @@ j1.adapter['bmd'] = (function (j1, window) {
|
|
126
126
|
//
|
127
127
|
// Place handling of command|action here
|
128
128
|
//
|
129
|
-
logger.info(message.text);
|
129
|
+
logger.info('\n' + message.text);
|
130
130
|
}
|
131
131
|
|
132
132
|
//
|
@@ -131,8 +131,8 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
131
131
|
}
|
132
132
|
|
133
133
|
_this.setState('started');
|
134
|
-
logger.info('state: ' + _this.getState());
|
135
|
-
logger.info('module is being initialized');
|
134
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
135
|
+
logger.info('\n' + 'module is being initialized');
|
136
136
|
|
137
137
|
var dependencies_met_page_finished = setInterval(function() {
|
138
138
|
if (j1.getState() == 'finished') {
|
@@ -157,11 +157,11 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
157
157
|
if ($('#{{slider_id}}').length) {
|
158
158
|
|
159
159
|
{% if environment == 'development' %}
|
160
|
-
logText = 'slider is being initialized on id: #{{slider_id}}';
|
160
|
+
logText = '\n' + 'slider is being initialized on id: #{{slider_id}}';
|
161
161
|
logger.info(logText);
|
162
162
|
_this.setState('running');
|
163
|
-
logger.info('state: ' + _this.getState());
|
164
|
-
logger.info('module is being initialized');
|
163
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
164
|
+
logger.info('\n' + 'module is being initialized');
|
165
165
|
{% endif %}
|
166
166
|
|
167
167
|
{% if item.show.slide_height != null %}
|
@@ -336,7 +336,7 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
336
336
|
{% endif %}
|
337
337
|
}
|
338
338
|
$('#{{slider_id}}').html(content);
|
339
|
-
logText = 'initializing slider finished on id: {{slider_id}}';
|
339
|
+
logText = '\n' + 'initializing slider finished on id: {{slider_id}}';
|
340
340
|
logger.info(logText);
|
341
341
|
} // END customDataSuccess_{{forloop.index}}
|
342
342
|
} // END if carousel exists
|
@@ -345,8 +345,8 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
345
345
|
clearInterval(dependencies_met_page_finished);
|
346
346
|
}
|
347
347
|
_this.setState('finished');
|
348
|
-
logger.info('state: ' + _this.getState());
|
349
|
-
logger.info('initializing module finished');
|
348
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
349
|
+
logger.info('\n' + 'initializing module finished');
|
350
350
|
}, 25); // END 'dependencies_met_adapter_finished'
|
351
351
|
}, // END init
|
352
352
|
|
@@ -357,7 +357,7 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
357
357
|
messageHandler: function (sender, message) {
|
358
358
|
var json_message = JSON.stringify(message, undefined, 2);
|
359
359
|
|
360
|
-
logText = 'received message from ' + sender + ': ' + json_message;
|
360
|
+
logText = '\n' + 'received message from ' + sender + ': ' + json_message;
|
361
361
|
logger.debug(logText);
|
362
362
|
|
363
363
|
// -----------------------------------------------------------------------
|
@@ -367,7 +367,7 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
367
367
|
//
|
368
368
|
// Place handling of command|action here
|
369
369
|
//
|
370
|
-
logger.info(message.text);
|
370
|
+
logger.info('\n' + message.text);
|
371
371
|
}
|
372
372
|
|
373
373
|
//
|
@@ -101,13 +101,13 @@ j1.adapter['clipboard'] = (function (j1, window) {
|
|
101
101
|
|
102
102
|
// initialize state flag
|
103
103
|
_this.state = 'started';
|
104
|
-
logText = 'initialization: started';
|
104
|
+
logText = '\n' + 'initialization: started';
|
105
105
|
logger.info(logText);
|
106
106
|
|
107
107
|
// initialize ClipboardJS if page is loaded
|
108
108
|
var dependencies_met_j1_finished = setInterval(function() {
|
109
109
|
if ( j1.getState() == 'finished' ) {
|
110
|
-
logText = 'create clipboard';
|
110
|
+
logText = '\n' + 'create clipboard';
|
111
111
|
logger.info(logText);
|
112
112
|
|
113
113
|
clipboardJS = new ClipboardJS('.btn-clipboard', {
|
@@ -120,10 +120,10 @@ j1.adapter['clipboard'] = (function (j1, window) {
|
|
120
120
|
_this.initEventHandler(clipboardJS);
|
121
121
|
|
122
122
|
clearInterval(dependencies_met_j1_finished);
|
123
|
-
logger.info('met dependencies for: j1');
|
123
|
+
logger.info('\n' + 'met dependencies for: j1');
|
124
124
|
_this.setState('finished');
|
125
|
-
logger.info('state: ' + _this.getState());
|
126
|
-
logger.info('module initialized successfully');
|
125
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
126
|
+
logger.info('\n' + 'module initialized successfully');
|
127
127
|
}
|
128
128
|
}, 25); // END dependencies_met_j1_finished
|
129
129
|
},
|
@@ -154,7 +154,7 @@ j1.adapter['clipboard'] = (function (j1, window) {
|
|
154
154
|
clipboard.on('success', function (e) {
|
155
155
|
$(e.trigger).attr('title', 'copied!').tooltip('_fixTitle').tooltip('show').attr('title', 'Copy to clipboard').tooltip('_fixTitle');
|
156
156
|
var logger = log4javascript.getLogger('j1.initClipboard');
|
157
|
-
var logText = 'initialization copy-to-clipboard sucessfull';
|
157
|
+
var logText = '\n' + 'initialization copy-to-clipboard sucessfull';
|
158
158
|
logger.debug(logText);
|
159
159
|
/* Cleanup clipped data for trailing numbers */
|
160
160
|
var splitted = e.text.split('\n');
|
@@ -168,7 +168,7 @@ j1.adapter['clipboard'] = (function (j1, window) {
|
|
168
168
|
clipboard.on('error', function (e) {
|
169
169
|
var fallbackMsg = /Mac/i.test(navigator.userAgent) ? 'press \u2318 to copy' : 'press ctrl-c to copy';
|
170
170
|
logger = log4javascript.getLogger('j1.initClipboard');
|
171
|
-
logText = 'initialization copy-to-clipboard failed, fallback used.';
|
171
|
+
logText = '\n' + 'initialization copy-to-clipboard failed, fallback used.';
|
172
172
|
logger.warn(logText);
|
173
173
|
$(e.trigger).attr('title', fallbackMsg).tooltip('_fixTitle').tooltip('show').attr('title', 'copy to clipboard').tooltip('_fixTitle');
|
174
174
|
});
|
@@ -182,7 +182,7 @@ j1.adapter['clipboard'] = (function (j1, window) {
|
|
182
182
|
// var json_message = JSON.stringify(message, undefined, 2); // multiline
|
183
183
|
var json_message = JSON.stringify(message);
|
184
184
|
|
185
|
-
logText = 'received message from ' + sender + ': ' + json_message;
|
185
|
+
logText = '\n' + 'received message from ' + sender + ': ' + json_message;
|
186
186
|
logger.debug(logText);
|
187
187
|
|
188
188
|
// -----------------------------------------------------------------------
|
@@ -192,10 +192,10 @@ j1.adapter['clipboard'] = (function (j1, window) {
|
|
192
192
|
//
|
193
193
|
// Place handling of command|action here
|
194
194
|
//
|
195
|
-
logger.info(message.text);
|
195
|
+
logger.info('\n' + message.text);
|
196
196
|
}
|
197
197
|
if (message.type === 'command' && message.action === 'status') {
|
198
|
-
logger.info('messageHandler: received - ' + message.action);
|
198
|
+
logger.info('\n' + 'messageHandler: received - ' + message.action);
|
199
199
|
}
|
200
200
|
|
201
201
|
//
|
@@ -39,6 +39,8 @@ regenerate: true
|
|
39
39
|
{% assign tracking_enabled = template_config.analytics.enabled %}
|
40
40
|
{% assign tracking_id = template_config.analytics.google.tracking_id %}
|
41
41
|
|
42
|
+
{% assign comment_provider = site.data.j1_config.comments.provider %}
|
43
|
+
|
42
44
|
{% comment %} Set config options
|
43
45
|
-------------------------------------------------------------------------------- {% endcomment %}
|
44
46
|
{% assign consent_options = consent_defaults | merge: consent_settings %}
|
@@ -78,20 +80,28 @@ regenerate: true
|
|
78
80
|
'use strict';
|
79
81
|
|
80
82
|
{% comment %} Main
|
81
|
-
|
83
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
82
84
|
j1.adapter['cookieConsent'] = (function (j1, window) {
|
83
85
|
|
84
86
|
var environment = '{{environment}}';
|
85
87
|
var tracking_enabled = ('{{tracking_enabled}}' === 'true') ? true: false;
|
86
88
|
var tracking_id = '{{tracking_id}}';
|
87
89
|
var tracking_id_valid = (tracking_id.includes('tracking-id')) ? false : true;
|
90
|
+
var comment_provider = '{{comment_provider}}';
|
88
91
|
var moduleOptions = {};
|
89
92
|
var _this;
|
90
93
|
var $modal;
|
91
94
|
var user_cookie;
|
92
95
|
var logger;
|
96
|
+
var url;
|
97
|
+
var baseUrl;
|
98
|
+
var hostname;
|
99
|
+
var domain;
|
100
|
+
var cookie_domain;
|
101
|
+
var secure;
|
93
102
|
var logText;
|
94
103
|
var cookie_written;
|
104
|
+
var language;
|
95
105
|
|
96
106
|
// NOTE: RegEx for tracking_id: ^(G|UA|YT|MO)-[a-zA-Z0-9-]+$
|
97
107
|
// See: https://stackoverflow.com/questions/20411767/how-to-validate-google-analytics-tracking-id-using-a-javascript-function/20412153
|
@@ -113,8 +123,21 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
113
123
|
// -----------------------------------------------------------------------
|
114
124
|
// globals
|
115
125
|
// -----------------------------------------------------------------------
|
116
|
-
_this
|
117
|
-
logger
|
126
|
+
_this = j1.adapter.cookieConsent;
|
127
|
+
logger = log4javascript.getLogger('j1.adapter.cookieConsent');
|
128
|
+
url = new liteURL(window.location.href);
|
129
|
+
baseUrl = url.origin;
|
130
|
+
hostname = url.hostname;
|
131
|
+
domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
132
|
+
secure = (url.protocol.includes('https')) ? true : false;
|
133
|
+
language = "{{site.language}}";
|
134
|
+
|
135
|
+
// set domain used by cookies
|
136
|
+
if(domain !== 'localhost') {
|
137
|
+
cookie_domain = '.' + hostname;
|
138
|
+
} else {
|
139
|
+
cookie_domain = hostname;
|
140
|
+
}
|
118
141
|
|
119
142
|
// initialize state flag
|
120
143
|
_this.state = 'pending';
|
@@ -144,23 +167,24 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
144
167
|
var dependencies_met_page_ready = setInterval (function (options) {
|
145
168
|
if ( j1.getState() === 'finished' ) {
|
146
169
|
_this.setState('started');
|
147
|
-
logger.info('state: ' + _this.getState());
|
148
|
-
logger.info('module is being initialized');
|
170
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
171
|
+
logger.info('\n' + 'module is being initialized');
|
149
172
|
|
150
173
|
j1.cookieConsent = new BootstrapCookieConsent({
|
151
174
|
contentURL: moduleOptions.contentURL,
|
152
175
|
cookieName: moduleOptions.cookieName,
|
153
|
-
language:
|
176
|
+
language: language,
|
154
177
|
whitelisted: moduleOptions.whitelisted,
|
155
178
|
reloadPageOnChange: moduleOptions.reloadPageOnChange,
|
156
|
-
xhr_data_element: moduleOptions.xhr_data_element + '-' +
|
179
|
+
xhr_data_element: moduleOptions.xhr_data_element + '-' + language,
|
157
180
|
sameSite: moduleOptions.sameSite,
|
181
|
+
secure: secure,
|
158
182
|
postSelectionCallback: function () {j1.adapter.cookieConsent.cbCookie()}
|
159
183
|
});
|
160
184
|
|
161
185
|
_this.setState('finished');
|
162
|
-
logger.info('state: ' + _this.getState());
|
163
|
-
logger.debug('module initialized successfully');
|
186
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
187
|
+
logger.debug('\n' + 'module initialized successfully');
|
164
188
|
clearInterval(dependencies_met_page_ready);
|
165
189
|
}
|
166
190
|
});
|
@@ -173,7 +197,7 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
173
197
|
messageHandler: function (sender, message) {
|
174
198
|
var json_message = JSON.stringify(message, undefined, 2);
|
175
199
|
|
176
|
-
logText = 'received message from ' + sender + ': ' + json_message;
|
200
|
+
logText = '\n' + 'received message from ' + sender + ': ' + json_message;
|
177
201
|
logger.debug(logText);
|
178
202
|
|
179
203
|
// -----------------------------------------------------------------------
|
@@ -183,7 +207,7 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
183
207
|
//
|
184
208
|
// Place handling of command|action here
|
185
209
|
//
|
186
|
-
logger.info(message.text);
|
210
|
+
logger.info('\n' + message.text);
|
187
211
|
}
|
188
212
|
|
189
213
|
//
|
@@ -223,8 +247,8 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
223
247
|
var json = JSON.stringify(user_consent);
|
224
248
|
var user_agent = platform.ua;
|
225
249
|
|
226
|
-
logger.info('
|
227
|
-
logger.info('
|
250
|
+
logger.info('\n' + 'entered post selection callback from CookieConsent');
|
251
|
+
logger.info('\n' + 'current values from CookieConsent: ' + json);
|
228
252
|
|
229
253
|
// enable cookie button if not visible
|
230
254
|
if ($('#quickLinksCookieButton').css('display') === 'none') {
|
@@ -236,20 +260,19 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
236
260
|
// because page is reloaded after selection
|
237
261
|
//
|
238
262
|
// if (tracking_enabled && !tracking_id_valid) {
|
239
|
-
// logger.error('tracking enabled, but invalid tracking id found: ' + tracking_id);
|
263
|
+
// logger.error('\n' + 'tracking enabled, but invalid tracking id found: ' + tracking_id);
|
240
264
|
// } else {
|
241
|
-
// logger.warn('tracking enabled, tracking id found: ' + tracking_id);
|
265
|
+
// logger.warn('\n' + 'tracking enabled, tracking id found: ' + tracking_id);
|
242
266
|
// }
|
243
267
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
}
|
268
|
+
logger.debug('\n' + 'j1 cookies found:' + j1Cookies.length);
|
269
|
+
j1Cookies.forEach(item => console.log('j1.core.switcher: ' + item));
|
270
|
+
logger.debug('\n' + 'ga cookies found:' + gaCookies.length);
|
271
|
+
gaCookies.forEach(item => console.log('j1.core.switcher: ' + item));
|
249
272
|
|
250
273
|
if (user_agent.includes('iPad')) {
|
251
|
-
logger.warn('
|
252
|
-
logger.warn('
|
274
|
+
logger.warn('\n' + 'product detected : ' + platform.product);
|
275
|
+
logger.warn('\n' + 'skip deleting (unwanted) cookies for this platform');
|
253
276
|
}
|
254
277
|
|
255
278
|
// Manage Google Analytics OptIn/Out
|
@@ -257,20 +280,24 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
257
280
|
if (tracking_enabled && tracking_id_valid) {
|
258
281
|
GTagOptIn.register(tracking_id);
|
259
282
|
if (user_consent.analyses) {
|
260
|
-
logger.info('
|
283
|
+
logger.info('\n' + 'enable: GA');
|
261
284
|
GTagOptIn.optIn();
|
262
285
|
} else {
|
263
|
-
logger.warn('
|
286
|
+
logger.warn('\n' + 'disable: GA');
|
264
287
|
GTagOptIn.optOut();
|
265
288
|
|
266
289
|
if (!user_agent.includes('iPad')) {
|
267
290
|
gaCookies.forEach(function (item) {
|
268
|
-
logger.warn('
|
269
|
-
j1.removeCookie(item);
|
291
|
+
logger.warn('\n' + 'delete GA cookie: ' + item);
|
292
|
+
j1.removeCookie({ name: item, domain: cookie_domain });
|
270
293
|
});
|
271
294
|
}
|
272
295
|
}
|
273
|
-
|
296
|
+
|
297
|
+
// Managing providers for personalization OptIn/Out (Comments|Ads)
|
298
|
+
// moved to J1 adapter
|
299
|
+
|
300
|
+
if (!user_consent.analyses || !user_consent.personalization) {
|
274
301
|
// expire consent|state cookies to session
|
275
302
|
j1.expireCookie({ name: cookie_names.user_state });
|
276
303
|
j1.expireCookie({ name: cookie_names.user_consent });
|