j1_template_mde 2018.4.18 → 2018.4.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/j1/version.rb +1 -1
- data/lib/j1_app/j1_auth_manager/auth_manager.previous.rb +5 -5
- data/lib/j1_app/j1_auth_manager/auth_manager.rb +7 -7
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/j1_resources.yml +3 -0
- data/lib/starter_web/_data/modules/j1_footer.yml +3 -3
- data/lib/starter_web/_data/modules/j1_navigator.yml +3 -3
- data/lib/starter_web/assets/data/panel.html +2 -2
- data/lib/starter_web/assets/images/animated/1_ZrgWTM-NmdhJFac8T7-4Rg.gif +0 -0
- data/lib/starter_web/assets/images/animated/2049.gif +0 -0
- data/lib/starter_web/assets/themes/j1/core/js/adapter/algolia.js +231 -0
- data/lib/starter_web/assets/themes/j1/core/js/adapter/custom.js +1 -1
- data/lib/starter_web/assets/themes/j1/core/js/adapter/navigator.js +2 -2
- data/lib/starter_web/package.json +6 -1
- data/lib/starter_web/pages/public/start/roundtrip/200_cards.adoc +0 -2
- data/lib/starter_web/pages/public/start/roundtrip/800_search_engine.adoc +58 -109
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cc08a222c67c2fa2c2a707821f5c071a154e293
|
4
|
+
data.tar.gz: 654f49546f043ab52de64dfbc18372afd40ff92a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e93e65766a2c5ab3067142f05cbc296725ebdaee77b0be2e9dcfb79737cfcdccc659237f37f8877a894ec06741374078bd7e043c7c4a08327d41f20e7beeccfb
|
7
|
+
data.tar.gz: 390dbba1ded4939d54e9380f8eb9c463b16725d6bf2b24764f2f877b34cd9e927a9a2d88ebb9471934c2282c99c71eb3a27819298ae43530cc704bf513843162
|
data/lib/j1/version.rb
CHANGED
@@ -657,12 +657,12 @@ module J1App
|
|
657
657
|
reward = {
|
658
658
|
:id => 'unknown',
|
659
659
|
:name => 'unknown',
|
660
|
-
:link => '
|
660
|
+
:link => '#'
|
661
661
|
}
|
662
662
|
|
663
663
|
campaign = {
|
664
664
|
:id => 'unknown',
|
665
|
-
:link => '
|
665
|
+
:link => '#'
|
666
666
|
}
|
667
667
|
|
668
668
|
session_encoded = request.cookies['j1.web.session']
|
@@ -808,7 +808,7 @@ module J1App
|
|
808
808
|
user_member_url = warden.user[:extra][:reward][:link]
|
809
809
|
else
|
810
810
|
user_member = 'unknown'
|
811
|
-
user_member_url = '
|
811
|
+
user_member_url = '#'
|
812
812
|
end
|
813
813
|
|
814
814
|
log_info! 'Status', 'RestApi', 'User detected as signed in', "#{user}"
|
@@ -839,10 +839,10 @@ module J1App
|
|
839
839
|
user: 'unknown',
|
840
840
|
user_id: 'unknown',
|
841
841
|
provider: 'unknown',
|
842
|
-
provider_url: '
|
842
|
+
provider_url: '#',
|
843
843
|
permissions: 'unknown',
|
844
844
|
membership: 'unknown',
|
845
|
-
memberurl: '
|
845
|
+
memberurl: '#',
|
846
846
|
status: 'signed out'
|
847
847
|
}.to_json
|
848
848
|
end
|
@@ -657,12 +657,12 @@ module J1App
|
|
657
657
|
reward = {
|
658
658
|
:id => 'unknown',
|
659
659
|
:name => 'unknown',
|
660
|
-
:link => '
|
660
|
+
:link => '#'
|
661
661
|
}
|
662
662
|
|
663
663
|
campaign = {
|
664
664
|
:id => 'unknown',
|
665
|
-
:link => '
|
665
|
+
:link => '#'
|
666
666
|
}
|
667
667
|
|
668
668
|
session_encoded = request.cookies['j1.web.session']
|
@@ -816,7 +816,7 @@ module J1App
|
|
816
816
|
provider_member_url = warden.user[:extra][:reward][:link]
|
817
817
|
else
|
818
818
|
provider_membership = 'unknown'
|
819
|
-
provider_member_url = '
|
819
|
+
provider_member_url = '#'
|
820
820
|
end
|
821
821
|
|
822
822
|
log_info! 'Status', 'RestApi', 'User detected as signed in', "#{user_name}"
|
@@ -851,10 +851,10 @@ module J1App
|
|
851
851
|
provider: 'unknown',
|
852
852
|
provider_membership: 'unknown',
|
853
853
|
provider_permissions: 'unknown',
|
854
|
-
provider_site_url: '
|
855
|
-
provider_home_url: '
|
856
|
-
provider_blog_url: '
|
857
|
-
provider_member_url: '
|
854
|
+
provider_site_url: '#',
|
855
|
+
provider_home_url: '#',
|
856
|
+
provider_blog_url: '#',
|
857
|
+
provider_member_url: '#',
|
858
858
|
status: 'signed out'
|
859
859
|
}.to_json
|
860
860
|
end
|
data/lib/starter_web/Gemfile
CHANGED
@@ -46,7 +46,7 @@ gem 'jekyll', '~> 3.8.5'
|
|
46
46
|
# Theme Rubies
|
47
47
|
# Default: J1 Template
|
48
48
|
#
|
49
|
-
gem 'j1_template_mde', '~> 2018.4.
|
49
|
+
gem 'j1_template_mde', '~> 2018.4.19'
|
50
50
|
|
51
51
|
# --------------------------------------------------------------------
|
52
52
|
# PRODUCTION: Gem needed for the Jekyll and J1 prod environment
|
data/lib/starter_web/_config.yml
CHANGED
@@ -527,10 +527,13 @@ resources:
|
|
527
527
|
script_load: sync
|
528
528
|
data:
|
529
529
|
files: [
|
530
|
+
core/js/adapter/algolia.js,
|
530
531
|
"https://cdn.jsdelivr.net/npm/instantsearch.js@2.6.0/dist/instantsearch-theme-algolia.min.css",
|
531
532
|
"https://cdn.jsdelivr.net/npm/instantsearch.js@2.6.0/dist/instantsearch.min.css",
|
532
533
|
"https://cdn.jsdelivr.net/npm/instantsearch.js@2.6.0/dist/instantsearch.min.js"
|
533
534
|
]
|
535
|
+
init_function: j1.Algolia.init
|
536
|
+
|
534
537
|
# ----------------------------------------------------------------------------
|
535
538
|
# Livereload
|
536
539
|
#
|
@@ -59,11 +59,11 @@ footer:
|
|
59
59
|
|
60
60
|
- social_media:
|
61
61
|
- facebook: true
|
62
|
-
href: "
|
62
|
+
href: "#"
|
63
63
|
- twitter: true
|
64
|
-
href: "
|
64
|
+
href: "#"
|
65
65
|
- google-plus: false
|
66
|
-
href: "
|
66
|
+
href: "#"
|
67
67
|
|
68
68
|
- footer_box:
|
69
69
|
|
@@ -219,17 +219,17 @@ nav_sidebar:
|
|
219
219
|
icon: domain
|
220
220
|
- title: User
|
221
221
|
value: ??user-name
|
222
|
-
href: "
|
222
|
+
href: "#"
|
223
223
|
target: blank
|
224
224
|
icon: account
|
225
225
|
- title: State
|
226
226
|
value: ??user-state
|
227
|
-
href: "
|
227
|
+
href: "##"
|
228
228
|
target: blank
|
229
229
|
icon: account-alert
|
230
230
|
- title: Permisions
|
231
231
|
value: ??provider-permissions
|
232
|
-
href: "
|
232
|
+
href: "#"
|
233
233
|
target: blank
|
234
234
|
icon: account-check
|
235
235
|
- title: Membership
|
@@ -136,7 +136,7 @@ regenerate: true
|
|
136
136
|
<div class="card card-profile mb-4 {{card_raised}}">
|
137
137
|
|
138
138
|
<div class="card-icon">
|
139
|
-
<a href="
|
139
|
+
<a href="#">
|
140
140
|
<i class="card-icon-circle raised-z2 {{icon_family}} {{icon_family}}-{{card_icon}} {{icon_family}}-{{card_icon_size}} {{icon_family}}-{{card_icon_color}} card-icon-background-color-theme card-icon-{{icon_family}}"></i>
|
141
141
|
</a>
|
142
142
|
</div>
|
@@ -212,7 +212,7 @@ regenerate: true
|
|
212
212
|
<div class="card card-flat card-profile mb-4 raised-z0">
|
213
213
|
|
214
214
|
<div class="card-icon">
|
215
|
-
<a href="
|
215
|
+
<a href="#">
|
216
216
|
<i class="card-icon-rectangle raised-z0 {{icon_family}} {{icon_family}}-{{card_icon}} {{icon_family}}-{{card_icon_size}} {{icon_family}}-{{card_icon_color}} card-icon-background-no-color card-icon-{{icon_family}}"></i>
|
217
217
|
</a>
|
218
218
|
</div>
|
Binary file
|
Binary file
|
@@ -0,0 +1,231 @@
|
|
1
|
+
---
|
2
|
+
regenerate: true
|
3
|
+
---
|
4
|
+
|
5
|
+
{% capture cache %}
|
6
|
+
|
7
|
+
{% comment %}
|
8
|
+
# -----------------------------------------------------------------------------
|
9
|
+
# ~/assets/themes/j1/core/js/adapter/algolia.js
|
10
|
+
# Liquid template to create the Template Adapter for Algolia
|
11
|
+
#
|
12
|
+
# Product/Info:
|
13
|
+
# https://jekyll.one
|
14
|
+
#
|
15
|
+
# Copyright (C) 2019 Juergen Adams
|
16
|
+
#
|
17
|
+
# J1 Template is licensed under the MIT License.
|
18
|
+
# For details, see https://jekyll.one
|
19
|
+
#
|
20
|
+
# -----------------------------------------------------------------------------
|
21
|
+
# Test data:
|
22
|
+
# {{ liquid_var | debug }}
|
23
|
+
#
|
24
|
+
# -----------------------------------------------------------------------------
|
25
|
+
{% endcomment %}
|
26
|
+
|
27
|
+
/*
|
28
|
+
# -----------------------------------------------------------------------------
|
29
|
+
# ~/assets/themes/j1/core/js/adapter/algolia.js
|
30
|
+
# J1 Adapter for Algolia
|
31
|
+
#
|
32
|
+
# Product/Info:
|
33
|
+
# https://jekyll.one
|
34
|
+
#
|
35
|
+
# Copyright (C) 2019 Juergen Adams
|
36
|
+
#
|
37
|
+
# J1 Template is licensed under the MIT License.
|
38
|
+
# For details, see https://jekyll.one
|
39
|
+
#
|
40
|
+
# -----------------------------------------------------------------------------
|
41
|
+
# Adapter generated: {{site.time}}
|
42
|
+
# -----------------------------------------------------------------------------
|
43
|
+
*/
|
44
|
+
'use strict';
|
45
|
+
|
46
|
+
{% comment %} Load YML config data
|
47
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
48
|
+
{% assign algolia_config = site.algolia %}
|
49
|
+
|
50
|
+
j1.Algolia = (function (j1, window) {
|
51
|
+
|
52
|
+
var environment = '{{environment}}'; // Set environment
|
53
|
+
var state = 'unknown';
|
54
|
+
var logger;
|
55
|
+
var logText;
|
56
|
+
|
57
|
+
return {
|
58
|
+
|
59
|
+
// -------------------------------------------------------------------------
|
60
|
+
// Initialize InstantSearch
|
61
|
+
// -------------------------------------------------------------------------
|
62
|
+
init: function () {
|
63
|
+
|
64
|
+
// Config settings object
|
65
|
+
var algoliaConfig = {};
|
66
|
+
|
67
|
+
{% comment %} Set global variables
|
68
|
+
-------------------------------------------------------------------------- {% endcomment %}
|
69
|
+
logger = log4javascript.getLogger("j1.Algolia"); // Setup logger
|
70
|
+
|
71
|
+
// Set|Log status
|
72
|
+
state = 'initialize';
|
73
|
+
logger.info('state: ' + state);
|
74
|
+
|
75
|
+
{% comment %} Load module config from yml data
|
76
|
+
-------------------------------------------------------------------------- {% endcomment %}
|
77
|
+
// Load module DEFAULTS|CONFIG
|
78
|
+
algoliaConfig = $.extend({}, {{algolia_config | replace: '=>', ':' }});
|
79
|
+
|
80
|
+
var search = instantsearch({
|
81
|
+
appId: algoliaConfig.application_id,
|
82
|
+
apiKey: algoliaConfig.search_only_api_key,
|
83
|
+
indexName: algoliaConfig.index_name,
|
84
|
+
routing: true
|
85
|
+
});
|
86
|
+
|
87
|
+
var hitTemplate = function(hit) {
|
88
|
+
// state = 'start search';
|
89
|
+
// logger.info('state: ' + state);
|
90
|
+
// var re = new RegExp("^\/posts");
|
91
|
+
// var re = new RegExp("^\/pages");
|
92
|
+
var re = new RegExp("^\/pages|^\/posts|^\/collections");
|
93
|
+
if ( re.test(hit.url) ) {
|
94
|
+
let date = '';
|
95
|
+
if (hit.date) {
|
96
|
+
date = moment.unix(hit.date).format('MMM D, YYYY');
|
97
|
+
}
|
98
|
+
// let url = `/jekyll-algolia-example${hit.url}#${hit.anchor}`;
|
99
|
+
let url = `${hit.url}`;
|
100
|
+
|
101
|
+
const title = hit._highlightResult.title.value;
|
102
|
+
let breadcrumbs = '';
|
103
|
+
|
104
|
+
if (hit._highlightResult.headings) {
|
105
|
+
breadcrumbs = hit._highlightResult.headings.map(match => {
|
106
|
+
return `<span class="post-breadcrumb">${match.value}</span>`
|
107
|
+
}).join(' > ')
|
108
|
+
}
|
109
|
+
|
110
|
+
var content = hit._highlightResult.html.value;
|
111
|
+
|
112
|
+
return `
|
113
|
+
<li class="search-result-item">
|
114
|
+
<div class="card card-flat">
|
115
|
+
<div class="card-body">
|
116
|
+
<span class="post-meta">${date}</span>
|
117
|
+
<h2 class="card-title">${title}</h2>
|
118
|
+
<h6 class="card-subtitle mb-2 text-muted">${hit.tagline}</h6>
|
119
|
+
<div class="card-text">${content}</div>
|
120
|
+
<div class="card-footer">
|
121
|
+
<a class="card-link" href="${url}" target="_blank">Read more ..</a>
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
</li>
|
126
|
+
`;
|
127
|
+
}
|
128
|
+
// state = 'finished search';
|
129
|
+
// logger.info('state: ' + state);
|
130
|
+
}
|
131
|
+
|
132
|
+
// initialize currentRefinedValues
|
133
|
+
search.addWidget(
|
134
|
+
instantsearch.widgets.currentRefinedValues({
|
135
|
+
container: '#current-refined-values',
|
136
|
+
// This widget can also contain a clear all link to remove all filters,
|
137
|
+
// we disable it in this example since we use `clearAll` widget on its own.
|
138
|
+
clearAll: false
|
139
|
+
})
|
140
|
+
);
|
141
|
+
|
142
|
+
// initialize clearAll
|
143
|
+
search.addWidget(
|
144
|
+
instantsearch.widgets.clearAll({
|
145
|
+
container: '#clear-all',
|
146
|
+
templates: {
|
147
|
+
link: 'Reset everything'
|
148
|
+
},
|
149
|
+
autoHideContainer: false
|
150
|
+
})
|
151
|
+
);
|
152
|
+
|
153
|
+
// initialize pagination
|
154
|
+
search.addWidget(
|
155
|
+
instantsearch.widgets.pagination({
|
156
|
+
container: '#pagination',
|
157
|
+
maxPages: 20,
|
158
|
+
// default is to scroll to 'body', here we disable this behavior
|
159
|
+
scrollTo: false
|
160
|
+
})
|
161
|
+
);
|
162
|
+
// initialize SearchBox
|
163
|
+
search.addWidget(
|
164
|
+
instantsearch.widgets.searchBox({
|
165
|
+
container: '#search-searchbar',
|
166
|
+
placeholder: 'Search this site ..',
|
167
|
+
autofocus: true,
|
168
|
+
reset: true,
|
169
|
+
loadingIndicator: false,
|
170
|
+
poweredBy: true // This is required if you're on the free Community plan
|
171
|
+
})
|
172
|
+
);
|
173
|
+
// initialize hits widget
|
174
|
+
search.addWidget(
|
175
|
+
instantsearch.widgets.hits({
|
176
|
+
container: '#search-hits',
|
177
|
+
templates: {
|
178
|
+
empty: 'No results',
|
179
|
+
item: hitTemplate
|
180
|
+
}
|
181
|
+
})
|
182
|
+
);
|
183
|
+
// initialize RefinementList
|
184
|
+
search.addWidget(
|
185
|
+
instantsearch.widgets.refinementList({
|
186
|
+
container: '#refinement-list',
|
187
|
+
attributeName: 'tags',
|
188
|
+
collapsible: true,
|
189
|
+
operator: "or",
|
190
|
+
limit: 5,
|
191
|
+
sortBy: ["isRefined","count:desc","name:asc"],
|
192
|
+
showMore: true
|
193
|
+
})
|
194
|
+
);
|
195
|
+
|
196
|
+
/*
|
197
|
+
search.addWidget(
|
198
|
+
instantsearch.widgets.hitsPerPageSelector({
|
199
|
+
container: '#hits-per-page-selector',
|
200
|
+
items: [
|
201
|
+
{value: 3, label: '3 per page', default: true},
|
202
|
+
{value: 6, label: '6 per page'},
|
203
|
+
{value: 12, label: '12 per page'},
|
204
|
+
]
|
205
|
+
})
|
206
|
+
);
|
207
|
+
*/
|
208
|
+
search.start();
|
209
|
+
|
210
|
+
$('#searcher').addClass('row');
|
211
|
+
|
212
|
+
state = 'finished';
|
213
|
+
logger.info('state: ' + state); // Set|Log status
|
214
|
+
logger.info("J1 Algolia successfully initialized");
|
215
|
+
}, // end init
|
216
|
+
|
217
|
+
// -------------------------------------------------------------------------
|
218
|
+
// returns the current (processing) state of the module
|
219
|
+
// -------------------------------------------------------------------------
|
220
|
+
state: function () {
|
221
|
+
return state;
|
222
|
+
|
223
|
+
} // end state
|
224
|
+
}; // end return
|
225
|
+
|
226
|
+
})(j1, window);
|
227
|
+
|
228
|
+
{% endcapture %}
|
229
|
+
|
230
|
+
{{ cache | strip_empty_lines }}
|
231
|
+
{% assign cache = nil %}
|
@@ -24,7 +24,7 @@ regenerate: true
|
|
24
24
|
# -----------------------------------------------------------------------------
|
25
25
|
{% endcomment %}
|
26
26
|
|
27
|
-
{% comment %}
|
27
|
+
{% comment %} Load YML config data
|
28
28
|
-------------------------------------------------------------------------------- {% endcomment %}
|
29
29
|
{% assign environment = site.environment %}
|
30
30
|
{% assign debug = navigator_config.debug %}
|
@@ -72,6 +72,7 @@ ToDo: Remove configuration from j1_navigator.yml
|
|
72
72
|
'use strict';
|
73
73
|
|
74
74
|
j1.Navigator = (function (j1, window) {
|
75
|
+
|
75
76
|
var environment = '{{environment}}'; // Set environment
|
76
77
|
var state = 'unknown';
|
77
78
|
// J1 data file objects
|
@@ -112,7 +113,6 @@ j1.Navigator = (function (j1, window) {
|
|
112
113
|
|
113
114
|
{% comment %} Set global variables
|
114
115
|
-------------------------------------------------------------------------- {% endcomment %}
|
115
|
-
|
116
116
|
logger = log4javascript.getLogger("j1.Navigator"); // Setup logger
|
117
117
|
|
118
118
|
// Set|Log status
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"private": true,
|
3
3
|
"name": "j1_starter",
|
4
|
-
"version": "2018.4.
|
4
|
+
"version": "2018.4.19",
|
5
5
|
"description": "Starter site for J1 Template",
|
6
6
|
"homepage": "https://your.site",
|
7
7
|
"author": {
|
@@ -31,6 +31,9 @@
|
|
31
31
|
"Web",
|
32
32
|
"Site"
|
33
33
|
],
|
34
|
+
"algolia": {
|
35
|
+
"admin_key": "my_admin_key"
|
36
|
+
},
|
34
37
|
"scripts": {
|
35
38
|
"app": "cross-var cross-env if-env J1DOCKER=true && run-s app-docker || run-s app-local",
|
36
39
|
"app-dev": "run-p -s app-local-dev:*",
|
@@ -49,6 +52,8 @@
|
|
49
52
|
"app-docker-dev:rackup": "cross-env SINATRA_ACTIVESUPPORT_WARNING=false bundle exec rackup -o 127.0.0.1 -p 4000",
|
50
53
|
"app-docker-dev:jekyll": "npm run delay-3s && bundle exec jekyll b --incremental --watch",
|
51
54
|
"app-docker-dev:open": "npm run delay-10s && opn http://127.0.0.1:4000/",
|
55
|
+
"algolia": "cross-env ALGOLIA_API_KEY=$npm_package_algolia_admin_key bundle exec jekyll algolia",
|
56
|
+
"algolia-check": "cross-env ALGOLIA_API_KEY=$npm_package_algolia_admin_key bundle exec jekyll algolia --dry-run --verbose",
|
52
57
|
"detect-os": "echo Detecting OS .. && cross-env cross-var if-env OS=Windows_NT && cross-var echo OS detected as: $OS || OS=$(echo $(getos) && echo OS detected as: $OS",
|
53
58
|
"detect-docker": "echo Detecting DOCKER .. && cross-var cross-env if-env J1DOCKER=true && cross-var cross-env echo Docker detected as: $J1DOCKER || echo no Docker detected",
|
54
59
|
"built": "run-p -s built:*",
|
@@ -46,8 +46,6 @@ include::{includedir}/attributes.asciidoc[tag=urls]
|
|
46
46
|
// Additional Asciidoc page attributes goes here
|
47
47
|
//
|
48
48
|
|
49
|
-
Bla
|
50
|
-
|
51
49
|
A card is a sheet of material that serves as an entry point to more detailed
|
52
50
|
information. Cards may contain a photo, text, and a link about a single subject.
|
53
51
|
They may display content containing elements of varying size, such as photos
|
@@ -29,127 +29,80 @@ regenerate: true
|
|
29
29
|
// -------------------------------------------------------------------
|
30
30
|
|
31
31
|
|
32
|
-
== Search
|
32
|
+
== Site Search
|
33
33
|
|
34
|
-
lorem:sentences[
|
35
|
-
|
36
|
-
=== Site Search
|
37
|
-
|
38
|
-
lorem:sentences[3]
|
34
|
+
lorem:sentences[2]
|
39
35
|
|
40
36
|
++++
|
41
|
-
<!--
|
42
|
-
<div id="
|
43
|
-
++++
|
44
|
-
|
45
|
-
=== Refine the search
|
37
|
+
<!-- CurrentRefinedValues widget -->
|
38
|
+
<div id="current-refined-values"></div>
|
46
39
|
|
47
|
-
|
40
|
+
<!-- ClearAll widget -->
|
41
|
+
<div id="clear-all"></div>
|
48
42
|
|
49
|
-
|
50
|
-
|
51
|
-
<div id="refinement-list" class="mb-3">
|
52
|
-
</div>
|
53
|
-
++++
|
43
|
+
<!-- SearchBox widget -->
|
44
|
+
<div id="search-searchbar" class="mb-4"> </div>
|
54
45
|
|
55
|
-
=== Search Results
|
56
46
|
|
57
|
-
|
47
|
+
<!-- HitsPerPage widget -->
|
48
|
+
<!-- div id="hits-per-page-selector"></div -->
|
58
49
|
|
59
|
-
++++
|
60
|
-
<!-- Hits widget will appear here -->
|
61
|
-
<div class="result-list" id="search-hits">
|
62
|
-
<div class="result-item"></div>
|
63
|
-
</div>
|
64
50
|
++++
|
65
51
|
|
66
52
|
++++
|
67
|
-
<
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
if (hit._highlightResult.headings) {
|
84
|
-
breadcrumbs = hit._highlightResult.headings.map(match => {
|
85
|
-
return `<span class="post-breadcrumb">${match.value}</span>`
|
86
|
-
}).join(' > ')
|
87
|
-
}
|
88
|
-
|
89
|
-
const content = hit._highlightResult.html.value;
|
90
|
-
|
91
|
-
return `
|
92
|
-
<div class="search-result-item">
|
93
|
-
<div class="card card-flat">
|
94
|
-
<div class="card-body">
|
95
|
-
<span class="post-meta">${date}</span>
|
96
|
-
<h2 class="card-title">${title}</h2>
|
97
|
-
<h6 class="card-subtitle mb-2 text-muted">${hit.tagline}</h6>
|
98
|
-
<div class="card-text">${content}</div>
|
99
|
-
<div class="card-footer">
|
100
|
-
<a class="card-link" href="${url}" target="_blank">Read more ..</a>
|
101
|
-
</div>
|
102
|
-
</div>
|
103
|
-
</div>
|
53
|
+
<div id="searcher" class"row">
|
54
|
+
<div class="col-md-4 col-xs-6">
|
55
|
+
<!-- CurrentRefinedValues widget -->
|
56
|
+
<div id="current-refined-values"></div>
|
57
|
+
<!-- RefinementList widget -->
|
58
|
+
<div id="refinement-list" class="limit-y"></div>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
<div class="col-md-8 col-xs-6">
|
62
|
+
<!-- Pagination widget -->
|
63
|
+
<div id="pagination"></div>
|
64
|
+
<!-- Hits widget -->
|
65
|
+
<ul class="list-unstyled">
|
66
|
+
<div id="search-hits" class="result-list" >
|
67
|
+
<div class="result-item"></div>
|
104
68
|
</div>
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
<!-- Access credentials and index -->
|
110
|
-
const search = instantsearch({
|
111
|
-
appId: '{{ site.algolia.application_id }}',
|
112
|
-
apiKey: '{{ site.algolia.search_only_api_key }}',
|
113
|
-
indexName: '{{ site.algolia.index_name }}',
|
114
|
-
routing: true
|
115
|
-
});
|
116
|
-
// initialize SearchBox
|
117
|
-
search.addWidget(
|
118
|
-
instantsearch.widgets.searchBox({
|
119
|
-
container: '#search-searchbar',
|
120
|
-
placeholder: 'Search this site ..',
|
121
|
-
poweredBy: true // This is required if you're on the free Community plan
|
122
|
-
})
|
123
|
-
);
|
124
|
-
// initialize hits widget
|
125
|
-
search.addWidget(
|
126
|
-
instantsearch.widgets.hits({
|
127
|
-
container: '#search-hits',
|
128
|
-
templates: {
|
129
|
-
empty: 'No results',
|
130
|
-
item: hitTemplate
|
131
|
-
}
|
132
|
-
})
|
133
|
-
);
|
134
|
-
// initialize RefinementList
|
135
|
-
search.addWidget(
|
136
|
-
instantsearch.widgets.refinementList({
|
137
|
-
container: '#refinement-list',
|
138
|
-
attributeName: 'outsideDiameter.description',
|
139
|
-
collapsible: true,
|
140
|
-
operator: "and",
|
141
|
-
limit: 5,
|
142
|
-
sortBy: ["isRefined","count:asc","name:asc"],
|
143
|
-
showMore: true,
|
144
|
-
attributeName: 'tags'
|
145
|
-
})
|
146
|
-
);
|
147
|
-
search.start();
|
148
|
-
</script>
|
69
|
+
</ul>
|
70
|
+
</div>
|
71
|
+
|
72
|
+
</div>
|
149
73
|
++++
|
150
74
|
|
151
75
|
++++
|
152
76
|
<style>
|
77
|
+
|
78
|
+
input:focus{
|
79
|
+
outline: none;
|
80
|
+
// box-shadow: 0px 0px 5px #61C5FA;
|
81
|
+
border: 1px solid #424242;
|
82
|
+
}
|
83
|
+
|
84
|
+
input:hover {
|
85
|
+
border: 1px solid #424242;
|
86
|
+
border-radius: 5px;
|
87
|
+
}
|
88
|
+
|
89
|
+
input:focus:hover{
|
90
|
+
outline: none;
|
91
|
+
box-shadow: 0px 0px 5px #424242;
|
92
|
+
border: 1px solid #3f51b5;
|
93
|
+
border-radius:0;
|
94
|
+
|
95
|
+
}
|
96
|
+
|
97
|
+
.limit-y {
|
98
|
+
max-height: 500px;
|
99
|
+
overflow-y: auto;
|
100
|
+
}
|
101
|
+
|
102
|
+
.search-result-item {
|
103
|
+
margin-bottom: 0px;
|
104
|
+
}
|
105
|
+
|
153
106
|
.ais-search-box {
|
154
107
|
max-width: 100%;
|
155
108
|
margin-bottom: 15px;
|
@@ -170,10 +123,6 @@ lorem:sentences[2]
|
|
170
123
|
right: 1rem !important;
|
171
124
|
}
|
172
125
|
|
173
|
-
.search-result-item {
|
174
|
-
margin-bottom: 30px;
|
175
|
-
}
|
176
|
-
|
177
126
|
em.ais-Highlight {
|
178
127
|
font-weight: bold;
|
179
128
|
font-size: 1.125rem;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: j1_template_mde
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2018.4.
|
4
|
+
version: 2018.4.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- juergen_jekyll_one
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -262,6 +262,8 @@ files:
|
|
262
262
|
- lib/starter_web/assets/data/themes.json
|
263
263
|
- lib/starter_web/assets/data/twa_v1.json
|
264
264
|
- lib/starter_web/assets/data/twa_v2.json
|
265
|
+
- lib/starter_web/assets/images/animated/1_ZrgWTM-NmdhJFac8T7-4Rg.gif
|
266
|
+
- lib/starter_web/assets/images/animated/2049.gif
|
265
267
|
- lib/starter_web/assets/images/backgrounds/bg-1.jpg
|
266
268
|
- lib/starter_web/assets/images/backgrounds/bg-2.jpg
|
267
269
|
- lib/starter_web/assets/images/backgrounds/bg-3.jpg
|
@@ -570,6 +572,7 @@ files:
|
|
570
572
|
- lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/notoserif-bold_italic-subset.ttf
|
571
573
|
- lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/notoserif-italic-subset.ttf
|
572
574
|
- lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/notoserif-regular-subset.ttf
|
575
|
+
- lib/starter_web/assets/themes/j1/core/js/adapter/algolia.js
|
573
576
|
- lib/starter_web/assets/themes/j1/core/js/adapter/back2top.js
|
574
577
|
- lib/starter_web/assets/themes/j1/core/js/adapter/bs_gallery.js
|
575
578
|
- lib/starter_web/assets/themes/j1/core/js/adapter/cookiebar.js
|