j1-template 2023.0.16 → 2023.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/data/banner.html +2 -2
- data/assets/error_pages/HTTP204.html +9 -5
- data/assets/error_pages/HTTP400.html +18 -2
- data/assets/error_pages/HTTP401.html +18 -2
- data/assets/error_pages/HTTP403.html +18 -2
- data/assets/error_pages/HTTP404.html +10 -2
- data/assets/error_pages/HTTP444.html +18 -2
- data/assets/error_pages/HTTP445.html +18 -2
- data/assets/error_pages/HTTP446.html +18 -2
- data/assets/error_pages/HTTP447.html +18 -2
- data/assets/error_pages/HTTP448.html +18 -2
- data/assets/error_pages/HTTP500.html +18 -2
- data/assets/error_pages/HTTP501.html +18 -2
- data/assets/error_pages/HTTP502.html +18 -2
- data/assets/error_pages/HTTP503.html +18 -2
- data/assets/themes/j1/adapter/js/cookieConsent.js +41 -25
- data/assets/themes/j1/adapter/js/fab.js +3 -1
- data/assets/themes/j1/adapter/js/j1.js +39 -1
- data/assets/themes/j1/adapter/js/slick.js +221 -0
- data/assets/themes/j1/adapter/js/translator.js +45 -3
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +4 -4
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +10 -4
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js +1 -1
- data/assets/themes/j1/modules/slick/LICENSE +20 -0
- data/assets/themes/j1/modules/slick/README.md +292 -0
- data/assets/themes/j1/modules/slick/ajax-loader.gif +0 -0
- data/assets/themes/j1/modules/slick/css/slick.css +129 -0
- data/assets/themes/j1/modules/slick/css/slick.min.css +15 -0
- data/assets/themes/j1/modules/slick/fonts/slick.eot +0 -0
- data/assets/themes/j1/modules/slick/fonts/slick.svg +14 -0
- data/assets/themes/j1/modules/slick/fonts/slick.ttf +0 -0
- data/assets/themes/j1/modules/slick/fonts/slick.woff +0 -0
- data/assets/themes/j1/modules/slick/js/slick.js +2295 -0
- data/assets/themes/j1/modules/slick/js/slick.min.js +1 -0
- data/assets/themes/j1/modules/translator/css/translator.css +3 -3
- data/assets/themes/j1/modules/translator/css/translator.min.css +1 -1
- data/assets/themes/j1/modules/translator/js/translator.js +19 -7
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +2 -2
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +4 -2
- data/lib/starter_web/_data/modules/defaults/cookies.yml +1 -1
- data/lib/starter_web/_data/modules/navigator_menu.yml +3 -0
- data/lib/starter_web/_data/resources.yml +26 -0
- data/lib/starter_web/_data/templates/feed.xml +1 -1
- data/lib/starter_web/_plugins/index/lunr.rb +1 -1
- data/lib/starter_web/package.json +2 -2
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +0 -1
- data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +14 -2
@@ -87,9 +87,24 @@ sitemap: false
|
|
87
87
|
<meta name="robots" content="noindex, nofollow">
|
88
88
|
<link rel="icon" type="image/ico" href="{{favicon}}">
|
89
89
|
<title>{{title}} · {{page.http_error}}</title>
|
90
|
-
<style>
|
91
|
-
|
90
|
+
<style>
|
91
|
+
body, html {
|
92
|
+
width:100%;
|
93
|
+
height:100%;
|
94
|
+
background-color: #fff;
|
95
|
+
}
|
96
|
+
.attic {
|
97
|
+
background-image: -webkit-gradient(linear, left top, left bottom, from(#263238), to(#707070));
|
98
|
+
background-image: -webkit-linear-gradient(top, #263238 0%, #707070 100%);
|
99
|
+
background-image: -o-linear-gradient(top, #263238 0%, #707070 100%);
|
100
|
+
background-image: linear-gradient(to bottom, #263238 0%, #707070 100%);
|
101
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#263238", endColorstr="#707070", GradientType=0);
|
102
|
+
}
|
103
|
+
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
|
104
|
+
html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{cursor: pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{cursor: pointer ;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}body{color:#fff;text-align:center;text-shadow:0 2px 4px rgba(0,0,0,.5);padding:0;min-height:100%;-webkit-box-shadow:inset 0 0 100px rgba(0,0,0,.8);box-shadow:inset 0 0 100px rgba(0,0,0,.8);display:table;font-family:"Open Sans",Arial,sans-serif}h1{font-family:inherit;font-weight:500;line-height:1.1;color:inherit;font-size:36px}h1 small{font-size:68%;font-weight:400;line-height:1;color:#777}a{text-decoration:none;color:#fff;font-size:inherit;border-bottom:dotted 1px #707070}.lead{color:silver;font-size:21px;line-height:1.4}.cover{display:table-cell;vertical-align:middle;padding:0 20px}footer{position:fixed;width:100%;height:40px;left:0;bottom:0;color:#e0e0e0;font-size:14px}
|
105
|
+
</style>
|
92
106
|
</head>
|
107
|
+
|
93
108
|
<body>
|
94
109
|
<div style="margin-top: 1rem;">
|
95
110
|
<a href="/"><img src="{{brand_image}}" height="{{brand_image_height}}" alt="{{brand_text}}"></a>
|
@@ -103,6 +118,7 @@ sitemap: false
|
|
103
118
|
<p>{{copyright_info}} · {{contact_issue}}: <a href="mailto:{{webmaster_email}}?subject={{title}}">{{webmaster_email}}</a></p>
|
104
119
|
</footer>
|
105
120
|
</body>
|
121
|
+
|
106
122
|
</html>
|
107
123
|
|
108
124
|
{% endcapture %}
|
@@ -90,9 +90,24 @@ sitemap: false
|
|
90
90
|
<meta name="robots" content="noindex, nofollow">
|
91
91
|
<link rel="icon" type="image/ico" href="{{favicon}}">
|
92
92
|
<title>{{title}} · {{page.http_error}}</title>
|
93
|
-
<style>
|
94
|
-
|
93
|
+
<style>
|
94
|
+
body, html {
|
95
|
+
width:100%;
|
96
|
+
height:100%;
|
97
|
+
background-color: #fff;
|
98
|
+
}
|
99
|
+
.attic {
|
100
|
+
background-image: -webkit-gradient(linear, left top, left bottom, from(#263238), to(#707070));
|
101
|
+
background-image: -webkit-linear-gradient(top, #263238 0%, #707070 100%);
|
102
|
+
background-image: -o-linear-gradient(top, #263238 0%, #707070 100%);
|
103
|
+
background-image: linear-gradient(to bottom, #263238 0%, #707070 100%);
|
104
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#263238", endColorstr="#707070", GradientType=0);
|
105
|
+
}
|
106
|
+
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
|
107
|
+
html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{cursor: pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{cursor: pointer ;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}body{color:#fff;text-align:center;text-shadow:0 2px 4px rgba(0,0,0,.5);padding:0;min-height:100%;-webkit-box-shadow:inset 0 0 100px rgba(0,0,0,.8);box-shadow:inset 0 0 100px rgba(0,0,0,.8);display:table;font-family:"Open Sans",Arial,sans-serif}h1{font-family:inherit;font-weight:500;line-height:1.1;color:inherit;font-size:36px}h1 small{font-size:68%;font-weight:400;line-height:1;color:#777}a{text-decoration:none;color:#fff;font-size:inherit;border-bottom:dotted 1px #707070}.lead{color:silver;font-size:21px;line-height:1.4}.cover{display:table-cell;vertical-align:middle;padding:0 20px}footer{position:fixed;width:100%;height:40px;left:0;bottom:0;color:#e0e0e0;font-size:14px}
|
108
|
+
</style>
|
95
109
|
</head>
|
110
|
+
|
96
111
|
<body>
|
97
112
|
<div style="margin-top: 1rem;">
|
98
113
|
<a href="/"><img src="{{brand_image}}" height="{{brand_image_height}}" alt="{{brand_text}}"></a>
|
@@ -106,6 +121,7 @@ sitemap: false
|
|
106
121
|
<p>{{copyright_info}} · {{contact_issue}}: <a href="mailto:{{webmaster_email}}?subject={{title}}">{{webmaster_email}}</a></p>
|
107
122
|
</footer>
|
108
123
|
</body>
|
124
|
+
|
109
125
|
</html>
|
110
126
|
|
111
127
|
{% endcapture %}
|
@@ -89,10 +89,18 @@ j1.adapter.cookieConsent = (function (j1, window) {
|
|
89
89
|
var tracking_enabled = ('{{tracking_enabled}}' === 'true') ? true: false;
|
90
90
|
var tracking_id = '{{tracking_id}}';
|
91
91
|
var tracking_id_valid = (tracking_id.includes('tracking-id')) ? false : true;
|
92
|
-
var
|
92
|
+
var stringifiedAttributes = '';
|
93
|
+
|
94
|
+
var expireCookiesOnRequiredOnly;
|
95
|
+
|
96
|
+
var cookieDefaults;
|
97
|
+
var cookieSettings;
|
98
|
+
var cookieOptions;
|
99
|
+
|
93
100
|
var cookieConsentDefaults;
|
94
101
|
var cookieConsentSettings;
|
95
102
|
var cookieConsentOptions;
|
103
|
+
|
96
104
|
var _this;
|
97
105
|
var $modal;
|
98
106
|
var cookie_names;
|
@@ -102,7 +110,7 @@ j1.adapter.cookieConsent = (function (j1, window) {
|
|
102
110
|
var baseUrl;
|
103
111
|
var hostname;
|
104
112
|
var auto_domain;
|
105
|
-
var
|
113
|
+
var check_cookie_option_domain;
|
106
114
|
var cookie_domain;
|
107
115
|
var secure;
|
108
116
|
var logText;
|
@@ -146,15 +154,19 @@ j1.adapter.cookieConsent = (function (j1, window) {
|
|
146
154
|
baseUrl = url.origin;
|
147
155
|
hostname = url.hostname;
|
148
156
|
auto_domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
149
|
-
cookie_option_domain = ('{{cookie_options.domain}}' === 'true');
|
150
157
|
secure = (url.protocol.includes('https')) ? true : false;
|
151
158
|
contentLanguage = '{{site.language}}';
|
152
159
|
navigatorLanguage = navigator.language || navigator.userLanguage;
|
153
160
|
|
161
|
+
// Load cookie DEFAULTS|CONFIG
|
162
|
+
cookieDefaults = $.extend({}, {{cookie_defaults | replace: 'nil', 'null' | replace: '=>', ':' }});
|
163
|
+
cookieSettings = $.extend({}, {{cookie_settings | replace: 'nil', 'null' | replace: '=>', ':' }});
|
164
|
+
cookieOptions = $.extend(true, {}, cookieDefaults, cookieSettings);
|
165
|
+
|
154
166
|
// Load module DEFAULTS|CONFIG
|
155
|
-
cookieConsentDefaults
|
156
|
-
cookieConsentSettings
|
157
|
-
cookieConsentOptions
|
167
|
+
cookieConsentDefaults = $.extend({}, {{consent_defaults | replace: 'nil', 'null' | replace: '=>', ':' }});
|
168
|
+
cookieConsentSettings = $.extend({}, {{consent_settings | replace: 'nil', 'null' | replace: '=>', ':' }});
|
169
|
+
cookieConsentOptions = $.extend(true, {}, cookieConsentDefaults, cookieConsentSettings);
|
158
170
|
|
159
171
|
// initialize state flag
|
160
172
|
_this.state = 'pending';
|
@@ -176,15 +188,18 @@ j1.adapter.cookieConsent = (function (j1, window) {
|
|
176
188
|
cookieConsentOptions.dialogLanguage = contentLanguage;
|
177
189
|
}
|
178
190
|
|
191
|
+
check_cookie_option_domain = (cookieOptions.domain === 'false') ? false : true;
|
192
|
+
expireCookiesOnRequiredOnly = (cookieOptions.expireCookiesOnRequiredOnly === 'true') ? true: false;
|
193
|
+
|
179
194
|
// -----------------------------------------------------------------------
|
180
195
|
// initializer
|
181
196
|
// -----------------------------------------------------------------------
|
182
197
|
var dependencies_met_page_ready = setInterval (function (options) {
|
183
|
-
var same_site =
|
198
|
+
var same_site = cookieOptions.same_site;
|
184
199
|
var expires;
|
185
200
|
|
186
201
|
if (cookieConsentOptions.enabled) {
|
187
|
-
expires =
|
202
|
+
expires = cookieOptions.expires;
|
188
203
|
} else {
|
189
204
|
// expire permanent cookies to session
|
190
205
|
j1.expireCookie({ name: cookie_names.user_state });
|
@@ -202,14 +217,16 @@ j1.adapter.cookieConsent = (function (j1, window) {
|
|
202
217
|
}
|
203
218
|
|
204
219
|
// set domain used by cookies
|
205
|
-
if (
|
206
|
-
if (
|
220
|
+
if (check_cookie_option_domain) {
|
221
|
+
if (cookieOptions.domain == 'auto') {
|
207
222
|
domainAttribute = auto_domain;
|
208
223
|
stringifiedAttributes += '; ' + 'Domain=' + domainAttribute;
|
209
|
-
} else
|
210
|
-
domainAttribute = domain;
|
224
|
+
} else {
|
225
|
+
domainAttribute = cookieOptions.domain;
|
211
226
|
stringifiedAttributes += '; ' + 'Domain=' + domainAttribute;
|
212
227
|
}
|
228
|
+
} else {
|
229
|
+
domainAttribute = cookieOptions.domain;
|
213
230
|
}
|
214
231
|
|
215
232
|
// Failsafe: if 'None' is given for samesite in non-secure
|
@@ -222,24 +239,23 @@ j1.adapter.cookieConsent = (function (j1, window) {
|
|
222
239
|
if ( j1.getState() === 'finished' ) {
|
223
240
|
_this.setState('started');
|
224
241
|
|
225
|
-
|
226
242
|
if (cookieConsentOptions.enabled) {
|
227
243
|
logger.debug('\n' + 'state: ' + _this.getState());
|
228
244
|
logger.info('\n' + 'module is being initialized');
|
229
245
|
|
230
246
|
j1.cookieConsent = new CookieConsent ({
|
231
|
-
contentURL: cookieConsentOptions.contentURL,
|
232
|
-
cookieName: cookie_names.user_consent,
|
233
|
-
cookieStorageDays: expires,
|
234
|
-
cookieSameSite: same_site,
|
235
|
-
cookieSecure: secure,
|
236
|
-
cookieDomain: domainAttribute,
|
237
|
-
dialogLanguage: cookieConsentOptions.dialogLanguage,
|
238
|
-
whitelisted: cookieConsentOptions.whitelisted,
|
239
|
-
reloadPageOnChange: cookieConsentOptions.reloadPageOnChange,
|
240
|
-
dialogContainerID: cookieConsentOptions.dialogContainerID,
|
241
|
-
xhrDataElement: cookieConsentOptions.xhrDataElement,
|
242
|
-
postSelectionCallback: cookieConsentOptions.postSelectionCallback,
|
247
|
+
contentURL: cookieConsentOptions.contentURL, // dialog content (modals) for all supported languages
|
248
|
+
cookieName: cookie_names.user_consent, // name of the consent cookie
|
249
|
+
cookieStorageDays: expires, // lifetime of a cookie [0..365], 0: session cookie
|
250
|
+
cookieSameSite: same_site, // restrict consent cookie
|
251
|
+
cookieSecure: secure, // only sent to the server with an encrypted request over HTTPS
|
252
|
+
cookieDomain: domainAttribute, // set domain (hostname|domain)
|
253
|
+
dialogLanguage: cookieConsentOptions.dialogLanguage, // language for the dialog (modal)
|
254
|
+
whitelisted: cookieConsentOptions.whitelisted, // pages NO cookie dialog is shown
|
255
|
+
reloadPageOnChange: cookieConsentOptions.reloadPageOnChange, // reload if setzings has changed
|
256
|
+
dialogContainerID: cookieConsentOptions.dialogContainerID, // container, the dialog modal is (dynamically) loaded
|
257
|
+
xhrDataElement: cookieConsentOptions.xhrDataElement, // container for all language-specific dialogs (modals)
|
258
|
+
postSelectionCallback: cookieConsentOptions.postSelectionCallback, // callback function, called after the user has made his selection
|
243
259
|
});
|
244
260
|
} else {
|
245
261
|
logger.warn('\n' + 'module is disabled');
|
@@ -185,7 +185,9 @@ j1.adapter.fab = (function (j1, window) {
|
|
185
185
|
// Initialize FAB button
|
186
186
|
// ---------------------------------------------------------------------
|
187
187
|
var dependencies_met_fab_initialized = setInterval (function () {
|
188
|
-
|
188
|
+
var pageState = $('#no_flicker').css("display");
|
189
|
+
var pageVisible = (pageState == 'block') ? true: false;
|
190
|
+
if (j1.xhrDOMState['#' + fabOptions.xhr_container_id] == 'success' && j1.getState() == 'finished' && pageVisible) {
|
189
191
|
_this.setState('loaded');
|
190
192
|
logger.info('\n' + 'set module state to: ' + _this.getState());
|
191
193
|
logger.info('\n' + 'HTML data for FAB: ' + _this.getState());
|
@@ -260,7 +260,7 @@ var j1 = (function (options) {
|
|
260
260
|
};
|
261
261
|
|
262
262
|
// ---------------------------------------------------------------------------
|
263
|
-
//
|
263
|
+
// Helper functions
|
264
264
|
// ---------------------------------------------------------------------------
|
265
265
|
|
266
266
|
// See: https://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string
|
@@ -1587,6 +1587,44 @@ var j1 = (function (options) {
|
|
1587
1587
|
}
|
1588
1588
|
},
|
1589
1589
|
|
1590
|
+
// -------------------------------------------------------------------------
|
1591
|
+
// subdomain()
|
1592
|
+
// Returns true|false if a subdomain is used for a given URL
|
1593
|
+
// -------------------------------------------------------------------------
|
1594
|
+
subdomain: function (url) {
|
1595
|
+
// See: https://snipplr.com/view/5449/check-if-a-url-contains-a-subdomain
|
1596
|
+
|
1597
|
+
// IF THERE, REMOVE WHITE SPACE FROM BOTH ENDS
|
1598
|
+
url = url.replace(new RegExp(/^\s+/),""); // START
|
1599
|
+
url = url.replace(new RegExp(/\s+$/),""); // END
|
1600
|
+
|
1601
|
+
// IF FOUND, CONVERT BACK SLASHES TO FORWARD SLASHES
|
1602
|
+
url = url.replace(new RegExp(/\\/g),"/");
|
1603
|
+
|
1604
|
+
// IF THERE, REMOVES 'http://', 'https://' or 'ftp://' FROM THE START
|
1605
|
+
url = url.replace(new RegExp(/^http\:\/\/|^https\:\/\/|^ftp\:\/\//i),"");
|
1606
|
+
|
1607
|
+
// IF THERE, REMOVES 'www.' FROM THE START OF THE STRING
|
1608
|
+
url = url.replace(new RegExp(/^www\./i),"");
|
1609
|
+
|
1610
|
+
// REMOVE COMPLETE STRING FROM FIRST FORWARD SLASH ON
|
1611
|
+
url = url.replace(new RegExp(/\/(.*)/),"");
|
1612
|
+
|
1613
|
+
// REMOVES '.??.??' OR '.???.??' FROM END - e.g. '.CO.UK', '.COM.AU'
|
1614
|
+
if (url.match(new RegExp(/\.[a-z]{2,3}\.[a-z]{2}$/i))) {
|
1615
|
+
url = url.replace(new RegExp(/\.[a-z]{2,3}\.[a-z]{2}$/i),"");
|
1616
|
+
|
1617
|
+
// REMOVES '.??' or '.???' or '.????' FROM END - e.g. '.US', '.COM', '.INFO'
|
1618
|
+
} else if (url.match(new RegExp(/\.[a-z]{2,4}$/i))) {
|
1619
|
+
url = url.replace(new RegExp(/\.[a-z]{2,4}$/i),"");
|
1620
|
+
}
|
1621
|
+
|
1622
|
+
// CHECK TO SEE IF THERE IS A DOT '.' LEFT IN THE STRING
|
1623
|
+
var isSubDomain = (url.match(new RegExp(/\./g))) ? true : false;
|
1624
|
+
|
1625
|
+
return(isSubDomain);
|
1626
|
+
}, // END subdomain
|
1627
|
+
|
1590
1628
|
// -------------------------------------------------------------------------
|
1591
1629
|
// readCookie (Vanilla JS)
|
1592
1630
|
// -------------------------------------------------------------------------
|
@@ -0,0 +1,221 @@
|
|
1
|
+
---
|
2
|
+
regenerate: true
|
3
|
+
---
|
4
|
+
|
5
|
+
{% capture cache %}
|
6
|
+
|
7
|
+
{% comment %}
|
8
|
+
# -----------------------------------------------------------------------------
|
9
|
+
# ~/assets/themes/j1/adapter/js/slick.js
|
10
|
+
# Liquid template to create the Template Adapter for J1 Slick
|
11
|
+
#
|
12
|
+
# Product/Info:
|
13
|
+
# http://jekyll.one
|
14
|
+
#
|
15
|
+
# Copyright (C) 2023 Juergen Adams
|
16
|
+
#
|
17
|
+
# J1 Theme is licensed under the MIT License.
|
18
|
+
# For details, see: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md
|
19
|
+
# -----------------------------------------------------------------------------
|
20
|
+
# Test data:
|
21
|
+
# {{ liquid_var | debug }}
|
22
|
+
# cookie_options: {{ cookie_options | debug }}
|
23
|
+
# -----------------------------------------------------------------------------
|
24
|
+
{% endcomment %}
|
25
|
+
|
26
|
+
{% comment %} Liquid var initialization
|
27
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
28
|
+
|
29
|
+
{% comment %} Set config files
|
30
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
31
|
+
{% assign environment = site.environment %}
|
32
|
+
{% assign blocks = site.data.blocks %}
|
33
|
+
{% assign modules = site.data.modules %}
|
34
|
+
{% assign template_config = site.data.j1_config %}
|
35
|
+
|
36
|
+
{% comment %} Set config data
|
37
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
38
|
+
|
39
|
+
{% comment %} Set config options
|
40
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
41
|
+
|
42
|
+
|
43
|
+
{% comment %} Set variables
|
44
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
45
|
+
|
46
|
+
|
47
|
+
{% comment %} Detect prod mode
|
48
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
49
|
+
{% assign production = false %}
|
50
|
+
{% if environment == 'prod' or environment == 'production' %}
|
51
|
+
{% assign production = true %}
|
52
|
+
{% endif %}
|
53
|
+
|
54
|
+
/*
|
55
|
+
# -----------------------------------------------------------------------------
|
56
|
+
# ~/assets/themes/j1/adapter/js/slick.js
|
57
|
+
# JS Adapter for J1 Slick
|
58
|
+
#
|
59
|
+
# Product/Info:
|
60
|
+
# http://jekyll.one
|
61
|
+
#
|
62
|
+
# Copyright (C) 2023 Juergen Adams
|
63
|
+
#
|
64
|
+
# J1 Theme is licensed under MIT License.
|
65
|
+
# See: https://github.com/jekyll-one/J1 Theme/blob/master/LICENSE
|
66
|
+
# -----------------------------------------------------------------------------
|
67
|
+
# Adapter generated: {{site.time}}
|
68
|
+
# -----------------------------------------------------------------------------
|
69
|
+
*/
|
70
|
+
|
71
|
+
// -----------------------------------------------------------------------------
|
72
|
+
// ESLint shimming
|
73
|
+
// -----------------------------------------------------------------------------
|
74
|
+
/* eslint indent: "off" */
|
75
|
+
/* eslint quotes: "off" */
|
76
|
+
// -----------------------------------------------------------------------------
|
77
|
+
'use strict';
|
78
|
+
j1.adapter.slick = (function (j1, window) {
|
79
|
+
var environment = '{{environment}}';
|
80
|
+
var _this;
|
81
|
+
var logger;
|
82
|
+
var logText;
|
83
|
+
|
84
|
+
// ---------------------------------------------------------------------------
|
85
|
+
// Helper functions
|
86
|
+
// ---------------------------------------------------------------------------
|
87
|
+
|
88
|
+
// ---------------------------------------------------------------------------
|
89
|
+
// Main object
|
90
|
+
// ---------------------------------------------------------------------------
|
91
|
+
return {
|
92
|
+
|
93
|
+
// -------------------------------------------------------------------------
|
94
|
+
// Initializer
|
95
|
+
// -------------------------------------------------------------------------
|
96
|
+
init: function (options) {
|
97
|
+
|
98
|
+
// -----------------------------------------------------------------------
|
99
|
+
// Default module settings
|
100
|
+
// -----------------------------------------------------------------------
|
101
|
+
var settings = $.extend({
|
102
|
+
module_name: 'j1.adapter.cookieConsent',
|
103
|
+
generated: '{{site.time}}'
|
104
|
+
}, options);
|
105
|
+
|
106
|
+
// -----------------------------------------------------------------------
|
107
|
+
// Global variable settings
|
108
|
+
// -----------------------------------------------------------------------
|
109
|
+
_this = j1.adapter.slick;
|
110
|
+
logger = log4javascript.getLogger('j1.adapter.slick');
|
111
|
+
|
112
|
+
|
113
|
+
{% comment %} Load module config from yml data
|
114
|
+
-------------------------------------------------------------------------- {% endcomment %}
|
115
|
+
|
116
|
+
|
117
|
+
// -----------------------------------------------------------------------
|
118
|
+
// initializer
|
119
|
+
// -----------------------------------------------------------------------
|
120
|
+
var dependencies_met_page_ready = setInterval (function (options) {
|
121
|
+
var pageState = $('#no_flicker').css("display");
|
122
|
+
var pageVisible = (pageState == 'block') ? true: false;
|
123
|
+
if ( j1.getState() === 'finished' && pageVisible ) {
|
124
|
+
|
125
|
+
_this.setState('started');
|
126
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
127
|
+
logger.info('\n' + 'module is being initialized');
|
128
|
+
|
129
|
+
$('.featured-post-slider').slick({
|
130
|
+
dots: false,
|
131
|
+
speed: 300,
|
132
|
+
autoplay: true,
|
133
|
+
arrows: false,
|
134
|
+
slidesToShow: 4,
|
135
|
+
slidesToScroll: 1,
|
136
|
+
responsive: [{
|
137
|
+
breakpoint: 1024,
|
138
|
+
settings: {
|
139
|
+
slidesToShow: 4
|
140
|
+
}
|
141
|
+
},
|
142
|
+
{
|
143
|
+
breakpoint: 600,
|
144
|
+
settings: {
|
145
|
+
slidesToShow: 3
|
146
|
+
}
|
147
|
+
},
|
148
|
+
{
|
149
|
+
breakpoint: 480,
|
150
|
+
settings: {
|
151
|
+
slidesToShow: 2
|
152
|
+
}
|
153
|
+
}
|
154
|
+
]
|
155
|
+
});
|
156
|
+
|
157
|
+
$('.masonry-container').masonry({
|
158
|
+
itemSelector: '.masonry-container > div',
|
159
|
+
columnWidth: 1
|
160
|
+
});
|
161
|
+
|
162
|
+
_this.setState('finished');
|
163
|
+
logger.debug('\n' + 'state: ' + _this.getState());
|
164
|
+
logger.info('\n' + 'module initialization finished');
|
165
|
+
|
166
|
+
clearInterval(dependencies_met_page_ready);
|
167
|
+
|
168
|
+
}
|
169
|
+
}, 25);
|
170
|
+
|
171
|
+
}, // END init
|
172
|
+
|
173
|
+
// -------------------------------------------------------------------------
|
174
|
+
// messageHandler: MessageHandler for J1 CookieConsent module
|
175
|
+
// Manage messages send from other J1 modules
|
176
|
+
// -------------------------------------------------------------------------
|
177
|
+
messageHandler: function (sender, message) {
|
178
|
+
var json_message = JSON.stringify(message, undefined, 2);
|
179
|
+
|
180
|
+
logText = '\n' + 'received message from ' + sender + ': ' + json_message;
|
181
|
+
logger.debug(logText);
|
182
|
+
|
183
|
+
// -----------------------------------------------------------------------
|
184
|
+
// Process commands|actions
|
185
|
+
// -----------------------------------------------------------------------
|
186
|
+
if (message.type === 'command' && message.action === 'module_initialized') {
|
187
|
+
//
|
188
|
+
// Place handling of command|action here
|
189
|
+
//
|
190
|
+
logger.info('\n' + message.text);
|
191
|
+
}
|
192
|
+
|
193
|
+
//
|
194
|
+
// Place handling of other command|action here
|
195
|
+
//
|
196
|
+
|
197
|
+
return true;
|
198
|
+
}, // END messageHandler
|
199
|
+
|
200
|
+
// -------------------------------------------------------------------------
|
201
|
+
// setState()
|
202
|
+
// Sets the current (processing) state of the module
|
203
|
+
// -------------------------------------------------------------------------
|
204
|
+
setState: function (stat) {
|
205
|
+
_this.state = stat;
|
206
|
+
}, // END setState
|
207
|
+
|
208
|
+
// -------------------------------------------------------------------------
|
209
|
+
// getState()
|
210
|
+
// Returns the current (processing) state of the module
|
211
|
+
// -------------------------------------------------------------------------
|
212
|
+
getState: function () {
|
213
|
+
return _this.state;
|
214
|
+
}, // END getState
|
215
|
+
|
216
|
+
}; // END return
|
217
|
+
})(j1, window);
|
218
|
+
|
219
|
+
{% endcapture %}
|
220
|
+
{{ cache | strip_empty_lines }}
|
221
|
+
{% assign cache = nil %}
|
@@ -100,6 +100,7 @@ j1.adapter.translator = (function (j1, window) {
|
|
100
100
|
var baseUrl;
|
101
101
|
var hostname;
|
102
102
|
var domain;
|
103
|
+
var subDomain;
|
103
104
|
var cookie_option_domain;
|
104
105
|
var secure;
|
105
106
|
var logText;
|
@@ -146,6 +147,7 @@ j1.adapter.translator = (function (j1, window) {
|
|
146
147
|
baseUrl = url.origin;
|
147
148
|
hostname = url.hostname;
|
148
149
|
domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
150
|
+
subDomain = j1.subdomain(hostname);
|
149
151
|
secure = (url.protocol.includes('https')) ? true : false;
|
150
152
|
navigator_language = navigator.language || navigator.userLanguage; // userLanguage for MS IE compatibility
|
151
153
|
translation_language = navigator_language.split('-')[0];
|
@@ -221,17 +223,24 @@ j1.adapter.translator = (function (j1, window) {
|
|
221
223
|
});
|
222
224
|
}
|
223
225
|
|
226
|
+
// hide the google translate element if exists
|
227
|
+
if ($('google_translate_element')) {
|
228
|
+
$('google_translate_element').hide();
|
229
|
+
}
|
230
|
+
|
224
231
|
// show|hide translate button if enabled
|
225
232
|
if (translatorOptions.hideTranslatorIcon) {
|
226
233
|
if (!user_consent.analysis || !user_consent.personalization) {
|
227
234
|
// disable google translate button if visible
|
228
235
|
if ($('#quickLinksTranslateButton').css('display') === 'block') {
|
236
|
+
logger.info('\n' + 'disable quickLinksTranslateButton');
|
229
237
|
$('#quickLinksTranslateButton').css('display', 'none');
|
230
238
|
}
|
231
239
|
}
|
232
240
|
if (user_consent.analysis && user_consent.personalization) {
|
233
241
|
// enable google translate button if not visible
|
234
242
|
if ($('#quickLinksTranslateButton').css('display') === 'none') {
|
243
|
+
logger.info('\n' + 'enable quickLinksTranslateButton');
|
235
244
|
$('#quickLinksTranslateButton').css('display', 'block');
|
236
245
|
}
|
237
246
|
}
|
@@ -286,10 +295,25 @@ j1.adapter.translator = (function (j1, window) {
|
|
286
295
|
// enable|disable translation (after callback)
|
287
296
|
if (user_translate.analysis && user_translate.personalization && user_translate.translationEnabled) {
|
288
297
|
if (translatorOptions.translatorName === 'google') {
|
298
|
+
logger.info('\n' + 'append Google Translate Script: ' + gtTranslateScript.id);
|
289
299
|
head.appendChild(gtTranslateScript);
|
300
|
+
if ($('google_translate_element')) {
|
301
|
+
$('google_translate_element').hide();
|
302
|
+
}
|
303
|
+
// if( $('#gt-callback').length ) {
|
304
|
+
// logger.info('\n' + 'Google Translate Script already exists : ' + gtTranslateScript.id);
|
305
|
+
// } else {
|
306
|
+
// logger.info('\n' + 'append Google Translate Script: ' + gtTranslateScript.id);
|
307
|
+
// head.appendChild(gtTranslateScript);
|
308
|
+
// if ($('google_translate_element')) {
|
309
|
+
// $('google_translate_element').hide();
|
310
|
+
// }
|
311
|
+
// }
|
290
312
|
}
|
291
313
|
} else {
|
292
314
|
if (translatorOptions.translatorName === 'google') {
|
315
|
+
logger.info('\n' + 'translation disabled');
|
316
|
+
logger.info('\n' + 'remove existing Google Translate cookies');
|
293
317
|
// remove all googtrans cookies that POTENTIALLY exists
|
294
318
|
Cookies.remove('googtrans', { domain: domainAttribute });
|
295
319
|
Cookies.remove('googtrans', { domain: hostname });
|
@@ -370,8 +394,16 @@ j1.adapter.translator = (function (j1, window) {
|
|
370
394
|
// the selection for a translation|language
|
371
395
|
// -------------------------------------------------------------------------
|
372
396
|
cbGoogle: function () {
|
373
|
-
var logger
|
374
|
-
var msDropdown
|
397
|
+
var logger = log4javascript.getLogger('j1.adapter.translator.cbGoogle');
|
398
|
+
var msDropdown = document.getElementById('dropdownJSON').msDropdown;
|
399
|
+
|
400
|
+
var url = new liteURL(window.location.href);
|
401
|
+
var baseUrl = url.origin;
|
402
|
+
var hostname = url.hostname;
|
403
|
+
var auto_domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
404
|
+
var subDomain = j1.subdomain(hostname);
|
405
|
+
var domainAttribute = '';
|
406
|
+
|
375
407
|
// var cookie_names = j1.getCookieNames();
|
376
408
|
// var user_consent = j1.readCookie(cookie_names.user_consent);
|
377
409
|
// var user_translate = j1.readCookie(cookie_names.user_translate);
|
@@ -381,6 +413,7 @@ j1.adapter.translator = (function (j1, window) {
|
|
381
413
|
// var domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
382
414
|
// var cookie_option_domain = '{{cookie_options.domain}}';
|
383
415
|
// var same_site = '{{cookie_options.same_site}}';
|
416
|
+
|
384
417
|
var srcLang;
|
385
418
|
var destLang;
|
386
419
|
var transCode;
|
@@ -407,6 +440,7 @@ j1.adapter.translator = (function (j1, window) {
|
|
407
440
|
|
408
441
|
// translation language MUST be DIFFERENT from content language
|
409
442
|
if (srcLang == selectedTranslationLanguage ) {
|
443
|
+
// remove all googtrans cookies that POTENTIALLY exists
|
410
444
|
Cookies.remove('googtrans', { domain: domainAttribute });
|
411
445
|
Cookies.remove('googtrans', { domain: hostname });
|
412
446
|
Cookies.remove('googtrans');
|
@@ -428,7 +462,15 @@ j1.adapter.translator = (function (j1, window) {
|
|
428
462
|
// in an empty field and two cookies (host+domain) if domain option
|
429
463
|
// is enabled!!!
|
430
464
|
// -----------------------------------------------------------------------
|
431
|
-
|
465
|
+
|
466
|
+
if (subDomain) {
|
467
|
+
Cookies.set('googtrans', transCode, { domain: auto_domain });
|
468
|
+
} else {
|
469
|
+
Cookies.set('googtrans', transCode);
|
470
|
+
// Cookies.set('googtrans', transCode, { domain: hostname });
|
471
|
+
}
|
472
|
+
|
473
|
+
// Cookies.set('googtrans', transCode);
|
432
474
|
|
433
475
|
// reload current page (skip cache)
|
434
476
|
location.reload(true);
|
@@ -15262,12 +15262,12 @@ a.card-title:hover {
|
|
15262
15262
|
font-weight: 500; }
|
15263
15263
|
|
15264
15264
|
.card .card-title a {
|
15265
|
-
color: #f44336
|
15266
|
-
text-decoration: none
|
15265
|
+
color: #f44336;
|
15266
|
+
text-decoration: none; }
|
15267
15267
|
|
15268
15268
|
.card .card-title > a:focus, .card .card-title > a:hover {
|
15269
|
-
color: #2196f3
|
15270
|
-
text-decoration: none
|
15269
|
+
color: #2196f3;
|
15270
|
+
text-decoration: none; }
|
15271
15271
|
|
15272
15272
|
.card-pricing > .card-title {
|
15273
15273
|
bottom: 15px;
|