j1-template 2022.0.9 → 2022.0.13
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/modules/ads/google_ad_content_home.html +11 -0
- data/_includes/themes/j1/modules/ads/google_ad_top_home.html +11 -0
- data/apps/public/cc/index.adoc +0 -1
- data/assets/data/article_navigator/index.html +0 -1
- data/assets/data/news_panel_posts/index.html +0 -1
- data/assets/error_pages/HTTP445.html +5 -4
- data/assets/error_pages/HTTP446.html +2 -2
- data/assets/error_pages/HTTP447.html +110 -0
- data/assets/error_pages/HTTP448.html +111 -0
- data/assets/themes/j1/adapter/js/advertising.js +442 -0
- data/assets/themes/j1/adapter/js/algolia.js +10 -13
- data/assets/themes/j1/adapter/js/analytics.js +259 -0
- data/assets/themes/j1/adapter/js/asciidoctor.js +10 -13
- data/assets/themes/j1/adapter/js/attic.js +10 -5
- data/assets/themes/j1/adapter/js/bmd.js +10 -14
- data/assets/themes/j1/adapter/js/carousel.js +10 -13
- data/assets/themes/j1/adapter/js/clipboard.js +9 -10
- data/assets/themes/j1/adapter/js/comments.js +407 -0
- data/assets/themes/j1/adapter/js/cookieConsent.js +107 -84
- data/assets/themes/j1/adapter/js/fab.js +11 -11
- data/assets/themes/j1/adapter/js/framer.js +59 -64
- data/assets/themes/j1/adapter/js/j1.js +203 -258
- data/assets/themes/j1/adapter/js/justifiedGallery.js +12 -14
- data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +10 -13
- data/assets/themes/j1/adapter/js/lightbox.js +12 -9
- data/assets/themes/j1/adapter/js/logger.js +11 -5
- data/assets/themes/j1/adapter/js/mmenu.js +11 -12
- data/assets/themes/j1/adapter/js/navigator.js +13 -12
- data/assets/themes/j1/adapter/js/quicksearch.js +10 -13
- data/assets/themes/j1/adapter/js/rouge.js +11 -14
- data/assets/themes/j1/adapter/js/rtable.js +10 -13
- data/assets/themes/j1/adapter/js/rtextResizer.js +10 -13
- data/assets/themes/j1/adapter/js/scroller.js +14 -12
- data/assets/themes/j1/adapter/js/themer.js +12 -3
- data/assets/themes/j1/adapter/js/toccer.js +10 -13
- data/assets/themes/j1/adapter/js/translator.js +50 -96
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +6 -0
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/js/template.js +13 -5
- data/assets/themes/j1/core/js/template.min.js +1 -1
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/advertising/js/google/adInitializer.js +127 -0
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +11 -2
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js +1 -1
- data/assets/themes/j1/modules/deeplAPI/js/deeplAPI.2.js +1 -1
- data/assets/themes/j1/modules/deeplAPI/js/deeplAPI.js +1 -1
- data/assets/themes/j1/modules/scroller/js/scroller.js +1 -1
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +1 -13
- data/lib/starter_web/_data/apps/carousel.yml +2 -2
- data/lib/starter_web/_data/apps/defaults/carousel.yml +3 -2
- data/lib/starter_web/_data/apps/defaults/justifiedGallery.yml +2 -2
- data/lib/starter_web/_data/apps/defaults/justifiedGalleryCustomizer.yml +2 -2
- data/lib/starter_web/_data/apps/defaults/lightGallery.yml +2 -2
- data/lib/starter_web/_data/apps/defaults/lightbox.yml +2 -2
- data/lib/starter_web/_data/apps/justifiedGallery.yml +2 -2
- data/lib/starter_web/_data/apps/justifiedGalleryCustomizer.yml +2 -2
- data/lib/starter_web/_data/apps/lightGallery.yml +2 -2
- data/lib/starter_web/_data/apps/lightbox.yml +2 -2
- data/lib/starter_web/_data/blocks/banner.yml +3 -2
- data/lib/starter_web/_data/blocks/defaults/banner.yml +9 -0
- data/lib/starter_web/_data/blocks/defaults/footer.yml +9 -0
- data/lib/starter_web/_data/blocks/defaults/panel.yml +9 -0
- data/lib/starter_web/_data/blocks/footer.yml +3 -2
- data/lib/starter_web/_data/blocks/panel.yml +3 -2
- data/lib/starter_web/_data/builder/blog_navigator.yml +3 -2
- data/lib/starter_web/_data/builder/defaults/blog_navigator.yml +8 -8
- data/lib/starter_web/_data/j1_config.yml +0 -116
- data/lib/starter_web/_data/layouts/default.yml +21 -21
- data/lib/starter_web/_data/layouts/home.ads.yml +262 -0
- data/lib/starter_web/_data/layouts/home.no-ads.yml +262 -0
- data/lib/starter_web/_data/layouts/home.yml +24 -0
- data/lib/starter_web/_data/layouts/page.yml +7 -18
- data/lib/starter_web/_data/layouts/post.yml +0 -11
- data/lib/starter_web/_data/modules/advertising.yml +139 -12
- data/lib/starter_web/_data/modules/analytics.yml +99 -0
- data/lib/starter_web/_data/modules/attics.yml +3 -2
- data/lib/starter_web/_data/modules/comments.yml +55 -0
- data/lib/starter_web/_data/modules/cookieconsent.yml +2 -1
- data/lib/starter_web/_data/modules/cookies.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/advertising.yml +105 -0
- data/lib/starter_web/_data/modules/defaults/analytics.yml +93 -0
- data/lib/starter_web/_data/modules/defaults/attics.yml +3 -2
- data/lib/starter_web/_data/modules/defaults/authentication.yml +51 -48
- data/lib/starter_web/_data/modules/defaults/comments.yml +114 -0
- data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +3 -3
- data/lib/starter_web/_data/modules/defaults/cookies.yml +105 -26
- data/lib/starter_web/_data/modules/defaults/fab.yml +4 -2
- data/lib/starter_web/_data/modules/defaults/framer.yml +2 -3
- data/lib/starter_web/_data/modules/defaults/log4javascript.yml +3 -2
- data/lib/starter_web/_data/modules/defaults/log4r.yml +2 -2
- data/lib/starter_web/_data/modules/defaults/navigator.yml +4 -2
- data/lib/starter_web/_data/modules/defaults/quicksearch.yml +4 -3
- data/lib/starter_web/_data/modules/defaults/rtable.yml +3 -2
- data/lib/starter_web/_data/modules/defaults/scoller.yml +3 -2
- data/lib/starter_web/_data/modules/defaults/themer.yml +119 -118
- data/lib/starter_web/_data/modules/defaults/toccer.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/translator.yml +1 -1
- data/lib/starter_web/_data/modules/fab.yml +3 -2
- data/lib/starter_web/_data/modules/framer.yml +3 -4
- data/lib/starter_web/_data/modules/log4r.yml +2 -2
- data/lib/starter_web/_data/modules/navigator.yml +4 -2
- data/lib/starter_web/_data/modules/quicksearch.yml +3 -3
- data/lib/starter_web/_data/modules/rtable.yml +3 -3
- data/lib/starter_web/_data/modules/scroller.yml +2 -3
- data/lib/starter_web/_data/modules/themer.yml +2 -3
- data/lib/starter_web/_data/modules/toccer.yml +3 -3
- data/lib/starter_web/_data/modules/translator.yml +1 -1
- data/lib/starter_web/_data/plugins/defaults/paginator.yml +2 -2
- data/lib/starter_web/_data/plugins/paginator.yml +2 -2
- data/lib/starter_web/_data/resources.yml +447 -290
- data/lib/starter_web/_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/_includes/themes/j1/modules/ads/google_ad_content_home.html +11 -0
- data/lib/starter_web/_includes/themes/j1/modules/ads/google_ad_top_home.html +11 -0
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +1 -1
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-01-01-about-cookies.adoc +1 -1
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-01-01-about-cookies.ads.asciidoc +196 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-01-01-about-cookies.comments.asciidoc +182 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-02-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-wiki-series.adoc +1 -1
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-wiki-series.adoc +1 -1
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-wiki-series.adoc +1 -1
- data/lib/starter_web/index.html +0 -4
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +0 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +0 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +0 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +0 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +0 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +0 -1
- data/lib/starter_web/pages/public/blog/navigator/archive.html +0 -1
- data/lib/starter_web/pages/public/blog/navigator/index.html +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +4 -3
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.ads.asciidoc +265 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.base.asciidoc +237 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.comments.asciidoc +237 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +62 -0
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/google-ad.js +130 -0
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +0 -1
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +0 -1
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +0 -1
- data/lib/starter_web/pages/public/manuals/dropdown-help.adoc +23 -2
- data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +100 -166
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +25 -70
- data/_includes/themes/j1/blocks/ads/ad.html +0 -64
- data/_includes/themes/j1/modules/boards/news_pin_board.html +0 -183
- data/_includes/themes/j1/modules/connectors/ad/custom-provider.html +0 -30
- data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +0 -62
- data/_includes/themes/j1/modules/connectors/ads +0 -56
- data/_includes/themes/j1/modules/connectors/analytic/custom-provider.html +0 -32
- data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +0 -30
- data/_includes/themes/j1/modules/connectors/analytics +0 -60
- data/_includes/themes/j1/modules/connectors/comment/commento.html +0 -31
- data/_includes/themes/j1/modules/connectors/comment/custom-provider.html +0 -30
- data/_includes/themes/j1/modules/connectors/comment/disqus.html +0 -32
- data/_includes/themes/j1/modules/connectors/comment/facebook.html +0 -30
- data/_includes/themes/j1/modules/connectors/comment/hyvor.html +0 -32
- data/_includes/themes/j1/modules/connectors/comment/just-comments.html +0 -31
- data/_includes/themes/j1/modules/connectors/comments +0 -64
- data/_includes/themes/j1/modules/connectors/sharing +0 -29
- data/_includes/themes/j1/modules/connectors/survey/custom-provider.html +0 -30
- data/_includes/themes/j1/modules/connectors/survey/jotform.html +0 -32
- data/_includes/themes/j1/modules/connectors/surveys +0 -58
- data/_includes/themes/j1/modules/connectors/translator +0 -58
- data/_includes/themes/j1/modules/connectors/translators/custom-translator.html +0 -32
- data/_includes/themes/j1/modules/connectors/translators/google-translator.html +0 -53
- data/_includes/themes/j1/modules/search/algolia.html +0 -181
- data/_includes/themes/j1/modules/search/docsearch.html +0 -42
- data/assets/data/disqus.js +0 -81
- data/assets/data/hyvor.js +0 -72
- data/lib/starter_web/pages/_test_pages/100_side-bar-tester.adoc +0 -244
- data/lib/starter_web/pages/_test_pages/_includes/attributes.asciidoc +0 -110
- data/lib/starter_web/pages/_test_pages/_includes/documents/100_gistblock.asciidoc +0 -28
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_bottom_info.asciidoc +0 -14
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_bottom_left_warning.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_bottom_right_danger.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_central_success.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_full_height_left_info.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_full_height_right_success.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_table_bs_modal_examples.asciidoc +0 -47
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_top_info.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_top_left_info.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_top_right_success.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/419_advanced_modals_demo.asciidoc +0 -337
- data/lib/starter_web/pages/_test_pages/_includes/documents/tables/bs_modal_examples.asciidoc +0 -47
- data/lib/starter_web/pages/_test_pages/accordion-01-tester.adoc +0 -220
- data/lib/starter_web/pages/_test_pages/accordion-02-tester.adoc +0 -177
- data/lib/starter_web/pages/_test_pages/accordion-03-tester.adoc +0 -148
- data/lib/starter_web/pages/_test_pages/attribute-changes-01-tester.adoc +0 -226
- data/lib/starter_web/pages/_test_pages/backdrop-tester.adoc +0 -109
- data/lib/starter_web/pages/_test_pages/button-tester-1.adoc +0 -127
- data/lib/starter_web/pages/_test_pages/card-tester.adoc +0 -128
- data/lib/starter_web/pages/_test_pages/cookieConsent.adoc +0 -96
- data/lib/starter_web/pages/_test_pages/deepl.0.adoc +0 -258
- data/lib/starter_web/pages/_test_pages/deepl.adoc +0 -204
- data/lib/starter_web/pages/_test_pages/desandro-button.adoc +0 -171
- data/lib/starter_web/pages/_test_pages/desandro.adoc +0 -147
- data/lib/starter_web/pages/_test_pages/flipcard-1-tester.adoc +0 -308
- data/lib/starter_web/pages/_test_pages/formular-01-tester.adoc +0 -167
- data/lib/starter_web/pages/_test_pages/formular-02-tester.adoc +0 -727
- data/lib/starter_web/pages/_test_pages/google-translate-tester.0.adoc +0 -113
- data/lib/starter_web/pages/_test_pages/google-translate-tester.1.adoc +0 -231
- data/lib/starter_web/pages/_test_pages/google-translate-tester.3.adoc +0 -149
- data/lib/starter_web/pages/_test_pages/google-translate-tester.4.adoc +0 -237
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester-2.adoc +0 -183
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester-3.adoc +0 -235
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester-4.adoc +0 -222
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester-5.adoc +0 -119
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester.1.adoc +0 -236
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester.adoc +0 -225
- data/lib/starter_web/pages/_test_pages/list-group-tester.adoc +0 -265
- data/lib/starter_web/pages/_test_pages/tictok.adoc +0 -127
@@ -19,6 +19,7 @@ regenerate: true
|
|
19
19
|
# -----------------------------------------------------------------------------
|
20
20
|
# Test data:
|
21
21
|
# {{ liquid_var | debug }}
|
22
|
+
# cookie_options: {{ cookie_options | debug }}
|
22
23
|
# -----------------------------------------------------------------------------
|
23
24
|
{% endcomment %}
|
24
25
|
|
@@ -36,18 +37,21 @@ regenerate: true
|
|
36
37
|
-------------------------------------------------------------------------------- {% endcomment %}
|
37
38
|
{% assign cookie_defaults = modules.defaults.cookies.defaults %}
|
38
39
|
{% assign cookie_settings = modules.cookies.settings %}
|
39
|
-
|
40
40
|
{% assign consent_defaults = modules.defaults.cookieconsent.defaults %}
|
41
41
|
{% assign consent_settings = modules.cookieconsent.settings %}
|
42
|
-
{% assign
|
43
|
-
{% assign
|
44
|
-
|
45
|
-
{% assign comment_provider = site.data.j1_config.comments.provider %}
|
42
|
+
{% assign analytics_defaults = modules.defaults.analytics.defaults %}
|
43
|
+
{% assign analytics_settings = modules.analytics.settings %}
|
46
44
|
|
47
45
|
{% comment %} Set config options
|
48
46
|
-------------------------------------------------------------------------------- {% endcomment %}
|
49
47
|
{% assign consent_options = consent_defaults | merge: consent_settings %}
|
50
48
|
{% assign cookie_options = cookie_defaults | merge: cookie_settings %}
|
49
|
+
{% assign analytics_options = analytics_defaults | merge: analytics_settings %}
|
50
|
+
|
51
|
+
{% comment %} Set variables
|
52
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
53
|
+
{% assign tracking_enabled = analytics_options.enabled %}
|
54
|
+
{% assign tracking_id = analytics_options.google.trackingID %}
|
51
55
|
|
52
56
|
{% assign production = false %}
|
53
57
|
{% if environment == 'prod' or environment == 'production' %}
|
@@ -78,17 +82,13 @@ regenerate: true
|
|
78
82
|
/* eslint quotes: "off" */
|
79
83
|
// -----------------------------------------------------------------------------
|
80
84
|
'use strict';
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
var
|
87
|
-
var
|
88
|
-
var tracking_id = '{{tracking_id}}';
|
89
|
-
var tracking_id_valid = (tracking_id.includes('tracking-id')) ? false : true;
|
90
|
-
var comment_provider = '{{comment_provider}}';
|
91
|
-
var moduleOptions = {};
|
85
|
+
j1.adapter.cookieConsent = (function (j1, window) {
|
86
|
+
var environment = '{{environment}}';
|
87
|
+
var tracking_enabled = ('{{tracking_enabled}}' === 'true') ? true: false;
|
88
|
+
var tracking_id = '{{tracking_id}}';
|
89
|
+
var tracking_id_valid = (tracking_id.includes('tracking-id')) ? false : true;
|
90
|
+
var expireCookiesOnRequiredOnly = ('{{cookie_options.expireCookiesOnRequiredOnly}}' === 'true') ? true: false;
|
91
|
+
var moduleOptions = {};
|
92
92
|
var _this;
|
93
93
|
var $modal;
|
94
94
|
var cookie_names;
|
@@ -97,7 +97,7 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
97
97
|
var url;
|
98
98
|
var baseUrl;
|
99
99
|
var hostname;
|
100
|
-
var
|
100
|
+
var auto_domain;
|
101
101
|
var cookie_option_domain;
|
102
102
|
var cookie_domain;
|
103
103
|
var secure;
|
@@ -125,7 +125,15 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
125
125
|
init: function (options) {
|
126
126
|
|
127
127
|
// -----------------------------------------------------------------------
|
128
|
-
//
|
128
|
+
// Default module settings
|
129
|
+
// -----------------------------------------------------------------------
|
130
|
+
var settings = $.extend({
|
131
|
+
module_name: 'j1.adapter.cookieConsent',
|
132
|
+
generated: '{{site.time}}'
|
133
|
+
}, options);
|
134
|
+
|
135
|
+
// -----------------------------------------------------------------------
|
136
|
+
// Global variable settings
|
129
137
|
// -----------------------------------------------------------------------
|
130
138
|
_this = j1.adapter.cookieConsent;
|
131
139
|
logger = log4javascript.getLogger('j1.adapter.cookieConsent');
|
@@ -133,8 +141,8 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
133
141
|
url = new liteURL(window.location.href);
|
134
142
|
baseUrl = url.origin;
|
135
143
|
hostname = url.hostname;
|
136
|
-
|
137
|
-
cookie_option_domain = '{{cookie_options.domain}}';
|
144
|
+
auto_domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
145
|
+
cookie_option_domain = ('{{cookie_options.domain}}' === 'true');
|
138
146
|
secure = (url.protocol.includes('https')) ? true : false;
|
139
147
|
contentLanguage = '{{site.language}}';
|
140
148
|
navigatorLanguage = navigator.language || navigator.userLanguage;
|
@@ -142,14 +150,6 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
142
150
|
// initialize state flag
|
143
151
|
_this.state = 'pending';
|
144
152
|
|
145
|
-
// -----------------------------------------------------------------------
|
146
|
-
// Default module settings
|
147
|
-
// -----------------------------------------------------------------------
|
148
|
-
var settings = $.extend({
|
149
|
-
module_name: 'j1.adapter.cookieConsent',
|
150
|
-
generated: '{{site.time}}'
|
151
|
-
}, options);
|
152
|
-
|
153
153
|
{% comment %} Load module config from yml data
|
154
154
|
-------------------------------------------------------------------------- {% endcomment %}
|
155
155
|
// Load module DEFAULTS|CONFIG
|
@@ -174,11 +174,28 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
174
174
|
var expires = '{{cookie_options.expires}}';
|
175
175
|
var same_site = '{{cookie_options.same_site}}';
|
176
176
|
|
177
|
+
// // set domain used by cookies
|
178
|
+
// if (cookie_option_domain == 'auto') {
|
179
|
+
// domainAttribute = domain ;
|
180
|
+
// } else {
|
181
|
+
// domainAttribute = '';
|
182
|
+
// }
|
183
|
+
|
177
184
|
// set domain used by cookies
|
178
|
-
if (cookie_option_domain
|
179
|
-
|
180
|
-
|
181
|
-
|
185
|
+
if (cookie_option_domain) {
|
186
|
+
if (cookie_option_domain == 'auto') {
|
187
|
+
domainAttribute = auto_domain;
|
188
|
+
stringifiedAttributes += '; ' + 'Domain=' + domainAttribute;
|
189
|
+
} else if (cookie_option_domain) {
|
190
|
+
domainAttribute = domain;
|
191
|
+
stringifiedAttributes += '; ' + 'Domain=' + domainAttribute;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
// Failsafe: if 'None' is given for samesite in non-secure environments
|
196
|
+
// -----------------------------------------------------------------------
|
197
|
+
if (same_site == 'None' && !secure) {
|
198
|
+
same_site = 'Lax';
|
182
199
|
}
|
183
200
|
|
184
201
|
if ( j1.getState() === 'finished' ) {
|
@@ -211,7 +228,7 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
211
228
|
|
212
229
|
clearInterval(dependencies_met_page_ready);
|
213
230
|
}
|
214
|
-
});
|
231
|
+
}, 25);
|
215
232
|
}, // END init
|
216
233
|
|
217
234
|
// -------------------------------------------------------------------------
|
@@ -259,18 +276,21 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
259
276
|
|
260
277
|
// -------------------------------------------------------------------------
|
261
278
|
// cbCookie()
|
262
|
-
// Called by CookieConsent module after the user has
|
263
|
-
// made his selection
|
279
|
+
// Called (callback) by CookieConsent module after the user has
|
280
|
+
// made his selection
|
264
281
|
// -------------------------------------------------------------------------
|
265
282
|
cbCookie: function () {
|
266
|
-
var
|
267
|
-
var
|
268
|
-
var
|
269
|
-
var
|
270
|
-
var
|
271
|
-
var
|
272
|
-
var
|
273
|
-
var
|
283
|
+
var url = new liteURL(window.location.href);
|
284
|
+
var hostname = url.hostname;
|
285
|
+
var gaCookies = j1.findCookie('_ga');
|
286
|
+
var gasCookies = j1.findCookie('__ga');
|
287
|
+
var j1Cookies = j1.findCookie('j1');
|
288
|
+
var cookie_names = j1.getCookieNames();
|
289
|
+
var user_state = j1.readCookie(cookie_names.user_state);
|
290
|
+
var user_consent = j1.readCookie(cookie_names.user_consent);
|
291
|
+
var user_translate = j1.readCookie(cookie_names.user_translate);
|
292
|
+
var json = JSON.stringify(user_consent);
|
293
|
+
var user_agent = platform.ua;
|
274
294
|
var cookie_written;
|
275
295
|
|
276
296
|
logger.info('\n' + 'entered post selection callback from CookieConsent');
|
@@ -281,40 +301,15 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
281
301
|
$('#quickLinksCookieButton').css('display', 'block');
|
282
302
|
}
|
283
303
|
|
284
|
-
// jadams, 2021-11-29: disabled additional logs to verify the existance
|
285
|
-
// of J1 and GA cookies (testing only)
|
286
|
-
//
|
287
|
-
// logger.debug('\n' + 'j1 cookies found:' + j1Cookies.length);
|
288
|
-
// j1Cookies.forEach(item => console.log('j1.core.switcher: ' + item));
|
289
|
-
// logger.debug('\n' + 'ga cookies found:' + gaCookies.length);
|
290
|
-
// gaCookies.forEach(item => console.log('j1.core.switcher: ' + item));
|
291
|
-
//
|
292
|
-
// if (user_agent.includes('iPad')) {
|
293
|
-
// logger.warn('\n' + 'product detected : ' + platform.product);
|
294
|
-
// logger.warn('\n' + 'skip deleting (unwanted) cookies for this platform');
|
295
|
-
// }
|
296
|
-
|
297
304
|
// Manage Google Analytics OptIn/Out
|
298
305
|
// See: https://github.com/luciomartinez/gtag-opt-in/wiki
|
299
306
|
if (tracking_enabled && tracking_id_valid) {
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
GTagOptIn.optOut();
|
307
|
-
|
308
|
-
if (!user_agent.includes('iPad')) {
|
309
|
-
gaCookies.forEach(function (item) {
|
310
|
-
logger.warn('\n' + 'delete GA cookie: ' + item);
|
311
|
-
j1.removeCookie({ name: item, domain: cookie_domain });
|
312
|
-
});
|
313
|
-
}
|
314
|
-
}
|
315
|
-
|
316
|
-
// Managing providers using personalization OptIn/Out
|
317
|
-
// (Comments|Ads|Translation)
|
307
|
+
// Managing cookie life-time
|
308
|
+
// ---------------------------------------------------------------------
|
309
|
+
// If cookie settings allows only "required" cookies, all "persistent"
|
310
|
+
// cookies (Comments|Ads|Translation) get expired to "session" for
|
311
|
+
// better GDPR compliance. The GDPR regulations does NOT require
|
312
|
+
// any consent on session-only cookies.
|
318
313
|
//
|
319
314
|
if (!user_consent.analysis || !user_consent.personalization) {
|
320
315
|
|
@@ -331,6 +326,7 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
331
326
|
});
|
332
327
|
|
333
328
|
// expire permanent cookies to session
|
329
|
+
// -------------------------------------------------------------------
|
334
330
|
j1.expireCookie({ name: cookie_names.user_state });
|
335
331
|
j1.expireCookie({ name: cookie_names.user_consent });
|
336
332
|
j1.expireCookie({ name: cookie_names.user_translate });
|
@@ -340,16 +336,41 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
340
336
|
location.reload(true);
|
341
337
|
}
|
342
338
|
} else {
|
343
|
-
//
|
344
|
-
//
|
339
|
+
// Failsafe: Make (really) sure the all GA|GAS cookies removed
|
340
|
+
// left from a previous session/page view for better privacy compliance
|
341
|
+
// ---------------------------------------------------------------------
|
342
|
+
|
343
|
+
// remove cookies on invalid GA config or left from a previous
|
344
|
+
// session/page view if they exists
|
345
|
+
// ---------------------------------------------------------------------
|
345
346
|
gaCookies.forEach(function (item) {
|
346
347
|
logger.warn('\n' + 'delete GA cookie: ' + item);
|
347
|
-
|
348
|
+
if (hostname == 'localhost') {
|
349
|
+
j1.removeCookie({ name: item, domain: false, secure: false });
|
350
|
+
} else {
|
351
|
+
j1.removeCookie({ name: item, domain: '.' + hostname, secure: false });
|
352
|
+
}
|
348
353
|
});
|
349
354
|
|
350
|
-
//
|
351
|
-
//
|
352
|
-
//
|
355
|
+
// remove cookies on invalid GAS config or left from a previous
|
356
|
+
// session/page view if they exists
|
357
|
+
// ---------------------------------------------------------------------
|
358
|
+
gasCookies.forEach(function (item) {
|
359
|
+
// Remove cookies from Google Ads
|
360
|
+
logger.warn('\n' + 'delete GAS cookie: ' + item);
|
361
|
+
if (hostname == 'localhost') {
|
362
|
+
j1.removeCookie({ name: item, domain: false, secure: false });
|
363
|
+
} else {
|
364
|
+
j1.removeCookie({ name: item, domain: '.' + hostname, secure: false });
|
365
|
+
}
|
366
|
+
});
|
367
|
+
|
368
|
+
// Managing cookie life-time. If cookie settings allows only
|
369
|
+
// "required" cookies, all "persistent" cookies (Comments|Ads|Translation)
|
370
|
+
// get expired to "session" for better GDPR compliance. The GDPR
|
371
|
+
// regulations|privacy does NOT require any consent on using cookies
|
372
|
+
// for session-only cookies.
|
373
|
+
// ---------------------------------------------------------------------
|
353
374
|
if (!user_consent.analysis || !user_consent.personalization) {
|
354
375
|
// overload cookie consent settings
|
355
376
|
user_translate.analysis = user_consent.analysis;
|
@@ -363,10 +384,12 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
363
384
|
secure: secure
|
364
385
|
});
|
365
386
|
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
387
|
+
if (expireCookiesOnRequiredOnly) {
|
388
|
+
// expire permanent cookies to session
|
389
|
+
j1.expireCookie({ name: cookie_names.user_state });
|
390
|
+
j1.expireCookie({ name: cookie_names.user_consent });
|
391
|
+
j1.expireCookie({ name: cookie_names.user_translate });
|
392
|
+
}
|
370
393
|
}
|
371
394
|
|
372
395
|
if (moduleOptions.reloadPageOnChange) {
|
@@ -78,10 +78,10 @@ regenerate: true
|
|
78
78
|
/* eslint indent: "off" */
|
79
79
|
// -----------------------------------------------------------------------------
|
80
80
|
'use strict';
|
81
|
+
j1.adapter.fab = (function (j1, window) {
|
81
82
|
|
82
|
-
j1.adapter['fab'] = (function (j1, window) {
|
83
83
|
// ---------------------------------------------------------------------------
|
84
|
-
//
|
84
|
+
// Global variable settings
|
85
85
|
// ---------------------------------------------------------------------------
|
86
86
|
var isMobile = j1.core.isMobile();
|
87
87
|
var environment = '{{environment}}';
|
@@ -116,7 +116,15 @@ j1.adapter['fab'] = (function (j1, window) {
|
|
116
116
|
init: function (options) {
|
117
117
|
|
118
118
|
// -----------------------------------------------------------------------
|
119
|
-
//
|
119
|
+
// Default module settings
|
120
|
+
// -----------------------------------------------------------------------
|
121
|
+
var settings = $.extend({
|
122
|
+
module_name: 'j1.adapter.fab',
|
123
|
+
generated: '{{site.time}}'
|
124
|
+
}, options);
|
125
|
+
|
126
|
+
// -----------------------------------------------------------------------
|
127
|
+
// Global variable settings
|
120
128
|
// -----------------------------------------------------------------------
|
121
129
|
_this = j1.adapter.fab;
|
122
130
|
logger = log4javascript.getLogger('j1.adapter.fab');
|
@@ -132,14 +140,6 @@ j1.adapter['fab'] = (function (j1, window) {
|
|
132
140
|
// create settings object from frontmatterOptions
|
133
141
|
var frontmatterOptions = options != null ? $.extend({}, options) : {};
|
134
142
|
|
135
|
-
// -----------------------------------------------------------------------
|
136
|
-
// defaults
|
137
|
-
// -----------------------------------------------------------------------
|
138
|
-
var settings = $.extend({
|
139
|
-
module_name: 'j1.adapter.fab',
|
140
|
-
generated: '{{site.time}}'
|
141
|
-
}, options);
|
142
|
-
|
143
143
|
// -----------------------------------------------------------------------
|
144
144
|
// options loader
|
145
145
|
// -----------------------------------------------------------------------
|
@@ -78,10 +78,7 @@ regenerate: false
|
|
78
78
|
/* eslint indent: "off" */
|
79
79
|
// -----------------------------------------------------------------------------
|
80
80
|
'use strict';
|
81
|
-
|
82
|
-
{% comment %} Main
|
83
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
84
|
-
j1.adapter['framer'] = (function (j1, window) {
|
81
|
+
j1.adapter.framer = (function (j1, window) {
|
85
82
|
|
86
83
|
{% comment %} Set global variables
|
87
84
|
------------------------------------------------------------------------------ {% endcomment %}
|
@@ -107,69 +104,67 @@ j1.adapter['framer'] = (function (j1, window) {
|
|
107
104
|
|
108
105
|
var dependencies_met_page_finished = setInterval (function () {
|
109
106
|
if (j1.getState() === 'finished') {
|
110
|
-
// -----------------------------------------------------------------------
|
111
|
-
// globals
|
112
|
-
// -----------------------------------------------------------------------
|
113
|
-
_this = j1.adapter.framer;
|
114
|
-
logger = log4javascript.getLogger('j1.adapter.framer');
|
115
|
-
|
116
|
-
// initialize state flag
|
117
|
-
_this.setState('started');
|
118
|
-
logger.info('\n' + 'state: ' + _this.getState());
|
119
|
-
logger.info('\n' + 'module is being initialized');
|
120
|
-
|
121
|
-
// -----------------------------------------------------------------------
|
122
|
-
// Default module settings
|
123
|
-
// -----------------------------------------------------------------------
|
124
|
-
var settings = $.extend({
|
125
|
-
module_name: 'j1.adapter.example',
|
126
|
-
generated: '{{site.time}}'
|
127
|
-
}, options);
|
128
|
-
|
129
|
-
{% comment %} Load module config from yml data
|
130
|
-
-------------------------------------------------------------------------- {% endcomment %}
|
131
|
-
// Load module DEFAULTS|CONFIG
|
132
|
-
/* eslint-disable */
|
133
|
-
moduleOptions = $.extend({}, {{framer_options | replace: '=>', ':' | replace: 'nil', '""'}});
|
134
|
-
/* eslint-enable */
|
135
|
-
|
136
|
-
if (typeof settings !== 'undefined') {
|
137
|
-
moduleOptions = j1.mergeData(moduleOptions, settings);
|
138
|
-
}
|
139
|
-
|
140
|
-
iFrameResize({
|
141
|
-
log: moduleOptions.log,
|
142
|
-
autoResize: moduleOptions.autoResize,
|
143
|
-
bodyBackground: moduleOptions.bodyBackground,
|
144
|
-
bodyMargin: moduleOptions.bodyMargin,
|
145
|
-
checkOrigin: moduleOptions.checkOrigin,
|
146
|
-
inPageLinks: moduleOptions.inPageLinks,
|
147
|
-
interval: moduleOptions.interval,
|
148
|
-
heightCalculationMethod: moduleOptions.heightCalculationMethod,
|
149
|
-
maxHeight: moduleOptions.maxHeight,
|
150
|
-
minWidth: moduleOptions.minWidth,
|
151
|
-
maxWidth: moduleOptions.maxWidth,
|
152
|
-
minHeight: moduleOptions.minHeight,
|
153
|
-
resizeFrom: moduleOptions.resizeFrom,
|
154
|
-
scrolling: moduleOptions.scrolling,
|
155
|
-
sizeHeight: moduleOptions.sizeHeight,
|
156
|
-
sizeWidth: moduleOptions.sizeWidth,
|
157
|
-
tolerance: moduleOptions.tolerance,
|
158
|
-
widthCalculationMethod: moduleOptions.widthCalculationMethod,
|
159
|
-
targetOrigin: moduleOptions.checkOrigin
|
160
|
-
});
|
161
|
-
|
162
|
-
_this.setState('finished');
|
163
|
-
logger.info('\n' + 'state: ' + _this.getState());
|
164
|
-
logger.info('\n' + 'initializing module finished');
|
165
|
-
|
166
|
-
clearInterval(dependencies_met_page_finished);
|
167
|
-
|
168
|
-
return true;
|
169
107
|
|
108
|
+
// -----------------------------------------------------------------------
|
109
|
+
// Default module settings
|
110
|
+
// -----------------------------------------------------------------------
|
111
|
+
var settings = $.extend({
|
112
|
+
module_name: 'j1.adapter.example',
|
113
|
+
generated: '{{site.time}}'
|
114
|
+
}, options);
|
115
|
+
|
116
|
+
// -----------------------------------------------------------------------
|
117
|
+
// Global variable settings
|
118
|
+
// -----------------------------------------------------------------------
|
119
|
+
_this = j1.adapter.framer;
|
120
|
+
logger = log4javascript.getLogger('j1.adapter.framer');
|
121
|
+
|
122
|
+
// initialize state flag
|
123
|
+
_this.setState('started');
|
124
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
125
|
+
logger.info('\n' + 'module is being initialized');
|
126
|
+
|
127
|
+
{% comment %} Load module config from yml data
|
128
|
+
-------------------------------------------------------------------------- {% endcomment %}
|
129
|
+
// Load module DEFAULTS|CONFIG
|
130
|
+
/* eslint-disable */
|
131
|
+
moduleOptions = $.extend({}, {{framer_options | replace: '=>', ':' | replace: 'nil', '""'}});
|
132
|
+
/* eslint-enable */
|
133
|
+
|
134
|
+
if (typeof settings !== 'undefined') {
|
135
|
+
moduleOptions = j1.mergeData(moduleOptions, settings);
|
136
|
+
}
|
137
|
+
|
138
|
+
iFrameResize({
|
139
|
+
log: moduleOptions.log,
|
140
|
+
autoResize: moduleOptions.autoResize,
|
141
|
+
bodyBackground: moduleOptions.bodyBackground,
|
142
|
+
bodyMargin: moduleOptions.bodyMargin,
|
143
|
+
checkOrigin: moduleOptions.checkOrigin,
|
144
|
+
inPageLinks: moduleOptions.inPageLinks,
|
145
|
+
interval: moduleOptions.interval,
|
146
|
+
heightCalculationMethod: moduleOptions.heightCalculationMethod,
|
147
|
+
maxHeight: moduleOptions.maxHeight,
|
148
|
+
minWidth: moduleOptions.minWidth,
|
149
|
+
maxWidth: moduleOptions.maxWidth,
|
150
|
+
minHeight: moduleOptions.minHeight,
|
151
|
+
resizeFrom: moduleOptions.resizeFrom,
|
152
|
+
scrolling: moduleOptions.scrolling,
|
153
|
+
sizeHeight: moduleOptions.sizeHeight,
|
154
|
+
sizeWidth: moduleOptions.sizeWidth,
|
155
|
+
tolerance: moduleOptions.tolerance,
|
156
|
+
widthCalculationMethod: moduleOptions.widthCalculationMethod,
|
157
|
+
targetOrigin: moduleOptions.checkOrigin
|
158
|
+
});
|
159
|
+
|
160
|
+
_this.setState('finished');
|
161
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
162
|
+
logger.info('\n' + 'initializing module finished');
|
163
|
+
|
164
|
+
clearInterval(dependencies_met_page_finished);
|
165
|
+
return true;
|
170
166
|
}
|
171
167
|
}, 25);
|
172
|
-
|
173
168
|
}, // END init
|
174
169
|
|
175
170
|
// -------------------------------------------------------------------------
|