j1-template 2021.1.11 → 2021.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/blocks/footer/boxes/issue.proc +28 -5
  3. data/_includes/themes/j1/blocks/footer/boxes/legal_statements.proc +66 -23
  4. data/_includes/themes/j1/blocks/footer/boxes/links_box.proc +0 -1
  5. data/_includes/themes/j1/blocks/footer/boxes/news_box.proc +16 -1
  6. data/_includes/themes/j1/layouts/content_generator_app.html +1 -1
  7. data/_includes/themes/j1/layouts/content_generator_blog_archive.html +197 -219
  8. data/_includes/themes/j1/layouts/content_generator_collection.html +4 -2
  9. data/_includes/themes/j1/layouts/content_generator_page.html +4 -1
  10. data/_includes/themes/j1/layouts/content_generator_post.html +31 -23
  11. data/_includes/themes/j1/layouts/content_generator_raw.html +1 -1
  12. data/_includes/themes/j1/layouts/layout_metadata_generator.html +55 -0
  13. data/_includes/themes/j1/modules/connectors/comment/commento.html +31 -0
  14. data/_includes/themes/j1/modules/connectors/comment/custom-provider.html +7 -8
  15. data/_includes/themes/j1/modules/connectors/comment/disqus.html +12 -54
  16. data/_includes/themes/j1/modules/connectors/comment/facebook.html +7 -8
  17. data/_includes/themes/j1/modules/connectors/comment/hyvor.html +33 -0
  18. data/_includes/themes/j1/modules/connectors/comment/just-comments.html +31 -0
  19. data/_includes/themes/j1/modules/connectors/comments +3 -0
  20. data/_includes/themes/j1/procedures/posts/collate_timeline.proc +27 -5
  21. data/_includes/themes/j1/procedures/posts/pager.proc +123 -0
  22. data/_layouts/default.html +52 -1
  23. data/assets/data/cookieconsent.html +0 -2
  24. data/assets/data/disqus.js +81 -0
  25. data/assets/data/hyvor.js +72 -0
  26. data/assets/data/menu.html +1 -1
  27. data/assets/data/mmenu_toc.html +20 -1
  28. data/assets/data/panel.html +28 -7
  29. data/assets/error_pages/HTTP204.html +2 -1
  30. data/assets/error_pages/HTTP400.html +2 -1
  31. data/assets/error_pages/HTTP401.html +2 -1
  32. data/assets/error_pages/HTTP403.html +2 -1
  33. data/assets/error_pages/HTTP404.html +2 -1
  34. data/assets/error_pages/HTTP444.html +93 -0
  35. data/assets/error_pages/HTTP500.html +2 -1
  36. data/assets/error_pages/HTTP501.html +2 -1
  37. data/assets/error_pages/HTTP502.html +2 -1
  38. data/assets/error_pages/HTTP503.html +2 -1
  39. data/assets/themes/j1/adapter/js/algolia.js +10 -10
  40. data/assets/themes/j1/adapter/js/asciidoctor.js +6 -6
  41. data/assets/themes/j1/adapter/js/attic.js +17 -17
  42. data/assets/themes/j1/adapter/js/bmd.js +6 -6
  43. data/assets/themes/j1/adapter/js/carousel.js +10 -10
  44. data/assets/themes/j1/adapter/js/clipboard.js +10 -10
  45. data/assets/themes/j1/adapter/js/cookieConsent.js +58 -47
  46. data/assets/themes/j1/adapter/js/fam.js +34 -34
  47. data/assets/themes/j1/adapter/js/framer.js +6 -6
  48. data/assets/themes/j1/adapter/js/j1.js +520 -252
  49. data/assets/themes/j1/adapter/js/justifiedGallery.js +11 -11
  50. data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +19 -19
  51. data/assets/themes/j1/adapter/js/lightbox.js +6 -6
  52. data/assets/themes/j1/adapter/js/logger.js +7 -7
  53. data/assets/themes/j1/adapter/js/mmenu.js +25 -25
  54. data/assets/themes/j1/adapter/js/navigator.js +55 -48
  55. data/assets/themes/j1/adapter/js/quicksearch.js +6 -6
  56. data/assets/themes/j1/adapter/js/rouge.js +7 -7
  57. data/assets/themes/j1/adapter/js/rtable.js +6 -6
  58. data/assets/themes/j1/adapter/js/themer.js +43 -47
  59. data/assets/themes/j1/adapter/js/toccer.js +9 -9
  60. data/assets/themes/j1/modules/backstretch/js/backstretch.js +3 -3
  61. data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +35 -23
  62. data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js +2 -2
  63. data/assets/themes/j1/modules/lunrSearch/js/quicksearch.js +1 -1
  64. data/assets/themes/j1/modules/themeSwitcher/js/switcher.js +74 -55
  65. data/assets/themes/j1/modules/themeSwitcher/js/switcher.min.js +75 -57
  66. data/lib/j1/version.rb +3 -3
  67. data/lib/starter_web/Gemfile +4 -5
  68. data/lib/starter_web/_config.yml +42 -24
  69. data/lib/starter_web/_data/blocks/footer.yml +52 -20
  70. data/lib/starter_web/_data/blocks/panel.yml +4 -4
  71. data/lib/starter_web/_data/builder/blog_navigator.yml +9 -192
  72. data/lib/starter_web/_data/builder/defaults/blog_navigator.yml +389 -0
  73. data/lib/starter_web/_data/j1_config.yml +24 -10
  74. data/lib/starter_web/_data/locales/be.yml +269 -0
  75. data/lib/starter_web/_data/locales/cs.yml +218 -0
  76. data/lib/starter_web/_data/locales/da.yml +213 -0
  77. data/lib/starter_web/_data/locales/de.yml +222 -0
  78. data/lib/starter_web/_data/locales/el.yml +215 -0
  79. data/lib/starter_web/_data/locales/en.yml +215 -0
  80. data/lib/starter_web/_data/locales/es.yml +219 -0
  81. data/lib/starter_web/_data/locales/et.yml +207 -0
  82. data/lib/starter_web/_data/locales/fi.yml +211 -0
  83. data/lib/starter_web/_data/locales/fr.yml +219 -0
  84. data/lib/starter_web/_data/locales/hr.yml +240 -0
  85. data/lib/starter_web/_data/locales/hu.yml +196 -0
  86. data/lib/starter_web/_data/locales/it.yml +215 -0
  87. data/lib/starter_web/_data/locales/lv.yml +233 -0
  88. data/lib/starter_web/_data/locales/nl.yml +213 -0
  89. data/lib/starter_web/_data/locales/pl.yml +241 -0
  90. data/lib/starter_web/_data/locales/pt.yml +217 -0
  91. data/lib/starter_web/_data/locales/readme +4 -0
  92. data/lib/starter_web/_data/locales/ro.yml +209 -0
  93. data/lib/starter_web/_data/locales/ru.yml +269 -0
  94. data/lib/starter_web/_data/locales/sk.yml +211 -0
  95. data/lib/starter_web/_data/locales/sl.yml +209 -0
  96. data/lib/starter_web/_data/locales/sv.yml +207 -0
  97. data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +11 -10
  98. data/lib/starter_web/_data/modules/defaults/themer.yml +1 -0
  99. data/lib/starter_web/_data/modules/themer.yml +1 -0
  100. data/lib/starter_web/_data/plugins/defaults/paginator.yml +7 -6
  101. data/lib/starter_web/_data/plugins/paginator.yml +3 -0
  102. data/lib/starter_web/_includes/attributes.asciidoc +1 -1
  103. data/lib/starter_web/_plugins/date-i18n.rb +67 -0
  104. data/lib/starter_web/_plugins/lunr_index.rb +1 -1
  105. data/lib/starter_web/assets/images/modules/attics/markus-spiske-1920x1280.jpg +0 -0
  106. data/lib/starter_web/assets/images/modules/attics/matthew-dockery-1920x1280.jpg +0 -0
  107. data/lib/starter_web/collections/posts/public/featured/_posts/2020-01-01-about-cookies.adoc +1 -1
  108. data/lib/starter_web/collections/posts/public/featured/_posts/2021-03-01-site-generators.adoc +1 -1
  109. data/lib/starter_web/collections/posts/public/featured/_posts/2021-03-03-about-j1.adoc +1 -1
  110. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +2 -2
  111. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +2 -2
  112. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +2 -2
  113. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +2 -2
  114. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +1 -1
  115. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +1 -1
  116. data/lib/starter_web/index.html +3 -3
  117. data/lib/starter_web/package.json +1 -1
  118. data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +3 -0
  119. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +3 -0
  120. data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +3 -0
  121. data/lib/starter_web/pages/public/blog/navigator/archive.html +80 -12
  122. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +94 -26
  123. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +81 -12
  124. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +95 -37
  125. data/lib/starter_web/pages/public/blog/navigator/index.html +4 -0
  126. data/lib/starter_web/pages/public/cookieConsent.adoc +3 -0
  127. data/lib/starter_web/pages/public/learn/quickstart.adoc +473 -0
  128. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +0 -1
  129. data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +2 -1
  130. data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +0 -2
  131. data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +0 -2
  132. data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +0 -1
  133. data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +0 -1
  134. data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +0 -1
  135. data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +0 -1
  136. data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +0 -1
  137. data/lib/starter_web/pages/public/learn/where_to_go.adoc +0 -1
  138. data/lib/starter_web/pages/public/legal/de/100_copyright.adoc +116 -0
  139. data/lib/starter_web/pages/public/legal/de/100_impress.adoc +94 -0
  140. data/lib/starter_web/pages/public/legal/de/300_privacy.adoc +320 -0
  141. data/lib/starter_web/pages/public/legal/de/400_comment_policy.adoc +123 -0
  142. data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +3 -1
  143. data/lib/starter_web/pages/public/legal/en/200_impress.adoc +3 -1
  144. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +81 -20
  145. data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +34 -16
  146. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  147. data/lib/starter_web/utilsrv/package.json +1 -1
  148. metadata +41 -4
  149. data/_includes/themes/j1/procedures/global/pager.proc +0 -79
  150. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.org.asciidoc +0 -244
@@ -127,8 +127,8 @@ j1.adapter['toccer'] = (function () {
127
127
 
128
128
  // initialize state flag
129
129
  _this.setState('started');
130
- logger.info('state: ' + _this.getState());
131
- logger.info('Module is being initialized');
130
+ logger.info('\n' + 'state: ' + _this.getState());
131
+ logger.info('\n' + 'module is being initialized');
132
132
 
133
133
  // create settings object from frontmatterOptions
134
134
  var frontmatterOptions = options != null ? $.extend({}, options) : {};
@@ -175,9 +175,9 @@ j1.adapter['toccer'] = (function () {
175
175
  _this.initToccerCore(settings);
176
176
  _this.setState('finished');
177
177
 
178
- logger.info('state: ' + _this.getState());
179
- logger.info('module initialized successfully');
180
- logger.info('met dependencies for: j1');
178
+ logger.info('\n' + 'state: ' + _this.getState());
179
+ logger.info('\n' + 'module initialized successfully');
180
+ logger.info('\n' + 'met dependencies for: j1');
181
181
  clearInterval(dependencies_met_navigator);
182
182
  }
183
183
  }, 25);
@@ -219,7 +219,7 @@ j1.adapter['toccer'] = (function () {
219
219
  scrollOffset = scrollOffset + moduleOptions.scrollSmoothOffset
220
220
 
221
221
  _this.setState('running');
222
- logger.info('state: ' + _this.getState());
222
+ logger.info('\n' + 'state: ' + _this.getState());
223
223
 
224
224
  // tocbot get fired if HTML portion is loaded (AJAX load finished)
225
225
  //
@@ -256,7 +256,7 @@ j1.adapter['toccer'] = (function () {
256
256
  throttleTimeout: moduleOptions.throttleTimeout
257
257
  });
258
258
  /* eslint-enable */
259
- logger.info('met dependencies for: xhrData');
259
+ logger.info('\n' + 'met dependencies for: loadHTML');
260
260
  clearInterval(dependencies_met_ajax_load_finished);
261
261
  } // END AJAX load finished
262
262
  }, 25); // END dependencies_met_ajax_load_finished
@@ -323,7 +323,7 @@ j1.adapter['toccer'] = (function () {
323
323
  messageHandler: function (sender, message) {
324
324
  var json_message = JSON.stringify(message, undefined, 2);
325
325
 
326
- logText = 'received message from ' + sender + ': ' + json_message;
326
+ logText = '\n' + 'received message from ' + sender + ': ' + json_message;
327
327
  logger.debug(logText);
328
328
 
329
329
  // -----------------------------------------------------------------------
@@ -333,7 +333,7 @@ j1.adapter['toccer'] = (function () {
333
333
  //
334
334
  // Place handling of command|action here
335
335
  //
336
- logger.info(message.text);
336
+ logger.info('\n' + message.text);
337
337
  }
338
338
 
339
339
  //
@@ -861,12 +861,12 @@
861
861
 
862
862
  // jadams, 2017-12-07: Added log for testing
863
863
  if(this.options.debug) {
864
- logText = 'resize: boxHeight x boxWidth: ' + boxHeight + ' x ' + boxWidth;
864
+ logText = '\n' + 'resize: boxHeight x boxWidth: ' + boxHeight + ' x ' + boxWidth;
865
865
  logger.debug(logText);
866
866
  }
867
867
 
868
868
  if ( boxHeight == 0 || boxWidth == 0 ) {
869
- logText = 'Kacke am Schuh';
869
+ logText = '\n' + 'Kacke am Schuh';
870
870
  logger.warn(logText);
871
871
  }
872
872
 
@@ -1083,7 +1083,7 @@
1083
1083
  if ($(myID).is(':visible')) {
1084
1084
  // clear interval checking
1085
1085
  clearInterval(isVisible);
1086
- logger.info('container visible on id: ' + myID);
1086
+ logger.info('\n' + 'container visible on id: ' + myID);
1087
1087
  that.resize();
1088
1088
  }
1089
1089
  }, 50); // END 'isVisible'
@@ -38,16 +38,18 @@
38
38
  // -----------------------------------------------------------------------------
39
39
 
40
40
  function BootstrapCookieConsent(props) {
41
+ var logger = log4javascript.getLogger('j1.core.bsCookieConsent');
42
+ var modalId = 'bccs-modal';
43
+ var self = this;
44
+ var detailedSettingsShown = false;
45
+ var url = new liteURL(window.location.href);
46
+ var secure = (url.protocol.includes('https')) ? true : false;
41
47
  var logText;
42
48
  var current_page;
43
49
  var whitelisted;
44
- var logger = log4javascript.getLogger('j1.core.bsCookieConsent');
45
- var modalId = "bccs-modal"
46
- var self = this
47
- var detailedSettingsShown = false
48
50
 
49
- logger.info('Initializing core module: started');
50
- logger.info('state: started');
51
+ logger.info('\n' + 'initializing core module: started');
52
+ logger.info('\n' + 'state: started');
51
53
 
52
54
  this.props = {
53
55
  autoShowDialog: true, // disable autoShowModal on the privacy policy and legal notice pages, to make these pages readable
@@ -58,7 +60,9 @@ function BootstrapCookieConsent(props) {
58
60
  cookieStorageDays: 365, // the duration the cookie configuration is stored on the client
59
61
  postSelectionCallback: undefined, // callback function, called after the user has made his selection
60
62
  whitelisted: [], // pages NO consent modal page is issued
61
- xhr_data_element: "" // container for the language-specific consent modal taken from /assets/data/cookieconsent.html
63
+ xhr_data_element: "", // container for the language-specific consent modal taken from /assets/data/cookieconsent.html
64
+ sameSite: "Strict", // restrict consent cookie to first-party, do NOT send cookie to other domains
65
+ secure: false //
62
66
  }
63
67
 
64
68
  for (var property in props) {
@@ -75,7 +79,7 @@ function BootstrapCookieConsent(props) {
75
79
  }
76
80
 
77
81
  var Cookie = {
78
- set: function (name, value, days) {
82
+ set: function (name, value, days, samesite, secure) {
79
83
  var value_encoded = window.btoa(value);
80
84
  var expires = "";
81
85
  if (days) {
@@ -83,7 +87,11 @@ function BootstrapCookieConsent(props) {
83
87
  date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
84
88
  expires = "; expires=" + date.toUTCString();
85
89
  }
86
- document.cookie = name + "=" + (value_encoded || "") + expires + "; Path=/; SameSite=Strict;";
90
+ if (secure) {
91
+ document.cookie = name + "=" + (value_encoded || '') + expires + '; Path=/; SameSite=' + samesite + '; ' + 'secure=' + secure + ';';
92
+ } else {
93
+ document.cookie = name + "=" + (value_encoded || '') + expires + '; Path=/; SameSite=' + samesite + ';';
94
+ }
87
95
  },
88
96
  get: function (name) {
89
97
  var nameEQ = name + "=";
@@ -118,7 +126,7 @@ function BootstrapCookieConsent(props) {
118
126
 
119
127
  self.modal = document.getElementById(modalId);
120
128
  if (!self.modal) {
121
- logger.info('Load consent modal');
129
+ logger.info('\n' + 'load consent modal');
122
130
  self.modal = document.createElement("div");
123
131
  self.modal.id = modalId;
124
132
  self.modal.setAttribute("class", "modal fade");
@@ -139,7 +147,7 @@ function BootstrapCookieConsent(props) {
139
147
  var templateUrl = self.props.contentURL + '/' + 'index.html';
140
148
  $.get(templateUrl)
141
149
  .done(function (data) {
142
- logger.info('Loading Consent modal: successfully');
150
+ logger.info('\n' + 'loading consent modal: successfully');
143
151
  self.modal.innerHTML = data;
144
152
  self.modal.innerHTML = $('#' + self.props.xhr_data_element).eq(0).html();
145
153
 
@@ -153,7 +161,7 @@ function BootstrapCookieConsent(props) {
153
161
  self.$buttonSave = $("#bccs-buttonSave");
154
162
  self.$buttonAgreeAll = $("#bccs-buttonAgreeAll");
155
163
 
156
- logger.info('Load/Initialze options from cookie');
164
+ logger.info('\n' + 'load/initialze options from cookie');
157
165
 
158
166
  updateButtons();
159
167
  updateOptionsFromCookie();
@@ -166,7 +174,7 @@ function BootstrapCookieConsent(props) {
166
174
  updateButtons();
167
175
  });
168
176
 
169
- logger.info('Initialze event handler');
177
+ logger.info('\n' + 'initialze event handler');
170
178
 
171
179
  self.$buttonDoNotAgree.click(function () {
172
180
  doNotAgree();
@@ -186,8 +194,8 @@ function BootstrapCookieConsent(props) {
186
194
  });
187
195
  })
188
196
  .fail(function () {
189
- logger.error('Loading Consent modal: failed');
190
- logger.info('Probably no `contentURL` set');
197
+ logger.error('\n' + 'loading consent modal: failed');
198
+ logger.warn('\n' + 'probably no `contentURL` set');
191
199
  })
192
200
  } else {
193
201
  self.$modal.modal("show")
@@ -238,21 +246,25 @@ function BootstrapCookieConsent(props) {
238
246
  }
239
247
 
240
248
  function agreeAll() {
241
- Cookie.set(self.props.cookieName, JSON.stringify(gatherOptions(true)), self.props.cookieStorageDays);
249
+ Cookie.set(self.props.cookieName, JSON.stringify(gatherOptions(true)), self.props.cookieStorageDays, self.props.sameSite, self.props.secure);
242
250
  self.$modal.modal("hide");
243
251
  }
244
252
 
245
253
  function doNotAgree() {
246
- Cookie.set(self.props.cookieName, JSON.stringify(gatherOptions(false)), self.props.cookieStorageDays);
247
- logger.warn('delete cookie: j1.user.consent');
248
- // j1.deleteCookie('j1.user.consent');
249
- j1.deleteCookie('all');
254
+ Cookie.set(self.props.cookieName, JSON.stringify(gatherOptions(false)), self.props.cookieStorageDays, self.props.sameSite, self.props.secure);
255
+
256
+ // jadams, 2021-07-15: all cookies NOT longer supported by j1.expireCookie
257
+ // TODO: Create loop over all cookies found in page
258
+ //
259
+ // logger.warn('expire all cookies');
260
+ // j1.expireCookie('all');
261
+
250
262
  self.$modal.modal('hide')
251
263
  j1.goHome();
252
264
  }
253
265
 
254
266
  function saveSettings() {
255
- Cookie.set(self.props.cookieName, JSON.stringify(gatherOptions()), self.props.cookieStorageDays);
267
+ Cookie.set(self.props.cookieName, JSON.stringify(gatherOptions()), self.props.cookieStorageDays, self.props.sameSite, self.props.secure);
256
268
  self.$modal.modal("hide");
257
269
  }
258
270
 
@@ -266,8 +278,8 @@ function BootstrapCookieConsent(props) {
266
278
  // API functions
267
279
  // ---------------------------------------------------------------------------
268
280
 
269
- logger.info('Initializing core module finished');
270
- logger.info('state: finished');
281
+ logger.info('\n' + 'initializing core module finished');
282
+ logger.info('\n' + 'state: finished');
271
283
 
272
284
  // show the consent dialog (modal)
273
285
  // ---------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  # -----------------------------------------------------------------------------
3
- # ~/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js
3
+ # ~/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js
4
4
  # Provides JS Core for J1 Module BS Cookie Consent
5
5
  #
6
6
  # Product/Info:
@@ -24,4 +24,4 @@
24
24
  # outside of J1 Template!
25
25
  # -----------------------------------------------------------------------------
26
26
  */
27
- "use strict";function BootstrapCookieConsent(c){var g;var e;var q;var r=log4javascript.getLogger("j1.core.bsCookieConsent");var p="bccs-modal";var l=this;var n=false;r.info("Initializing core module: started");r.info("state: started");this.props={autoShowDialog:true,language:navigator.language,languages:["en","de"],contentURL:"./content",cookieName:"cookie-consent-settings",cookieStorageDays:365,postSelectionCallback:undefined,whitelisted:[],xhr_data_element:""};for(var d in c){this.props[d]=c[d]}this.language=this.props.language;if(this.language.indexOf("-")!==-1){this.language=this.language.split("-")[0]}if(!this.props.languages.includes(this.language)){this.language=this.props.languages[0]}var f={set:function(u,v,x){var w=window.btoa(v);var s="";if(x){var t=new Date();t.setTime(t.getTime()+(x*24*60*60*1000));s="; expires="+t.toUTCString()}document.cookie=u+"="+(w||"")+s+"; Path=/; SameSite=Strict;"},get:function(t){var w=t+"=";var s=document.cookie.split(";");for(var u=0;u<s.length;u++){var y=s[u];while(y.charAt(0)===" "){y=y.substring(1,y.length)}if(y.indexOf(w)===0){var x=y.substring(w.length,y.length);var v=window.atob(x);return v}}return undefined}};var k={documentReady:function(s){if(document.readyState!=="loading"){s()}else{document.addEventListener("DOMContentLoaded",s)}}};function j(s){k.documentReady(function(){l.modal=document.getElementById(p);if(!l.modal){r.info("Load consent modal");l.modal=document.createElement("div");l.modal.id=p;l.modal.setAttribute("class","modal fade");l.modal.setAttribute("tabindex","-1");l.modal.setAttribute("role","dialog");l.modal.setAttribute("aria-labelledby",p);document.body.append(l.modal);l.$modal=$(l.modal);if(l.props.postSelectionCallback){l.$modal.on("hidden.bs.modal",function(){l.props.postSelectionCallback()})}var t=l.props.contentURL+"/index.html";$.get(t).done(function(u){r.info("Loading Consent modal: successfully");l.modal.innerHTML=u;l.modal.innerHTML=$("#"+l.props.xhr_data_element).eq(0).html();$(l.modal).modal({backdrop:"static",keyboard:false});l.$buttonDoNotAgree=$("#bccs-buttonDoNotAgree");l.$buttonAgree=$("#bccs-buttonAgree");l.$buttonSave=$("#bccs-buttonSave");l.$buttonAgreeAll=$("#bccs-buttonAgreeAll");r.info("Load/Initialze options from cookie");i();h();$("#bccs-options").on("hide.bs.collapse",function(){n=false;i()}).on("show.bs.collapse",function(){n=true;i()});r.info("Initialze event handler");l.$buttonDoNotAgree.click(function(){b()});l.$buttonAgree.click(function(){m()});l.$buttonSave.click(function(){$("#bccs-options").collapse("hide");o();h()});l.$buttonAgreeAll.click(function(){$("#bccs-options").collapse("hide");m();h()})}).fail(function(){r.error("Loading Consent modal: failed");r.info("Probably no `contentURL` set")})}else{l.$modal.modal("show")}}.bind(this))}function h(){var u=l.getSettings();if(u){for(var t in u){var s=l.$modal.find("#bccs-options .bccs-option[data-name='"+t+"'] input[type='checkbox']");s.prop("checked",u[t])}}}function i(){if(n){l.$buttonDoNotAgree.hide();l.$buttonAgree.hide();l.$buttonSave.show();l.$buttonAgreeAll.show()}else{l.$buttonDoNotAgree.show();l.$buttonAgree.show();l.$buttonSave.hide();l.$buttonAgreeAll.hide()}}function a(t){var s=l.$modal.find("#bccs-options .bccs-option");var v={};for(var w=0;w<s.length;w++){var y=s[w];var u=y.getAttribute("data-name");if(u==="necessary"){v[u]=true}else{if(t===undefined){var x=$(y).find("input[type='checkbox']");v[u]=x.prop("checked")}else{v[u]=!!t}}}return v}function m(){f.set(l.props.cookieName,JSON.stringify(a(true)),l.props.cookieStorageDays);l.$modal.modal("hide")}function b(){f.set(l.props.cookieName,JSON.stringify(a(false)),l.props.cookieStorageDays);r.warn("delete cookie: j1.user.consent");j1.deleteCookie("all");l.$modal.modal("hide");j1.goHome()}function o(){f.set(l.props.cookieName,JSON.stringify(a()),l.props.cookieStorageDays);l.$modal.modal("hide")}q=(this.props.whitelisted.indexOf(window.location.pathname)>-1);if(f.get(this.props.cookieName)===undefined&&this.props.autoShowDialog&&!q){j()}r.info("Initializing core module finished");r.info("state: finished");this.showDialog=function(){q=(this.props.whitelisted.indexOf(window.location.pathname)>-1);if(!q){j()}};this.getSettings=function(t){var s=f.get(l.props.cookieName);if(s){var u=JSON.parse(f.get(l.props.cookieName));if(t===undefined){return u}else{if(u){return u[t]}else{return false}}}else{return undefined}}};
27
+ function BootstrapCookieConsent(c){var t=log4javascript.getLogger("j1.core.bsCookieConsent");var r="bccs-modal";var o=this;var p=false;var d=new liteURL(window.location.href);var m=(d.protocol.includes("https"))?true:false;var h;var f;var s;t.info("\ninitializing core module: started");t.info("\nstate: started");this.props={autoShowDialog:true,language:navigator.language,languages:["en","de"],contentURL:"./content",cookieName:"cookie-consent-settings",cookieStorageDays:365,postSelectionCallback:undefined,whitelisted:[],xhr_data_element:"",sameSite:"Strict",secure:false};for(var e in c){this.props[e]=c[e]}this.language=this.props.language;if(this.language.indexOf("-")!==-1){this.language=this.language.split("-")[0]}if(!this.props.languages.includes(this.language)){this.language=this.props.languages[0]}var g={set:function(w,y,B,x,z){var A=window.btoa(y);var u="";if(B){var v=new Date();v.setTime(v.getTime()+(B*24*60*60*1000));u="; expires="+v.toUTCString()}if(z){document.cookie=w+"="+(A||"")+u+"; Path=/; SameSite="+x+"; secure="+z+";"}else{document.cookie=w+"="+(A||"")+u+"; Path=/; SameSite="+x+";"}},get:function(v){var y=v+"=";var u=document.cookie.split(";");for(var w=0;w<u.length;w++){var A=u[w];while(A.charAt(0)===" "){A=A.substring(1,A.length)}if(A.indexOf(y)===0){var z=A.substring(y.length,A.length);var x=window.atob(z);return x}}return undefined}};var l={documentReady:function(u){if(document.readyState!=="loading"){u()}else{document.addEventListener("DOMContentLoaded",u)}}};function k(u){l.documentReady(function(){o.modal=document.getElementById(r);if(!o.modal){t.info("\nload consent modal");o.modal=document.createElement("div");o.modal.id=r;o.modal.setAttribute("class","modal fade");o.modal.setAttribute("tabindex","-1");o.modal.setAttribute("role","dialog");o.modal.setAttribute("aria-labelledby",r);document.body.append(o.modal);o.$modal=$(o.modal);if(o.props.postSelectionCallback){o.$modal.on("hidden.bs.modal",function(){o.props.postSelectionCallback()})}var v=o.props.contentURL+"/index.html";$.get(v).done(function(w){t.info("\nloading consent modal: successfully");o.modal.innerHTML=w;o.modal.innerHTML=$("#"+o.props.xhr_data_element).eq(0).html();$(o.modal).modal({backdrop:"static",keyboard:false});o.$buttonDoNotAgree=$("#bccs-buttonDoNotAgree");o.$buttonAgree=$("#bccs-buttonAgree");o.$buttonSave=$("#bccs-buttonSave");o.$buttonAgreeAll=$("#bccs-buttonAgreeAll");t.info("\nload/initialze options from cookie");j();i();$("#bccs-options").on("hide.bs.collapse",function(){p=false;j()}).on("show.bs.collapse",function(){p=true;j()});t.info("\ninitialze event handler");o.$buttonDoNotAgree.click(function(){b()});o.$buttonAgree.click(function(){n()});o.$buttonSave.click(function(){$("#bccs-options").collapse("hide");q();i()});o.$buttonAgreeAll.click(function(){$("#bccs-options").collapse("hide");n();i()})}).fail(function(){t.error("\nloading consent modal: failed");t.warn("\nprobably no `contentURL` set")})}else{o.$modal.modal("show")}}.bind(this))}function i(){var w=o.getSettings();if(w){for(var v in w){var u=o.$modal.find("#bccs-options .bccs-option[data-name='"+v+"'] input[type='checkbox']");u.prop("checked",w[v])}}}function j(){if(p){o.$buttonDoNotAgree.hide();o.$buttonAgree.hide();o.$buttonSave.show();o.$buttonAgreeAll.show()}else{o.$buttonDoNotAgree.show();o.$buttonAgree.show();o.$buttonSave.hide();o.$buttonAgreeAll.hide()}}function a(v){var u=o.$modal.find("#bccs-options .bccs-option");var x={};for(var y=0;y<u.length;y++){var A=u[y];var w=A.getAttribute("data-name");if(w==="necessary"){x[w]=true}else{if(v===undefined){var z=$(A).find("input[type='checkbox']");x[w]=z.prop("checked")}else{x[w]=!!v}}}return x}function n(){g.set(o.props.cookieName,JSON.stringify(a(true)),o.props.cookieStorageDays,o.props.sameSite,o.props.secure);o.$modal.modal("hide")}function b(){g.set(o.props.cookieName,JSON.stringify(a(false)),o.props.cookieStorageDays,o.props.sameSite,o.props.secure);o.$modal.modal("hide");j1.goHome()}function q(){g.set(o.props.cookieName,JSON.stringify(a()),o.props.cookieStorageDays,o.props.sameSite,o.props.secure);o.$modal.modal("hide")}s=(this.props.whitelisted.indexOf(window.location.pathname)>-1);if(g.get(this.props.cookieName)===undefined&&this.props.autoShowDialog&&!s){k()}t.info("\ninitializing core module finished");t.info("\nstate: finished");this.showDialog=function(){s=(this.props.whitelisted.indexOf(window.location.pathname)>-1);if(!s){k()}};this.getSettings=function(v){var u=g.get(o.props.cookieName);if(u){var w=JSON.parse(g.get(o.props.cookieName));if(v===undefined){return w}else{if(w){return w[v]}else{return false}}}else{return undefined}}};
@@ -154,7 +154,7 @@
154
154
  //
155
155
  if (docs.length > 0) {
156
156
  var logger = log4javascript.getLogger("j1.searcher");
157
- var log_text = 'cleanup tags and categories';
157
+ var log_text = '\n' + 'cleanup tags and categories';
158
158
  logger.info(log_text);
159
159
  $('.sr-tags').each(function() {
160
160
  var sr_tags = $(this).html().replace(/^\s+(.*)(\s+·\s+$)/, "$1");
@@ -47,16 +47,21 @@
47
47
 
48
48
  var old = $.fn.bootstrapThemeSwitcher;
49
49
 
50
- var cookie_names = j1.getCookieNames();
51
- const user_state_cookie_name = cookie_names.user_state;
50
+ var cookie_names = j1.getCookieNames();
51
+ var gaCookies = j1.findCookie('_ga');
52
+ var j1Cookies = j1.findCookie('j1');
53
+ var url = new liteURL(window.location.href);
54
+ var hostname = url.hostname;
55
+ var domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
56
+ var secure = (url.protocol.includes('https')) ? true : false;
52
57
 
53
58
  var logger = log4javascript.getLogger('j1.core.switcher');
54
59
  var logText;
55
60
 
56
61
  var user_state_detected;
57
- var j1_user_state = {};
58
- var j1_user_state_json;
59
- var j1_user_state_cookie;
62
+ var user_state = {};
63
+ var user_state_json;
64
+ var user_state_cookie;
60
65
 
61
66
  // Constructor
62
67
  // ---------------------------------------------------------------------------
@@ -75,13 +80,13 @@
75
80
  // ---------------------------------------------------------------------------
76
81
  BootstrapThemeSwitcher.prototype = {
77
82
  clear: function () {
78
- logger.debug('bootstrapThemeSwitcher.clear');
83
+ logger.debug('\n' + 'bootstrapThemeSwitcher.clear');
79
84
  return this.$element.each(function () {
80
85
  this.$element.empty();
81
86
  });
82
87
  },
83
88
  update: function () {
84
- logger.debug('bootstrapThemeSwitcher.update');
89
+ logger.debug('\n' + 'bootstrapThemeSwitcher.update');
85
90
  this.getThemes();
86
91
  },
87
92
 
@@ -112,27 +117,29 @@
112
117
  // -------------------------------------------------------------------------
113
118
  switchTheme: function (name, cssFile) {
114
119
 
115
- var $this = $(this);
116
- var settings = $.extend({}, $.fn.bootstrapThemeSwitcher.defaults, $this.data('bootstrapThemeSwitcher'));
120
+ var $this = $(this);
121
+ var settings = $.extend({}, $.fn.bootstrapThemeSwitcher.defaults, $this.data('bootstrapThemeSwitcher'));
122
+ var id = settings.cssThemeLink;
123
+ var debug = settings.debug;
124
+ var includeCSS = this.settings.includeBootswatch;
117
125
  var themeName;
118
126
  var theme_css;
119
- var theme_extension_css;
120
-
121
- var id = settings.cssThemeLink;
122
- var debug = settings.debug;
123
- var includeCSS = this.settings.includeBootswatch;
124
127
 
125
128
  // detect|set user state cookie
126
- user_state_detected = j1.existsCookie ( 'j1.user.state' );
129
+ user_state_detected = j1.existsCookie (cookie_names.user_state);
127
130
  if ( user_state_detected ) {
128
- logger.debug('cookie found: j1.user.state');
129
- j1_user_state = j1.readCookie(user_state_cookie_name);
131
+ logger.debug('\n' + 'cookie found: ' + cookie_names.user_state);
132
+ user_state = j1.readCookie(cookie_names.user_state);
130
133
  } else {
131
- logger.error('cookie not found: j1.user.state');
134
+ logger.error('\n' + 'cookie not found: ' + cookie_names.user_state);
135
+ logger.debug('\n' + 'j1 cookies found:' + j1Cookies.length);
136
+ j1Cookies.forEach(item => console.log('j1.core.switcher: ' + item));
137
+ logger.debug('\n' + 'ga cookies found:' + gaCookies.length);
138
+ gaCookies.forEach(item => console.log('j1.core.switcher: ' + item));
132
139
  }
133
140
 
134
- themeName = j1_user_state.theme_name;
135
- theme_css = j1_user_state.theme_css;
141
+ themeName = user_state.theme_name;
142
+ theme_css = user_state.theme_css;
136
143
 
137
144
  if (typeof cssFile === 'undefined') { cssFile = this.settings.defaultCssFile; }
138
145
  if (typeof name === 'undefined') { name = cssFile; }
@@ -141,32 +148,36 @@
141
148
  if (settings.saveToCookie) {
142
149
  if ( typeof Cookies === 'undefined' ) {
143
150
  if ( debug === 'true' ) {
144
- logger.error('cookies library not present');
151
+ logger.error('\n' + 'cookies library not present');
145
152
  }
146
153
  return false;
147
154
  }
148
155
 
149
- j1_user_state.theme_name = name;
150
- j1_user_state.theme_css = cssFile;
156
+ user_state.theme_name = name;
157
+ user_state.theme_css = cssFile;
151
158
 
152
- if (!(j1_user_state.theme_name.includes('Uno') || j1_user_state.theme_name == 'Bootstrap')) {
153
- j1_user_state.theme_author = 'Bootswatch';
154
- j1_user_state.theme_author_url = 'https://bootswatch.com/';
159
+ if (!(user_state.theme_name.includes('Uno') || user_state.theme_name == 'Bootstrap')) {
160
+ user_state.theme_author = 'Bootswatch';
161
+ user_state.theme_author_url = 'https://bootswatch.com/';
155
162
  } else {
156
- j1_user_state.theme_author = 'J1 Team';
157
- j1_user_state.theme_author_url = 'https://jekyll.one/';
163
+ user_state.theme_author = 'J1 Team';
164
+ user_state.theme_author_url = 'https://jekyll.one/';
158
165
  }
159
166
 
167
+ logger.debug('\n' + 'write to cookie : ' + cookie_names.user_state);
160
168
  j1.writeCookie({
161
- name: user_state_cookie_name,
162
- data: j1_user_state
169
+ name: cookie_names.user_state,
170
+ data: user_state,
171
+ samesite: 'Strict',
172
+ secure: secure,
173
+ expires: 365
163
174
  });
164
175
 
165
176
  // reload current page (skip cache)
166
177
  location.reload(true);
167
178
  } else {
168
- logger.warn('write to cookie : disabled');
169
- logger.warn('selected theme not activated: ' + name);
179
+ logger.debug('\n' + 'write to cookie : disabled');
180
+ logger.warn('\n' + 'selected theme not activated: ' + name);
170
181
  } // END if saveToCookie
171
182
 
172
183
  }, // END switchTheme
@@ -177,24 +188,28 @@
177
188
  loadThemeFromCookie: function (options) {
178
189
 
179
190
  if ( typeof Cookies === 'undefined' ) {
180
- logger.error('cookies library not present');
191
+ logger.error('\n' + 'cookies library not present');
181
192
  return false;
182
193
  }
183
194
 
184
195
  var settings = $.extend({}, $.fn.bootstrapThemeSwitcher.defaults, options);
185
196
 
186
197
  // detect|set user state cookie
187
- user_state_detected = j1.existsCookie ( 'j1.user.state' );
198
+ user_state_detected = j1.existsCookie (cookie_names.user_state);
188
199
 
189
200
  if ( user_state_detected ) {
190
- logger.info('cookie found: j1.user.state');
191
- j1_user_state = j1.readCookie(user_state_cookie_name);
201
+ logger.info('\n' + 'cookie found: ' + cookie_names.user_state);
202
+ user_state = j1.readCookie(cookie_names.user_state);
192
203
  } else {
193
- logger.error('cookie not found: j1.user.state');
204
+ logger.error('\n' + 'cookie not found: ' + cookie_names.user_state);
205
+ logger.debug('\n' + 'j1 cookies found:' + j1Cookies.length);
206
+ j1Cookies.forEach(item => console.log('j1.core.switcher: ' + item));
207
+ logger.debug('\n' + 'ga cookies found:' + gaCookies.length);
208
+ gaCookies.forEach(item => console.log('j1.core.switcher: ' + item));
194
209
  }
195
210
 
196
- var themeName = j1_user_state.theme_name;
197
- var themeCss = j1_user_state.theme_css;
211
+ var themeName = user_state.theme_name;
212
+ var themeCss = user_state.theme_css;
198
213
  this.switchTheme(themeName, themeCss);
199
214
 
200
215
  }, // END loadThemeFromCookie
@@ -214,11 +229,11 @@
214
229
  // -------------------------------------------------------------------------
215
230
  addThemesToControl: function() {
216
231
  if (typeof this.$element === 'undefined') {
217
- logger.error('bootstrapThemeSelector|addThemesToControl: Element is undefined');
232
+ logger.error('\n' + 'bootstrapThemeSelector|addThemesToControl: Element is undefined');
218
233
  return false;
219
234
  }
220
235
  if (typeof this.themesList === 'undefined') {
221
- logger.error('bootstrapThemeSelector|addThemesToControl: Themes is undefined');
236
+ logger.error('\n' + 'bootstrapThemeSelector|addThemesToControl: Themes is undefined');
222
237
  return false;
223
238
  }
224
239
 
@@ -247,25 +262,29 @@
247
262
  var base = this;
248
263
 
249
264
  if (this.$element.is('ul')) {
250
- var $this = $(this);
251
- var settings = $.extend({}, $.fn.bootstrapThemeSwitcher.defaults, $this.data('bootstrapThemeSwitcher'));
252
- var id = settings.cssThemeLink;
265
+ var $this = $(this);
266
+ var settings = $.extend({}, $.fn.bootstrapThemeSwitcher.defaults, $this.data('bootstrapThemeSwitcher'));
267
+ var id = settings.cssThemeLink;
268
+ var debug = settings.debug;
253
269
  var themeName;
254
- var debug = settings.debug;
255
270
 
256
271
  // detect|set user state cookie
257
- user_state_detected = j1.existsCookie ( 'j1.user.state' );
272
+ user_state_detected = j1.existsCookie (cookie_names.user_state);
258
273
  if ( user_state_detected ) {
259
- logger.debug('User state cookie found');
260
- j1_user_state = j1.readCookie(user_state_cookie_name);
274
+ logger.debug('\n' + 'user state cookie found');
275
+ user_state = j1.readCookie(cookie_names.user_state);
261
276
  } else {
262
- logger.error('User state NOT cookie found');
277
+ logger.error('\n' + 'user state NOT cookie found');
278
+ logger.debug('\n' + 'j1 cookies found:' + j1Cookies.length);
279
+ j1Cookies.forEach(item => console.log('j1.core.switcher: ' + item));
280
+ logger.debug('\n' + 'ga cookies found:' + gaCookies.length);
281
+ gaCookies.forEach(item => console.log('j1.core.switcher: ' + item));
263
282
  }
264
283
 
265
- themeName = j1_user_state.theme_name;
284
+ themeName = user_state.theme_name;
266
285
 
267
286
  if ( debug === 'true' ) {
268
- logger.debug('bootstrapThemeSelector: UL element selected');
287
+ logger.debug('\n' + 'bootstrapThemeSelector: UL element selected');
269
288
  }
270
289
  this.$element.empty();
271
290
 
@@ -305,7 +324,7 @@
305
324
  });
306
325
 
307
326
  } else if (this.$element.is('select')) {
308
- logger.debug('bootstrapThemeSelector: SELECT element selected');
327
+ logger.debug('\n' + 'bootstrapThemeSelector: SELECT element selected');
309
328
  this.$element.empty();
310
329
 
311
330
  var optionSelectedMarker;
@@ -327,8 +346,8 @@
327
346
 
328
347
  } else {
329
348
  // no container found to add Theme list
330
- logger.info('bootstrapThemeSelector: no UL or SELECT element found');
331
- logger.error('bootstrapThemeSelector: failed');
349
+ logger.info('\n' + 'bootstrapThemeSelector: no UL or SELECT element found');
350
+ logger.error('\n' + 'bootstrapThemeSelector: failed');
332
351
  // console.warn('bootstrapThemeSelector only works with ul or select elements');
333
352
  }
334
353
  }, // END addThemesToControl
@@ -351,7 +370,7 @@
351
370
  base.addThemesToControl();
352
371
  },
353
372
  error: function (jqXHR, textStatus, errorThrown) {
354
- logger.error('Failed to retrieve the local feed from: \'' + base.settings.localFeed + '\'');
373
+ logger.error('\n' + 'failed to retrieve the local feed from: \'' + base.settings.localFeed + '\'');
355
374
  }
356
375
  });
357
376
  } else {