j1-template 2020.0.9 → 2020.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +8 -3
- data/assets/data/search.yml +32 -10
- data/assets/themes/j1/adapter/js/algolia.js +21 -13
- data/assets/themes/j1/adapter/js/attic.js +31 -30
- data/assets/themes/j1/adapter/js/carousel.js +31 -20
- data/assets/themes/j1/adapter/js/cookie_consent.js +8 -0
- data/assets/themes/j1/adapter/js/framer.js +8 -1
- data/assets/themes/j1/adapter/js/gallery_customizer.js +16 -8
- data/assets/themes/j1/adapter/js/j1.js +70 -101
- data/assets/themes/j1/adapter/js/justified_gallery.js +50 -33
- data/assets/themes/j1/adapter/js/lightbox.js +9 -1
- data/assets/themes/j1/adapter/js/logger.js +12 -4
- data/assets/themes/j1/adapter/js/mmenu.js +16 -8
- data/assets/themes/j1/adapter/js/navigator.js +59 -75
- data/assets/themes/j1/adapter/js/searcher.js +10 -2
- data/assets/themes/j1/adapter/js/ssm.js +29 -51
- data/assets/themes/j1/adapter/js/themer.js +10 -2
- data/assets/themes/j1/adapter/js/toccer.js +8 -0
- data/assets/themes/j1/core/css/theme_extensions.css +57 -2
- data/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
- data/assets/themes/j1/core/css/uno.css +57 -2
- data/assets/themes/j1/core/css/uno.min.css +1 -1
- data/assets/themes/j1/core/js/template.js +2 -2
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.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/defaults/navigator.yml +4 -3
- data/lib/starter_web/_data/modules/jekyll_search.yml +3 -2
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/clear_button.adoc +121 -0
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/100_meet_and_greet_jekyll.adoc +9 -4
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +54 -48
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +5 -3
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +3 -3
- data/lib/starter_web/_plugins/uglify.rb +0 -41
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 294ad76aaea5bb9b75bfe21b5412ca52d5f63255c80e6383d42717171b886311
|
|
4
|
+
data.tar.gz: 9ee6d60d4f040fcff8d7ed4f9e0b1b0cc3327c625e2026da898fecc520000dda
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 34562865fd1e38574fbb99d55cbcab7cee3e704febe4fe410a560d7147fba85541cf33331b8755efbccf7092eb19fecf1790e59dff3080a26c8249bef63b7d23
|
|
7
|
+
data.tar.gz: 7e80771307131117aac96d63e40e08aa3c8d592fd3cc7335666568d95d4cbbe76901c383c0334c2ee86ad6453ab4824d88519d4b5e1a332debe8be59c0790d3c
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
-------------------------------------------------------------------------------- {% endcomment %}
|
|
28
28
|
{% capture select_color %}themes/{{site.template.name}}/procedures/global/select_color.proc{% endcapture %}
|
|
29
29
|
{% capture select_icon_size %}themes/{{site.template.name}}/procedures/global/select_icon_size.proc{% endcapture %}
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
|
|
32
32
|
{% comment %} Liquid var initialization
|
|
33
33
|
-------------------------------------------------------------------------------- {% endcomment %}
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
{% assign result_heading_lead = topsearch_options.result_heading_lead %}
|
|
53
53
|
{% assign search_icon = topsearch_options.search_icon %}
|
|
54
54
|
{% assign close_icon = topsearch_options.close_icon %}
|
|
55
|
+
{% assign clear_icon = topsearch_options.clear_icon %}
|
|
55
56
|
|
|
56
57
|
{% assign quick_search = true %}
|
|
57
58
|
{% assign elastic_search = false %}
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
{% assign icon_size = size %}
|
|
81
82
|
|
|
82
83
|
|
|
83
|
-
{% comment %} Main
|
|
84
|
+
{% comment %} Main
|
|
84
85
|
-------------------------------------------------------------------------------- {% endcomment %}
|
|
85
86
|
{% if topsearch_options.enabled %}
|
|
86
87
|
|
|
@@ -93,13 +94,17 @@
|
|
|
93
94
|
<div class="input-group">
|
|
94
95
|
<span class="input-group-addon"><i class="{{icon_family}} {{icon_family}}-{{search_icon}} {{icon_size}}" {{icon_color}}></i></span>
|
|
95
96
|
<input type="text" id="jss-input" class="form-control" placeholder="{{placeholder}}">
|
|
97
|
+
{% if clear_icon %}
|
|
98
|
+
<!-- [INFO ] [j1.modules.navigator.topsearch.proc ] [ place clear icon ] -->
|
|
99
|
+
<span class="form-clear form-clear-searcher d-none"><i class="{{icon_family}} {{icon_family}}-{{clear_icon}} {{icon_size}}" {{icon_color}}"></i></span>
|
|
100
|
+
{% endif %}
|
|
96
101
|
<span class="input-group-addon close-search"><i class="{{icon_family}} {{icon_family}}-{{close_icon}} {{icon_size}}" {{icon_color}}></i></span>
|
|
97
102
|
</div>
|
|
98
103
|
</div>
|
|
99
104
|
<!-- [INFO ] [j1.modules.navigator.topsearch.proc ] [ add search panel (hidden) ] -->
|
|
100
105
|
<div class="row">
|
|
101
106
|
<!-- div class="card card-flat panel-search mr-5 mb-3 ml-5" id="jss-panel" style="display: none" -->
|
|
102
|
-
<div class="panel-search mr-5 mb-3
|
|
107
|
+
<div class="panel-search mr-5 mb-3 col-lg-9" id="jss-panel" style="display: none">
|
|
103
108
|
{% if search_heading_lead %}<div class="panel-heading lead">{{ search_heading_lead }}</div>{% endif %}
|
|
104
109
|
{% if result_heading_lead %}<div class="panel-body"><p>{{ result_heading_lead }}</p></div>{% endif %}
|
|
105
110
|
<div class="search-list-group mr-5 ml-2">
|
data/assets/data/search.yml
CHANGED
|
@@ -2,8 +2,30 @@
|
|
|
2
2
|
regenerate: true
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
{%
|
|
5
|
+
{% comment %} Set global settings
|
|
6
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
|
7
|
+
{% assign environment = site.environment %}
|
|
8
|
+
{% assign template_version = site.version %}
|
|
9
|
+
|
|
10
|
+
{% comment %} Process YML config data
|
|
11
|
+
================================================================================ {% endcomment %}
|
|
6
12
|
|
|
13
|
+
{% comment %} Set config files
|
|
14
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
|
15
|
+
{% assign template_config = site.data.template_settings %}
|
|
16
|
+
{% assign blocks = site.data.blocks %}
|
|
17
|
+
{% assign modules = site.data.modules %}
|
|
18
|
+
|
|
19
|
+
{% comment %} Set config data
|
|
20
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
|
21
|
+
{% assign jekyll_search_defaults = modules.defaults.jekyll_search.defaults %}
|
|
22
|
+
{% assign jekyll_search_settings = modules.jekyll_search.settings %}
|
|
23
|
+
|
|
24
|
+
{% comment %} Set config options
|
|
25
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
|
26
|
+
{% assign jekyll_search_options = jekyll_search_defaults | merge: jekyll_search_settings %}
|
|
27
|
+
|
|
28
|
+
{% capture cache %}
|
|
7
29
|
{% comment %}
|
|
8
30
|
# -----------------------------------------------------------------------------
|
|
9
31
|
# ~/assets/data/search.yml
|
|
@@ -25,14 +47,14 @@ regenerate: true
|
|
|
25
47
|
# This template is a helper that creates the search database (index, YAML)
|
|
26
48
|
# for all documents.
|
|
27
49
|
#
|
|
28
|
-
# The Liquid template generates a simple YAML file as an array that contains
|
|
50
|
+
# The Liquid template generates a simple YAML file as an array that contains
|
|
29
51
|
# objects for ALL posts and pages included for indexing. See below the fields
|
|
30
52
|
# taken from the source files.
|
|
31
53
|
#
|
|
32
54
|
# NOTE:
|
|
33
55
|
# Be careful changing the Liquid code. If the code is changed, check
|
|
34
56
|
# the integrity of the YAML data created. Corrupted YAML data makes
|
|
35
|
-
# the Javascript of SimpleJekyllSearch to fail (JSONLoader.js) and no
|
|
57
|
+
# the Javascript of SimpleJekyllSearch to fail (JSONLoader.js) and no
|
|
36
58
|
# search functionality will be available for most UNCLEAR reasons.
|
|
37
59
|
#
|
|
38
60
|
# -----------------------------------------------------------------------------
|
|
@@ -44,8 +66,8 @@ regenerate: true
|
|
|
44
66
|
{% assign quick_search_config = site.data.modules.j1_jekyll_search %}
|
|
45
67
|
{% assign result_target = quick_search_config.target %}
|
|
46
68
|
|
|
47
|
-
{% comment %}
|
|
48
|
-
Set posts count by posts_num. Indicates if a comma needs to be
|
|
69
|
+
{% comment %}
|
|
70
|
+
Set posts count by posts_num. Indicates if a comma needs to be
|
|
49
71
|
set for valid JSON
|
|
50
72
|
-------------------------------------------------------------------------------- {% endcomment %}
|
|
51
73
|
{% assign posts_num = site.posts.size %}
|
|
@@ -74,14 +96,14 @@ regenerate: true
|
|
|
74
96
|
"url": "{{ site.baseurl }}{{ post.url }}",
|
|
75
97
|
"target": "{{ result_target }}",
|
|
76
98
|
{% if post.excerpt %}
|
|
77
|
-
"excerpt": "{{ post.excerpt | newline_to_br | strip_html | strip | newline_to_space | replace:'"','\"' | truncatewords:
|
|
99
|
+
"excerpt": "{{ post.excerpt | newline_to_br | strip_html | strip | newline_to_space | replace:'"','\"' | truncatewords: jekyll_search_options.result_truncate | replace:'....',' ...' | replace:':...',' ...' }}"
|
|
78
100
|
{% else %}
|
|
79
101
|
"excerpt": ""
|
|
80
102
|
{% endif %}
|
|
81
103
|
}{% if posts_num %},{% endif %}
|
|
82
104
|
{% endfor %}
|
|
83
105
|
|
|
84
|
-
{% comment %} For unknown reason, loop for pages needs corrected
|
|
106
|
+
{% comment %} For unknown reason, loop for pages needs corrected
|
|
85
107
|
by page_offset. Helper forloop.last not usable.
|
|
86
108
|
------------------------------------------------------------------------------ {% endcomment %}
|
|
87
109
|
|
|
@@ -93,7 +115,7 @@ regenerate: true
|
|
|
93
115
|
{% for page in site.pages %}
|
|
94
116
|
{% if page.noindex %} {% continue %} {% endif %}
|
|
95
117
|
{% if page.url contains 'assets' or page.url contains '.json' or page.url contains '.txt' %} {% continue %} {% endif %}
|
|
96
|
-
{% if page.url contains '.html' %} {% continue %} {% endif %}
|
|
118
|
+
{% if page.url contains '.html' %} {% continue %} {% endif %}
|
|
97
119
|
{% if page.url == '/'%} {% continue %} {% endif %}
|
|
98
120
|
{
|
|
99
121
|
"title": "{{ page.title | escape }}",
|
|
@@ -116,9 +138,9 @@ regenerate: true
|
|
|
116
138
|
"url": "{{ site.baseurl }}{{ page.url }}",
|
|
117
139
|
"target": "{{ result_target }}",
|
|
118
140
|
{% if page.excerpt %}
|
|
119
|
-
"excerpt": "{{ page.excerpt | newline_to_br | strip_html | strip | newline_to_space |
|
|
141
|
+
"excerpt": "{{ page.excerpt | newline_to_br | strip_html | strip | newline_to_space | replace:'"','\"' | truncatewords: jekyll_search_options.result_truncate | replace:'....',' ...' | replace:':...',' ...' }}"
|
|
120
142
|
{% else %}
|
|
121
|
-
"excerpt": "{{ page.description | newline_to_br | strip_html | strip | newline_to_space |
|
|
143
|
+
"excerpt": "{{ page.description | newline_to_br | strip_html | strip | newline_to_space | replace:'"','\"' | truncatewords: jekyll_search_options.result_truncate | replace:'....',' ...' | replace:':...',' ...' }}"
|
|
122
144
|
{% endif %}
|
|
123
145
|
}{% unless forloop.rindex0 == page_offset %},{% endunless %}
|
|
124
146
|
{% endfor %}
|
|
@@ -63,6 +63,12 @@ regenerate: false
|
|
|
63
63
|
# Adapter generated: {{site.time}}
|
|
64
64
|
# -----------------------------------------------------------------------------
|
|
65
65
|
*/
|
|
66
|
+
|
|
67
|
+
// -----------------------------------------------------------------------------
|
|
68
|
+
// ESLint shimming
|
|
69
|
+
// -----------------------------------------------------------------------------
|
|
70
|
+
/* eslint indent: "off" */
|
|
71
|
+
// -----------------------------------------------------------------------------
|
|
66
72
|
'use strict';
|
|
67
73
|
|
|
68
74
|
{% comment %} Main
|
|
@@ -113,7 +119,9 @@ j1.adapter['algolia'] = (function (j1, window) {
|
|
|
113
119
|
{% comment %} Load module config from yml data
|
|
114
120
|
-------------------------------------------------------------------------- {% endcomment %}
|
|
115
121
|
// Load module DEFAULTS|CONFIG
|
|
122
|
+
/* eslint-disable */
|
|
116
123
|
moduleOptions = $.extend({}, {{algolia_config | replace: '=>', ':' | replace: 'nil', '""'}});
|
|
124
|
+
/* eslint-enable */
|
|
117
125
|
|
|
118
126
|
if (typeof settings !== 'undefined') {
|
|
119
127
|
moduleOptions = j1.mergeData(moduleOptions, settings);
|
|
@@ -129,24 +137,24 @@ j1.adapter['algolia'] = (function (j1, window) {
|
|
|
129
137
|
var hitTemplate = function(hit) {
|
|
130
138
|
// state = 'start search';
|
|
131
139
|
// logger.info('state: ' + state);
|
|
132
|
-
// var re = new RegExp(
|
|
133
|
-
// var re = new RegExp(
|
|
134
|
-
var re = new RegExp(
|
|
140
|
+
// var re = new RegExp('^\/posts');
|
|
141
|
+
// var re = new RegExp('^\/pages');
|
|
142
|
+
var re = new RegExp('^\/pages|^\/posts|^\/collections');
|
|
135
143
|
if (re.test(hit.url)) {
|
|
136
|
-
|
|
144
|
+
var date = '';
|
|
137
145
|
if (hit.date) {
|
|
138
146
|
date = moment.unix(hit.date).format('MMM D, YYYY');
|
|
139
147
|
}
|
|
140
|
-
//
|
|
141
|
-
|
|
148
|
+
// var url = `/jekyll-algolia-example${hit.url}#${hit.anchor}`;
|
|
149
|
+
var url = hit.url;
|
|
142
150
|
|
|
143
151
|
const title = hit._highlightResult.title.value;
|
|
144
|
-
|
|
152
|
+
var breadcrumbs = '';
|
|
145
153
|
|
|
146
154
|
if (hit._highlightResult.headings) {
|
|
147
155
|
breadcrumbs = hit._highlightResult.headings.map(match => {
|
|
148
|
-
return `<span class="post-breadcrumb">${match.value}</span
|
|
149
|
-
}).join(' > ')
|
|
156
|
+
return `<span class="post-breadcrumb">${match.value}</span>`;
|
|
157
|
+
}).join(' > ');
|
|
150
158
|
}
|
|
151
159
|
|
|
152
160
|
var content = hit._highlightResult.html.value;
|
|
@@ -169,7 +177,7 @@ j1.adapter['algolia'] = (function (j1, window) {
|
|
|
169
177
|
}
|
|
170
178
|
// state = 'finished search';
|
|
171
179
|
// logger.info('state: ' + state);
|
|
172
|
-
}
|
|
180
|
+
};
|
|
173
181
|
|
|
174
182
|
if (moduleOptions.enabled == true) {
|
|
175
183
|
// initialize currentRefinedValues
|
|
@@ -230,9 +238,9 @@ j1.adapter['algolia'] = (function (j1, window) {
|
|
|
230
238
|
container: '#refinement-list',
|
|
231
239
|
attributeName: 'tags',
|
|
232
240
|
collapsible: true,
|
|
233
|
-
operator:
|
|
241
|
+
operator: 'and',
|
|
234
242
|
limit: 5,
|
|
235
|
-
sortBy: [
|
|
243
|
+
sortBy: ['isRefined','count:desc','name:asc'],
|
|
236
244
|
templates: {
|
|
237
245
|
header: 'Tags'
|
|
238
246
|
},
|
|
@@ -264,7 +272,7 @@ j1.adapter['algolia'] = (function (j1, window) {
|
|
|
264
272
|
$('#algolia-site-search').append('<p class="ml-5 mt-5 mb-5 "> <strong>Algolia Search DISABLED</strong> </p>');
|
|
265
273
|
_this.setState('finished');
|
|
266
274
|
logger.info('state: ' + _this.getState());
|
|
267
|
-
logger.warn(
|
|
275
|
+
logger.warn('module disabled');
|
|
268
276
|
}
|
|
269
277
|
|
|
270
278
|
return true;
|
|
@@ -70,6 +70,12 @@ regenerate: true
|
|
|
70
70
|
# Adapter generated: {{site.time}}
|
|
71
71
|
# -----------------------------------------------------------------------------
|
|
72
72
|
*/
|
|
73
|
+
|
|
74
|
+
// -----------------------------------------------------------------------------
|
|
75
|
+
// ESLint shimming
|
|
76
|
+
// -----------------------------------------------------------------------------
|
|
77
|
+
/* eslint indent: "off" */
|
|
78
|
+
// -----------------------------------------------------------------------------
|
|
73
79
|
'use strict';
|
|
74
80
|
|
|
75
81
|
{% comment %} Main
|
|
@@ -143,7 +149,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
|
143
149
|
function {{attic_id}} (atticOptions) {
|
|
144
150
|
// Fire backstretch for all slides of the header on attic_id
|
|
145
151
|
if ($('#{{attic_id}}').length) {
|
|
146
|
-
$(
|
|
152
|
+
$('#{{attic_id}}').backstretch(
|
|
147
153
|
atticOptions.slides, {
|
|
148
154
|
debug: atticOptions.debug,
|
|
149
155
|
spinner: atticOptions.spinner,
|
|
@@ -188,7 +194,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
|
188
194
|
See: https://github.com/jquery-backstretch/jquery-backstretch/issues/194
|
|
189
195
|
-------------------------------------------------------------------- {% endcomment %}
|
|
190
196
|
$(window).on('backstretch.after', function (e, instance, index) {
|
|
191
|
-
logText ='add caption text'
|
|
197
|
+
logText ='add caption text';
|
|
192
198
|
_this.setState('backstretch_after');
|
|
193
199
|
logger.debug('state: ' + status);
|
|
194
200
|
logger.debug(logText);
|
|
@@ -235,7 +241,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
|
235
241
|
{% comment %} Detect how show should run (only once|infinite loop)
|
|
236
242
|
-------------------------------------------------------------------- {% endcomment %}
|
|
237
243
|
{% if image_loop %}
|
|
238
|
-
$(window).on(
|
|
244
|
+
$(window).on('backstretch.before', function (e, instance, index) {
|
|
239
245
|
_this.setState('backstretch_before_image_loop');
|
|
240
246
|
logger.debug('state: ' + _this.getState());
|
|
241
247
|
// remove class for the backstretch_intro background
|
|
@@ -244,12 +250,12 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
|
244
250
|
}
|
|
245
251
|
});
|
|
246
252
|
{% else %}
|
|
247
|
-
$(window).on(
|
|
253
|
+
$(window).on('backstretch.before', function (e, instance, index) {
|
|
248
254
|
_this.setState('backstretch_before_image_once');
|
|
249
255
|
logger.debug('state: ' + _this.getState());
|
|
250
256
|
// Stop the slideshow after reached the last image
|
|
251
257
|
if (index === backstretch_instance_data.images.length -1) {
|
|
252
|
-
$(
|
|
258
|
+
$('#{{attic_id}}').backstretch('pause');
|
|
253
259
|
// remove class for the backstretch_intro background
|
|
254
260
|
$('.backstretch').removeClass(atticOptions.spinner);
|
|
255
261
|
}
|
|
@@ -316,6 +322,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
|
316
322
|
|
|
317
323
|
// Create and json object for HEADER options taken from
|
|
318
324
|
// header config (YAML data file)
|
|
325
|
+
/* eslint-disable */
|
|
319
326
|
var atticOptions = {
|
|
320
327
|
{% if raised_level %} "raised_level": {{ raised_level | json }}, {% endif %}
|
|
321
328
|
{% if r_text %} "r_text": {{ r_text | json }}, {% endif %}
|
|
@@ -334,10 +341,10 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
|
334
341
|
{% if background_color_1 %} "background_color_1": {{ background_color_1 | json }}, {% endif %}
|
|
335
342
|
{% if background_color_2 %} "background_color_2": {{ background_color_2 | json }}, {% endif %}
|
|
336
343
|
}
|
|
337
|
-
|
|
344
|
+
/* eslint-enable */
|
|
338
345
|
{% comment %} trans-script header|backstretch options
|
|
339
346
|
---------------------------------------------------------------- {% endcomment %}
|
|
340
|
-
{% if type ==
|
|
347
|
+
{% if type == 'video' %}
|
|
341
348
|
{% assign isVideo = true %}
|
|
342
349
|
{% if sound %} {% assign mute = false %} {% else %} {% assign mute = true %} {% endif %}
|
|
343
350
|
{% if loop %} {% assign loop = true %} {% else %} {% assign loop = true %} {% endif %}
|
|
@@ -345,6 +352,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
|
345
352
|
|
|
346
353
|
// Create an json object for BACKSTRETCH options taken from
|
|
347
354
|
// header config (yaml data file)
|
|
355
|
+
/* eslint-disable */
|
|
348
356
|
var atticOptions = {
|
|
349
357
|
{% if spinner %} "spinner": {{ spinner | json }}, {% endif %}
|
|
350
358
|
{% if opacity %} "opacity": {{ opacity | json }}, {% endif %}
|
|
@@ -366,20 +374,13 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
|
366
374
|
{% if duration %} "duration": {{ duration | json }}, {% endif %}
|
|
367
375
|
}
|
|
368
376
|
|
|
369
|
-
// Load
|
|
377
|
+
// Load Attic DEFAULTS
|
|
370
378
|
var attic_options = $.extend({}, {{attic_options | replace:'=>',':' }});
|
|
371
379
|
|
|
372
|
-
// Merge|Overload
|
|
380
|
+
// Merge|Overload Attic DEFAULTS by individual settings
|
|
373
381
|
// var atticOptions = j1.mergeData(attic_options, atticOptions);
|
|
374
382
|
var atticOptions = j1.mergeData(atticOptions, attic_options);
|
|
375
|
-
|
|
376
|
-
// Load Backstretch DEFAULTS
|
|
377
|
-
//var image_attic_defaults = $.extend({}, {{image_attic_defaults | replace:'=>',':' }});
|
|
378
|
-
|
|
379
|
-
// Merge|Overload Backstretch DEFAULTS by (header) OPTIONS
|
|
380
|
-
//var atticOptions = j1.mergeData(image_attic_defaults, atticOptions);
|
|
381
|
-
|
|
382
|
-
|
|
383
|
+
/* eslint-enable */
|
|
383
384
|
{% else %}
|
|
384
385
|
{% continue %}
|
|
385
386
|
{% endif %} // ENDIF attic_id
|
|
@@ -447,12 +448,12 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
|
447
448
|
-------------------------------------------------------------------- {% endcomment %}
|
|
448
449
|
if (atticOptions.r_text == 'enabled') { $('#{{attic_id}}').addClass('r-text'); }
|
|
449
450
|
|
|
450
|
-
var raised_level =
|
|
451
|
+
var raised_level = 'raised-z' +atticOptions.raised_level;
|
|
451
452
|
$('#{{attic_id}}').addClass(raised_level);
|
|
452
453
|
$('#head-title').addClass(atticOptions.title_animate);
|
|
453
454
|
$('#head-tagline').addClass(atticOptions.tagline_animate);
|
|
454
455
|
|
|
455
|
-
var text_emphasis =
|
|
456
|
+
var text_emphasis = 'text-emphasis-' +atticOptions.text_emphasis;
|
|
456
457
|
$('#head-title-text').addClass(text_emphasis);
|
|
457
458
|
$('#head-tagline-text').addClass(text_emphasis);
|
|
458
459
|
|
|
@@ -461,22 +462,22 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
|
461
462
|
var attic_style = '';
|
|
462
463
|
|
|
463
464
|
// Initialze header background gradient
|
|
464
|
-
attic_style +=
|
|
465
|
-
attic_style +=
|
|
466
|
-
attic_style +=
|
|
467
|
-
attic_style +=
|
|
468
|
-
attic_style +=
|
|
469
|
-
attic_style += 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="' +atticOptions.background_color_1+ '", endColorstr="' +atticOptions.background_color_2+ '", GradientType=0);
|
|
470
|
-
attic_style +=
|
|
465
|
+
attic_style += '<style> .attic { ';
|
|
466
|
+
attic_style += 'background-image: -webkit-gradient(linear, left top, left bottom, from(' +atticOptions.background_color_1+ '), to(' +atticOptions.background_color_2+ '));';
|
|
467
|
+
attic_style += 'background-image: -webkit-linear-gradient(top, ' +atticOptions.background_color_1+ ' 0%, ' +atticOptions.background_color_2+ ' 100%);';
|
|
468
|
+
attic_style += 'background-image: -o-linear-gradient(top, ' +atticOptions.background_color_1+ ' 0%, ' +atticOptions.background_color_2+ ' 100%);';
|
|
469
|
+
attic_style += 'background-image: linear-gradient(to bottom, ' +atticOptions.background_color_1+ ' 0%, ' +atticOptions.background_color_2+ ' 100%);';
|
|
470
|
+
attic_style += 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="' +atticOptions.background_color_1+ '", endColorstr="' +atticOptions.background_color_2+ '", GradientType=0);';
|
|
471
|
+
attic_style += '} </style>';
|
|
471
472
|
$('head').append(attic_style);
|
|
472
473
|
|
|
473
474
|
// Initialze header sizes
|
|
474
475
|
attic_style = '';
|
|
476
|
+
attic_style = '<style> .attic { padding-top: ' +atticOptions.padding_top+ 'px; padding-bottom: ' +atticOptions.padding_bottom+ 'px; margin-bottom: ' +atticOptions.margin_bottom+ 'px; text-shadow: 0 1px 0 rgba(0,0,0,.1); </style>';
|
|
475
477
|
|
|
476
|
-
attic_style = "<style> .attic { padding-top:" +atticOptions.padding_top+ "px; padding-bottom: " +atticOptions.padding_bottom+ "px; margin-bottom: " +atticOptions.margin_bottom+ "px; text-shadow: 0 1px 0 rgba(0,0,0,.1); </style>"
|
|
477
478
|
$('head').append(attic_style);
|
|
478
|
-
$('head').append(
|
|
479
|
-
$('head').append(
|
|
479
|
+
$('head').append('<style> .attic .head-title h2 { color: ' +atticOptions.title_color+ ';font-size: ' +atticOptions.title_size+ ' !important; text-align: ' +atticOptions.title_align+ ';} </style>');
|
|
480
|
+
$('head').append('<style> .attic .head-tagline h3 { color: ' +atticOptions.tagline_color+ ';font-size: ' +atticOptions.tagline_size+ ' !important; text-align: ' +atticOptions.tagline_align+ '; } </style>');
|
|
480
481
|
|
|
481
482
|
// Add opacity to all header images
|
|
482
483
|
// See: https://tympanus.net/codrops/2013/11/07/css-overlay-techniques/
|
|
@@ -495,7 +496,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
|
495
496
|
$(function() {
|
|
496
497
|
// logger.debug('Load image header on: ' + {{attic_id}});
|
|
497
498
|
logger.debug('Load image header');
|
|
498
|
-
{{attic_id}}(atticOptions)
|
|
499
|
+
{{attic_id}}(atticOptions);
|
|
499
500
|
_this.setState('completed');
|
|
500
501
|
logger.info('state: ' + _this.getState());
|
|
501
502
|
});
|
|
@@ -64,6 +64,12 @@ regenerate: true
|
|
|
64
64
|
# Adapter generated: {{site.time}}
|
|
65
65
|
# -----------------------------------------------------------------------------
|
|
66
66
|
*/
|
|
67
|
+
|
|
68
|
+
// -----------------------------------------------------------------------------
|
|
69
|
+
// ESLint shimming
|
|
70
|
+
// -----------------------------------------------------------------------------
|
|
71
|
+
/* eslint indent: "off" */
|
|
72
|
+
// -----------------------------------------------------------------------------
|
|
67
73
|
'use strict';
|
|
68
74
|
|
|
69
75
|
{% comment %} Main
|
|
@@ -102,7 +108,9 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
|
102
108
|
{% comment %} Load module config from yml data
|
|
103
109
|
-------------------------------------------------------------------------- {% endcomment %}
|
|
104
110
|
// Load module DEFAULTS|CONFIG
|
|
111
|
+
/* eslint-disable */
|
|
105
112
|
moduleOptions = $.extend({}, {{carousel_options | replace: '=>', ':' | replace: 'nil', '""'}});
|
|
113
|
+
/* eslint-enable */
|
|
106
114
|
|
|
107
115
|
if (typeof settings !== 'undefined') {
|
|
108
116
|
moduleOptions = j1.mergeData(moduleOptions, settings);
|
|
@@ -141,7 +149,7 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
|
141
149
|
{% if item.show.slide_height != null %}
|
|
142
150
|
// Set slide_height: {{item.show.slide_height}}vh
|
|
143
151
|
{% assign slide_height = item.show.slide_height %}
|
|
144
|
-
$('head').append(
|
|
152
|
+
$('head').append('<style>.owl-carousel .item{height: {{slide_height}}vh;}</style>');
|
|
145
153
|
{% endif %}
|
|
146
154
|
|
|
147
155
|
{% if item.show.slide_space_between %}
|
|
@@ -173,12 +181,13 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
|
173
181
|
$('head').append('<style>.parallax-slider__owl_demo_text_carousel_parallax:after{top:0;left:0;width:100%;height:100%;content:" ";position:absolute;background:rgba(0,0,0,0.3)}</style>');
|
|
174
182
|
{% endif %}
|
|
175
183
|
|
|
176
|
-
$('head').append(
|
|
184
|
+
$('head').append('<style>.{{slider_id}}-item{margin: {{slide_space}}px;}</style>');
|
|
177
185
|
//$('.{{slider_id}}-item').parent().addClass('owl-carousel');
|
|
178
186
|
//$('.owl-carousel .item').css('margin','{{slide_space}}px');
|
|
179
187
|
|
|
180
188
|
// Initialize individual show parameters
|
|
181
|
-
|
|
189
|
+
/* eslint-disable */
|
|
190
|
+
$('#{{slider_id}}').owlCarousel({
|
|
182
191
|
{% for option in item.show.options %}
|
|
183
192
|
{{option[0] | json}}: {{option[1] | json}},
|
|
184
193
|
{% endfor %}
|
|
@@ -189,29 +198,31 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
|
189
198
|
"jsonPath": {{carousel_options.xhr_data_path | json}},
|
|
190
199
|
"jsonSuccess": customDataSuccess_{{forloop.index}}
|
|
191
200
|
});
|
|
201
|
+
/* eslint-enable */
|
|
202
|
+
|
|
192
203
|
// Initialize instance variable (for later access)
|
|
193
204
|
//{{slider_id}} = $('#{{slider_id}}').data('owlCarousel');
|
|
194
205
|
|
|
195
|
-
j1[
|
|
206
|
+
j1['{{slider_id}}'] = $('#{{slider_id}}').data('owlCarousel');
|
|
196
207
|
|
|
197
208
|
// jQuery show data functions
|
|
198
209
|
function customDataSuccess_{{forloop.index}}(data){
|
|
199
|
-
var content =
|
|
200
|
-
for (var i in data[
|
|
210
|
+
var content = '';
|
|
211
|
+
for (var i in data['{{slider_id}}']) {
|
|
201
212
|
{% if slider_type == 'image' %}
|
|
202
|
-
var lb = data[
|
|
203
|
-
var lb_caption = data[
|
|
204
|
-
var img = data[
|
|
205
|
-
var alt = data[
|
|
213
|
+
var lb = data['{{slider_id}}'][i].lb;
|
|
214
|
+
var lb_caption = data['{{slider_id}}'][i].lb_caption;
|
|
215
|
+
var img = data['{{slider_id}}'][i].img;
|
|
216
|
+
var alt = data['{{slider_id}}'][i].alt;
|
|
206
217
|
{% endif %}
|
|
207
218
|
{% if slider_type == 'text' %}
|
|
208
|
-
var text = data[
|
|
219
|
+
var text = data['{{slider_id}}'][i].text;
|
|
209
220
|
{% endif %}
|
|
210
|
-
var href = data[
|
|
221
|
+
var href = data['{{slider_id}}'][i].href;
|
|
211
222
|
{% if css_classes %}
|
|
212
|
-
var css_classes = 'class="{{css_classes}}";'
|
|
223
|
+
var css_classes = 'class="{{css_classes}}";';
|
|
213
224
|
{% else %}
|
|
214
|
-
var css_classes = ''
|
|
225
|
+
var css_classes = '';
|
|
215
226
|
{% endif %}
|
|
216
227
|
|
|
217
228
|
{% if slider_type == 'image' %}
|
|
@@ -229,24 +240,24 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
|
229
240
|
}
|
|
230
241
|
content += '\t\t' + '</div>' + '\n';
|
|
231
242
|
} else {
|
|
232
|
-
content += '<a class="item" href="' +img+ '" ' + 'data-lightbox="{{slider_id}}"> <img class="lazyOwl" data-src="' +img+ '" alt="' +alt+ '">' + '</a>'
|
|
243
|
+
content += '<a class="item" href="' +img+ '" ' + 'data-lightbox="{{slider_id}}"> <img class="lazyOwl" data-src="' +img+ '" alt="' +alt+ '">' + '</a>';
|
|
233
244
|
}
|
|
234
245
|
} else if (href) {
|
|
235
|
-
content += '<div class="item">' + '<img ' +css_classes+ ' src="' +img+ '" alt="' +alt+ '">' + '</div>'
|
|
246
|
+
content += '<div class="item">' + '<img ' +css_classes+ ' src="' +img+ '" alt="' +alt+ '">' + '</div>';
|
|
236
247
|
} else {
|
|
237
|
-
content += '<div class="item">' + '<img ' +css_classes+ ' src="' +img+ '" alt="' +alt+ '">' + '</div>'
|
|
248
|
+
content += '<div class="item">' + '<img ' +css_classes+ ' src="' +img+ '" alt="' +alt+ '">' + '</div>';
|
|
238
249
|
}
|
|
239
250
|
{% endif %}
|
|
240
251
|
|
|
241
252
|
{% if slider_type == 'text' %}
|
|
242
253
|
if (href) {
|
|
243
|
-
content += '<div class="item">' + '<p href=' +href+ '">' +text+ '</p>' + '</div>'
|
|
254
|
+
content += '<div class="item">' + '<p href=' +href+ '">' +text+ '</p>' + '</div>';
|
|
244
255
|
} else {
|
|
245
|
-
content += '<div class="item">' + '<p>' +text+ '</p>' + '</div>'
|
|
256
|
+
content += '<div class="item">' + '<p>' +text+ '</p>' + '</div>';
|
|
246
257
|
}
|
|
247
258
|
{% endif %}
|
|
248
259
|
}
|
|
249
|
-
$(
|
|
260
|
+
$('#{{slider_id}}').html(content);
|
|
250
261
|
logText = 'initializing slider finished on id: {{slider_id}}';
|
|
251
262
|
logger.info(logText);
|
|
252
263
|
} // END customDataSuccess_{{forloop.index}}
|