j1_template_mde 2018.4.20 → 2018.4.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/_layouts/default.html +17 -12
  3. data/_layouts/home.html +1 -1
  4. data/lib/j1/version.rb +1 -1
  5. data/lib/j1_app.rb +17 -7
  6. data/lib/starter_web/Gemfile +1 -1
  7. data/lib/starter_web/_config.yml +1 -1
  8. data/lib/starter_web/_data/j1_config.yml +1 -0
  9. data/lib/starter_web/_rack/config.ru +27 -1
  10. data/lib/starter_web/_rack/dot.env +4 -3
  11. data/lib/starter_web/assets/images/icons/j1/scalable/j1v2.svg +1 -1
  12. data/lib/starter_web/assets/themes/j1/core/css/theme_extensions.css +12 -2
  13. data/lib/starter_web/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
  14. data/lib/starter_web/assets/themes/j1/core/css/uno.css +41 -4
  15. data/lib/starter_web/assets/themes/j1/core/css/uno.min.css +1 -1
  16. data/lib/starter_web/assets/themes/j1/core/js/adapter/algolia.js +1 -1
  17. data/lib/starter_web/assets/themes/j1/core/js/template.js +7 -18
  18. data/lib/starter_web/assets/themes/j1/core/js/template.js.map +1 -1
  19. data/lib/starter_web/assets/themes/j1/core/js/template.min.js +1 -1
  20. data/lib/starter_web/package.json +8 -6
  21. data/lib/starter_web/pages/public/start/000_includes/attributes.asciidoc +40 -12
  22. data/lib/starter_web/pages/public/start/platform.adoc +151 -0
  23. data/lib/starter_web/pages/public/start/roundtrip/000_includes/attributes.asciidoc +18 -16
  24. data/lib/starter_web/pages/public/start/roundtrip/100_present_images.adoc +1 -1
  25. data/lib/starter_web/pages/public/start/roundtrip/200_cards.adoc +5 -4
  26. data/lib/starter_web/pages/public/start/roundtrip/300_typography.adoc +24 -27
  27. data/lib/starter_web/pages/public/start/roundtrip/400_icon_fonts.adoc +5 -4
  28. data/lib/starter_web/pages/public/start/roundtrip/500_asciidoc_extensions.adoc +3 -3
  29. data/lib/starter_web/pages/public/start/roundtrip/600_themes.adoc +10 -16
  30. data/lib/starter_web/pages/public/start/roundtrip/700_extended_modals.adoc +49 -44
  31. data/lib/starter_web/pages/public/start/roundtrip/800_search_engine.adoc +37 -2
  32. metadata +3 -10
  33. data/lib/j1_app/j1_auth_manager/views/_unused/iframe.erb +0 -29
  34. data/lib/j1_app/j1_auth_manager/views/_unused/modal_page.erb +0 -136
  35. data/lib/j1_app/omniauth/strategies/_unused/doumart_patreon.rb +0 -75
  36. data/lib/j1_app/omniauth/strategies/_unused/my_patreon.rb +0 -78
  37. data/lib/j1_app/omniauth/strategies/_unused/patreon.v1.rb +0 -50
  38. data/lib/j1_app/omniauth/strategies/_unused/patreon.v2-v1.rb +0 -82
  39. data/lib/j1_app/omniauth/strategies/_unused/patreon.v2.rb +0 -79
  40. data/lib/starter_web/pages/public/instant_search_media.adoc +0 -438
@@ -1,79 +0,0 @@
1
- # https://github.com/doumart/omniauth-patreon-v2
2
-
3
- require 'omniauth/strategies/oauth2'
4
- require 'json'
5
-
6
- module OmniAuth
7
- module Strategies
8
- class Patreon < OmniAuth::Strategies::OAuth2
9
-
10
- DEFAULT_SCOPE = 'identity identity[email] identity[memberships]'
11
-
12
- option :name, 'patreon'
13
- option :client_options, {
14
- :authorize_url => '/oauth2/authorize',
15
- :site => 'https://www.patreon.com',
16
- :token_url => '/api/oauth2/token'
17
- }
18
-
19
- uid { raw_info["data"]["id"] }
20
-
21
- info do
22
- prune!({
23
- :first_name => raw_info["data"]["attributes"]['first_name'],
24
- :last_name => raw_info["data"]["attributes"]['last_name'],
25
- :full_name => raw_info["data"]["attributes"]['full_name'],
26
- :nickname => raw_info["data"]["attributes"]['full_name'].gsub('ä','ae').gsub('ö','oe').gsub('ü','ue').gsub(' ','_').downcase,
27
- :image_url => raw_info["data"]["attributes"]['image_url'],
28
- :email => raw_info["data"]["attributes"]['email']
29
- })
30
- end
31
-
32
- def authorize_params
33
- super.tap do |params|
34
- options[:authorize_options].each do |k|
35
- params[k] = request.params[k.to_s] unless [nil, ''].include?(request.params[k.to_s])
36
- end
37
- params[:scope] = get_scope(params)
38
- session['omniauth.state'] = params[:state] if params[:state]
39
- end
40
- end
41
-
42
- extra do
43
- hash = {}
44
- hash['raw_info'] = raw_info unless skip_info?
45
- prune! hash
46
- end
47
-
48
- def raw_info
49
- @raw_info = MultiJson.decode(access_token.get('/api/oauth2/v2/identity?include=memberships&fields[pledge]=total_historical_amount_cents,is_paused,outstanding_payment_amount_cents,declined_since', info_options).body)
50
- # @raw_info = MultiJson.decode(access_token.get('/api/oauth2/v2/identity?include=campaign&fields[pledge]=total_historical_amount_cents,is_paused,outstanding_payment_amount_cents,declined_since', info_options).body)
51
- end
52
-
53
- def info_options
54
- params = {}
55
- params.merge!({fields: {user: (options[:info_fields] || 'full_name,first_name,email')}})
56
- params.merge!({locale: options[:locale]}) if options[:locale]
57
-
58
- { params: params }
59
- end
60
-
61
-
62
- def callback_url
63
- options[:redirect_uri] || full_host + script_name + callback_path
64
- end
65
-
66
- def get_scope(params)
67
- raw_scope = params[:scope] || DEFAULT_SCOPE
68
- scope_list = raw_scope.split(' ').map { |item| item.split(',') }.flatten
69
- scope_list.join(' ')
70
- end
71
- def prune!(hash)
72
- hash.delete_if do |_, value|
73
- prune!(value) if value.is_a?(Hash)
74
- value.nil? || (value.respond_to?(:empty?) && value.empty?)
75
- end
76
- end
77
- end
78
- end
79
- end
@@ -1,438 +0,0 @@
1
- ---
2
- title: InstantSearch
3
- tagline: Example Media
4
- description: Using Algolia Index API for static sites
5
-
6
- tags: []
7
- resources: [ algolia ]
8
- permalink: /pages/public/instantsearch/media/
9
-
10
- resource_options:
11
-
12
- - toccer:
13
- collapseDepth: 2
14
-
15
- - masthead:
16
- opacity: 0.2
17
- slides:
18
- - url: /assets/images/widescreen/featured-1920x800.jpg
19
- alt: featured-1920x800
20
-
21
- regenerate: true
22
- ---
23
-
24
- // Enable the Liquid Preprocessor
25
- //
26
- //:page-liquid:
27
-
28
- // Set other global page attributes here
29
- // -------------------------------------------------------------------
30
-
31
-
32
- == Site Search
33
-
34
- lorem:sentences[2]
35
-
36
- ++++
37
- <header class="row">
38
- <div><a href="https://community.algolia.com/instantsearch.js/" class="is-logo"><img src="logo-is.png" width="40"></a><a href="./" class="logo">You<i class="fa fa-youtube-play"></i></a></div>
39
- <div class="searchbox-container">
40
- <div class="input-group">
41
- <input id="q" type="text" class="form-control"><span class="input-group-btn">
42
- <button class="btn btn-default"><i class="fa fa-search"></i></button></span>
43
- </div>
44
- </div>
45
- </header>
46
- <section>
47
- <aside>
48
- <ul class="nav nav-list">
49
- <li><a href=""><i class="fa fa-home"></i> Home</a></li>
50
- <li class="separator"></li>
51
- </ul>
52
- <h5><i class="fa fa-chevron-right"></i> Genres</h5>
53
- <div id="genres"></div>
54
- <h5><i class="fa fa-chevron-right"></i> Ratings</h5>
55
- <div id="ratings"></div>
56
- <div class="thank-you">Data courtesy of <a href="https://www.imdb.com/">imdb.com</a></div>
57
- </aside>
58
- <article>
59
- <div id="stats" class="text-right text-muted"></div>
60
- <hr>
61
- <div id="hits"></div>
62
- <div id="pagination" class="text-center"></div>
63
- </article>
64
- </section>
65
- ++++
66
-
67
- ++++
68
- <script>
69
-
70
- var search = instantsearch({
71
- appId: 'latency',
72
- apiKey: '6be0576ff61c053d5f9a3225e2a90f76',
73
- indexName: 'movies',
74
- routing: true
75
- });
76
-
77
- search.addWidget(
78
- instantsearch.widgets.searchBox({
79
- container: '#q'
80
- })
81
- );
82
-
83
- search.addWidget(
84
- instantsearch.widgets.stats({
85
- container: '#stats'
86
- })
87
- );
88
-
89
- var hitTemplate =
90
- '<div class="hit media">' +
91
- '<div class="media-left">' +
92
- '<div class="media-object" style="background-image: url(\'{{image}}\');"></div>' +
93
- '</div>' +
94
- '<div class="media-body">' +
95
- '<h4 class="media-heading">{{{_highlightResult.title.value}}} {{#stars}}<span class="ais-star-rating--star{{^.}}__empty{{/.}}"></span>{{/stars}}</h4>' +
96
- '<p class="year">{{year}}</p><p class="genre">{{#genre}}<span class="badge">{{.}}</span> {{/genre}}</p>' +
97
- '</div>' +
98
- '</div>';
99
-
100
- var noResultsTemplate =
101
- '<div class="text-center">No results found matching <strong>{{query}}</strong>.</div>';
102
-
103
- search.addWidget(
104
- instantsearch.widgets.hits({
105
- container: '#hits',
106
- hitsPerPage: 10,
107
- templates: {
108
- empty: noResultsTemplate,
109
- item: hitTemplate
110
- },
111
- transformData: function(hit) {
112
- hit.stars = [];
113
- for (var i = 1; i <= 5; ++i) {
114
- hit.stars.push(i <= hit.rating);
115
- }
116
- return hit;
117
- }
118
- })
119
- );
120
-
121
- search.addWidget(
122
- instantsearch.widgets.pagination({
123
- container: '#pagination',
124
- cssClasses: {
125
- root: 'pagination',
126
- active: 'active'
127
- }
128
- })
129
- );
130
-
131
- search.addWidget(
132
- instantsearch.widgets.refinementList({
133
- container: '#genres',
134
- attributeName: 'genre',
135
- operator: 'and',
136
- limit: 10,
137
- cssClasses: {
138
- list: 'nav nav-list',
139
- count: 'badge pull-right',
140
- active: 'active'
141
- }
142
- })
143
- );
144
-
145
- search.addWidget(
146
- instantsearch.widgets.starRating({
147
- container: '#ratings',
148
- attributeName: 'rating',
149
- cssClasses: {
150
- list: 'nav',
151
- count: 'badge pull-right'
152
- }
153
- })
154
- );
155
-
156
- search.start();
157
-
158
- </script>
159
- ++++
160
-
161
-
162
- ++++
163
- <style>
164
-
165
- body {
166
- min-height: 100%;
167
- font-family: Roboto;
168
- background: #F1F1F1;
169
- }
170
-
171
- a {
172
- color: #333333;
173
- }
174
-
175
- hr {
176
- margin: 10px 14px;
177
- }
178
-
179
- .is-logo {
180
- float: left;
181
- margin-left: 18px;
182
- }
183
-
184
- .logo {
185
- margin-left: 15px;
186
- font-size: 30px;
187
- font-weight: bold;
188
- float: left;
189
- }
190
-
191
- .logo:hover {
192
- text-decoration: none;
193
- }
194
-
195
- .logo i {
196
- margin-left: 5px;
197
- color: #E91D00;
198
- }
199
-
200
- header {
201
- background: #FFFFFF;
202
- padding: 10px;
203
- border-bottom: 1px solid #E8E8E8;
204
- position: fixed;
205
- top: 0;
206
- left: 0;
207
- right: 0;
208
- z-index: 2;
209
- }
210
-
211
- header .searchbox-container {
212
- margin-left: 240px;
213
- max-width: 400px;
214
- }
215
-
216
- header .searchbox-container .ais-search-box {
217
- max-width: inherit;
218
- }
219
-
220
- header .searchbox-container .ais-search-box #q {
221
- border-radius: 0;
222
- padding-bottom: 7px;
223
- }
224
-
225
- header .searchbox-container .input-group {
226
- margin-top: 5px;
227
- }
228
-
229
- header .searchbox-container .input-group .form-control:focus {
230
- outline: none;
231
- box-shadow: none;
232
- }
233
-
234
- header .searchbox-container .input-group .input-group-btn button {
235
- padding-left: 20px;
236
- padding-right: 20px;
237
- background: #F8F8F8;
238
- border-radius: 0;
239
- }
240
-
241
- section {
242
- background: #F1F1F1;
243
- min-height: 100%;
244
- z-index: 1;
245
- }
246
-
247
- section aside {
248
- position: fixed;
249
- top: 70px;
250
- left: 0;
251
- bottom: 10px;
252
- width: 230px;
253
- background: #FFFFFF;
254
- border-right: 1px solid #E8E8E8;
255
- }
256
-
257
- section aside .nav {
258
- margin: 0 20px;
259
- }
260
-
261
- section aside .nav li a {
262
- display: block;
263
- padding: 2px 10px;
264
- margin: 10px 0;
265
- }
266
-
267
- section aside .nav li a:hover {
268
- color: #FFFFFF;
269
- background: #333333;
270
- }
271
-
272
- section aside .nav li.separator {
273
- height: 1px;
274
- background: #E8E8E8;
275
- }
276
-
277
- section aside h5 {
278
- color: #CE1312;
279
- margin-left: 30px;
280
- text-transform: uppercase;
281
- font-size: 10px;
282
- margin-top: 20px;
283
- }
284
-
285
- section aside .badge {
286
- font-size: .8em;
287
- background: #BBBBBB;
288
- position: relative;
289
- top: 1px;
290
- }
291
-
292
- section aside #genres label {
293
- display: block;
294
- cursor: pointer;
295
- padding: 4px 4px 4px 8px;
296
- font-weight: normal;
297
- font-size: .9em;
298
- margin: 0 0 -1px;
299
- }
300
-
301
- section aside #genres label:hover {
302
- color: #FFFFFF;
303
- background: #333333;
304
- }
305
-
306
- section aside #genres label input {
307
- display: none;
308
- }
309
-
310
- section aside #genres .active label {
311
- border: 1px solid #CE1312;
312
- margin-top: -1px;
313
- }
314
-
315
- section aside #genres .active .badge {
316
- background: #333333;
317
- }
318
-
319
- section aside #ratings {
320
- margin-left: 10px;
321
- }
322
-
323
- section aside #ratings .ais-stars-list--link {
324
- font-size: .9em;
325
- }
326
-
327
- section aside #ratings .ais-stars-list--link:hover,
328
- section aside #ratings .ais-stars-list--link:active,
329
- section aside #ratings .ais-stars-list--link:focus {
330
- text-decoration: none;
331
- }
332
-
333
- section aside #ratings .ais-stars-list--count {
334
- font-size: 8px;
335
- }
336
-
337
- section aside #ratings .ais-star-rating--item {
338
- margin-bottom: 6px;
339
- }
340
-
341
- section aside #ratings .ais-star-rating--item__active a {
342
- color: #CE1312;
343
- }
344
-
345
- section article {
346
- margin-top: 70px;
347
- margin-bottom: 10px;
348
- margin-left: 237px;
349
- margin-right: 10px;
350
- padding: 10px 0;
351
- max-width: 100%;
352
- background: #FFFFFF;
353
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
354
- }
355
-
356
- section article #stats {
357
- padding-right: 14px;
358
- font-size: .8em;
359
- line-height: 24px;
360
- }
361
-
362
- section article #hits {
363
- padding: 0 15px;
364
- }
365
-
366
- section article #pagination .pagination a {
367
- background: #F8F8F8;
368
- padding: 3px 8px;
369
- color: #333333;
370
- margin-right: 4px;
371
- }
372
-
373
- section article #pagination .pagination a.active {
374
- border-color: #b5b5b5;
375
- background: #E8E8E8;
376
- }
377
-
378
- section article #pagination .pagination a:hover {
379
- border-color: #cfcfcf;
380
- background: #ebebeb;
381
- }
382
-
383
- section article .hit {
384
- margin-bottom: 10px;
385
- height: 130px;
386
- border: 1px solid #F3F3F3;
387
- }
388
-
389
- section article .hit em {
390
- font-style: normal;
391
- background: #FFFFD4;
392
- text-decoration: underline;
393
- }
394
-
395
- section article .hit .media-object {
396
- height: 130px;
397
- width: 130px;
398
- overflow: hidden;
399
- background-size: contain;
400
- background-repeat: no-repeat;
401
- background-position: center center;
402
- }
403
-
404
- section article .hit .media-heading {
405
- color: #167AC6;
406
- font-weight: normal;
407
- font-size: 18px;
408
- }
409
-
410
- section .thank-you {
411
- font-size: .8em;
412
- margin-top: 18px;
413
- margin-left: 30px;
414
- }
415
-
416
- section .thank-you a {
417
- color: #CE1312;
418
- }
419
-
420
- .ais-search-box--input {
421
- padding-left: 14px;
422
- }
423
-
424
- .genre,
425
- .year {
426
- margin: 12px 0;
427
- }
428
-
429
- .year {
430
- font-weight: bold;
431
- }
432
-
433
- .genre .badge {
434
- background: #BBBBBB;
435
- }
436
-
437
- </style>
438
- ++++