j1-template 2022.0.8 → 2022.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/error_pages/HTTP446.html +1 -1
- data/assets/themes/j1/adapter/js/cookieConsent.js +22 -20
- data/assets/themes/j1/adapter/js/j1.js +63 -44
- data/assets/themes/j1/adapter/js/translator.js +91 -93
- data/assets/themes/j1/modules/translator/js/translator.js +1 -1
- data/assets/themes/j1/modules/translator/js/translator.min.js +1 -1
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/modules/cookies.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/cookies.yml +22 -13
- data/lib/starter_web/_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cc23d49ab79488234bcc11d52989a1114159fd3d075e1b74db6c8122e430885
|
4
|
+
data.tar.gz: b4e92ca4f3b66f2682a1299ceb0fc9b5a0381f03705936ab1d75e5ec25dc5eb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0e18887bb26c831f49560b3f46dc140a0aa200b871a6b952066361ae6fae306e3591bdeb18c994b49a9e0022533042d1efa6b64d620622c746888f0d8e64af6
|
7
|
+
data.tar.gz: 483b7805c69ffdeb8e2ee16e10b971ded5a801f796facb25965fb05c9b8ff8052a23bae381789e1047a02d02d13fe23792fd2274bfaeff696b1ae2f9ef7309e9
|
@@ -97,7 +97,7 @@ sitemap: false
|
|
97
97
|
<div class="cover attic">
|
98
98
|
<h1>{{title}} <small>{{page.http_error}}</small></h1>
|
99
99
|
<p class="lead">{{reason}}</p>
|
100
|
-
<div><a href="{{page.back_url}}">{{back_url_text}}</a></div>
|
100
|
+
<div><a href="{{page.back_url}}" target="blank" rel="noopener">{{back_url_text}}</a></div>
|
101
101
|
</div>
|
102
102
|
<footer>
|
103
103
|
<p>{{copyright_info}} · {{contact_issue}}: <a href="mailto:{{webmaster_email}}?subject={{title}}"> {{webmaster_email}} </a></p>
|
@@ -98,13 +98,14 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
98
98
|
var baseUrl;
|
99
99
|
var hostname;
|
100
100
|
var domain;
|
101
|
-
var
|
101
|
+
var cookie_option_domain;
|
102
102
|
var cookie_domain;
|
103
103
|
var secure;
|
104
104
|
var logText;
|
105
105
|
var cookie_written;
|
106
106
|
var contentLanguage;
|
107
107
|
var navigatorLanguage;
|
108
|
+
var domainAttribute;
|
108
109
|
|
109
110
|
// NOTE: RegEx for tracking_id: ^(G|UA|YT|MO)-[a-zA-Z0-9-]+$
|
110
111
|
// See: https://stackoverflow.com/questions/20411767/how-to-validate-google-analytics-tracking-id-using-a-javascript-function/20412153
|
@@ -126,17 +127,17 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
126
127
|
// -----------------------------------------------------------------------
|
127
128
|
// globals
|
128
129
|
// -----------------------------------------------------------------------
|
129
|
-
_this
|
130
|
-
logger
|
131
|
-
cookie_names
|
132
|
-
url
|
133
|
-
baseUrl
|
134
|
-
hostname
|
135
|
-
domain
|
136
|
-
|
137
|
-
secure
|
138
|
-
contentLanguage
|
139
|
-
navigatorLanguage
|
130
|
+
_this = j1.adapter.cookieConsent;
|
131
|
+
logger = log4javascript.getLogger('j1.adapter.cookieConsent');
|
132
|
+
cookie_names = j1.getCookieNames();
|
133
|
+
url = new liteURL(window.location.href);
|
134
|
+
baseUrl = url.origin;
|
135
|
+
hostname = url.hostname;
|
136
|
+
domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
137
|
+
cookie_option_domain = '{{cookie_options.domain}}';
|
138
|
+
secure = (url.protocol.includes('https')) ? true : false;
|
139
|
+
contentLanguage = '{{site.language}}';
|
140
|
+
navigatorLanguage = navigator.language || navigator.userLanguage;
|
140
141
|
|
141
142
|
// initialize state flag
|
142
143
|
_this.state = 'pending';
|
@@ -170,14 +171,14 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
170
171
|
// initializer
|
171
172
|
// -----------------------------------------------------------------------
|
172
173
|
var dependencies_met_page_ready = setInterval (function (options) {
|
173
|
-
var expires
|
174
|
-
var same_site
|
174
|
+
var expires = '{{cookie_options.expires}}';
|
175
|
+
var same_site = '{{cookie_options.same_site}}';
|
175
176
|
|
176
177
|
// set domain used by cookies
|
177
|
-
if (
|
178
|
-
|
179
|
-
} else
|
180
|
-
|
178
|
+
if (cookie_option_domain == 'auto') {
|
179
|
+
domainAttribute = domain ;
|
180
|
+
} else {
|
181
|
+
domainAttribute = '';
|
181
182
|
}
|
182
183
|
|
183
184
|
if ( j1.getState() === 'finished' ) {
|
@@ -190,7 +191,8 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
190
191
|
cookieName: cookie_names.user_consent, // name of the consent cookie
|
191
192
|
cookieStorageDays: expires, // lifetime of a cookie [0..365], 0: session cookie
|
192
193
|
cookieSameSite: same_site, // restrict consent cookie
|
193
|
-
|
194
|
+
cookieSecure: secure, // only sent to the server with an encrypted request over HTTPS
|
195
|
+
cookieDomain: domainAttribute, // set domain (hostname|domain)
|
194
196
|
dialogLanguage: moduleOptions.dialogLanguage, // language for the dialog (modal)
|
195
197
|
whitelisted: moduleOptions.whitelisted, // pages NOt dialog is shown
|
196
198
|
reloadPageOnChange: moduleOptions.reloadPageOnChange, // reload if setzings has changed
|
@@ -366,7 +368,7 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
366
368
|
j1.expireCookie({ name: cookie_names.user_consent });
|
367
369
|
j1.expireCookie({ name: cookie_names.user_translate });
|
368
370
|
}
|
369
|
-
|
371
|
+
|
370
372
|
if (moduleOptions.reloadPageOnChange) {
|
371
373
|
// reload current page (skip cache)
|
372
374
|
location.reload(true);
|
@@ -174,6 +174,7 @@ var j1 = (function () {
|
|
174
174
|
// Default comment provider information
|
175
175
|
var comment_provider = '{{comment_provider}}';
|
176
176
|
var site_id = '{{site_id}}';
|
177
|
+
var check_cookies = {{cookie_options.check_cookies}};
|
177
178
|
|
178
179
|
var current_user_data;
|
179
180
|
var current_page;
|
@@ -368,13 +369,15 @@ var j1 = (function () {
|
|
368
369
|
expires: 365
|
369
370
|
});
|
370
371
|
|
371
|
-
// jadams, 2021-12-06:
|
372
|
+
// jadams, 2021-12-06: Check if access to cookies for this site failed.
|
372
373
|
// Possibly, a third-party domain or an attacker tries to access it.
|
373
|
-
if (
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
374
|
+
if (check_cookies) {
|
375
|
+
if (!user_state) {
|
376
|
+
logger.error('\n' + 'Access to cookie failed or cookie not found: ' + cookie_names.user_state);
|
377
|
+
logger.debug('\n' + 'j1 cookies found:' + j1Cookies.length);
|
378
|
+
// redirect to error page: blocked content
|
379
|
+
window.location.href = '/446.html';
|
380
|
+
}
|
378
381
|
}
|
379
382
|
|
380
383
|
if (!user_consent.analysis || !user_consent.personalization) {
|
@@ -1612,25 +1615,25 @@ var j1 = (function () {
|
|
1612
1615
|
// context/HTTPS).
|
1613
1616
|
// -------------------------------------------------------------------------
|
1614
1617
|
writeCookie: function (options /*name, data, [path, expires, domain, samesite, http_only, secure]*/) {
|
1615
|
-
var date
|
1616
|
-
var timestamp_now
|
1617
|
-
var url
|
1618
|
-
var baseUrl
|
1619
|
-
var hostname
|
1620
|
-
var domain
|
1621
|
-
var
|
1622
|
-
var cookie_data
|
1618
|
+
var date = new Date();
|
1619
|
+
var timestamp_now = date.toISOString()
|
1620
|
+
var url = new liteURL(window.location.href);
|
1621
|
+
var baseUrl = url.origin;;
|
1622
|
+
var hostname = url.hostname;
|
1623
|
+
var domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
1624
|
+
var stringifiedAttributes = '';
|
1625
|
+
var cookie_data = {};
|
1623
1626
|
var data_json;
|
1624
1627
|
var data_encoded;
|
1625
1628
|
var expires;
|
1626
|
-
var
|
1629
|
+
var domainAttribute;
|
1627
1630
|
|
1628
1631
|
var defaults = {
|
1629
1632
|
data: {},
|
1630
1633
|
name: '',
|
1631
1634
|
path: '{{cookie_options.path}}',
|
1632
1635
|
expires: '{{cookie_options.expires}}',
|
1633
|
-
domain: '
|
1636
|
+
domain: '{{cookie_options.domain}}',
|
1634
1637
|
samesite: '{{cookie_options.same_site}}',
|
1635
1638
|
http_only: '{{cookie_options.http_only}}',
|
1636
1639
|
secure: '{{cookie_options.secure}}'
|
@@ -1650,27 +1653,26 @@ var j1 = (function () {
|
|
1650
1653
|
data_encoded = window.btoa(data_json);
|
1651
1654
|
}
|
1652
1655
|
|
1653
|
-
stringifiedAttributes += '; ' + '
|
1656
|
+
stringifiedAttributes += '; ' + 'Path=' + settings.path;
|
1654
1657
|
|
1655
1658
|
if (settings.expires > 0) {
|
1656
1659
|
date.setTime(date.getTime() + (settings.expires * 24 * 60 * 60 * 1000));
|
1657
|
-
stringifiedAttributes += '; ' + '
|
1660
|
+
stringifiedAttributes += '; ' + 'Expires=' + date.toUTCString();
|
1658
1661
|
}
|
1659
1662
|
|
1660
1663
|
stringifiedAttributes += '; ' + 'SameSite=' + settings.samesite;
|
1661
1664
|
|
1662
|
-
//
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
} else
|
1667
|
-
|
1665
|
+
// set domain used by cookies
|
1666
|
+
if (settings.domain == 'auto') {
|
1667
|
+
domainAttribute = domain;
|
1668
|
+
stringifiedAttributes += '; ' + 'Domain=' + domainAttribute;
|
1669
|
+
} else {
|
1670
|
+
domainAttribute = '';
|
1671
|
+
stringifiedAttributes += '; ' + 'Domain=' + domainAttribute;
|
1668
1672
|
}
|
1669
1673
|
|
1670
|
-
|
1671
|
-
|
1672
|
-
if (settings.secure) {
|
1673
|
-
stringifiedAttributes += '; ' + 'secure=' + settings.secure;
|
1674
|
+
if (settings.secure == 'true') {
|
1675
|
+
stringifiedAttributes += '; ' + 'Secure=' + settings.secure;
|
1674
1676
|
}
|
1675
1677
|
|
1676
1678
|
// write the cookie
|
@@ -1705,16 +1707,29 @@ var j1 = (function () {
|
|
1705
1707
|
// removeCookie (Vanilla JS)
|
1706
1708
|
// -------------------------------------------------------------------------
|
1707
1709
|
removeCookie: function (options /*name, [path, domain]*/) {
|
1708
|
-
var cookieExists;
|
1709
1710
|
var defaults = {
|
1710
|
-
|
1711
|
-
|
1711
|
+
path: '{{cookie_options.path}}',
|
1712
|
+
expires: '{{cookie_options.expires}}',
|
1713
|
+
domain: '{{cookie_options.domain}}',
|
1714
|
+
samesite: '{{cookie_options.same_site}}',
|
1715
|
+
http_only: '{{cookie_options.http_only}}',
|
1716
|
+
secure: '{{cookie_options.secure}}'
|
1712
1717
|
};
|
1718
|
+
var cookieExists;
|
1719
|
+
|
1713
1720
|
var settings = $.extend(defaults, options);
|
1714
1721
|
|
1722
|
+
// set domain used by cookies
|
1723
|
+
if (settings.domain == 'auto') {
|
1724
|
+
domainAttribute = domain ;
|
1725
|
+
} else {
|
1726
|
+
// domainAttribute = hostname;
|
1727
|
+
domainAttribute = '';
|
1728
|
+
}
|
1729
|
+
|
1715
1730
|
if (j1.findCookie(settings.name)) {
|
1716
1731
|
// clear cookie CONTENT and set expiry date in the PAST
|
1717
|
-
document.cookie = settings.name + '=;
|
1732
|
+
document.cookie = settings.name + '=; Domain=' + domainAttribute + '; Expires=Thu, 01 Jan 1970 00:00:00 UTC; Path=/;';
|
1718
1733
|
return true;
|
1719
1734
|
} else {
|
1720
1735
|
return false;
|
@@ -1744,20 +1759,24 @@ var j1 = (function () {
|
|
1744
1759
|
var baseUrl = url.origin;;
|
1745
1760
|
var hostname = url.hostname;
|
1746
1761
|
var domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
1747
|
-
var
|
1762
|
+
var domainAttribute;
|
1748
1763
|
|
1749
1764
|
var defaults = {
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1765
|
+
path: '{{cookie_options.path}}',
|
1766
|
+
expires: '{{cookie_options.expires}}',
|
1767
|
+
domain: '{{cookie_options.domain}}',
|
1768
|
+
samesite: '{{cookie_options.same_site}}',
|
1769
|
+
http_only: '{{cookie_options.http_only}}',
|
1770
|
+
secure: '{{cookie_options.secure}}'
|
1753
1771
|
};
|
1754
|
-
|
1755
1772
|
var settings = $.extend(defaults, options);
|
1756
1773
|
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1774
|
+
// set domain used by cookies
|
1775
|
+
if (settings.domain == 'auto') {
|
1776
|
+
domainAttribute = domain ;
|
1777
|
+
} else {
|
1778
|
+
// domainAttribute = hostname;
|
1779
|
+
domainAttribute = '';
|
1761
1780
|
}
|
1762
1781
|
|
1763
1782
|
var dc = document.cookie; // all cookies in page
|
@@ -1787,10 +1806,10 @@ var j1 = (function () {
|
|
1787
1806
|
|
1788
1807
|
// expire cookie to session
|
1789
1808
|
content = decodeURI(dc.substring(begin + prefix.length, end) ).replace(/"/g, '');
|
1790
|
-
if (settings.secure) {
|
1791
|
-
document.cookie = settings.name + '=' + content +';
|
1809
|
+
if (settings.secure == 'true') {
|
1810
|
+
document.cookie = settings.name + '=' + content +'; Path=' + settings.path + '; ' + 'SameSite=' + settings.samesite + '; ' + 'Domain=' + domainAttribute + '; Secure' + '; ';
|
1792
1811
|
} else {
|
1793
|
-
document.cookie = settings.name + '=' + content +';
|
1812
|
+
document.cookie = settings.name + '=' + content +'; Path=' + settings.path + '; ' + 'SameSite=' + settings.samesite + '; ' + 'Domain=' + domainAttribute + '; ';
|
1794
1813
|
}
|
1795
1814
|
|
1796
1815
|
return true;
|
@@ -98,8 +98,7 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
98
98
|
var baseUrl;
|
99
99
|
var hostname;
|
100
100
|
var domain;
|
101
|
-
var
|
102
|
-
var domain_enabled;
|
101
|
+
var cookie_option_domain;
|
103
102
|
var secure;
|
104
103
|
var logText;
|
105
104
|
var cookie_written;
|
@@ -109,6 +108,7 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
109
108
|
var head;
|
110
109
|
var script;
|
111
110
|
var languageList;
|
111
|
+
var domainAttribute;
|
112
112
|
|
113
113
|
// ---------------------------------------------------------------------------
|
114
114
|
// helper functions
|
@@ -118,55 +118,56 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
118
118
|
// setCookie()
|
119
119
|
// writes a FLAT cookie (not using an encoded JSON string)
|
120
120
|
// ---------------------------------------------------------------------------
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
121
|
+
// function setCookie(options /*cName, cValue, expDays*/) {
|
122
|
+
// var date = new Date();
|
123
|
+
// var timestamp_now = date.toISOString()
|
124
|
+
// var url = new liteURL(window.location.href);
|
125
|
+
// var baseUrl = url.origin;;
|
126
|
+
// var hostname = url.hostname;
|
127
|
+
// var domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
128
|
+
// var domain_enabled = '{{cookie_options.domain}}';
|
129
|
+
// var defaults = {};
|
130
|
+
// var settings;
|
131
|
+
// var document_cookie;
|
132
|
+
// var stringifiedAttributes = '';
|
133
|
+
//
|
134
|
+
// defaults = {
|
135
|
+
// name: '',
|
136
|
+
// path: '/',
|
137
|
+
// expires: 0,
|
138
|
+
// domain: true,
|
139
|
+
// samesite: 'Lax',
|
140
|
+
// http_only: false,
|
141
|
+
// secure: false
|
142
|
+
// };
|
143
|
+
// settings = $.extend(defaults, options);
|
144
|
+
//
|
145
|
+
// stringifiedAttributes += '; ' + 'path=' + settings.path;
|
146
|
+
//
|
147
|
+
// if (settings.expires > 0) {
|
148
|
+
// date.setTime(date.getTime() + (settings.expires * 24 * 60 * 60 * 1000));
|
149
|
+
// stringifiedAttributes += '; ' + 'expires=' + date.toUTCString();
|
150
|
+
// }
|
151
|
+
//
|
152
|
+
// if (domain != hostname) {
|
153
|
+
// // settings.domain = domain_enabled ? '.' + domain : hostname;
|
154
|
+
// settings.domain = domain_enabled ? domain : hostname;
|
155
|
+
// } else {
|
156
|
+
// settings.domain = hostname;
|
157
|
+
// }
|
158
|
+
// stringifiedAttributes += '; ' + 'domain=' + settings.domain;
|
159
|
+
//
|
160
|
+
// stringifiedAttributes += '; ' + 'SameSite=' + settings.samesite;
|
161
|
+
//
|
162
|
+
// if (settings.secure) {
|
163
|
+
// stringifiedAttributes += '; ' + 'secure=' + settings.secure;
|
164
|
+
// }
|
165
|
+
//
|
166
|
+
// // document_cookie = settings.name + '=' + settings.data + '; path=' + settings.path + '; ' + 'domain=' + settings.domain + '; ' + 'SameSite=' + settings.samesite + ';';
|
167
|
+
// document_cookie = settings.name + '=' + settings.data + stringifiedAttributes;
|
168
|
+
//
|
169
|
+
// document.cookie = document_cookie;
|
170
|
+
// };
|
170
171
|
|
171
172
|
// ---------------------------------------------------------------------------
|
172
173
|
// Main object
|
@@ -187,7 +188,6 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
187
188
|
baseUrl = url.origin;
|
188
189
|
hostname = url.hostname;
|
189
190
|
domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
190
|
-
domain_enabled = '{{cookie_options.domain}}';
|
191
191
|
secure = (url.protocol.includes('https')) ? true : false;
|
192
192
|
navigator_language = navigator.language || navigator.userLanguage; // userLanguage for MS IE compatibility
|
193
193
|
translation_language = navigator_language.split('-')[0];
|
@@ -233,15 +233,17 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
233
233
|
// initializer
|
234
234
|
// -----------------------------------------------------------------------
|
235
235
|
var dependencies_met_page_ready = setInterval (function (options) {
|
236
|
-
var expires
|
237
|
-
var same_site
|
238
|
-
|
236
|
+
var expires = '{{cookie_options.expires}}';
|
237
|
+
var same_site = '{{cookie_options.same_site}}';
|
238
|
+
var option_domain = '{{cookie_options.domain}}';
|
239
|
+
|
240
|
+
user_consent = j1.readCookie(cookie_names.user_consent);
|
239
241
|
|
240
242
|
// set domain used by cookies
|
241
|
-
if (
|
242
|
-
|
243
|
-
} else
|
244
|
-
|
243
|
+
if (option_domain == 'auto') {
|
244
|
+
domainAttribute = domain ;
|
245
|
+
} else {
|
246
|
+
domainAttribute = '';
|
245
247
|
}
|
246
248
|
|
247
249
|
// load|initialize user translate cookie
|
@@ -252,9 +254,9 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
252
254
|
cookie_written = j1.writeCookie({
|
253
255
|
name: cookie_names.user_translate,
|
254
256
|
data: user_translate,
|
255
|
-
samesite:
|
257
|
+
samesite: same_site,
|
256
258
|
secure: secure,
|
257
|
-
expires:
|
259
|
+
expires: expires
|
258
260
|
});
|
259
261
|
}
|
260
262
|
|
@@ -285,7 +287,7 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
285
287
|
}
|
286
288
|
|
287
289
|
// load|set user translate cookie
|
288
|
-
|
290
|
+
user_consent = j1.readCookie(cookie_names.user_consent);
|
289
291
|
if (!user_consent.analysis || !user_consent.personalization) {
|
290
292
|
// disable translation service
|
291
293
|
user_translate.translationEnabled = false;
|
@@ -316,7 +318,7 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
316
318
|
cookieName: cookie_names.user_translate, // name of the translator cookie
|
317
319
|
cookieStorageDays: expires, // lifetime of a cookie [0..365], 0: session cookie
|
318
320
|
cookieSameSite: same_site, // restrict consent cookie
|
319
|
-
cookieDomain:
|
321
|
+
cookieDomain: domainAttribute, // set domain (hostname|domain)
|
320
322
|
cookieSecure: secure, // set
|
321
323
|
cookieConsentName: moduleOptions.cookieConsentName, // the name of the Cookie Consent Cookie (secondary data)
|
322
324
|
disableLanguageSelector: moduleOptions.disableLanguageSelector, // disable language dropdown for translation in dialog (modal)
|
@@ -341,7 +343,7 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
341
343
|
} else {
|
342
344
|
if (moduleOptions.translatorName === 'google') {
|
343
345
|
// remove all googtrans cookies that POTENTIALLY exists
|
344
|
-
Cookies.remove('googtrans', { domain:
|
346
|
+
Cookies.remove('googtrans', { domain: domainAttribute });
|
345
347
|
Cookies.remove('googtrans', { domain: hostname });
|
346
348
|
Cookies.remove('googtrans');
|
347
349
|
}
|
@@ -420,30 +422,30 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
420
422
|
// the selection for a translation|language
|
421
423
|
// -------------------------------------------------------------------------
|
422
424
|
cbGoogle: function () {
|
423
|
-
var logger
|
424
|
-
var
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
var selectedTranslationLanguage;
|
425
|
+
var logger = log4javascript.getLogger('j1.adapter.translator.cbGoogle');
|
426
|
+
var msDropdown = document.getElementById('dropdownJSON').msDropdown;
|
427
|
+
// var cookie_names = j1.getCookieNames();
|
428
|
+
// var user_consent = j1.readCookie(cookie_names.user_consent);
|
429
|
+
// var user_translate = j1.readCookie(cookie_names.user_translate);
|
430
|
+
// var url = new liteURL(window.location.href);
|
431
|
+
// var baseUrl = url.origin;;
|
432
|
+
// var hostname = url.hostname;
|
433
|
+
// var domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
434
|
+
// var cookie_option_domain = '{{cookie_options.domain}}';
|
435
|
+
// var same_site = '{{cookie_options.same_site}}';
|
436
436
|
var srcLang;
|
437
437
|
var destLang;
|
438
438
|
var transCode;
|
439
|
-
|
439
|
+
var domainAttribute;
|
440
|
+
var selectedTranslationLanguage;
|
440
441
|
|
441
442
|
// set domain used by cookies
|
442
|
-
if (
|
443
|
-
|
444
|
-
} else
|
445
|
-
|
446
|
-
|
443
|
+
// if (cookie_option_domain == 'auto') {
|
444
|
+
// domainAttribute = domain ;
|
445
|
+
// } else {
|
446
|
+
// // domainAttribute = hostname;
|
447
|
+
// domainAttribute = '';
|
448
|
+
// }
|
447
449
|
|
448
450
|
selectedTranslationLanguage = msDropdown.value;
|
449
451
|
logger.info('\n' + 'selected translation language: ' + selectedTranslationLanguage);
|
@@ -457,7 +459,7 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
457
459
|
|
458
460
|
// translation language MUST be DIFFERENT from content language
|
459
461
|
if (srcLang == selectedTranslationLanguage ) {
|
460
|
-
Cookies.remove('googtrans', { domain:
|
462
|
+
Cookies.remove('googtrans', { domain: domainAttribute });
|
461
463
|
Cookies.remove('googtrans', { domain: hostname });
|
462
464
|
Cookies.remove('googtrans');
|
463
465
|
location.reload(true);
|
@@ -468,21 +470,17 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
468
470
|
transCode = '/' + srcLang + '/' + selectedTranslationLanguage;
|
469
471
|
|
470
472
|
// remove all googtrans cookies that POTENTIALLY exists
|
471
|
-
Cookies.remove('googtrans', { domain:
|
473
|
+
Cookies.remove('googtrans', { domain: domainAttribute });
|
472
474
|
Cookies.remove('googtrans', { domain: hostname });
|
473
475
|
Cookies.remove('googtrans');
|
474
476
|
|
475
477
|
// -----------------------------------------------------------------------
|
476
478
|
// NOTE: googtrans cookie will be rewritten (by Google!?) for
|
477
|
-
// attributes 'SameSite' and
|
478
|
-
//
|
479
|
+
// attributes 'SameSite' and 'Domain'. This results for 'SameSite'
|
480
|
+
// in an empty field and two cookies (host+domain) if domain option
|
481
|
+
// is enabled!!!
|
479
482
|
// -----------------------------------------------------------------------
|
480
|
-
|
481
|
-
// write the googtrans cookie (w/o DOMAIN?!)
|
482
|
-
Cookies.set('googtrans', transCode, {
|
483
|
-
Domain: cookie_domain,
|
484
|
-
sameSite: 'Lax'
|
485
|
-
});
|
483
|
+
Cookies.set('googtrans', transCode);
|
486
484
|
|
487
485
|
// reload current page (skip cache)
|
488
486
|
location.reload(true);
|
@@ -514,7 +514,7 @@ function Translator(props) {
|
|
514
514
|
// ---------------------------------------------------------------------------
|
515
515
|
function agreeAll() {
|
516
516
|
var consentSettings = JSON.parse(Cookie.get(self.props.cookieConsentName));
|
517
|
-
var translationSettings =
|
517
|
+
var translationSettings = JSON.parse(Cookie.get(self.props.cookieName));
|
518
518
|
|
519
519
|
// enable all settings required for translation
|
520
520
|
translationSettings.analysis = true;
|
@@ -12,4 +12,4 @@
|
|
12
12
|
# See: https://github.com/jekyll-one/J1 Template/blob/master/LICENSE
|
13
13
|
# -----------------------------------------------------------------------------
|
14
14
|
*/
|
15
|
-
"use strict";function Translator(d){var q=this;var w=log4javascript.getLogger("j1.core.translator");var m=new liteURL(window.location.href);var c=(m.protocol.includes("https"))?true:false;var r=false;var h;var u;var g={set:function(x,D,F,A,E,B){var C=window.btoa(D);var y="; expires=Thu, 01 Jan 1970 00:00:00 UTC";if(F>0){var z=new Date();z.setTime(z.getTime()+(F*24*60*60*1000));y="; expires="+z.toUTCString()}if(B){document.cookie=x+"="+(C||"")+y+"; Path=/; SameSite="+A+"; Domain="+E+"; Secure="+B+";"}else{document.cookie=x+"="+(C||"")+y+"; Path=/; SameSite="+A+";Domain="+E+"; "}},get:function(y){var B=y+"=";var x=document.cookie.split(";");for(var z=0;z<x.length;z++){var D=x[z];while(D.charAt(0)===" "){D=D.substring(1,D.length)}if(D.indexOf(B)===0){var C=D.substring(B.length,D.length);var A=window.atob(C);return A}}return undefined}};w.info("\ninitializing core module: started");w.info("\nstate: started");this.props={contentURL:"/assets/data/translator",cookieName:"j1.user.state",cookieConsentName:"j1.user.consent",cookieStorageDays:365,cookieSameSite:"Lax",cookieSecure:c,translationEnabled:false,disableLanguageSelector:false,translatorName:"google",translationLanguages:"all",translationLanguage:"auto",translateAllPages:true,hideSuggestionBox:true,hidePoweredBy:true,hideTopFrame:true,dialogLanguage:"content",dialogLanguages:["en","de"],dialogContainerID:"translator-modal",xhrDataElement:"",postSelectionCallback:"",};for(var f in d){this.props[f]=d[f]}if(this.props.dialogLanguage.indexOf("-")!==-1){this.props.dialogLanguage=this.props.dialogLanguage.split("-")[0]}if(!this.props.dialogLanguages.includes(this.props.dialogLanguage)){this.props.dialogLanguage=this.props.dialogLanguages[0]}this.props.xhrDataElement=this.props.xhrDataElement+"-"+this.props.dialogLanguage;w.info("\ninitializing core module: started");w.info("\nstate: started");var s={translatorName:"google",translationEnabled:false,translateAllPages:true,useLanguageFromBrowser:true,translationLanguage:"de",analysis:true,personalization:true};var e=g.get(q.props.cookieName);if(!e){w.info("\ninitializing translator cookie: "+q.props.cookieName);g.set(q.props.cookieName,JSON.stringify(s),q.props.cookieStorageDays,q.props.cookieSameSite,q.props.cookieDomain,q.props.cookieSecure)}var o={documentReady:function(x){if(document.readyState!=="loading"){x()}else{document.addEventListener("DOMContentLoaded",x)}}};function v(){var x={};var y=false;var z=0;var A=arguments.length;if(Object.prototype.toString.call(arguments[0])==="[object Boolean]"){y=arguments[0];z++}var C=function(D){for(var E in D){if(Object.prototype.hasOwnProperty.call(D,E)){if(y&&Object.prototype.toString.call(D[E])==="[object Object]"){x[E]=v(true,x[E],D[E])}else{x[E]=D[E]}}}};for(;z<A;z++){var B=arguments[z];C(B)}return x}function i(C,z){var x=Array.prototype.slice.call(arguments,2);var B=C.split(".");var A=B.pop();for(var y=0;y<B.length;y++){z=z[B[y]]}return z[A].apply(z,x)}function k(y){var x;var z=v({size:0,width:250,multiple:false,selectedIndex:1,enableAutoFilter:false,visibleRows:null,},y);x="#"+z.selector;$.ajax({url:z.url,dataType:"json",success:function(C){var B=[];if(q.props.translationLanguages.includes("all")){B=C[z.elm]}else{for(var A=0;A<C[z.elm].length;A++){if(q.props.translationLanguages.includes(C[z.elm][A].value)){B.push(C[z.elm][A])}}}if(z.visibleRows>B.length){z.visibleRows=B.length}MsDropdown.make(x,{byJson:{data:B,name:z.name,size:z.size,width:z.width,multiple:z.multiple,},enableAutoFilter:z.enableAutoFilter,visibleRows:z.visibleRows,})},error:function(A,C,B){w.error("\nfailed to retrieve JSON data from: "+z.url)}})}function n(){o.documentReady(function(){q.modal=document.getElementById(q.props.dialogContainerID);if(!q.modal){w.info("\nload consent modal");q.modal=document.createElement("div");q.modal.id=q.props.dialogContainerID;q.modal.style.display="none";q.modal.setAttribute("class","modal fade");q.modal.setAttribute("tabindex","-1");q.modal.setAttribute("role","dialog");q.modal.setAttribute("aria-labelledby",q.props.dialogContainerID);document.body.append(q.modal);q.$modal=$(q.modal);q.$modal.on("show.bs.modal",function(){var y;var z;w.info("\nshow.bs.modal: entered");$.when(k({url:"/assets/data/iso-639-language-codes-flags.json",elm:"iso-639-languages",selector:"dropdownJSON",width:400,visibleRows:8,})).then(function(A){w.info("\ncreating msDropdown from JSON data: finished")})});q.$modal.on("shown.bs.modal",function(){var y;var z;z=setInterval(function(){if(typeof document.getElementById("dropdownJSON").msDropdown!=="undefined"){y=document.getElementById("dropdownJSON").msDropdown;if(!y.length){w.error("\nno msDropdown found in translation dialog");q.$modal.hide()}else{if(q.props.translationLanguage==="auto"){h=navigator.language||navigator.userLanguage;u=h.split("-")[0]}else{u=q.props.translationLanguage}y.selectedIndex=$("#dropdownJSON option[value="+u+"]").index();if(q.props.disableLanguageSelector){y.disabled=true}$("#dropdownJSON").show();$("body").addClass("stop-scrolling");w.info("\nmsDropdown successfully loaded in translation dialog");clearInterval(z)}}},25)});q.$modal.on("hidden.bs.modal",function(){$("body").removeClass("stop-scrolling");i(q.props.postSelectionCallback,window)});var x=q.props.contentURL+"/index.html";$.get(x).done(function(y){w.info("\nloading consent modal: successfully");q.modal.innerHTML=y;q.modal.innerHTML=$("#"+q.props.xhrDataElement).eq(0).html();q.modal.style.display="block";$(q.modal).modal({backdrop:"static",keyboard:false});q.$buttonDoNotAgree=$("#translator-buttonDoNotAgree");q.$buttonAgree=$("#translator-buttonAgree");q.$buttonSave=$("#translator-buttonSave");q.$buttonAgreeAll=$("#translator-buttonAgreeAll");w.info("\nload/initialze options from cookie");l();j();$("#google-options").on("hide.bs.collapse",function(){r=false;l()}).on("show.bs.collapse",function(){r=true;l()});w.info("\ninitialze button event handler");q.$buttonDoNotAgree.click(function(){b()});q.$buttonAgree.click(function(){p()});q.$buttonSave.click(function(){$("#google-options").collapse("hide");t();j()});q.$buttonAgreeAll.click(function(){$("#google-options").collapse("hide");p()});q.$modal.modal("show")}).fail(function(){w.error("\nloading translator dialog (modal): failed");w.warn("\nprobably no|wrong `contentURL` set")})}else{q.$modal.modal("show")}}.bind(this))}function j(){var z=q.getSettings();if(z){for(var y in z){var x=q.$modal.find("#google-options .translator-option[data-name="+y+'] input[type="checkbox"]');x.prop("checked",z[y])}}}function l(){if(r){q.$buttonDoNotAgree.hide();q.$buttonAgree.hide();q.$buttonSave.show();q.$buttonAgreeAll.show()}else{q.$buttonDoNotAgree.show();q.$buttonAgree.show();q.$buttonSave.hide();q.$buttonAgreeAll.hide()}}function a(y){var x=q.$modal.find("#google-options .translator-option");var A={};for(var B=0;B<x.length;B++){var D=x[B];var z=D.getAttribute("data-name");if(z==="necessary"){A[z]=true}else{if(y===undefined){var C=$(D).find('input[type="checkbox"]');A[z]=C.prop("checked")}else{A[z]=!!y}}}return A}function p(){var x=JSON.parse(g.get(q.props.cookieConsentName));var y=
|
15
|
+
"use strict";function Translator(d){var q=this;var w=log4javascript.getLogger("j1.core.translator");var m=new liteURL(window.location.href);var c=(m.protocol.includes("https"))?true:false;var r=false;var h;var u;var g={set:function(x,D,F,A,E,B){var C=window.btoa(D);var y="; expires=Thu, 01 Jan 1970 00:00:00 UTC";if(F>0){var z=new Date();z.setTime(z.getTime()+(F*24*60*60*1000));y="; expires="+z.toUTCString()}if(B){document.cookie=x+"="+(C||"")+y+"; Path=/; SameSite="+A+"; Domain="+E+"; Secure="+B+";"}else{document.cookie=x+"="+(C||"")+y+"; Path=/; SameSite="+A+";Domain="+E+"; "}},get:function(y){var B=y+"=";var x=document.cookie.split(";");for(var z=0;z<x.length;z++){var D=x[z];while(D.charAt(0)===" "){D=D.substring(1,D.length)}if(D.indexOf(B)===0){var C=D.substring(B.length,D.length);var A=window.atob(C);return A}}return undefined}};w.info("\ninitializing core module: started");w.info("\nstate: started");this.props={contentURL:"/assets/data/translator",cookieName:"j1.user.state",cookieConsentName:"j1.user.consent",cookieStorageDays:365,cookieSameSite:"Lax",cookieSecure:c,translationEnabled:false,disableLanguageSelector:false,translatorName:"google",translationLanguages:"all",translationLanguage:"auto",translateAllPages:true,hideSuggestionBox:true,hidePoweredBy:true,hideTopFrame:true,dialogLanguage:"content",dialogLanguages:["en","de"],dialogContainerID:"translator-modal",xhrDataElement:"",postSelectionCallback:"",};for(var f in d){this.props[f]=d[f]}if(this.props.dialogLanguage.indexOf("-")!==-1){this.props.dialogLanguage=this.props.dialogLanguage.split("-")[0]}if(!this.props.dialogLanguages.includes(this.props.dialogLanguage)){this.props.dialogLanguage=this.props.dialogLanguages[0]}this.props.xhrDataElement=this.props.xhrDataElement+"-"+this.props.dialogLanguage;w.info("\ninitializing core module: started");w.info("\nstate: started");var s={translatorName:"google",translationEnabled:false,translateAllPages:true,useLanguageFromBrowser:true,translationLanguage:"de",analysis:true,personalization:true};var e=g.get(q.props.cookieName);if(!e){w.info("\ninitializing translator cookie: "+q.props.cookieName);g.set(q.props.cookieName,JSON.stringify(s),q.props.cookieStorageDays,q.props.cookieSameSite,q.props.cookieDomain,q.props.cookieSecure)}var o={documentReady:function(x){if(document.readyState!=="loading"){x()}else{document.addEventListener("DOMContentLoaded",x)}}};function v(){var x={};var y=false;var z=0;var A=arguments.length;if(Object.prototype.toString.call(arguments[0])==="[object Boolean]"){y=arguments[0];z++}var C=function(D){for(var E in D){if(Object.prototype.hasOwnProperty.call(D,E)){if(y&&Object.prototype.toString.call(D[E])==="[object Object]"){x[E]=v(true,x[E],D[E])}else{x[E]=D[E]}}}};for(;z<A;z++){var B=arguments[z];C(B)}return x}function i(C,z){var x=Array.prototype.slice.call(arguments,2);var B=C.split(".");var A=B.pop();for(var y=0;y<B.length;y++){z=z[B[y]]}return z[A].apply(z,x)}function k(y){var x;var z=v({size:0,width:250,multiple:false,selectedIndex:1,enableAutoFilter:false,visibleRows:null,},y);x="#"+z.selector;$.ajax({url:z.url,dataType:"json",success:function(C){var B=[];if(q.props.translationLanguages.includes("all")){B=C[z.elm]}else{for(var A=0;A<C[z.elm].length;A++){if(q.props.translationLanguages.includes(C[z.elm][A].value)){B.push(C[z.elm][A])}}}if(z.visibleRows>B.length){z.visibleRows=B.length}MsDropdown.make(x,{byJson:{data:B,name:z.name,size:z.size,width:z.width,multiple:z.multiple,},enableAutoFilter:z.enableAutoFilter,visibleRows:z.visibleRows,})},error:function(A,C,B){w.error("\nfailed to retrieve JSON data from: "+z.url)}})}function n(){o.documentReady(function(){q.modal=document.getElementById(q.props.dialogContainerID);if(!q.modal){w.info("\nload consent modal");q.modal=document.createElement("div");q.modal.id=q.props.dialogContainerID;q.modal.style.display="none";q.modal.setAttribute("class","modal fade");q.modal.setAttribute("tabindex","-1");q.modal.setAttribute("role","dialog");q.modal.setAttribute("aria-labelledby",q.props.dialogContainerID);document.body.append(q.modal);q.$modal=$(q.modal);q.$modal.on("show.bs.modal",function(){var y;var z;w.info("\nshow.bs.modal: entered");$.when(k({url:"/assets/data/iso-639-language-codes-flags.json",elm:"iso-639-languages",selector:"dropdownJSON",width:400,visibleRows:8,})).then(function(A){w.info("\ncreating msDropdown from JSON data: finished")})});q.$modal.on("shown.bs.modal",function(){var y;var z;z=setInterval(function(){if(typeof document.getElementById("dropdownJSON").msDropdown!=="undefined"){y=document.getElementById("dropdownJSON").msDropdown;if(!y.length){w.error("\nno msDropdown found in translation dialog");q.$modal.hide()}else{if(q.props.translationLanguage==="auto"){h=navigator.language||navigator.userLanguage;u=h.split("-")[0]}else{u=q.props.translationLanguage}y.selectedIndex=$("#dropdownJSON option[value="+u+"]").index();if(q.props.disableLanguageSelector){y.disabled=true}$("#dropdownJSON").show();$("body").addClass("stop-scrolling");w.info("\nmsDropdown successfully loaded in translation dialog");clearInterval(z)}}},25)});q.$modal.on("hidden.bs.modal",function(){$("body").removeClass("stop-scrolling");i(q.props.postSelectionCallback,window)});var x=q.props.contentURL+"/index.html";$.get(x).done(function(y){w.info("\nloading consent modal: successfully");q.modal.innerHTML=y;q.modal.innerHTML=$("#"+q.props.xhrDataElement).eq(0).html();q.modal.style.display="block";$(q.modal).modal({backdrop:"static",keyboard:false});q.$buttonDoNotAgree=$("#translator-buttonDoNotAgree");q.$buttonAgree=$("#translator-buttonAgree");q.$buttonSave=$("#translator-buttonSave");q.$buttonAgreeAll=$("#translator-buttonAgreeAll");w.info("\nload/initialze options from cookie");l();j();$("#google-options").on("hide.bs.collapse",function(){r=false;l()}).on("show.bs.collapse",function(){r=true;l()});w.info("\ninitialze button event handler");q.$buttonDoNotAgree.click(function(){b()});q.$buttonAgree.click(function(){p()});q.$buttonSave.click(function(){$("#google-options").collapse("hide");t();j()});q.$buttonAgreeAll.click(function(){$("#google-options").collapse("hide");p()});q.$modal.modal("show")}).fail(function(){w.error("\nloading translator dialog (modal): failed");w.warn("\nprobably no|wrong `contentURL` set")})}else{q.$modal.modal("show")}}.bind(this))}function j(){var z=q.getSettings();if(z){for(var y in z){var x=q.$modal.find("#google-options .translator-option[data-name="+y+'] input[type="checkbox"]');x.prop("checked",z[y])}}}function l(){if(r){q.$buttonDoNotAgree.hide();q.$buttonAgree.hide();q.$buttonSave.show();q.$buttonAgreeAll.show()}else{q.$buttonDoNotAgree.show();q.$buttonAgree.show();q.$buttonSave.hide();q.$buttonAgreeAll.hide()}}function a(y){var x=q.$modal.find("#google-options .translator-option");var A={};for(var B=0;B<x.length;B++){var D=x[B];var z=D.getAttribute("data-name");if(z==="necessary"){A[z]=true}else{if(y===undefined){var C=$(D).find('input[type="checkbox"]');A[z]=C.prop("checked")}else{A[z]=!!y}}}return A}function p(){var x=JSON.parse(g.get(q.props.cookieConsentName));var y=JSON.parse(g.get(q.props.cookieName));y.analysis=true;y.personalization=true;y.translationEnabled=true;x.analysis=y.analysis;x.personalization=y.personalization;g.set(q.props.cookieConsentName,JSON.stringify(x),q.props.cookieStorageDays,q.props.cookieSameSite,q.props.cookieDomain,q.props.cookieSecure);g.set(q.props.cookieName,JSON.stringify(y),q.props.cookieStorageDays,q.props.cookieSameSite,q.props.cookieDomain,q.props.cookieSecure);q.$modal.modal("hide")}function b(){var x=a();x.translationEnabled=false;g.set(q.props.cookieName,JSON.stringify(x),q.props.cookieStorageDays,q.props.cookieSameSite,q.props.cookieDomain,q.props.cookieSecure);q.$modal.modal("hide")}function t(){var y=a();var x=JSON.parse(g.get(q.props.cookieConsentName));x.analysis=y.analysis;x.personalization=y.personalization;g.set(q.props.cookieConsentName,JSON.stringify(x),q.props.cookieStorageDays,q.props.cookieSameSite,q.props.cookieDomain,q.props.cookieSecure);g.set(q.props.cookieName,JSON.stringify(y),q.props.cookieStorageDays,q.props.cookieSameSite,q.props.cookieDomain,q.props.cookieSecure);q.$modal.modal("hide")}this.showDialog=function(){n()};this.getSettings=function(y){var x=g.get(q.props.cookieName);if(x){var z=JSON.parse(g.get(q.props.cookieName));if(y===undefined){return z}else{if(z){return z[y]}else{return false}}}else{return undefined}};w.info("\ninitializing core module finished");w.info("\nstate: finished")};
|
data/lib/j1/version.rb
CHANGED
data/lib/starter_web/Gemfile
CHANGED
@@ -53,7 +53,7 @@ gem 'jekyll', '~> 4.2'
|
|
53
53
|
|
54
54
|
# Theme Rubies, default: J1 Template (NOT used for the development system)
|
55
55
|
#
|
56
|
-
gem 'j1-template', '~> 2022.0.
|
56
|
+
gem 'j1-template', '~> 2022.0.9'
|
57
57
|
|
58
58
|
# ------------------------------------------------------------------------------
|
59
59
|
# PRODUCTION: Gem needed for the Jekyll and J1 prod environment
|
data/lib/starter_web/_config.yml
CHANGED
@@ -53,7 +53,7 @@ environment: development
|
|
53
53
|
# ------------------------------------------------------------------------------
|
54
54
|
# Sets the build version of J1 Template Gem
|
55
55
|
#
|
56
|
-
version: 2022.0.
|
56
|
+
version: 2022.0.9
|
57
57
|
|
58
58
|
# version
|
59
59
|
# ------------------------------------------------------------------------------
|
@@ -43,18 +43,19 @@ defaults:
|
|
43
43
|
# domain
|
44
44
|
# --------------------------------------------------------------------------
|
45
45
|
# Switch 'domain' controls if the value for the attribute 'domain' is
|
46
|
-
# (
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# used (= auto|domain) or NOT used (false). If 'auto' is given, the domain
|
47
|
+
# is calculated from the hostname. Otherwise domain is treates as domain
|
48
|
+
# to be used.
|
49
|
+
# If the switch 'domain' is to 'false', the attribute 'domain' is
|
50
|
+
# automatically set to the (fully qualified) hostname and all subdomains
|
51
|
+
# are EXCLUDED from accessing the cookies.
|
52
52
|
#
|
53
|
-
# NOTE: Be carefull setting switch 'domain' to
|
54
|
-
# to hosts of
|
55
|
-
#
|
53
|
+
# NOTE: Be carefull setting switch 'domain' to auto. For sites deployed
|
54
|
+
# to hosts of public domain providers like Netlify (netlify.app),
|
55
|
+
# this will open the access on cookies to ALL hosts (subdomains)!
|
56
|
+
# See 'same_site'.
|
56
57
|
#
|
57
|
-
# values: [false|
|
58
|
+
# values: [false|auto|domain]
|
58
59
|
# default: false
|
59
60
|
#
|
60
61
|
# expires
|
@@ -81,7 +82,7 @@ defaults:
|
|
81
82
|
#
|
82
83
|
# values: [false|true]
|
83
84
|
# default: false
|
84
|
-
|
85
|
+
#
|
85
86
|
# secure
|
86
87
|
# --------------------------------------------------------------------------
|
87
88
|
# Cookies are only sent to the server with an encrypted request over
|
@@ -90,11 +91,19 @@ defaults:
|
|
90
91
|
# values: [false|true]
|
91
92
|
# default: false
|
92
93
|
#
|
94
|
+
# check_cookies
|
95
|
+
# --------------------------------------------------------------------------
|
96
|
+
# Check if cookies created/available
|
97
|
+
#
|
98
|
+
# values: [false|true]
|
99
|
+
# default: true
|
100
|
+
#
|
93
101
|
# ----------------------------------------------------------------------------
|
94
102
|
#
|
103
|
+
check_cookies: false
|
95
104
|
path: /
|
96
|
-
domain:
|
97
|
-
expires:
|
105
|
+
domain: false
|
106
|
+
expires: 365
|
98
107
|
same_site: Strict
|
99
108
|
http_only: false
|
100
109
|
secure: false
|
@@ -437,7 +437,7 @@ end::tables[]
|
|
437
437
|
// -----------------------------------------------------------------------------
|
438
438
|
tag::products[]
|
439
439
|
:j1--license: MIT License
|
440
|
-
:j1--version: 2022.0.
|
440
|
+
:j1--version: 2022.0.9
|
441
441
|
:j1--site-name: Jekyll One
|
442
442
|
end::products[]
|
443
443
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: j1-template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2022.0.
|
4
|
+
version: 2022.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- juergen_jekyll_one
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|