j1-template 2021.1.5 → 2021.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/layout_metadata_generator.html +4 -4
  3. data/_includes/themes/j1/modules/connectors/ads +18 -7
  4. data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +6 -6
  5. data/_includes/themes/j1/modules/connectors/analytics +17 -3
  6. data/_includes/themes/j1/modules/connectors/comments +22 -8
  7. data/_includes/themes/j1/modules/connectors/translator +20 -6
  8. data/_includes/themes/j1/procedures/global/select_location.proc +3 -3
  9. data/assets/data/themes.json +6 -6
  10. data/assets/error_pages/HTTP204.html +30 -10
  11. data/assets/error_pages/HTTP400.html +29 -8
  12. data/assets/error_pages/HTTP401.html +29 -9
  13. data/assets/error_pages/HTTP403.html +29 -8
  14. data/assets/error_pages/HTTP404.html +29 -8
  15. data/assets/error_pages/HTTP500.html +29 -8
  16. data/assets/error_pages/HTTP501.html +29 -8
  17. data/assets/error_pages/HTTP502.html +29 -8
  18. data/assets/error_pages/HTTP503.html +30 -8
  19. data/assets/themes/j1/adapter/js/cookieConsent.js +93 -56
  20. data/assets/themes/j1/adapter/js/fam.js +2 -1
  21. data/assets/themes/j1/adapter/js/j1.js +176 -170
  22. data/assets/themes/j1/adapter/js/navigator.js +157 -200
  23. data/assets/themes/j1/adapter/js/themer.1.js +326 -0
  24. data/assets/themes/j1/adapter/js/themer.js +41 -57
  25. data/assets/themes/j1/adapter/js/toccer.js +4 -45
  26. data/assets/themes/j1/core/js/template.js +1 -1
  27. data/assets/themes/j1/core/js/template.js.map +1 -1
  28. data/assets/themes/j1/core/js/template.min.js +1 -1
  29. data/assets/themes/j1/core/js/template.min.js.map +1 -1
  30. data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +25 -10
  31. data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js +5 -6
  32. data/assets/themes/j1/modules/fam/css/{uno → theme/uno}/fam.css +0 -0
  33. data/assets/themes/j1/modules/fam/css/theme/uno/fam.min.css +15 -0
  34. data/assets/themes/j1/modules/fam/js/fam.js +1 -6
  35. data/assets/themes/j1/modules/mmenuLight/css/{mmenu.css → mmenu-light.css} +0 -0
  36. data/assets/themes/j1/modules/mmenuLight/css/{mmenu.min.css → mmenu-light.min.css} +0 -0
  37. data/assets/themes/j1/modules/mmenuLight/css/theme/{uno.css → uno/mmenu.css} +0 -0
  38. data/assets/themes/j1/modules/mmenuLight/css/theme/{uno.min.css → uno/mmenu.min.css} +0 -0
  39. data/assets/themes/j1/modules/rtable/css/theme/{uno.css → uno/rtable.css} +0 -0
  40. data/assets/themes/j1/modules/rtable/css/theme/{uno.min.css → uno/rtable.min.css} +0 -0
  41. data/assets/themes/j1/modules/themeSwitcher/js/switcher.js +34 -49
  42. data/assets/themes/j1/modules/themeSwitcher/js/switcher.min.js +410 -2
  43. data/lib/j1/version.rb +1 -1
  44. data/lib/j1_app/j1_auth_manager/auth_manager.rb +2 -3
  45. data/lib/starter_web/Gemfile +1 -1
  46. data/lib/starter_web/_config.yml +18 -10
  47. data/lib/starter_web/_data/_defaults/private.default.yml +119 -0
  48. data/lib/starter_web/_data/j1_config.yml +21 -18
  49. data/lib/starter_web/_data/modules/cookieconsent.yml +1 -0
  50. data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +10 -9
  51. data/lib/starter_web/_data/modules/defaults/themer.yml +2 -1
  52. data/lib/starter_web/_data/private.default.yml +119 -0
  53. data/lib/starter_web/_data/resources.yml +6 -7
  54. data/lib/starter_web/_includes/attributes.asciidoc +1 -1
  55. data/lib/starter_web/_plugins/lunr_index.rb +1 -1
  56. data/lib/starter_web/dot.gitignore +2 -2
  57. data/lib/starter_web/index.html +3 -3
  58. data/lib/starter_web/package.json +2 -2
  59. data/lib/starter_web/pages/public/blog/navigator/archive.html +5 -3
  60. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +3 -2
  61. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +6 -4
  62. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +23 -5
  63. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +9 -6
  64. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  65. data/lib/starter_web/utilsrv/package.json +1 -1
  66. metadata +13 -65
  67. data/assets/error_pages/HTTP520.html +0 -68
  68. data/assets/error_pages/HTTP521.html +0 -68
  69. data/assets/error_pages/HTTP533.html +0 -68
  70. data/assets/themes/j1/modules/_lightGallery/css/core/lg-fb-comment-box.css +0 -58
  71. data/assets/themes/j1/modules/_lightGallery/css/core/lg-fb-comment-box.min.css +0 -5
  72. data/assets/themes/j1/modules/_lightGallery/css/core/lg-transitions.css +0 -778
  73. data/assets/themes/j1/modules/_lightGallery/css/core/lg-transitions.min.css +0 -5
  74. data/assets/themes/j1/modules/_lightGallery/css/core/lightgallery.css +0 -981
  75. data/assets/themes/j1/modules/_lightGallery/css/core/lightgallery.min.css +0 -5
  76. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.eot +0 -0
  77. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.svg +0 -47
  78. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.ttf +0 -0
  79. data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.woff +0 -0
  80. data/assets/themes/j1/modules/_lightGallery/css/img/loading.gif +0 -0
  81. data/assets/themes/j1/modules/_lightGallery/css/img/video-play.png +0 -0
  82. data/assets/themes/j1/modules/_lightGallery/css/img/vimeo-play.png +0 -0
  83. data/assets/themes/j1/modules/_lightGallery/css/img/youtube-play.png +0 -0
  84. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/animation-w.png +0 -0
  85. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/customize-w.png +0 -0
  86. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/dynamic-w.png +0 -0
  87. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/facebook-icon.svg +0 -10
  88. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/googleplus-icon.svg +0 -30
  89. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/html5-w.png +0 -0
  90. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/linked-in.png +0 -0
  91. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/module-w.png +0 -0
  92. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/play-button.png +0 -0
  93. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/responsive-w.png +0 -0
  94. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/thumb-w.png +0 -0
  95. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/touch-w.png +0 -0
  96. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/twitter-icon.svg +0 -15
  97. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/twitter.png +0 -0
  98. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/video1-w.png +0 -0
  99. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/zoom-w.png +0 -0
  100. data/assets/themes/j1/modules/_lightGallery/css/themes/icons/zoom.png +0 -0
  101. data/assets/themes/j1/modules/_lightGallery/css/themes/uno.css +0 -262
  102. data/assets/themes/j1/modules/_lightGallery/css/themes/uno.min.css +0 -15
  103. data/assets/themes/j1/modules/_lightGallery/js/core/lightgallery.js +0 -1362
  104. data/assets/themes/j1/modules/_lightGallery/js/core/lightgallery.min.js +0 -4
  105. data/assets/themes/j1/modules/_lightGallery/js/modules/j1/j1-video.js +0 -402
  106. data/assets/themes/j1/modules/_lightGallery/js/modules/j1/j1-video.min.js +0 -8
  107. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-autoplay.js +0 -206
  108. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-autoplay.min.js +0 -5
  109. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-fullscreen.js +0 -126
  110. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-fullscreen.min.js +0 -5
  111. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-hash.js +0 -101
  112. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-hash.min.js +0 -5
  113. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-pager.js +0 -105
  114. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-pager.min.js +0 -5
  115. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-share.js +0 -107
  116. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-share.min.js +0 -5
  117. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-thumbnail.js +0 -478
  118. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-thumbnail.min.js +0 -5
  119. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-video.js +0 -342
  120. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-video.min.js +0 -5
  121. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-zoom.js +0 -527
  122. data/assets/themes/j1/modules/_lightGallery/js/modules/lg-zoom.min.js +0 -5
@@ -28,13 +28,16 @@ regenerate: true
28
28
  {% comment %} Set config files
29
29
  -------------------------------------------------------------------------------- {% endcomment %}
30
30
  {% assign environment = site.environment %}
31
+ {% assign blocks = site.data.blocks %}
31
32
  {% assign modules = site.data.modules %}
33
+ {% assign template_config = site.data.j1_config %}
32
34
 
33
35
  {% comment %} Set config data
34
36
  -------------------------------------------------------------------------------- {% endcomment %}
35
37
  {% assign consent_defaults = modules.defaults.cookieconsent.defaults %}
36
38
  {% assign consent_settings = modules.cookieconsent.settings %}
37
- {% assign tracking_id = site.data.j1_config.analytics.google.tracking_id %}
39
+ {% assign tracking_enabled = template_config.analytics.enabled %}
40
+ {% assign tracking_id = template_config.analytics.google.tracking_id %}
38
41
 
39
42
  {% comment %} Set config options
40
43
  -------------------------------------------------------------------------------- {% endcomment %}
@@ -78,13 +81,20 @@ regenerate: true
78
81
  --------------------------------------------------------------- {% endcomment %}
79
82
  j1.adapter['cookieConsent'] = (function (j1, window) {
80
83
 
81
- var environment = '{{environment}}';
82
- var moduleOptions = {};
84
+ var environment = '{{environment}}';
85
+ var tracking_enabled = ('{{tracking_enabled}}' === 'true') ? true: false;
86
+ var tracking_id = '{{tracking_id}}';
87
+ var tracking_id_valid = (tracking_id.includes('tracking-id')) ? false : true;
88
+ var moduleOptions = {};
83
89
  var _this;
84
90
  var $modal;
85
91
  var user_cookie;
86
92
  var logger;
87
93
  var logText;
94
+
95
+ // NOTE: RegEx for tracking_id: ^(G|UA|YT|MO)-[a-zA-Z0-9-]+$
96
+ // See: https://stackoverflow.com/questions/20411767/how-to-validate-google-analytics-tracking-id-using-a-javascript-function/20412153
97
+
88
98
  // ---------------------------------------------------------------------------
89
99
  // Helper functions
90
100
  // ---------------------------------------------------------------------------
@@ -130,31 +140,28 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
130
140
  // -----------------------------------------------------------------------
131
141
  // initializer
132
142
  // -----------------------------------------------------------------------
133
- _this.setState('started');
134
- logger.info('state: ' + _this.getState());
135
- logger.info('module is being initialized');
136
-
137
- j1.cookieConsent = new BootstrapCookieConsent({
138
- contentURL: moduleOptions.contentURL,
139
- cookieName: moduleOptions.cookieName,
140
- language: moduleOptions.language,
141
- whitelisted: moduleOptions.whitelisted,
142
- reloadPageOnChange: moduleOptions.reloadCurrentPage,
143
- xhr_data_element: moduleOptions.xhr_data_element + '-' + moduleOptions.language,
144
- postSelectionCallback: function () {
145
- j1.adapter.cookieConsent.cbCookie()
146
- }
147
- });
148
-
149
143
  var dependencies_met_page_ready = setInterval (function (options) {
150
- if ( j1.cookieConsent && j1.getState() === 'finished' ) {
144
+ if ( j1.getState() === 'finished' ) {
145
+ _this.setState('started');
146
+ logger.info('state: ' + _this.getState());
147
+ logger.info('module is being initialized');
148
+
149
+ j1.cookieConsent = new BootstrapCookieConsent({
150
+ contentURL: moduleOptions.contentURL,
151
+ cookieName: moduleOptions.cookieName,
152
+ language: moduleOptions.language,
153
+ whitelisted: moduleOptions.whitelisted,
154
+ reloadPageOnChange: moduleOptions.reloadPageOnChange,
155
+ xhr_data_element: moduleOptions.xhr_data_element + '-' + moduleOptions.language,
156
+ postSelectionCallback: function () {j1.adapter.cookieConsent.cbCookie()}
157
+ });
158
+
151
159
  _this.setState('finished');
152
160
  logger.info('state: ' + _this.getState());
153
161
  logger.debug('module initialized successfully');
154
162
  clearInterval(dependencies_met_page_ready);
155
163
  }
156
164
  });
157
-
158
165
  }, // END init
159
166
 
160
167
  // -------------------------------------------------------------------------
@@ -202,53 +209,83 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
202
209
 
203
210
  // -------------------------------------------------------------------------
204
211
  // cbCookie()
205
- // Callback function called by CookieConsent module after the user has
206
- // made his selection
207
- // -------------------------------------------------------------------------
208
- // TODO:
209
- // If ONLY required setting selected, make j1.user.consent
210
- // a SESSION cookie!!!
212
+ // Called by CookieConsent module after the user has
213
+ // made his selection (callback)
211
214
  // -------------------------------------------------------------------------
212
215
  cbCookie: function () {
213
- var gaCookies = j1.findCookie('_ga');
214
- var user_cookie = j1.readCookie('j1.user.consent');
215
- var json = JSON.stringify(user_cookie);
216
+ var gaCookies = j1.findCookie('_ga');
217
+ var user_state = j1.readCookie('j1.user.state');
218
+ var user_consent = j1.readCookie('j1.user.consent');
219
+ var json = JSON.stringify(user_consent);
220
+ var user_agent = platform.ua;
216
221
 
217
222
  logger.info('Entered post selection callback from CookieConsent');
218
223
  logger.info('Current values from CookieConsent: ' + json);
219
224
 
220
- // gaCookies.forEach(item => console.log('cookieConsent: ' + item));
221
-
222
- // Manage Google Analytics OptIn/Out
223
- // See: https://github.com/luciomartinez/gtag-opt-in/wiki
224
- //
225
- GTagOptIn.register('{{tracking_id}}');
226
- if (user_cookie.analyses) {
227
- logger.info('Enable: GA');
228
- GTagOptIn.optIn();
229
- } else {
230
- logger.warn('Disable: GA');
231
- GTagOptIn.optOut();
232
- var gaCookies = j1.findCookie('_ga');
233
- gaCookies.forEach(function (item) {
234
- logger.warn('Delete GA cookie: ' + item);
235
- j1.removeCookie({
236
- name: item,
237
- path: '/'
238
- });
239
- });
240
- }
241
-
242
225
  // enable cookie button if not visible
243
- //
244
226
  if ($('#quickLinksCookieButton').css('display') === 'none') {
245
227
  $('#quickLinksCookieButton').css('display', 'block');
246
228
  }
247
229
 
248
- // reload page after selection
230
+ // jadams, 2021-07-11: moded to j1 adapter (displayPage)
249
231
  //
250
- // $('#no_flicker').css('display', 'none');
251
- location.reload();
232
+ // NOTE: Warning needs to be moved to another module
233
+ // because page is reloaded after selection
234
+ //
235
+ // if (tracking_enabled && !tracking_id_valid) {
236
+ // logger.error('tracking enabled, but invalid tracking id found: ' + tracking_id);
237
+ // } else {
238
+ // logger.warn('tracking enabled, tracking id found: ' + tracking_id);
239
+ // }
240
+
241
+ // for development only
242
+ if (environment === 'development') {
243
+ gaCookies.forEach(item => console.log('cookieConsent: ' + item));
244
+ }
245
+
246
+ if (user_agent.includes('iPad')) {
247
+ logger.warn('Product detected : ' + platform.product);
248
+ logger.warn('Skip deleting (unwanted) cookies for this platform');
249
+ }
250
+
251
+ // Manage Google Analytics OptIn/Out
252
+ // See: https://github.com/luciomartinez/gtag-opt-in/wiki
253
+ if (tracking_enabled && tracking_id_valid) {
254
+ GTagOptIn.register(tracking_id);
255
+ if (user_consent.analyses) {
256
+ logger.info('Enable: GA');
257
+ GTagOptIn.optIn();
258
+ } else {
259
+ logger.warn('Disable: GA');
260
+ GTagOptIn.optOut();
261
+
262
+ if (!user_agent.includes('iPad')) {
263
+ gaCookies.forEach(function (item) {
264
+ logger.warn('Delete GA cookie: ' + item);
265
+ j1.removeCookie({name: item, path: '/'});
266
+ });
267
+ }
268
+ }
269
+
270
+ if (!user_consent.analyses || !user_consent.personalization) {
271
+ // expire consent|state cookies to session
272
+ j1.writeCookie({
273
+ name: 'j1.user.state',
274
+ data: user_state,
275
+ samesite: 'Strict'
276
+ });
277
+ j1.writeCookie({
278
+ name: 'j1.user.consent',
279
+ data: user_consent,
280
+ samesite: 'Strict'
281
+ });
282
+ }
283
+
284
+ if (moduleOptions.reloadPageOnChange) {
285
+ // reload current page (skip cache)
286
+ location.reload(true);
287
+ }
288
+ } // END if tracking_enabled
252
289
 
253
290
  } // END cbCookie
254
291
 
@@ -393,7 +393,8 @@ j1.adapter['fam'] = (function (j1, window) {
393
393
  // reload page
394
394
  // -------------------------------------------------------------------------
395
395
  reload_page: function () {
396
- location.reload();
396
+ // reload current page (skip cache)
397
+ location.reload(true);
397
398
  }, // END reload_page
398
399
 
399
400
  // -------------------------------------------------------------------------
@@ -41,9 +41,9 @@ regenerate: true
41
41
 
42
42
  {% comment %} Set config files
43
43
  -------------------------------------------------------------------------------- {% endcomment %}
44
- {% assign template_config = site.data.j1_config %}
45
44
  {% assign blocks = site.data.blocks %}
46
45
  {% assign modules = site.data.modules %}
46
+ {% assign template_config = site.data.j1_config %}
47
47
 
48
48
  {% comment %} Set config data
49
49
  -------------------------------------------------------------------------------- {% endcomment %}
@@ -56,6 +56,8 @@ regenerate: true
56
56
  {% assign toccer_settings = modules.toccer.settings %}
57
57
  {% assign themer_defaults = modules.defaults.themer.defaults %}
58
58
  {% assign themer_settings = modules.themer.settings %}
59
+ {% assign tracking_enabled = template_config.analytics.enabled %}
60
+ {% assign tracking_id = template_config.analytics.google.tracking_id %}
59
61
 
60
62
  {% assign authentication_defaults = modules.defaults.authentication.defaults %}
61
63
  {% assign authentication_settings = modules.authentication.settings %}
@@ -93,7 +95,6 @@ regenerate: true
93
95
  # For details, see https://jekyll.one
94
96
  # -----------------------------------------------------------------------------
95
97
  # TODO:
96
- # MANAGE themeExtensionCss is to be checked
97
98
  #
98
99
  # -----------------------------------------------------------------------------
99
100
  # Adapter generated: {{site.time}}
@@ -114,14 +115,19 @@ var j1 = (function () {
114
115
  // ---------------------------------------------------------------------------
115
116
  // globals
116
117
  // ---------------------------------------------------------------------------
117
- var rePager = new RegExp('navigator|dateview|tagview|archive');
118
- var environment = '{{environment}}';
119
- var moduleOptions = {};
120
- var j1_runtime_data = {};
118
+ var rePager = new RegExp('navigator|dateview|tagview|archive');
119
+ var environment = '{{environment}}';
120
+ var moduleOptions = {};
121
+ var j1_runtime_data = {};
121
122
 
122
123
  // Status information
123
- var state = 'not_started';
124
- var mode = 'not_detected';
124
+ var state = 'not_started';
125
+ var mode = 'not_detected';
126
+
127
+ // Tracking information (GA)
128
+ var tracking_enabled = ('{{tracking_enabled}}' === 'true') ? true: false;
129
+ var tracking_id = '{{tracking_id}}';
130
+ var tracking_id_valid = (tracking_id.includes('tracking-id')) ? false : true;
125
131
 
126
132
  var current_user_data;
127
133
  var current_page;
@@ -131,17 +137,17 @@ var j1 = (function () {
131
137
  var app_detected;
132
138
  var user_session_detected;
133
139
 
134
- // Connector settings
135
- var translation_enabled = {{template_config.translation.enabled}};
140
+ // Translatior settings (currently NOT supported)
141
+ // var translation_enabled = {{template_config.translation.enabled}};
136
142
 
137
143
  // Theme information
138
144
  var themeName;
139
145
  var themeCss;
140
- var themeExtensionCss = environment === 'production'
141
- ? '/assets/themes/j1/core/css/themes/theme-extensions.min.css'
142
- : '/assets/themes/j1/core/css/themes/theme-extensions.css';
146
+ var cssExtension = (environment === 'production')
147
+ ? '.min.css'
148
+ : '.css';
143
149
 
144
- // Pathes of J1 data files
150
+ // Pathes of J1 data files
145
151
  var colors_data_path = '{{template_config.colors_data_path}}';
146
152
  var font_size_data_path = '{{template_config.font_size_data_path}}';
147
153
  var runtime_data_path = '{{template_config.runtime_data_path}}';
@@ -158,22 +164,13 @@ var j1 = (function () {
158
164
  var baseUrl;
159
165
  var referrer;
160
166
 
161
- // var default_theme_css = environment === 'production' ? '/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css' : '/assets/themes/j1/core/css/themes/uno-light/bootstrap.css';
162
- // // TODO: check what property is used default_theme|default_theme_name ?
163
- // var default_theme_display_name = 'Uno (light)';
164
- // var default_theme_name = 'uno-light';
165
- // var default_theme_author = 'J1 Team';
166
- // var default_theme_link = 'https://jekyll.one/';
167
- // var default_white_listed_pages = [];
168
-
167
+ // initial cookie values
169
168
  var cookie_names = {
170
169
  'app_session': '{{template_config.cookies.app_session}}',
171
170
  'user_session': '{{template_config.cookies.user_session}}',
172
171
  'user_state': '{{template_config.cookies.user_state}}',
173
- 'user_consent': 'j1.user.consent'
172
+ 'user_consent': '{{template_config.cookies.user_consent}}'
174
173
  };
175
-
176
- // user SESSION cookie (initial values)
177
174
  var user_session = {
178
175
  'mode': 'web',
179
176
  'writer': 'web',
@@ -191,40 +188,23 @@ var j1 = (function () {
191
188
  'previous_page': 'na',
192
189
  'last_pager': '/pages/public/blog/navigator/'
193
190
  };
194
-
195
- // user STATE cookie (initial values)
196
- // var user_state = {
197
- // 'theme_css': "",
198
- // 'theme_name': "",
199
- // 'theme_author': "",
200
- // 'theme_version': '{{site.version}}',
201
- // 'cookies_accepted': 'pending',
202
- // 'whitelistedPages': default_white_listed_pages,
203
- // 'deleteOnDecline': false,
204
- // 'showConsentOnPending': false,
205
- // 'stopScrolling': true,
206
- // 'session_active': false,
207
- // 'last_session_ts': '',
208
- // 'cc_authenticated': false
209
- // };
210
-
211
191
  var user_state = {
212
- 'theme_css': "",
213
- 'theme_name': "",
214
- 'theme_author': "",
192
+ 'theme_css': '',
193
+ 'theme_name': '',
194
+ 'theme_author': '',
215
195
  'theme_version': '{{site.version}}',
216
- 'stopScrolling': true,
217
196
  'session_active': false,
218
197
  'last_session_ts': ''
219
198
  };
199
+ var user_consent = {};
220
200
 
221
201
  // ---------------------------------------------------------------------------
222
202
  // helper functions
223
203
  // ---------------------------------------------------------------------------
224
204
 
205
+ // See: https://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string
206
+ //
225
207
  function executeFunctionByName(functionName, context /*, args */) {
226
- // See: https://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string
227
- //
228
208
  var args = Array.prototype.slice.call(arguments, 2);
229
209
  var namespaces = functionName.split('.');
230
210
  var func = namespaces.pop();
@@ -241,25 +221,18 @@ var j1 = (function () {
241
221
 
242
222
  // -------------------------------------------------------------------------
243
223
  // init()
244
- // initializer
245
224
  // -------------------------------------------------------------------------
246
225
  init: function (options) {
247
226
 
248
227
  // -----------------------------------------------------------------------
249
228
  // global var (function)
250
229
  // -----------------------------------------------------------------------
251
- var logger = log4javascript.getLogger('j1.init');
252
- var url = new liteURL(window.location.href);
253
- var baseUrl = url.origin;
254
- // moment not used anymore
255
- // var epoch = Math.floor(Date.now()/1000);
256
- // var timestamp_now = moment.unix(epoch).format('YYYY-MM-DD HH:mm:ss');
257
- var date = new Date();
258
- var timestamp_now = date.toISOString();
259
- var curr_state = 'started';
260
- // var date = new Date();
261
- // var my_timestamp = date.toISOString();
262
-
230
+ var logger = log4javascript.getLogger('j1.init');
231
+ var url = new liteURL(window.location.href);
232
+ var baseUrl = url.origin;
233
+ var date = new Date();
234
+ var timestamp_now = date.toISOString();
235
+ var curr_state = 'started';
263
236
 
264
237
  // -----------------------------------------------------------------------
265
238
  // options loader
@@ -280,51 +253,58 @@ var j1 = (function () {
280
253
  j1['xhrDOMState'] = {};
281
254
 
282
255
  // -----------------------------------------------------------------------
283
- // session ON_CLOSE event
284
- // wrapup if ALL browser windows get closed. Update user STATE
285
- // cookie on window CLOSE.
256
+ // update cookies if browser window get closed
286
257
  // see: https://stackoverflow.com/questions/3888902/detect-browser-or-tab-closing
287
258
  // -----------------------------------------------------------------------
288
259
  window.addEventListener('beforeunload', function (event) {
289
260
  var cookie_names = j1.getCookieNames();
290
- var cookie_user_state_name = cookie_names.user_state;
291
- var cookie_user_session_name = cookie_names.user_session;
292
- // moment not used anymore
293
- // var epoch = Math.floor(Date.now()/1000);
294
- // var timestamp_now = moment.unix(epoch).format('YYYY-MM-DD HH:mm:ss');
295
261
  var date = new Date();
296
262
  var timestamp_now = date.toISOString();
297
- var user_state = j1.readCookie(cookie_user_state_name);
263
+ var user_state = j1.readCookie(cookie_names.user_state);
264
+ var user_consent = j1.readCookie(cookie_names.user_consent);
298
265
  var ep_status;
299
266
  var url;
300
267
  var baseUrl;
301
268
 
302
- // update cookie only, if (already) exists
303
- //
304
- if (user_state) {
305
- user_state.session_active = false;
306
- user_state.last_session_ts = timestamp_now;
269
+ user_state.session_active = false;
270
+ user_state.last_session_ts = timestamp_now;
307
271
 
272
+ if (!user_consent.analyses || !user_consent.personalization) {
273
+ // expire consent|state cookies to session
274
+ j1.writeCookie({
275
+ name: cookie_names.user_consent,
276
+ data: user_state,
277
+ samesite: 'Strict'
278
+ });
308
279
  j1.writeCookie({
309
- name: cookie_user_state_name,
310
- data: user_state,
311
- expires: 365
280
+ name: cookie_names.user_state,
281
+ data: user_state,
282
+ samesite: 'Strict'
283
+ });
284
+ } else {
285
+ j1.writeCookie({
286
+ name: cookie_names.user_state,
287
+ data: user_state,
288
+ samesite: 'Strict',
289
+ expires: 365
312
290
  });
313
291
  }
314
292
 
315
- });
293
+ }); // END beforeunload
316
294
 
317
295
  // -----------------------------------------------------------------------
318
- // initialize|load (existing) user cookies
296
+ // initialize|load user cookies
319
297
  // -----------------------------------------------------------------------
320
298
  user_session.created = timestamp_now;
321
299
  user_session.timestamp = timestamp_now;
322
300
 
301
+ user_consent = j1.readCookie(cookie_names.user_consent);
323
302
  user_session = j1.existsCookie(cookie_names.user_session)
324
303
  ? j1.readCookie(cookie_names.user_session)
325
304
  : j1.writeCookie({
326
305
  name: cookie_names.user_session,
327
306
  data: user_session,
307
+ samesite: 'Strict'
328
308
  });
329
309
 
330
310
  user_state = j1.existsCookie(cookie_names.user_state)
@@ -332,27 +312,46 @@ var j1 = (function () {
332
312
  : j1.writeCookie({
333
313
  name: cookie_names.user_state,
334
314
  data: user_state,
315
+ samesite: 'Strict',
335
316
  expires: 365
336
317
  });
337
318
 
338
- user_state.session_active = true;
339
- j1.writeCookie({
340
- name: cookie_names.user_state,
341
- data: user_state,
342
- expires: 365
343
- });
319
+ // jadams, 2021-07-11: Found situation that user_state NOT initialized
320
+ // correctly (user_state == false).
321
+ // TODO: Check if/why user state (cookie NOT created?) NOT initialized
322
+ // for what reason.
323
+ if (!user_state) {
324
+ logger.warn('user session cookie NOT found');
325
+ user_state = j1.readCookie(cookie_names.user_state);
326
+ user_state.session_active = true;
327
+ }
328
+
329
+ if (!user_consent.analyses || !user_consent.personalization) {
330
+ // expire consent|state cookies to session
331
+ j1.writeCookie({
332
+ name: cookie_names.user_state,
333
+ data: user_state,
334
+ samesite: 'Strict'
335
+ });
336
+ } else {
337
+ j1.writeCookie({
338
+ name: cookie_names.user_state,
339
+ data: user_state,
340
+ samesite: 'Strict',
341
+ expires: 365
342
+ });
343
+ }
344
344
 
345
345
  // detect middleware (mode 'app') and update user session cookie
346
346
  // -----------------------------------------------------------------------
347
- // if (user_session.mode === 'na' || user_session.mode === 'app') {
348
347
  if (user_session.mode === 'app') {
349
348
  var url = new liteURL(window.location.href);
350
349
  var ep_status = baseUrl + '/status' + '?page=' + window.location.pathname;
351
350
  var detectTimeout = 50;
352
351
 
353
- baseUrl = url.origin;
352
+ baseUrl = url.origin;
354
353
 
355
- // see: https://stackoverflow.com/questions/3709597/wait-until-all-jquery-ajax-requests-are-done
354
+ // See: https://stackoverflow.com/questions/3709597/wait-until-all-jquery-ajax-requests-are-done
356
355
  $.when (
357
356
  $.ajax(ep_status)
358
357
  )
@@ -369,14 +368,12 @@ var j1 = (function () {
369
368
  logger.info('update user session cookie');
370
369
  j1.writeCookie({
371
370
  name: cookie_names.user_session,
372
- data: user_session
371
+ data: user_session,
372
+ samesite: 'Strict'
373
373
  });
374
374
  j1.setState(curr_state);
375
375
  logger.info('state: ' + j1.getState());
376
376
 
377
-
378
-
379
-
380
377
  var dependencies_met_page_displayed = setInterval (function () {
381
378
  if (j1.getState() == 'finished') {
382
379
  if (j1.authEnabled()) {
@@ -411,8 +408,9 @@ var j1 = (function () {
411
408
 
412
409
  logger.info(logText);
413
410
  j1.writeCookie({
414
- name: cookie_names.user_session,
415
- data: user_session
411
+ name: cookie_names.user_session,
412
+ data: user_session,
413
+ samesite: 'Strict'
416
414
  });
417
415
  j1.setState(curr_state);
418
416
  logger.info('state: ' + j1.getState());
@@ -424,10 +422,6 @@ var j1 = (function () {
424
422
  logger.info('page is being initialized');
425
423
  }
426
424
 
427
- // jadams: for testing only
428
- // display page
429
- // $('#no_flicker').css('display', 'block');
430
-
431
425
  state = 'started';
432
426
  logger.info('state: ' + state);
433
427
  logger.info('page is being initialized');
@@ -443,7 +437,6 @@ var j1 = (function () {
443
437
  // process|update user state cookie
444
438
  themeName = user_session.theme_name;
445
439
  themeCss = user_session.theme_css;
446
- themeExtensionCss = user_session.theme_extension_css;
447
440
 
448
441
  // save last page access
449
442
  // see: https://stackoverflow.com/questions/3528324/how-to-get-the-previous-url-in-javascript
@@ -468,18 +461,15 @@ var j1 = (function () {
468
461
  last_pager = user_session.last_pager;
469
462
  }
470
463
 
471
- // jadams: for testing only
472
- // display page
473
- //$('#no_flicker').css('display', 'block');
474
-
475
464
  logger.info('update user session cookie');
476
465
  j1.writeCookie({
477
- name: cookie_names.user_session,
478
- data: user_session
466
+ name: cookie_names.user_session,
467
+ data: user_session,
468
+ samesite: 'Strict'
479
469
  });
480
470
 
471
+ // NOTE: asynchronous calls should be rewitten to xhrData
481
472
  // initialize page resources for blocks
482
- // (asynchronous, should be rewitten to xhrData)
483
473
  j1.initBanner(settings);
484
474
  j1.initPanel(settings);
485
475
  j1.initFooter(settings);
@@ -490,8 +480,9 @@ var j1 = (function () {
490
480
 
491
481
  user_session.timestamp = timestamp_now;
492
482
  j1.writeCookie({
493
- name: cookie_names.user_session,
494
- data: user_session
483
+ name: cookie_names.user_session,
484
+ data: user_session,
485
+ samesite: 'Strict'
495
486
  });
496
487
 
497
488
  // -----------------------------------------------------------------------
@@ -599,7 +590,6 @@ var j1 = (function () {
599
590
  if (selector.length) {
600
591
  logText = 'loading banner on id: ' +banner[i];
601
592
  logger.info(logText);
602
- // var banner_data_path = '{{banner_data_path}} ' + id + ' > *';
603
593
  var banner_data_path = '{{banner_data_path}} ' + id;
604
594
  selector.load(banner_data_path, cb_load_closure(id));
605
595
  }
@@ -703,7 +693,6 @@ var j1 = (function () {
703
693
  if ( selector.length ) {
704
694
  logText = 'loading panel on id: ' +panel[i];
705
695
  logger.info(logText);
706
- // var panel_data_path = '{{panel_data_path}} ' + id + ' > *';
707
696
  var panel_data_path = '{{panel_data_path}} ' + id;
708
697
  selector.load(panel_data_path, cb_load_closure(id));
709
698
  }
@@ -737,12 +726,6 @@ var j1 = (function () {
737
726
  j1.setXhrDataState(footer_id, statusTxt);
738
727
  j1.setXhrDomState(footer_id, statusTxt);
739
728
  logger.info('XHR data loaded in the DOM: ' + footer_id);
740
-
741
- // jadams, 2020-07-21: intermediate state DISABLED
742
- // state = 'footer_loaded';
743
- // logger.info('set state for module ' + mod + ': ' + state);
744
- // executeFunctionByName(mod + '.setState', window, state);
745
-
746
729
  logText = 'initialization finished';
747
730
  logger.info(logText);
748
731
  }
@@ -764,7 +747,6 @@ var j1 = (function () {
764
747
  var id = '#' + '{{footer_id}}';
765
748
  var selector = $(id);
766
749
  if ( selector.length ) {
767
- // var footer_data_path = '{{footer_data_path}} ' + id + ' > *';
768
750
  var footer_data_path = '{{footer_data_path}} ' + id;
769
751
  selector.load(footer_data_path, cb_load_closure(id));
770
752
  } else {
@@ -820,7 +802,8 @@ var j1 = (function () {
820
802
  user_session.current_page = current_url.pathname;
821
803
  j1.writeCookie({
822
804
  name: cookie_names.user_session,
823
- data: user_session
805
+ data: user_session,
806
+ samesite: 'Strict'
824
807
  });
825
808
 
826
809
  providerPermissions = user_session.provider_permissions;
@@ -850,6 +833,15 @@ var j1 = (function () {
850
833
  // display page
851
834
  $('#no_flicker').css('display', 'block');
852
835
 
836
+ // NOTE: Placed tracking warning/info here because page may reloaded
837
+ // after cookie consent selection
838
+ //
839
+ if (tracking_enabled && !tracking_id_valid) {
840
+ logger.error('tracking enabled, but invalid tracking id found: ' + tracking_id);
841
+ } else {
842
+ logger.warn('tracking enabled, tracking id found: ' + tracking_id);
843
+ }
844
+
853
845
  // show|hide cookie icon (should MOVED to Cookiebar ???)
854
846
  if (j1.existsCookie(cookie_names.user_consent)) {
855
847
  // Display cookie icon
@@ -863,14 +855,14 @@ var j1 = (function () {
863
855
  $('#quickLinksCookieButton').css('display', 'none');
864
856
  }
865
857
 
866
- // show|hide translator icon
867
- if (translation_enabled) {
868
- logger.info('translator detected: google');
869
- logger.info('initialize language selector');
870
- $('.goog-te-combo').addClass('form-control');
871
- }
858
+ // show|hide translator icon (currently NOT supported)
859
+ // if (translation_enabled) {
860
+ // logger.info('translator detected: google');
861
+ // logger.info('initialize language selector');
862
+ // $('.goog-te-combo').addClass('form-control');
863
+ // }
872
864
 
873
- // show cc icon
865
+ // show cc icon (currently NOT supported)
874
866
  // $('#quickLinksControlCenterButton').css('display', 'block');
875
867
 
876
868
  if (j1.authEnabled()) {
@@ -927,6 +919,15 @@ var j1 = (function () {
927
919
  // display page
928
920
  $('#no_flicker').css('display', 'block');
929
921
 
922
+ // NOTE: Placed tracking warning/info here because page may reloaded
923
+ // after cookie consent selection
924
+ //
925
+ if (tracking_enabled && !tracking_id_valid) {
926
+ logger.error('tracking enabled, but invalid tracking id found: ' + tracking_id);
927
+ } else {
928
+ logger.warn('tracking enabled, tracking id found: ' + tracking_id);
929
+ }
930
+
930
931
  logger.info('mode detected: web');
931
932
  logger.info('hide signin icon');
932
933
  $('#quickLinksSignInOutButton').css('display', 'none');
@@ -934,17 +935,21 @@ var j1 = (function () {
934
935
  user_session.current_page = current_url.pathname;
935
936
  j1.writeCookie({
936
937
  name: cookie_names.user_session,
937
- data: user_session
938
+ data: user_session,
939
+ samesite: 'Strict'
938
940
  });
939
941
 
940
- // show|hide translator icon
941
- if (translation_enabled) {
942
- logger.info('translator detected: google');
943
- logger.info('initialize language selector');
944
- $('.goog-te-combo').addClass('form-control');
945
- }
942
+ // show|hide translator icon (currently NOT supported)
943
+ // if (translation_enabled) {
944
+ // logger.info('translator detected: google');
945
+ // logger.info('initialize language selector');
946
+ // $('.goog-te-combo').addClass('form-control');
947
+ // }
946
948
 
947
- // show|hide cookie icon (should MOVED to Cookiebar ???)
949
+ // show cc icon (currently NOT supported)
950
+ // $('#quickLinksControlCenterButton').css('display', 'block');
951
+
952
+ // show|hide cookie icon
948
953
  if (j1.existsCookie(cookie_names.user_consent)) {
949
954
  // Display cookie icon
950
955
  logText = 'show cookie icon';
@@ -958,7 +963,7 @@ var j1 = (function () {
958
963
  }
959
964
 
960
965
  // If the page requested contains an anchor element,
961
- // do a smooth scroll to
966
+ // do a smooth scroll
962
967
  j1.scrollTo();
963
968
 
964
969
  if (user_session.previous_page !== user_session.current_page) {
@@ -1051,7 +1056,6 @@ var j1 = (function () {
1051
1056
  var toccerScrollOffset = {{toccer_options.scrollSmoothOffset}};
1052
1057
 
1053
1058
  // calculate offset for correct (smooth) scroll position
1054
- //
1055
1059
  var $pagehead = $('.attic');
1056
1060
  var $navbar = $('nav.navbar');
1057
1061
  var $adblock = $('#adblock');
@@ -1069,7 +1073,6 @@ var j1 = (function () {
1069
1073
  var scrollOffset = navbarType == 'fixed' ? -1*(n + a + l) : -1*(h + n + a + l);
1070
1074
 
1071
1075
  // static offset, to be checked why this is needed
1072
- //
1073
1076
  scrollOffset = scrollOffset + toccerScrollOffset;
1074
1077
 
1075
1078
  if (anchor_id && anchor_id !== '#') {
@@ -1149,11 +1152,6 @@ var j1 = (function () {
1149
1152
  return function (responseTxt, statusTxt, xhr) {
1150
1153
  var logger = log4javascript.getLogger('j1.adapter.xhrData');
1151
1154
  if ( statusTxt === 'success' ) {
1152
- // jadams, 2020-07-21: intermediate state should DISABLED
1153
- // if (state) {
1154
- // logger.info('set state for ' +mod+ ' to: ' + state);
1155
- // executeFunctionByName(mod + '.setState', window, state);
1156
- // }
1157
1155
  j1.setXhrDataState(id, statusTxt);
1158
1156
  j1.setXhrDomState(id, 'pending');
1159
1157
 
@@ -1180,19 +1178,24 @@ var j1 = (function () {
1180
1178
 
1181
1179
  // see: https://stackoverflow.com/questions/20420577/detect-added-element-to-dom-with-mutation-observer
1182
1180
  //
1183
- var html_data_path;
1181
+ var html_data_path = options.xhr_data_path + ' #' + options.xhr_data_element;
1184
1182
  var id = '#' + options.xhr_container_id;
1185
1183
  var container = '#' + options.xhr_container_id + '_container';
1186
1184
  var $selector = $(id);
1187
1185
 
1186
+ // NOTE: Unclear why some pages (e.g. about/site) affected (fam button).
1187
+ // All pages should have FRONTMATTER defaults (by _config.yml) setting
1188
+ // all relevant defaults.
1189
+
1190
+ // failsafe - prevent XHR load errors
1191
+ if (options.xhr_data_element !== '') {
1192
+ logger.info('XHR data element found: ' + options.xhr_data_element);
1193
+ } else {
1194
+ logger.warn('no XHR data element found, loading data aborted');
1195
+ return;
1196
+ }
1197
+
1188
1198
  if ( $selector.length ) {
1189
- if (options.xhr_data_element) {
1190
- html_data_path = options.xhr_data_path + ' #' + options.xhr_data_element;
1191
- logger.info('XHR data element found: ' + options.xhr_data_element);
1192
- } else {
1193
- logger.warn('no XHR data element found. HTML data loaded full page.');
1194
- html_data_path = options.xhr_data_path + ' > *';
1195
- }
1196
1199
  $selector.load( html_data_path, cb_load_closure( mod, id ) );
1197
1200
 
1198
1201
  var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
@@ -1205,7 +1208,7 @@ var j1 = (function () {
1205
1208
 
1206
1209
  selector.each(function(){
1207
1210
  xhrObserver.observe(this, obsConfig);
1208
- } );
1211
+ });
1209
1212
 
1210
1213
  function mutationHandler (mutationRecords) {
1211
1214
  mutationRecords.forEach ( function (mutation) {
@@ -1217,6 +1220,8 @@ var j1 = (function () {
1217
1220
  }
1218
1221
  } else {
1219
1222
  // jadams, 2020-07-21: To be clarified why a id is "undefined"
1223
+
1224
+ // failsafe - prevent XHR load errors
1220
1225
  if (id != '#undefined') {
1221
1226
  logText = 'data not loaded on id:' + id;
1222
1227
  logger.warn(logText);
@@ -1295,21 +1300,17 @@ var j1 = (function () {
1295
1300
  // context/HTTPS).
1296
1301
  // -------------------------------------------------------------------------
1297
1302
  //
1298
- writeCookie: function (options /*name, data, [path, expires, SameSite, secure]*/) {
1303
+ writeCookie: function (options /*name, data, [path, expires, samesite, http_only, secure]*/) {
1299
1304
  var defaults = {
1300
1305
  data: {},
1301
1306
  name: '',
1302
- expires: 0,
1303
1307
  path: '/',
1304
- // SameSite: 'Strict',
1305
- // SameSite: 'Lax',
1308
+ expires: 0,
1309
+ samesite: 'Lax',
1306
1310
  http_only: false,
1307
1311
  secure: false
1308
1312
  };
1309
1313
  var settings = $.extend(defaults, options);
1310
- // moment not used anymore
1311
- // var epoch = Math.floor(Date.now()/1000);
1312
- // var timestamp_now = moment.unix(epoch).format('YYYY-MM-DD HH:mm:ss');
1313
1314
  var date = new Date();
1314
1315
  var timestamp_now = date.toISOString();
1315
1316
  var cookie_data = {};
@@ -1326,25 +1327,26 @@ var j1 = (function () {
1326
1327
  if (settings.expires > 0) {
1327
1328
  Cookies.set(settings.name, data_encoded, {
1328
1329
  expires: settings.expires,
1329
- SameSite: settings.SameSite
1330
+ SameSite: settings.samesite
1330
1331
  });
1331
1332
  } else {
1332
1333
  Cookies.set(settings.name, data_encoded, {
1333
- SameSite: settings.SameSite
1334
+ SameSite: settings.samesite
1334
1335
  });
1335
1336
  }
1336
1337
  } else {
1337
1338
  cookie_data = settings.data;
1338
1339
  data_json = JSON.stringify(settings.data);
1339
1340
  data_encoded = window.btoa(data_json);
1341
+
1340
1342
  if (settings.expires > 0) {
1341
1343
  Cookies.set(settings.name, data_encoded, {
1342
1344
  expires: settings.expires,
1343
- SameSite: settings.SameSite
1345
+ SameSite: settings.samesite
1344
1346
  });
1345
1347
  } else {
1346
1348
  Cookies.set(settings.name, data_encoded, {
1347
- SameSite: settings.SameSite
1349
+ SameSite: settings.samesite
1348
1350
  });
1349
1351
  }
1350
1352
  }
@@ -1705,12 +1707,6 @@ var j1 = (function () {
1705
1707
  // -----------------------------------------------------------------------
1706
1708
  $('head').append('<style>.g-bg-primary { background-color: ' +bg_primary+ ' !important; }</style>');
1707
1709
 
1708
- // Set color of timeline bullet
1709
- // -----------------------------------------------------------------------
1710
- // $('head').append('<style>.tmicon { background: ' +bg_primary+ ' !important; }</style>');
1711
- // $('head').append('<style>.timeline-panel:after { border-left-color: ' +bg_primary+ ' !important; }</style>');
1712
- // $('head').append('<style>.timeline-panel:after { border-right-color: ' +bg_primary+ ' !important; }</style>');
1713
-
1714
1710
  // mdi icons
1715
1711
  // -----------------------------------------------------------------------
1716
1712
  $('head').append('<style>.iconify-md-bg-primary { color: ' +bg_primary+ ' !important; }</style>');
@@ -1851,7 +1847,7 @@ var j1 = (function () {
1851
1847
  for ( var i = 0; i < length; i++ ) {
1852
1848
  result += characters.charAt(Math.floor(Math.random() * charactersLength));
1853
1849
  }
1854
- return result;
1850
+ return result;
1855
1851
  }, // END generateId
1856
1852
 
1857
1853
  // -------------------------------------------------------------------------
@@ -1898,10 +1894,20 @@ var j1 = (function () {
1898
1894
  }; // END j1 (return)
1899
1895
  }) (j1, window);
1900
1896
 
1901
- {% endcapture %}
1897
+ {% comment %} NOTE: Unexpected token: punc (;) errors if compressed
1898
+ --------------------------------------------------------------------------------
1902
1899
  {% if production %}
1903
1900
  {{ cache | minifyJS }}
1904
1901
  {% else %}
1905
1902
  {{ cache | strip_empty_lines }}
1906
1903
  {% endif %}
1907
1904
  {% assign cache = nil %}
1905
+ -------------------------------------------------------------------------------- {% endcomment %}
1906
+
1907
+ {% endcapture %}
1908
+ {% if production %}
1909
+ {{ cache | strip_empty_lines }}
1910
+ {% else %}
1911
+ {{ cache | strip_empty_lines }}
1912
+ {% endif %}
1913
+ {% assign cache = nil %}