j1_template_mde 2018.4.25 → 2018.4.26

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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/layout_shim_generator.html +11 -0
  3. data/lib/j1/version.rb +1 -1
  4. data/lib/j1_app.rb +0 -1
  5. data/lib/j1_app/j1_auth_manager/auth_manager.rb +498 -292
  6. data/lib/j1_app/j1_auth_manager/helpers.rb +19 -2
  7. data/lib/j1_app/omniauth/strategies/disqus.rb +1 -1
  8. data/lib/j1_app/omniauth/strategies/patreon.rb +5 -3
  9. data/lib/starter_web/Gemfile +4 -4
  10. data/lib/starter_web/_config.yml +2 -2
  11. data/lib/starter_web/_data/apps/j1_bootstrap_gallery.yml +11 -10
  12. data/lib/starter_web/_data/apps/j1_carousel.yml +49 -48
  13. data/lib/starter_web/_data/apps/j1_justified_gallery.yml +14 -12
  14. data/lib/starter_web/_data/apps/j1_light_gallery.yml +10 -8
  15. data/lib/starter_web/_data/apps/j1_lightbox.yml +31 -29
  16. data/lib/starter_web/_data/apps/j1_link_checker.yml +6 -4
  17. data/lib/starter_web/_data/asciidoc2pdf/default-theme.yml +57 -55
  18. data/lib/starter_web/_data/asciidoc2pdf/j1-theme.yml +6 -6
  19. data/lib/starter_web/_data/builder/blog_navigator.yml +9 -11
  20. data/lib/starter_web/_data/j1_colors.yml +27 -27
  21. data/lib/starter_web/_data/j1_config.yml +43 -41
  22. data/lib/starter_web/_data/j1_polyfills.yml +49 -0
  23. data/lib/starter_web/_data/j1_resources.yml +5 -4
  24. data/lib/starter_web/_data/layouts/app.yml +14 -15
  25. data/lib/starter_web/_data/layouts/blog_archive.yml +24 -26
  26. data/lib/starter_web/_data/layouts/collection.yml +24 -25
  27. data/lib/starter_web/_data/layouts/default.yml +74 -107
  28. data/lib/starter_web/_data/layouts/home.yml +24 -32
  29. data/lib/starter_web/_data/layouts/page.yml +24 -25
  30. data/lib/starter_web/_data/layouts/post.yml +24 -25
  31. data/lib/starter_web/_data/layouts/raw.yml +14 -15
  32. data/lib/starter_web/_data/modules/j1_back2top.yml +25 -23
  33. data/lib/starter_web/_data/modules/j1_footer.yml +5 -4
  34. data/lib/starter_web/_data/modules/j1_header.yml +4 -4
  35. data/lib/starter_web/_data/modules/j1_iframe_resizer.yml +40 -20
  36. data/lib/starter_web/_data/modules/j1_jekyll_search.yml +25 -12
  37. data/lib/starter_web/_data/modules/j1_log4javascript.yml +12 -12
  38. data/lib/starter_web/_data/modules/j1_panel.yml +56 -58
  39. data/lib/starter_web/_data/modules/j1_parallax.yml +10 -6
  40. data/lib/starter_web/_data/modules/j1_polyfills.yml +0 -0
  41. data/lib/starter_web/_data/modules/j1_smooth_scroll.yml +83 -55
  42. data/lib/starter_web/_data/modules/j1_theme_switcher.yml +57 -43
  43. data/lib/starter_web/_data/modules/j1_toccer.yml +36 -35
  44. data/lib/starter_web/_data/pages/builder.yml +17 -16
  45. data/lib/starter_web/_rack/config.ru +4 -3
  46. data/lib/starter_web/assets/themes/j1/core/css/uno.css +8 -2
  47. data/lib/starter_web/assets/themes/j1/core/css/uno.min.css +1 -1
  48. data/lib/starter_web/package.json +1 -1
  49. metadata +4 -4
  50. data/lib/starter_web/_config.yml.kapott +0 -1064
  51. data/lib/starter_web/assets/data/_panel.html +0 -597
@@ -31,6 +31,23 @@ module J1App
31
31
  warden.authenticated?(*args)
32
32
  end
33
33
 
34
+ def category_whitelisted?(*args)
35
+ whitelist, user = *args
36
+ return true if whitelist.include? 'all'
37
+ return true if whitelist.include? user
38
+ return false
39
+ end
40
+
41
+ def payment_activated?(payment)
42
+ return true if payment.any?
43
+ return false
44
+ end
45
+
46
+ def payment_valid?(payment_info)
47
+ return true if payment_info.nil?
48
+ return false
49
+ end
50
+
34
51
  def logout!
35
52
  warden.logout
36
53
  end
@@ -43,9 +60,9 @@ module J1App
43
60
  scope, func, text, details = *args
44
61
 
45
62
  if details.nil?
46
- message = sprintf( "[%-15s] [%-15s] %s", "#{scope} ", "#{func}", "#{text}" )
63
+ message = sprintf( "[%-20s] [%-20s] %s", "#{scope} ", "#{func}", "#{text}" )
47
64
  else
48
- message = sprintf( "[%-15s] [%-15s] %s : %s", "#{scope} ", "#{func}", "#{text}", "#{details}" )
65
+ message = sprintf( "[%-20s] [%-20s] %s: %s", "#{scope} ", "#{func}", "#{text}", "#{details}" )
49
66
  end
50
67
  logger.info "#{message}"
51
68
  end
@@ -31,7 +31,7 @@ module OmniAuth
31
31
  # OAuth client settings
32
32
  # ========================================================================
33
33
 
34
- DEFAULT_SCOPE = 'read write'
34
+ DEFAULT_SCOPE = 'read write email'
35
35
 
36
36
  option :name, 'disqus'
37
37
  option :client_options, {
@@ -52,6 +52,8 @@ module OmniAuth
52
52
 
53
53
  info do
54
54
  {
55
+ :allowed => nil,
56
+ :blacklisted => nil,
55
57
  :description => nil,
56
58
  :email => raw_info['data']['attributes']['email'],
57
59
  :image => nil,
@@ -60,13 +62,13 @@ module OmniAuth
60
62
  :first_name => nil,
61
63
  :last_name => nil,
62
64
  :nickname => raw_info['data']['attributes']['full_name'].gsub('ä','ae').gsub('ö','oe').gsub('ü','ue').gsub(' ','_').downcase,
65
+ :payment_info => raw_info['included'].nil? ? {} : raw_info['included'][0],
66
+ :payment_status => nil,
63
67
  :urls => {
64
68
  'site' => nil,
65
69
  'blog' => nil
66
70
  },
67
- # Make payment_info always available
68
- #
69
- :payment_info => raw_info['included'].nil? ? {} : raw_info['included'][0]
71
+ :whitelisted => nil
70
72
  }
71
73
  end
72
74
 
@@ -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.25'
49
+ gem 'j1_template_mde', '~> 2018.4.26'
50
50
 
51
51
  # --------------------------------------------------------------------
52
52
  # PRODUCTION: Gem needed for the Jekyll and J1 prod environment
@@ -180,9 +180,9 @@ gem 'warden', '~> 1.2'
180
180
 
181
181
  # LiveReload
182
182
  #
183
- gem 'guard', '~> 2.1', group: :development
184
- gem 'guard-livereload', '~> 2.5', group: :development
185
- gem "rack-livereload", '~> 0.3', group: :development
183
+ #gem 'guard', '~> 2.1', group: :development
184
+ #gem 'guard-livereload', '~> 2.5', group: :development
185
+ #gem "rack-livereload", '~> 0.3', group: :development
186
186
 
187
187
  # For the build (npm|yarn), J1 Template is using scss_lint
188
188
  # for linting the SCSS (CSS) components:
@@ -60,7 +60,7 @@ environment: development
60
60
  # anything here because version information is bumped-in by
61
61
  # the build process
62
62
  #
63
- version: 2018.4.25
63
+ version: 2018.4.26
64
64
 
65
65
 
66
66
  # ==============================================================================
@@ -755,7 +755,7 @@ defaults:
755
755
  resources: toccer
756
756
  toc: true
757
757
  adsense: true
758
- comments: true
758
+ comments: false
759
759
 
760
760
  icons:
761
761
  family: MDI
@@ -12,10 +12,10 @@
12
12
  # ------------------------------------------------------------------------------
13
13
 
14
14
  # GENERAL settings
15
- # -------------------------------------------------------------------------
15
+ # ------------------------------------------------------------------------------
16
16
 
17
17
  # version
18
- # --------------------------------------------------------------------
18
+ # ------------------------------------------------------------------------------
19
19
  # Current version of the module
20
20
  #
21
21
  # values: string
@@ -24,7 +24,7 @@
24
24
  version: 0.0.1
25
25
 
26
26
  # enabled
27
- # --------------------------------------------------------------------
27
+ # ------------------------------------------------------------------------------
28
28
  # Enables|Disables the use of LightGallery for the template system
29
29
  #
30
30
  # values: boolean (true|false)
@@ -33,7 +33,7 @@ version: 0.0.1
33
33
  enabled: true
34
34
 
35
35
  # jsonPath
36
- # --------------------------------------------------------------------
36
+ # ------------------------------------------------------------------------------
37
37
  # Path to the JSON data file for AJAX loads
38
38
  #
39
39
  # values: string (path)
@@ -42,15 +42,15 @@ enabled: true
42
42
  jsonPath: /assets/data/galleries.json
43
43
 
44
44
 
45
- # --------------------------------------------------------------------
45
+ # ------------------------------------------------------------------------------
46
46
  # INSTANCE configuration
47
47
  #
48
48
  # lightbox_options
49
- # ---------------------------------------------------------------
49
+ # ------------------------------------------------------------------------------
50
50
  #
51
51
  #
52
52
  # lightbox
53
- # ----------------------------------------------------------
53
+ # ------------------------------------------------------------------------------
54
54
  # Specifies the lightbox used with the gallery
55
55
  #
56
56
  # lb: Lightbox 2
@@ -59,7 +59,8 @@ jsonPath: /assets/data/galleries.json
59
59
  #
60
60
  # values: lb|lg|cb
61
61
  # default: lb
62
- # --------------------------------------------------------------------
62
+ #
63
+ # ------------------------------------------------------------------------------
63
64
  galleries:
64
65
 
65
66
  - gallery:
@@ -93,7 +94,7 @@ galleries:
93
94
  mode: lg-fade
94
95
  cssEasing: cubic-bezier(0.25, 0, 0.25, 1)
95
96
 
96
- # --------------------------------------------------------
97
+ # --------------------------------------------------------------------------
97
98
  # HTML5 VIDEO
98
99
  #
99
100
  - gallery:
@@ -126,7 +127,7 @@ galleries:
126
127
  ]
127
128
  options:
128
129
 
129
- # --------------------------------------------------------
130
+ # ----------------------------------------------------------------------------
130
131
  # Online VIDEO
131
132
  #
132
133
  - gallery:
@@ -11,16 +11,16 @@
11
11
  # See: https://github.com/jekyll-one/j1_template_mde/blob/master/LICENSE
12
12
  # ------------------------------------------------------------------------------
13
13
 
14
- # -------------------------------------------------------------------------
14
+ # ------------------------------------------------------------------------------
15
15
  # GENERAL Carousel settings
16
16
 
17
17
  #
18
18
  # enabled
19
- # ---------------------------------------------------------------
19
+ # ------------------------------------------------------------------------------
20
20
  # Enables|Disables the use of a carousel|slider
21
21
  #
22
22
  # jsonPath
23
- # ---------------------------------------------------------------
23
+ # ------------------------------------------------------------------------------
24
24
  # All data items displayed by a slider are being read from a
25
25
  # JSON file automatically generated from that configuration.
26
26
  # AJAX get method is used to supply the slider with respective
@@ -30,15 +30,15 @@
30
30
  # values: string
31
31
  # default: /assets/data/carousel.json
32
32
  #
33
- # -------------------------------------------------------------------------
33
+ # ------------------------------------------------------------------------------
34
34
  enabled: true
35
35
  jsonPath: /assets/data/carousel.json
36
36
 
37
- # -------------------------------------------------------------------------
37
+ # ------------------------------------------------------------------------------
38
38
  # DEFAULT options
39
39
  #
40
40
  # items
41
- # --------------------------------------------------------------------
41
+ # ------------------------------------------------------------------------------
42
42
  # This variable allows to set the maximum amount of items displayed
43
43
  # at a time with the widest browser width.
44
44
  #
@@ -46,7 +46,7 @@ jsonPath: /assets/data/carousel.json
46
46
  # default: 5
47
47
  #
48
48
  # itemsDesktop
49
- # --------------------------------------------------------------------
49
+ # ------------------------------------------------------------------------------
50
50
  # Preset the number of slides visible with a particular browser
51
51
  # width. The format is [x,y] whereby x means the browser width
52
52
  # and y the number of slides displayed. For example [1199,4] means
@@ -66,21 +66,21 @@ jsonPath: /assets/data/carousel.json
66
66
  # itemsMobile: [479,1]
67
67
  #
68
68
  # singleItem:
69
- # --------------------------------------------------------------------
69
+ # ------------------------------------------------------------------------------
70
70
  # Display only one item independent from screen size.
71
71
  #
72
72
  # values: boolean (true|false)
73
73
  # default: false
74
74
  #
75
75
  # itemsScaleUp
76
- # --------------------------------------------------------------------
76
+ # ------------------------------------------------------------------------------
77
77
  # Don't stretch items when it is less than the supplied items.
78
78
  #
79
79
  # values: boolean (true|false)
80
80
  # default: false
81
81
  #
82
82
  # itemsCustom
83
- # --------------------------------------------------------------------
83
+ # ------------------------------------------------------------------------------
84
84
  # Specifies how many items|slides are shown depending on the
85
85
  # screen width. If this option is set, the options itemsDeskop,
86
86
  # itemsDesktopSmall, itemsTablet, itemsMobile are DISABLED
@@ -98,11 +98,11 @@ jsonPath: /assets/data/carousel.json
98
98
  # values: array (of screen|item pairs)
99
99
  # default: false (no defaults)
100
100
  #
101
- # -------------------------------------------------------------------------
101
+ # ------------------------------------------------------------------------------
102
102
 
103
103
  default:
104
104
 
105
- # --------------------------------------------------------
105
+ # ----------------------------------------------------------------------------
106
106
  # View port sizes
107
107
  #
108
108
  items: 5
@@ -115,20 +115,20 @@ default:
115
115
  singleItem: false
116
116
  itemsScaleUp: false
117
117
 
118
- # --------------------------------------------------------
118
+ # ----------------------------------------------------------------------------
119
119
  # Basic Speeds
120
120
  #
121
121
  slideSpeed: 200
122
122
  paginationSpeed: 800
123
123
  rewindSpeed: 1000
124
124
 
125
- # --------------------------------------------------------
125
+ # ----------------------------------------------------------------------------
126
126
  # Autoplay
127
127
  #
128
128
  autoPlay: false
129
129
  stopOnHover: false
130
130
 
131
- # --------------------------------------------------------
131
+ # ----------------------------------------------------------------------------
132
132
  # Navigation
133
133
  #
134
134
  navigation: false
@@ -136,38 +136,38 @@ default:
136
136
  rewindNav: true
137
137
  scrollPerPage: false
138
138
 
139
- # --------------------------------------------------------
139
+ # ----------------------------------------------------------------------------
140
140
  # Pagination
141
141
  #
142
142
  pagination: true
143
143
  paginationNumbers: false
144
144
 
145
- # --------------------------------------------------------
145
+ # ----------------------------------------------------------------------------
146
146
  # Responsive
147
147
  #
148
148
  responsive: true
149
149
  responsiveRefreshRate: 200
150
150
  responsiveBaseWidth: window
151
151
 
152
- # --------------------------------------------------------
152
+ # ----------------------------------------------------------------------------
153
153
  # CSS Styles
154
154
  #
155
155
  baseClass: owl-carousel
156
156
  theme: owl-theme
157
157
 
158
- # --------------------------------------------------------
158
+ # ----------------------------------------------------------------------------
159
159
  # Lazy load
160
160
  #
161
161
  lazyLoad: false
162
162
  lazyFollow: true
163
163
  lazyEffect: fade
164
164
 
165
- # --------------------------------------------------------
165
+ # ----------------------------------------------------------------------------
166
166
  # Auto height
167
167
  #
168
168
  autoHeight: false
169
169
 
170
- # --------------------------------------------------------
170
+ # ----------------------------------------------------------------------------
171
171
  # AJAX (JSON)
172
172
  #
173
173
  # All data items displayed by a carousel are being read
@@ -179,19 +179,19 @@ default:
179
179
  jsonPath: carousel.json
180
180
  jsonSuccess: false
181
181
 
182
- # --------------------------------------------------------
182
+ # ----------------------------------------------------------------------------
183
183
  # Mouse Events
184
184
  #
185
185
  dragBeforeAnimFinish: true
186
186
  mouseDrag: true
187
187
  touchDrag: true
188
188
 
189
- # --------------------------------------------------------
189
+ # ----------------------------------------------------------------------------
190
190
  # Transitions
191
191
  #
192
192
  transitionStyle: false
193
193
 
194
- # --------------------------------------------------------
194
+ # ----------------------------------------------------------------------------
195
195
  # Callbacks
196
196
  #
197
197
  beforeUpdate: false
@@ -204,29 +204,29 @@ default:
204
204
  startDragging: false
205
205
  afterLazyLoad: false
206
206
 
207
- # --------------------------------------------------------
207
+ # ----------------------------------------------------------------------------
208
208
  # Other
209
209
  #
210
210
  addClassActive: false
211
211
 
212
- # --------------------------------------------------------------------
212
+ # ------------------------------------------------------------------------------
213
213
  # SHOW options
214
- # --------------------------------------------------------------------
214
+ # ------------------------------------------------------------------------------
215
215
  #
216
216
  # enabled
217
- # ----------------------------------------------------------
217
+ # ------------------------------------------------------------------------------
218
218
  # Enables|Disables the use of the OwlCarousel
219
219
  #
220
220
  # values: boolean (true|false)
221
221
  # default: false
222
222
  #
223
223
  # carousel
224
- # ----------------------------------------------------------
224
+ # ------------------------------------------------------------------------------
225
225
  # All shows are configured as elements of the carousel
226
226
  # array
227
227
  #
228
228
  # enabled:
229
- # ---------------------------------------------------
229
+ # ------------------------------------------------------------------------------
230
230
  # If enabled, show data (JSON) is generated
231
231
  #
232
232
  # values: boolean (false|true)
@@ -247,7 +247,7 @@ default:
247
247
  # default: false
248
248
  #
249
249
  # id
250
- # ---------------------------------------------------
250
+ # ----------------------------------------------------------------------------
251
251
  # A unique id used to create and initialize a
252
252
  # (specific) carousel|show.
253
253
  #
@@ -256,7 +256,7 @@ default:
256
256
  #
257
257
  #
258
258
  # item_type
259
- # ---------------------------------------------------
259
+ # ----------------------------------------------------------------------------
260
260
  # For a slide show, images or text (HTML code) can be
261
261
  # used as items.
262
262
  #
@@ -264,7 +264,7 @@ default:
264
264
  # default: image
265
265
  #
266
266
  # css_classes
267
- # ---------------------------------------------------
267
+ # ----------------------------------------------------------------------------
268
268
  # For slide show items (image or text), a list of CSS
269
269
  # class names can be configured as a string of classes
270
270
  # separated by spaces. The class names are passed to all
@@ -274,7 +274,7 @@ default:
274
274
  # default: no defaults
275
275
  #
276
276
  # images
277
- # ---------------------------------------------------
277
+ # ----------------------------------------------------------------------------
278
278
  # The images array specifies all images used by a
279
279
  # carousel as items. All images are to be configured
280
280
  # as a comma separated list (of image names with NO path).
@@ -287,7 +287,7 @@ default:
287
287
  # default: no defaults
288
288
  #
289
289
  # slide_height
290
- # ---------------------------------------------------
290
+ # ----------------------------------------------------------------------------
291
291
  # The images are scaled to 100 percent of height per
292
292
  # default. To reduce the height of the images of a
293
293
  # show, slide_height reduce the (viewport) height of
@@ -308,7 +308,7 @@ default:
308
308
  # default: 100
309
309
  #
310
310
  # lb_caption
311
- # ---------------------------------------------------
311
+ # ----------------------------------------------------------------------------
312
312
  # The lb_caption array specifies all CAPTION TEXT
313
313
  # used by the LIGHTBOX configured (if a lightbox is
314
314
  # enabled).
@@ -321,7 +321,7 @@ default:
321
321
  # default: no defaults
322
322
  #
323
323
  # images_path
324
- # ---------------------------------------------------
324
+ # ----------------------------------------------------------------------------
325
325
  # Path to the IMAGES configured with the 'images'
326
326
  # sequence (array ).
327
327
  #
@@ -329,7 +329,7 @@ default:
329
329
  # default: no defaults
330
330
  #
331
331
  # text
332
- # ---------------------------------------------------
332
+ # ----------------------------------------------------------------------------
333
333
  # If the slide show items are of type TEXT (item_type),
334
334
  # the text array specifies all text blocks (plain text
335
335
  # of HTML code) used by a carousel as show items. Text
@@ -340,7 +340,7 @@ default:
340
340
  # default: no defaults
341
341
  #
342
342
  # links
343
- # ---------------------------------------------------
343
+ # ----------------------------------------------------------------------------
344
344
  # On all carousel items, links (URLs) can be specified.
345
345
  #
346
346
  # NOTE:
@@ -354,15 +354,14 @@ default:
354
354
  # default: no defaults
355
355
  #
356
356
  #
357
- # -------------------------------------------------------------------------
357
+ # ------------------------------------------------------------------------------
358
358
 
359
- # -------------------------------------------------------------------------
359
+ # ------------------------------------------------------------------------------
360
360
  # CAROUSEL configurations
361
- # -------------------------------------------------------------------------
362
-
361
+ # ------------------------------------------------------------------------------
363
362
  carousel:
364
363
 
365
- # ---------------------------------------------------------------
364
+ # ----------------------------------------------------------------------------
366
365
  # owl_demo_text_carousel
367
366
  #
368
367
  - show:
@@ -386,7 +385,7 @@ carousel:
386
385
 
387
386
 
388
387
 
389
- # ---------------------------------------------------------------
388
+ # ----------------------------------------------------------------------------
390
389
  # owl_demo_text_carousel_parallax
391
390
  #
392
391
  - show:
@@ -411,7 +410,7 @@ carousel:
411
410
  pagination: false
412
411
 
413
412
 
414
- # ---------------------------------------------------------------
413
+ # ----------------------------------------------------------------------------
415
414
  # owl_demo_cats
416
415
  #
417
416
  - show:
@@ -449,7 +448,7 @@ carousel:
449
448
  items: 2
450
449
 
451
450
 
452
- # ---------------------------------------------------------------
451
+ # ----------------------------------------------------------------------------
453
452
  # owl_demo_simple
454
453
  #
455
454
  - show:
@@ -477,7 +476,7 @@ carousel:
477
476
  itemsDesktop: "[1199,3]"
478
477
  itemsDesktopSmall: "[979,3]"
479
478
 
480
- # ---------------------------------------------------------------
479
+ # ----------------------------------------------------------------------------
481
480
  # owl_demo_oneslide
482
481
  #
483
482
  - show:
@@ -499,3 +498,5 @@ carousel:
499
498
  paginationSpeed: 400
500
499
  singleItem: true
501
500
  transitionStyle: goDown
501
+
502
+