j1-template 2021.1.0 → 2021.1.5
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/layouts/layout_metadata_generator.html +54 -39
- data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +1 -1
- data/_includes/themes/j1/modules/connectors/ads +3 -5
- data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +9 -5
- data/_includes/themes/j1/modules/connectors/analytics +4 -2
- data/_includes/themes/j1/modules/connectors/comments +7 -6
- data/_includes/themes/j1/modules/connectors/translator +3 -4
- data/_includes/themes/j1/modules/navigator/generator.html +4 -40
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +2 -2
- data/_includes/themes/j1/procedures/global/create_bs_button.proc +64 -22
- data/_includes/themes/j1/procedures/posts/collate_timeline.proc +14 -10
- data/_layouts/default.html +4 -7
- data/apps/public/cc/index.adoc +13 -4
- data/assets/data/authclient.html +234 -228
- data/assets/data/banner.html +34 -31
- data/assets/data/cookieconsent.html +249 -0
- data/assets/data/fam.html +5 -0
- data/assets/data/footer.html +4 -0
- data/assets/data/gallery_customizer.html +14 -4
- data/assets/data/menu.html +7 -2
- data/assets/data/mmenu.html +6 -2
- data/assets/data/mmenu_sidebar.html +5 -1
- data/assets/data/mmenu_toc.html +4 -0
- data/assets/data/panel.html +23 -15
- data/assets/data/quicklinks.html +24 -17
- data/assets/error_pages/HTTP204.html +2 -1
- data/assets/error_pages/HTTP400.html +2 -1
- data/assets/error_pages/HTTP401.html +2 -1
- data/assets/error_pages/HTTP403.html +2 -1
- data/assets/error_pages/HTTP404.html +2 -1
- data/assets/error_pages/HTTP500.html +2 -1
- data/assets/error_pages/HTTP501.html +2 -1
- data/assets/error_pages/HTTP502.html +2 -1
- data/assets/error_pages/HTTP503.html +2 -1
- data/assets/error_pages/HTTP520.html +2 -1
- data/assets/error_pages/HTTP521.html +2 -1
- data/assets/error_pages/HTTP533.html +2 -1
- data/assets/themes/j1/adapter/js/{cookiebar.js → cookieConsent.js} +102 -54
- data/assets/themes/j1/adapter/js/j1.js +53 -20
- data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +3 -2
- data/assets/themes/j1/adapter/js/mmenu.js +8 -4
- data/assets/themes/j1/adapter/js/navigator.js +77 -22
- data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.css +17 -14
- data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +3960 -240
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/js/template.js +3 -9
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.min.js +3 -9
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/_lightGallery/css/core/lg-fb-comment-box.css +58 -0
- data/assets/themes/j1/modules/_lightGallery/css/core/lg-fb-comment-box.min.css +5 -0
- data/assets/themes/j1/modules/_lightGallery/css/core/lg-transitions.css +778 -0
- data/assets/themes/j1/modules/_lightGallery/css/core/lg-transitions.min.css +5 -0
- data/assets/themes/j1/modules/_lightGallery/css/core/lightgallery.css +981 -0
- data/assets/themes/j1/modules/_lightGallery/css/core/lightgallery.min.css +5 -0
- data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.eot +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.svg +47 -0
- data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.ttf +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/fonts/lg.woff +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/img/loading.gif +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/img/video-play.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/img/vimeo-play.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/img/youtube-play.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/animation-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/customize-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/dynamic-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/facebook-icon.svg +10 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/googleplus-icon.svg +30 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/html5-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/linked-in.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/module-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/play-button.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/responsive-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/thumb-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/touch-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/twitter-icon.svg +15 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/twitter.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/video1-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/zoom-w.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/icons/zoom.png +0 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/uno.css +262 -0
- data/assets/themes/j1/modules/_lightGallery/css/themes/uno.min.css +15 -0
- data/assets/themes/j1/modules/_lightGallery/js/core/lightgallery.js +1362 -0
- data/assets/themes/j1/modules/_lightGallery/js/core/lightgallery.min.js +4 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/j1/j1-video.js +402 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/j1/j1-video.min.js +8 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-autoplay.js +206 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-autoplay.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-fullscreen.js +126 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-fullscreen.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-hash.js +101 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-hash.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-pager.js +105 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-pager.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-share.js +107 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-share.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-thumbnail.js +478 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-thumbnail.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-video.js +342 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-video.min.js +5 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-zoom.js +527 -0
- data/assets/themes/j1/modules/_lightGallery/js/modules/lg-zoom.min.js +5 -0
- data/assets/themes/j1/modules/cookieConsent/LICENSE +21 -0
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +286 -0
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js +28 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.absolute.html +4 -2
- data/assets/themes/j1/modules/iframeResizer/examples/frame.content.html +4 -3
- data/assets/themes/j1/modules/iframeResizer/examples/frame.hover.html +4 -2
- data/assets/themes/j1/modules/iframeResizer/examples/frame.nested.html +4 -2
- data/assets/themes/j1/modules/iframeResizer/examples/frame.textarea.html +4 -2
- data/assets/themes/j1/modules/iframeResizer/examples/frame.tolerance.html +4 -2
- data/assets/themes/j1/modules/iframeResizer/examples/index.html +2 -0
- data/assets/themes/j1/modules/iframeResizer/examples/two.html +4 -2
- data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery-x.js +1368 -0
- data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery-x.min.js +10 -0
- data/assets/themes/j1/modules/lightGallery/js/modules/j1/j1-x-video.js +344 -0
- data/assets/themes/j1/modules/lightGallery/js/modules/j1/j1-x-video.min.js +7 -0
- data/assets/themes/j1/modules/util/js/domready.js +146 -0
- data/assets/themes/j1/modules/util/js/gtag-opt-in.js +1 -0
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +74 -77
- data/lib/starter_web/_data/_defaults/resources.yml +11 -8
- data/lib/starter_web/_data/apps/defaults/justifiedGalleryCustomizer.yml +1 -0
- data/lib/starter_web/_data/blocks/banner.yml +30 -24
- data/lib/starter_web/_data/blocks/panel.yml +9 -7
- data/lib/starter_web/_data/builder/blog_navigator.yml +6 -1
- data/lib/starter_web/_data/j1_config.yml +2 -2
- data/lib/starter_web/_data/layouts/blog_archive.yml +9 -0
- data/lib/starter_web/_data/layouts/collection.yml +10 -0
- data/lib/starter_web/_data/layouts/default.yml +25 -59
- data/lib/starter_web/_data/layouts/home.yml +6 -5
- data/lib/starter_web/_data/layouts/page.yml +1 -1
- data/lib/starter_web/_data/modules/{cookiebar.yml → cookieconsent.yml} +4 -4
- data/lib/starter_web/_data/modules/defaults/authentication.yml +1 -0
- data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +135 -0
- data/lib/starter_web/_data/modules/defaults/navigator.yml +5 -2
- data/lib/starter_web/_data/modules/navigator.yml +24 -21
- data/lib/starter_web/_data/modules/navigator_menu.yml +2 -2
- data/lib/starter_web/_data/pages/builder.yml +7 -7
- data/lib/starter_web/_data/private.yml +6 -6
- data/lib/starter_web/_data/resources.yml +13 -8
- data/lib/starter_web/_includes/attributes.asciidoc +10 -1
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/assets/images/modules/attics/christa-dodoo-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/{cookies-1920x1200-bw.jpg → cookies-1920x1200.jpg} +0 -0
- data/lib/starter_web/assets/images/modules/attics/giammarco-boscaro-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.jpg +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +3 -9
- data/lib/starter_web/collections/posts/public/featured/_posts/2020-01-01-about-cookies.adoc +4 -11
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-03-01-site-generators.adoc +1 -8
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-03-03-about-j1.adoc +2 -8
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +2 -8
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +2 -9
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +2 -9
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +2 -9
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +3 -1
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +3 -1
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +3 -1
- data/lib/starter_web/index.html +7 -13
- data/lib/starter_web/package.json +3 -3
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/000_intro.adoc +7 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/100_chapter.adoc +5 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/200_chapter.adoc +6 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/900_references.adoc +5 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +6 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/100_chapter.asciidoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/200_chapter.asciidoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +6 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +6 -1
- data/lib/starter_web/pages/public/blog/navigator/archive.html +40 -24
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +48 -28
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +45 -28
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +41 -13
- data/lib/starter_web/pages/public/blog/navigator/index.html +1 -4
- data/lib/starter_web/pages/public/cookieConsent.adoc +93 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.org.asciidoc +244 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +3 -2
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +1 -1
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +2 -18
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +7 -5
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +7 -6
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +111 -214
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +7 -5
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +7 -2
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/iframer.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/justified_gallery.html +1 -1
- data/lib/starter_web/pages/public/previewer/md_color_palette.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/rouge.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +74 -14
- data/_includes/themes/j1/modules/connectors/analytic/google-analytics-legacy.html +0 -36
- data/assets/data/cookiebar.html +0 -281
- data/lib/starter_web/_data/_defaults/private.yml +0 -156
- data/lib/starter_web/_data/modules/defaults/cookiebar.yml +0 -132
- data/lib/starter_web/_data/private@default.yml +0 -119
- data/lib/starter_web/_data/private@localhost.yml +0 -156
- data/lib/starter_web/collections/posts/public/series/_posts/_includes/attributes.asciidoc +0 -37
- data/lib/starter_web/collections/posts/public/series/_posts/_includes/documents/readme +0 -0
- data/lib/starter_web/collections/posts/public/series/_posts/_includes/tables/debug_variables.asciidoc +0 -47
@@ -6,8 +6,8 @@ regenerate: true
|
|
6
6
|
|
7
7
|
{% comment %}
|
8
8
|
# -----------------------------------------------------------------------------
|
9
|
-
# ~/assets/themes/j1/adapter/js/
|
10
|
-
# Liquid template to create the Template Adapter for J1
|
9
|
+
# ~/assets/themes/j1/adapter/js/cookieConsent.js
|
10
|
+
# Liquid template to create the Template Adapter for J1 CookieConsent
|
11
11
|
#
|
12
12
|
# Product/Info:
|
13
13
|
# http://jekyll.one
|
@@ -27,17 +27,18 @@ regenerate: true
|
|
27
27
|
|
28
28
|
{% comment %} Set config files
|
29
29
|
-------------------------------------------------------------------------------- {% endcomment %}
|
30
|
-
{% assign environment
|
31
|
-
{% assign modules
|
30
|
+
{% assign environment = site.environment %}
|
31
|
+
{% assign modules = site.data.modules %}
|
32
32
|
|
33
33
|
{% comment %} Set config data
|
34
34
|
-------------------------------------------------------------------------------- {% endcomment %}
|
35
|
-
{% assign
|
36
|
-
{% assign
|
35
|
+
{% assign consent_defaults = modules.defaults.cookieconsent.defaults %}
|
36
|
+
{% assign consent_settings = modules.cookieconsent.settings %}
|
37
|
+
{% assign tracking_id = site.data.j1_config.analytics.google.tracking_id %}
|
37
38
|
|
38
39
|
{% comment %} Set config options
|
39
40
|
-------------------------------------------------------------------------------- {% endcomment %}
|
40
|
-
{% assign
|
41
|
+
{% assign consent_options = consent_defaults | merge: consent_settings %}
|
41
42
|
|
42
43
|
{% assign production = false %}
|
43
44
|
{% if environment == 'prod' or environment == 'production' %}
|
@@ -46,21 +47,20 @@ regenerate: true
|
|
46
47
|
|
47
48
|
/*
|
48
49
|
# -----------------------------------------------------------------------------
|
49
|
-
# ~/assets/themes/j1/adapter/js/
|
50
|
-
# JS Adapter for
|
50
|
+
# ~/assets/themes/j1/adapter/js/cookieConsent.js
|
51
|
+
# JS Adapter for J1 CookieConsent
|
51
52
|
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
53
|
+
# Product/Info:
|
54
|
+
# https://shaack.com
|
55
|
+
# http://jekyll.one
|
55
56
|
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
# J1 Template is licensed under the MIT License.
|
60
|
-
# For details, see https://jekyll.one
|
61
|
-
# jQuery Cookibar is licensed under Creative Commons Attribution 3.0 Unported License.
|
62
|
-
# For details, see http://www.primebox.co.uk/projects/jquery-cookiebar/
|
57
|
+
# Copyright (C) 2020 Stefan Haack
|
58
|
+
# Copyright (C) 2021 Juergen Adams
|
63
59
|
#
|
60
|
+
# bootstrap-cookie-banner is licensed under MIT License.
|
61
|
+
# See: https://github.com/shaack/bootstrap-cookie-banner/blob/master/LICENSE
|
62
|
+
# J1 Template is licensed under MIT License.
|
63
|
+
# See: https://github.com/jekyll-one/J1 Template/blob/master/LICENSE
|
64
64
|
# -----------------------------------------------------------------------------
|
65
65
|
# Adapter generated: {{site.time}}
|
66
66
|
# -----------------------------------------------------------------------------
|
@@ -76,14 +76,15 @@ regenerate: true
|
|
76
76
|
|
77
77
|
{% comment %} Main
|
78
78
|
--------------------------------------------------------------- {% endcomment %}
|
79
|
-
j1.adapter['
|
79
|
+
j1.adapter['cookieConsent'] = (function (j1, window) {
|
80
80
|
|
81
81
|
var environment = '{{environment}}';
|
82
82
|
var moduleOptions = {};
|
83
83
|
var _this;
|
84
|
+
var $modal;
|
85
|
+
var user_cookie;
|
84
86
|
var logger;
|
85
87
|
var logText;
|
86
|
-
|
87
88
|
// ---------------------------------------------------------------------------
|
88
89
|
// Helper functions
|
89
90
|
// ---------------------------------------------------------------------------
|
@@ -98,11 +99,20 @@ j1.adapter['cookiebar'] = (function (j1, window) {
|
|
98
99
|
// -------------------------------------------------------------------------
|
99
100
|
init: function (options) {
|
100
101
|
|
102
|
+
// -----------------------------------------------------------------------
|
103
|
+
// globals
|
104
|
+
// -----------------------------------------------------------------------
|
105
|
+
_this = j1.adapter.cookieConsent;
|
106
|
+
logger = log4javascript.getLogger('j1.adapter.cookieConsent');
|
107
|
+
|
108
|
+
// initialize state flag
|
109
|
+
_this.state = 'pending';
|
110
|
+
|
101
111
|
// -----------------------------------------------------------------------
|
102
112
|
// Default module settings
|
103
113
|
// -----------------------------------------------------------------------
|
104
114
|
var settings = $.extend({
|
105
|
-
module_name: 'j1.adapter.
|
115
|
+
module_name: 'j1.adapter.cookieConsent',
|
106
116
|
generated: '{{site.time}}'
|
107
117
|
}, options);
|
108
118
|
|
@@ -110,7 +120,7 @@ j1.adapter['cookiebar'] = (function (j1, window) {
|
|
110
120
|
-------------------------------------------------------------------------- {% endcomment %}
|
111
121
|
// Load module DEFAULTS|CONFIG
|
112
122
|
/* eslint-disable */
|
113
|
-
moduleOptions = $.extend({}, {{
|
123
|
+
moduleOptions = $.extend({}, {{consent_options | replace: '=>', ':' | replace: 'nil', '""'}});
|
114
124
|
/* eslint-enable */
|
115
125
|
|
116
126
|
if (typeof settings !== 'undefined') {
|
@@ -120,46 +130,32 @@ j1.adapter['cookiebar'] = (function (j1, window) {
|
|
120
130
|
// -----------------------------------------------------------------------
|
121
131
|
// initializer
|
122
132
|
// -----------------------------------------------------------------------
|
123
|
-
_this = j1.adapter.cookiebar;
|
124
|
-
logger = log4javascript.getLogger('j1.adapter.cookiebar');
|
125
|
-
|
126
133
|
_this.setState('started');
|
127
134
|
logger.info('state: ' + _this.getState());
|
128
135
|
logger.info('module is being initialized');
|
129
136
|
|
130
|
-
j1.
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
137
|
+
j1.cookieConsent = new BootstrapCookieConsent({
|
138
|
+
contentURL: moduleOptions.contentURL,
|
139
|
+
cookieName: moduleOptions.cookieName,
|
140
|
+
language: moduleOptions.language,
|
141
|
+
whitelisted: moduleOptions.whitelisted,
|
142
|
+
reloadPageOnChange: moduleOptions.reloadCurrentPage,
|
143
|
+
xhr_data_element: moduleOptions.xhr_data_element + '-' + moduleOptions.language,
|
144
|
+
postSelectionCallback: function () {
|
145
|
+
j1.adapter.cookieConsent.cbCookie()
|
146
|
+
}
|
136
147
|
});
|
137
148
|
|
138
|
-
|
139
|
-
|
140
|
-
// ---------------------------------------------------------------------
|
141
|
-
// Initialize events if all modals loaded
|
142
|
-
// ---------------------------------------------------------------------
|
143
|
-
var dependencies_met_modals_loaded = setInterval (function () {
|
144
|
-
if (j1.xhrDataState['#{{cookiebar_options.xhr_container_id}}'] == 'success') {
|
145
|
-
logger.info('load HTML data (AJAX): finished');
|
146
|
-
j1.core.cookiebar.eventHandler(moduleOptions);
|
149
|
+
var dependencies_met_page_ready = setInterval (function (options) {
|
150
|
+
if ( j1.cookieConsent && j1.getState() === 'finished' ) {
|
147
151
|
_this.setState('finished');
|
148
152
|
logger.info('state: ' + _this.getState());
|
149
|
-
logger.
|
150
|
-
clearInterval(
|
151
|
-
logger.info('met dependencies for: xhrData');
|
153
|
+
logger.debug('module initialized successfully');
|
154
|
+
clearInterval(dependencies_met_page_ready);
|
152
155
|
}
|
153
|
-
|
154
|
-
logger.error('load HTML data (AJAX): failed');
|
155
|
-
_this.setState('finished');
|
156
|
-
logger.info('state: ' + _this.getState());
|
157
|
-
logger.info('initializing module finished');
|
158
|
-
clearInterval(dependencies_met_modals_loaded);
|
159
|
-
}
|
160
|
-
}, 25); // END dependencies_met_modals_loaded
|
161
|
-
}, // END init
|
156
|
+
});
|
162
157
|
|
158
|
+
}, // END init
|
163
159
|
|
164
160
|
// -------------------------------------------------------------------------
|
165
161
|
// messageHandler: MessageHandler for J1 CookieConsent module
|
@@ -202,7 +198,59 @@ j1.adapter['cookiebar'] = (function (j1, window) {
|
|
202
198
|
// -------------------------------------------------------------------------
|
203
199
|
getState: function () {
|
204
200
|
return _this.state;
|
205
|
-
} // END getState
|
201
|
+
}, // END getState
|
202
|
+
|
203
|
+
// -------------------------------------------------------------------------
|
204
|
+
// cbCookie()
|
205
|
+
// Callback function called by CookieConsent module after the user has
|
206
|
+
// made his selection
|
207
|
+
// -------------------------------------------------------------------------
|
208
|
+
// TODO:
|
209
|
+
// If ONLY required setting selected, make j1.user.consent
|
210
|
+
// a SESSION cookie!!!
|
211
|
+
// -------------------------------------------------------------------------
|
212
|
+
cbCookie: function () {
|
213
|
+
var gaCookies = j1.findCookie('_ga');
|
214
|
+
var user_cookie = j1.readCookie('j1.user.consent');
|
215
|
+
var json = JSON.stringify(user_cookie);
|
216
|
+
|
217
|
+
logger.info('Entered post selection callback from CookieConsent');
|
218
|
+
logger.info('Current values from CookieConsent: ' + json);
|
219
|
+
|
220
|
+
// gaCookies.forEach(item => console.log('cookieConsent: ' + item));
|
221
|
+
|
222
|
+
// Manage Google Analytics OptIn/Out
|
223
|
+
// See: https://github.com/luciomartinez/gtag-opt-in/wiki
|
224
|
+
//
|
225
|
+
GTagOptIn.register('{{tracking_id}}');
|
226
|
+
if (user_cookie.analyses) {
|
227
|
+
logger.info('Enable: GA');
|
228
|
+
GTagOptIn.optIn();
|
229
|
+
} else {
|
230
|
+
logger.warn('Disable: GA');
|
231
|
+
GTagOptIn.optOut();
|
232
|
+
var gaCookies = j1.findCookie('_ga');
|
233
|
+
gaCookies.forEach(function (item) {
|
234
|
+
logger.warn('Delete GA cookie: ' + item);
|
235
|
+
j1.removeCookie({
|
236
|
+
name: item,
|
237
|
+
path: '/'
|
238
|
+
});
|
239
|
+
});
|
240
|
+
}
|
241
|
+
|
242
|
+
// enable cookie button if not visible
|
243
|
+
//
|
244
|
+
if ($('#quickLinksCookieButton').css('display') === 'none') {
|
245
|
+
$('#quickLinksCookieButton').css('display', 'block');
|
246
|
+
}
|
247
|
+
|
248
|
+
// reload page after selection
|
249
|
+
//
|
250
|
+
// $('#no_flicker').css('display', 'none');
|
251
|
+
location.reload();
|
252
|
+
|
253
|
+
} // END cbCookie
|
206
254
|
|
207
255
|
}; // END return
|
208
256
|
})(j1, window);
|
@@ -23,7 +23,7 @@ regenerate: true
|
|
23
23
|
{% endcomment %}
|
24
24
|
|
25
25
|
{% comment %} Liquid procedures
|
26
|
-
|
26
|
+
------------------------------------------------------------------------------- {% endcomment %}
|
27
27
|
|
28
28
|
{% comment %} Set global settings
|
29
29
|
-------------------------------------------------------------------------------- {% endcomment %}
|
@@ -132,12 +132,14 @@ var j1 = (function () {
|
|
132
132
|
var user_session_detected;
|
133
133
|
|
134
134
|
// Connector settings
|
135
|
-
var translation_enabled
|
135
|
+
var translation_enabled = {{template_config.translation.enabled}};
|
136
136
|
|
137
137
|
// Theme information
|
138
138
|
var themeName;
|
139
139
|
var themeCss;
|
140
|
-
var themeExtensionCss
|
140
|
+
var themeExtensionCss = environment === 'production'
|
141
|
+
? '/assets/themes/j1/core/css/themes/theme-extensions.min.css'
|
142
|
+
: '/assets/themes/j1/core/css/themes/theme-extensions.css';
|
141
143
|
|
142
144
|
// Pathes of J1 data files
|
143
145
|
var colors_data_path = '{{template_config.colors_data_path}}';
|
@@ -162,12 +164,13 @@ var j1 = (function () {
|
|
162
164
|
// var default_theme_name = 'uno-light';
|
163
165
|
// var default_theme_author = 'J1 Team';
|
164
166
|
// var default_theme_link = 'https://jekyll.one/';
|
165
|
-
var default_white_listed_pages = [];
|
167
|
+
// var default_white_listed_pages = [];
|
166
168
|
|
167
169
|
var cookie_names = {
|
168
170
|
'app_session': '{{template_config.cookies.app_session}}',
|
169
171
|
'user_session': '{{template_config.cookies.user_session}}',
|
170
|
-
'user_state': '{{template_config.cookies.user_state}}'
|
172
|
+
'user_state': '{{template_config.cookies.user_state}}',
|
173
|
+
'user_consent': 'j1.user.consent'
|
171
174
|
};
|
172
175
|
|
173
176
|
// user SESSION cookie (initial values)
|
@@ -190,19 +193,29 @@ var j1 = (function () {
|
|
190
193
|
};
|
191
194
|
|
192
195
|
// user STATE cookie (initial values)
|
196
|
+
// var user_state = {
|
197
|
+
// 'theme_css': "",
|
198
|
+
// 'theme_name': "",
|
199
|
+
// 'theme_author': "",
|
200
|
+
// 'theme_version': '{{site.version}}',
|
201
|
+
// 'cookies_accepted': 'pending',
|
202
|
+
// 'whitelistedPages': default_white_listed_pages,
|
203
|
+
// 'deleteOnDecline': false,
|
204
|
+
// 'showConsentOnPending': false,
|
205
|
+
// 'stopScrolling': true,
|
206
|
+
// 'session_active': false,
|
207
|
+
// 'last_session_ts': '',
|
208
|
+
// 'cc_authenticated': false
|
209
|
+
// };
|
210
|
+
|
193
211
|
var user_state = {
|
194
212
|
'theme_css': "",
|
195
213
|
'theme_name': "",
|
196
214
|
'theme_author': "",
|
197
215
|
'theme_version': '{{site.version}}',
|
198
|
-
'cookies_accepted': 'pending',
|
199
|
-
'whitelistedPages': default_white_listed_pages,
|
200
|
-
'deleteOnDecline': false,
|
201
|
-
'showConsentOnPending': false,
|
202
216
|
'stopScrolling': true,
|
203
217
|
'session_active': false,
|
204
|
-
'last_session_ts': ''
|
205
|
-
'cc_authenticated': false
|
218
|
+
'last_session_ts': ''
|
206
219
|
};
|
207
220
|
|
208
221
|
// ---------------------------------------------------------------------------
|
@@ -586,7 +599,8 @@ var j1 = (function () {
|
|
586
599
|
if (selector.length) {
|
587
600
|
logText = 'loading banner on id: ' +banner[i];
|
588
601
|
logger.info(logText);
|
589
|
-
|
602
|
+
// var banner_data_path = '{{banner_data_path}} ' + id + ' > *';
|
603
|
+
var banner_data_path = '{{banner_data_path}} ' + id;
|
590
604
|
selector.load(banner_data_path, cb_load_closure(id));
|
591
605
|
}
|
592
606
|
} // END for
|
@@ -689,7 +703,8 @@ var j1 = (function () {
|
|
689
703
|
if ( selector.length ) {
|
690
704
|
logText = 'loading panel on id: ' +panel[i];
|
691
705
|
logger.info(logText);
|
692
|
-
|
706
|
+
// var panel_data_path = '{{panel_data_path}} ' + id + ' > *';
|
707
|
+
var panel_data_path = '{{panel_data_path}} ' + id;
|
693
708
|
selector.load(panel_data_path, cb_load_closure(id));
|
694
709
|
}
|
695
710
|
} // END for
|
@@ -749,7 +764,8 @@ var j1 = (function () {
|
|
749
764
|
var id = '#' + '{{footer_id}}';
|
750
765
|
var selector = $(id);
|
751
766
|
if ( selector.length ) {
|
752
|
-
|
767
|
+
// var footer_data_path = '{{footer_data_path}} ' + id + ' > *';
|
768
|
+
var footer_data_path = '{{footer_data_path}} ' + id;
|
753
769
|
selector.load(footer_data_path, cb_load_closure(id));
|
754
770
|
} else {
|
755
771
|
logText = 'data not loaded';
|
@@ -835,7 +851,7 @@ var j1 = (function () {
|
|
835
851
|
$('#no_flicker').css('display', 'block');
|
836
852
|
|
837
853
|
// show|hide cookie icon (should MOVED to Cookiebar ???)
|
838
|
-
if (
|
854
|
+
if (j1.existsCookie(cookie_names.user_consent)) {
|
839
855
|
// Display cookie icon
|
840
856
|
logText = 'show cookie icon';
|
841
857
|
logger.info(logText);
|
@@ -929,7 +945,7 @@ var j1 = (function () {
|
|
929
945
|
}
|
930
946
|
|
931
947
|
// show|hide cookie icon (should MOVED to Cookiebar ???)
|
932
|
-
if (
|
948
|
+
if (j1.existsCookie(cookie_names.user_consent)) {
|
933
949
|
// Display cookie icon
|
934
950
|
logText = 'show cookie icon';
|
935
951
|
logger.info(logText);
|
@@ -1161,15 +1177,20 @@ var j1 = (function () {
|
|
1161
1177
|
}
|
1162
1178
|
};
|
1163
1179
|
};
|
1180
|
+
|
1164
1181
|
// see: https://stackoverflow.com/questions/20420577/detect-added-element-to-dom-with-mutation-observer
|
1182
|
+
//
|
1165
1183
|
var html_data_path;
|
1166
1184
|
var id = '#' + options.xhr_container_id;
|
1185
|
+
var container = '#' + options.xhr_container_id + '_container';
|
1167
1186
|
var $selector = $(id);
|
1168
1187
|
|
1169
1188
|
if ( $selector.length ) {
|
1170
1189
|
if (options.xhr_data_element) {
|
1171
|
-
html_data_path = options.xhr_data_path + ' #' + options.xhr_data_element
|
1190
|
+
html_data_path = options.xhr_data_path + ' #' + options.xhr_data_element;
|
1191
|
+
logger.info('XHR data element found: ' + options.xhr_data_element);
|
1172
1192
|
} else {
|
1193
|
+
logger.warn('no XHR data element found. HTML data loaded full page.');
|
1173
1194
|
html_data_path = options.xhr_data_path + ' > *';
|
1174
1195
|
}
|
1175
1196
|
$selector.load( html_data_path, cb_load_closure( mod, id ) );
|
@@ -1234,6 +1255,19 @@ var j1 = (function () {
|
|
1234
1255
|
}
|
1235
1256
|
}, // END readCookie
|
1236
1257
|
|
1258
|
+
// -------------------------------------------------------------------------
|
1259
|
+
// findCookie()
|
1260
|
+
// Search for cookies (names) in the page header that matches
|
1261
|
+
// a given regex string. Returns all names found as an array.
|
1262
|
+
// -------------------------------------------------------------------------
|
1263
|
+
// See: https://stackoverflow.com/questions/52287989/javascript-cookie-remove-or-delete-with-regex-regular-expression
|
1264
|
+
// -------------------------------------------------------------------------
|
1265
|
+
findCookie: function (regex) {
|
1266
|
+
var r=[];
|
1267
|
+
document.cookie.replace(new RegExp(regex + "[^= ]*", "g"), function(a){ r.push(a.trim()); });
|
1268
|
+
return r;
|
1269
|
+
}, // END findCookie
|
1270
|
+
|
1237
1271
|
// -------------------------------------------------------------------------
|
1238
1272
|
// writeCookie()
|
1239
1273
|
// Write 'data' to a cookie 'name'. If not exists, the cookie gets
|
@@ -1268,7 +1302,7 @@ var j1 = (function () {
|
|
1268
1302
|
expires: 0,
|
1269
1303
|
path: '/',
|
1270
1304
|
// SameSite: 'Strict',
|
1271
|
-
|
1305
|
+
// SameSite: 'Lax',
|
1272
1306
|
http_only: false,
|
1273
1307
|
secure: false
|
1274
1308
|
};
|
@@ -1349,8 +1383,7 @@ var j1 = (function () {
|
|
1349
1383
|
// by the browser if the last session (browser window) is closed.
|
1350
1384
|
// See: https://stackoverflow.com/questions/179355/clearing-all-cookies-with-javascript
|
1351
1385
|
// -------------------------------------------------------------------------
|
1352
|
-
deleteCookie: function (
|
1353
|
-
var name = options;
|
1386
|
+
deleteCookie: function (name) {
|
1354
1387
|
var all_cookies = document.cookie.split('; ');
|
1355
1388
|
|
1356
1389
|
if ( name === 'all' ) {
|
@@ -152,8 +152,9 @@ j1.adapter['justifiedGalleryCustomizer'] = (function (j1, window) {
|
|
152
152
|
// data loader
|
153
153
|
// ---------------------------------------------------------------------
|
154
154
|
j1.xhrData ({
|
155
|
-
xhr_container_id:
|
156
|
-
xhr_data_path:
|
155
|
+
xhr_container_id: customizerOptions.xhr_container_id,
|
156
|
+
xhr_data_path: customizerOptions.xhr_data_path,
|
157
|
+
xhr_data_element: customizerOptions.xhr_data_element },
|
157
158
|
'j1.adapter.gallery_customizer',
|
158
159
|
'null'
|
159
160
|
);
|
@@ -209,13 +209,17 @@ j1.adapter['mmenu'] = (function (j1, window) {
|
|
209
209
|
to
|
210
210
|
{% if forloop.last %}'data_loaded'{% else %}'data_loaded'{% endif %}){% if forloop.last %}{% else %},{% endif %}
|
211
211
|
-------------------------------------------------------------------------- {% endcomment %}
|
212
|
+
|
212
213
|
{% for item in nav_mmenu_options.menus %} {% if item.menu.enabled %}
|
213
|
-
|
214
|
-
{% assign
|
214
|
+
|
215
|
+
{% assign menu_id = item.menu.xhr_container_id %}
|
216
|
+
{% assign xhr_data_path = item.menu.xhr_data_path %}
|
217
|
+
{% assign xhr_data_element = item.menu.xhr_data_element %}
|
215
218
|
|
216
219
|
j1.xhrData ({
|
217
|
-
xhr_container_id:
|
218
|
-
xhr_data_path:
|
220
|
+
xhr_container_id: '{{menu_id}}',
|
221
|
+
xhr_data_path: '{{xhr_data_path}}',
|
222
|
+
xhr_data_element: '{{xhr_data_element}}' },
|
219
223
|
'j1.adapter.mmenu',
|
220
224
|
{% if forloop.last %}'data_loaded'{% else %}'null'{% endif %}){% if forloop.last %};{% else %};{% endif %}
|
221
225
|
|