j1-template 2023.0.3 → 2023.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/content_generator_collection.html +26 -74
  3. data/_includes/themes/j1/procedures/collections/create_collection_article_preview.proc +64 -19
  4. data/_includes/themes/j1/procedures/collections/pager.proc +127 -0
  5. data/_includes/themes/j1/procedures/posts/pager.proc +4 -4
  6. data/assets/data/banner.html +2 -2
  7. data/assets/data/panel.html +130 -141
  8. data/assets/themes/j1/adapter/js/themer.js +106 -85
  9. data/assets/themes/j1/modules/themeSwitcher/js/_unsued/switcher.1.js +454 -0
  10. data/lib/j1/version.rb +1 -1
  11. data/lib/starter_web/Gemfile +1 -1
  12. data/lib/starter_web/README.md +5 -5
  13. data/lib/starter_web/_config.yml +16 -19
  14. data/lib/starter_web/_data/blocks/panel.yml +1 -1
  15. data/lib/starter_web/_data/modules/attics.yml +2 -2
  16. data/lib/starter_web/_data/modules/scroller.yml +5 -5
  17. data/lib/starter_web/_data/templates/feed.xml +1 -1
  18. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  19. data/lib/starter_web/assets/images/{triangles-bg.png → backgrounds/triangles-bg.png} +0 -0
  20. data/lib/starter_web/assets/images/{agency/img/logos → icons/scalable}/facebook.svg +0 -0
  21. data/lib/starter_web/assets/images/{agency/img/logos → icons/scalable}/google.svg +0 -0
  22. data/lib/starter_web/assets/images/{agency/img/logos → icons/scalable}/ibm.svg +0 -0
  23. data/lib/starter_web/assets/images/{agency/img/logos → icons/scalable}/microsoft.svg +0 -0
  24. data/lib/starter_web/collections/_biography/a-life-in-questions.adoc +98 -0
  25. data/lib/starter_web/collections/_biography/becoming.adoc +89 -0
  26. data/lib/starter_web/collections/_biography/born-to-run.adoc +92 -0
  27. data/lib/starter_web/collections/_biography/forty-autumns.adoc +91 -0
  28. data/lib/starter_web/collections/_biography/not-dead-yet.adoc +85 -0
  29. data/lib/starter_web/collections/_biography/princess-diarist-the.adoc +88 -0
  30. data/lib/starter_web/collections/_biography/when-breath-becomes-air.adoc +90 -0
  31. data/lib/starter_web/package.json +1 -1
  32. data/lib/starter_web/pages/public/blog/navigator/archive/allview.html +1 -0
  33. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +1 -0
  34. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +1 -0
  35. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +1 -0
  36. data/lib/starter_web/pages/public/blog/navigator/index.html +2 -1
  37. data/lib/starter_web/pages/public/bookshelf/viewer_biography.adoc +62 -0
  38. data/lib/starter_web/pages/public/bookshelf/whats_up.adoc +287 -0
  39. data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +1 -0
  40. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  41. data/lib/starter_web/utilsrv/package.json +1 -1
  42. metadata +18 -36
  43. data/lib/starter_web/_includes/custom/agency/portfolio.html +0 -67
  44. data/lib/starter_web/_includes/custom/agency/services.html +0 -35
  45. data/lib/starter_web/_includes/custom/agency/team.html +0 -29
  46. data/lib/starter_web/assets/images/agency/img/about/1.jpg +0 -0
  47. data/lib/starter_web/assets/images/agency/img/about/2.jpg +0 -0
  48. data/lib/starter_web/assets/images/agency/img/about/3.jpg +0 -0
  49. data/lib/starter_web/assets/images/agency/img/about/4.jpg +0 -0
  50. data/lib/starter_web/assets/images/agency/img/close-icon.svg +0 -1
  51. data/lib/starter_web/assets/images/agency/img/header-bg.jpg +0 -0
  52. data/lib/starter_web/assets/images/agency/img/map-image.png +0 -0
  53. data/lib/starter_web/assets/images/agency/img/navbar-logo.svg +0 -1
  54. data/lib/starter_web/assets/images/agency/img/portfolio/1.jpg +0 -0
  55. data/lib/starter_web/assets/images/agency/img/portfolio/2.jpg +0 -0
  56. data/lib/starter_web/assets/images/agency/img/portfolio/3.jpg +0 -0
  57. data/lib/starter_web/assets/images/agency/img/portfolio/4.jpg +0 -0
  58. data/lib/starter_web/assets/images/agency/img/portfolio/5.jpg +0 -0
  59. data/lib/starter_web/assets/images/agency/img/portfolio/6.jpg +0 -0
  60. data/lib/starter_web/assets/images/agency/img/screenshot.png +0 -0
  61. data/lib/starter_web/assets/images/agency/img/team/1.jpg +0 -0
  62. data/lib/starter_web/assets/images/agency/img/team/2.jpg +0 -0
  63. data/lib/starter_web/assets/images/agency/img/team/3.jpg +0 -0
  64. data/lib/starter_web/pages/public/learn/mweb/mweb-tester.adoc +0 -299
  65. data/lib/starter_web/pages/public/learn/mweb/static/index.css +0 -237
  66. data/lib/starter_web/pages/public/learn/mweb/static/index.js +0 -1138
  67. data/lib/starter_web/pages/public/learn/mweb/static/lodash.min.js +0 -140
  68. data/lib/starter_web/pages/public/learn/mweb/static/socket.io/socket.io.js +0 -4570
  69. data/lib/starter_web/pages/public/learn/mweb/static/socket.io/socket.io.min.js +0 -7
  70. data/lib/starter_web/pages/public/learn/mweb/static/video-js.min.css +0 -1
  71. data/lib/starter_web/pages/public/learn/mweb/static/video.min.js +0 -26
@@ -224,149 +224,143 @@ exclude_from_search: true
224
224
  <div class="container {{panel_settings.properties}}">
225
225
 
226
226
  <!-- Heading -->
227
- <div>
228
-
229
- {% if heading_position == 'left' %}
230
- <div class="{{panel_settings.animate}} mb-2">
231
- <h2 class="g-font-weight-500 mb-0 {{heading_translate}}">{{panel_settings.title}}</h2>
232
- <p class="tagline mb-0 {{heading_translate}}"><b>{{panel_settings.tagline}}</b></p>
233
- <div class="d-inline-block g-width-50 g-height-2 bg-primary mb-2"></div>
234
- </div>
235
- </div>
236
- {% endif %}
237
-
238
- {% if heading_position == 'center' %}
239
- <div class="text-center mb-2">
240
- <h2 class="mb-0 {{heading_translate}}">{{panel_settings.title}}</h2>
241
- <p class="h4 mb-0 text-muted {{heading_translate}}"><i>{{panel_settings.tagline}}</i></p>
242
- <div class="d-inline-block g-width-50 g-height-2 bg-primary mb-2"></div>
243
- </div>
244
- {% endif%}
227
+ {% if heading_position == 'left' %}
228
+ <div class="{{panel_settings.animate}} mb-2">
229
+ <h2 class="g-font-weight-500 mb-0 {{heading_translate}}">{{panel_settings.title}}</h2>
230
+ <p class="tagline mb-0 {{heading_translate}}"><b>{{panel_settings.tagline}}</b></p>
231
+ <div class="d-inline-block g-width-50 g-height-2 bg-primary mb-2"></div>
232
+ </div>
233
+ {% endif %}
245
234
 
246
- <!-- Description -->
247
- <div class="{{description_properties}}">{{panel_settings.description}}</div>
235
+ {% if heading_position == 'center' %}
236
+ <div class="text-center mb-2">
237
+ <h2 class="mb-0 {{heading_translate}}">{{panel_settings.title}}</h2>
238
+ <p class="h4 mb-0 text-muted {{heading_translate}}"><i>{{panel_settings.tagline}}</i></p>
239
+ <div class="d-inline-block g-width-50 g-height-2 bg-primary mb-2"></div>
248
240
  </div>
241
+ {% endif%}
242
+
243
+ <!-- Description -->
244
+ <div class="{{description_properties}}">{{panel_settings.description}}</div>
249
245
  <!-- End Heading -->
250
246
 
251
247
  <!-- Cards -->
252
248
  <div class="card-deck {{panel_settings.id}}" style="display: none;">
253
- {% assign card_items = cards|size %}
254
- {% for card in cards %}
255
-
256
- {% for items in card %}
257
- {% for item in items[1] %}
258
- {% assign key = item[0] %}
259
- {% assign value = item[1] %}
260
- {% if key == 'enabled' %} {% assign card_enabled = value %} {% endif %}
261
- {% if key == 'type' %} {% assign card_type = value %} {% endif %}
262
- {% if key == 'properties' %} {% assign card_properties = value %} {% endif %}
263
- {% if key == 'icon' %} {% assign card_icon = value %} {% endif %}
264
- {% if key == 'icon_size' %} {% assign card_icon_size = value %} {% endif %}
265
- {% if key == 'icon_family' %} {% assign card_icon_family = value | downcase %} {% endif %}
266
- {% if key == 'icon_color' %} {% assign card_icon_color = value %} {% endif %}
267
- {% if key == 'title' %} {% assign card_title = value | strip_newlines%} {% endif %}
268
- {% if key == 'title_translate' %} {% assign card_title_translate = value %} {% endif %}
269
- {% if key == 'tagline' %} {% assign card_tagline = value | strip_newlines%} {% endif %}
270
- {% if key == 'text' %} {% assign card_text = value | strip_newlines %} {% endif %}
271
- {% if key == 'buttons' %} {% assign card_buttons = value %} {% endif %}
272
- {% endfor %}
273
- {% if card_enabled == false %} {% assign card_items = card_items|minus:1 %} {% assign card_enabled = nil %} {% endif %}
274
- {% endfor %}
275
- {% assign col_size = 12|divided_by:card_items %}
276
-
277
- {% include {{select_icon_size}} family=icon_family size=icon_size %}
278
- {% assign icon_size = size %}
279
-
280
- {% comment %} extract link for card icon
281
- ------------------------------------------------------------------ {% endcomment %}
282
- {% for items in card_buttons %} {% for item in items %}
283
- {% if item[0] == 'button' %}
284
- {% for elm in item[1] %}
285
- {% assign key = elm[0] %}
286
- {% assign value = elm[1] %}
287
- {% if key == 'href' %} {% assign card_href = value %} {% endif %}
249
+ {% assign card_items = cards|size %}
250
+ {% for card in cards %}
251
+
252
+ {% for items in card %}
253
+ {% for item in items[1] %}
254
+ {% assign key = item[0] %}
255
+ {% assign value = item[1] %}
256
+ {% if key == 'enabled' %} {% assign card_enabled = value %} {% endif %}
257
+ {% if key == 'type' %} {% assign card_type = value %} {% endif %}
258
+ {% if key == 'properties' %} {% assign card_properties = value %} {% endif %}
259
+ {% if key == 'icon' %} {% assign card_icon = value %} {% endif %}
260
+ {% if key == 'icon_size' %} {% assign card_icon_size = value %} {% endif %}
261
+ {% if key == 'icon_family' %} {% assign card_icon_family = value | downcase %} {% endif %}
262
+ {% if key == 'icon_color' %} {% assign card_icon_color = value %} {% endif %}
263
+ {% if key == 'title' %} {% assign card_title = value | strip_newlines%} {% endif %}
264
+ {% if key == 'title_translate' %} {% assign card_title_translate = value %} {% endif %}
265
+ {% if key == 'tagline' %} {% assign card_tagline = value | strip_newlines%} {% endif %}
266
+ {% if key == 'text' %} {% assign card_text = value | strip_newlines %} {% endif %}
267
+ {% if key == 'buttons' %} {% assign card_buttons = value %} {% endif %}
288
268
  {% endfor %}
289
- {% endif %}
290
- {% endfor %} {% endfor %}
291
-
292
- {% if card_type == 'text' and card_enabled %}
293
- {% assign card_raised = 'raised-z5' %}
294
- <article class="card raised-z0 mb-3">
295
- <div class="card-header bg-primary pt-2 pb-2">
296
- <div class="d-flex flex-row align-items-center">
297
- <div class="mr-3">
298
- {% if card_icon_family == 'iconify' %}
299
- {% if card_icon_color == 'bg-primary' %}
300
- <span class="{{card_icon_family}} {{card_icon_family}}-{{card_icon_size}} iconify-md-bg-primary" data-icon="{{card_icon}}" data-inline="false"></span>
301
- {% else %}
302
- <span class="{{card_icon_family}} {{card_icon_family}}-{{card_icon_size}} {{card_icon_family}}-{{card_icon_color}}" data-icon="{{card_icon}}" data-inline="false"></span>
303
- {% endif %}
304
- {% else %}
305
- <span>
269
+ {% if card_enabled == false %} {% assign card_items = card_items|minus:1 %} {% assign card_enabled = nil %} {% endif %}
270
+ {% endfor %}
271
+ {% assign col_size = 12|divided_by:card_items %}
272
+
273
+ {% include {{select_icon_size}} family=icon_family size=icon_size %}
274
+ {% assign icon_size = size %}
275
+
276
+ {% comment %} extract link for card icon
277
+ ------------------------------------------------------------------ {% endcomment %}
278
+ {% for items in card_buttons %} {% for item in items %}
279
+ {% if item[0] == 'button' %}
280
+ {% for elm in item[1] %}
281
+ {% assign key = elm[0] %}
282
+ {% assign value = elm[1] %}
283
+ {% if key == 'href' %} {% assign card_href = value %} {% endif %}
284
+ {% endfor %}
285
+ {% endif %}
286
+ {% endfor %} {% endfor %}
287
+
288
+ {% if card_type == 'text' and card_enabled %}
289
+ {% assign card_raised = 'raised-z5' %}
290
+ <article class="card raised-z0 mb-3">
291
+ <div class="card-header bg-primary pt-2 pb-2">
292
+ <div class="d-flex flex-row align-items-center">
293
+ <div class="mr-3">
294
+ {% if card_icon_family == 'iconify' %}
306
295
  {% if card_icon_color == 'bg-primary' %}
307
- <i class="{{card_icon_family}} {{card_icon_family}}-{{card_icon}} {{card_icon_family}}-{{card_icon_size}} mdi-md-white"></i>
296
+ <span class="{{card_icon_family}} {{card_icon_family}}-{{card_icon_size}} iconify-md-bg-primary" data-icon="{{card_icon}}" data-inline="false"></span>
308
297
  {% else %}
309
- <i class="{{card_icon_family}} {{card_icon_family}}-{{card_icon}} {{card_icon_family}}-{{card_icon_size}} {{card_icon_family}}-{{card_icon_color}}"></i>
298
+ <span class="{{card_icon_family}} {{card_icon_family}}-{{card_icon_size}} {{card_icon_family}}-{{card_icon_color}}" data-icon="{{card_icon}}" data-inline="false"></span>
310
299
  {% endif %}
311
- </span>
312
- {% endif %}
300
+ {% else %}
301
+ <span>
302
+ {% if card_icon_color == 'bg-primary' %}
303
+ <i class="{{card_icon_family}} {{card_icon_family}}-{{card_icon}} {{card_icon_family}}-{{card_icon_size}} mdi-md-white"></i>
304
+ {% else %}
305
+ <i class="{{card_icon_family}} {{card_icon_family}}-{{card_icon}} {{card_icon_family}}-{{card_icon_size}} {{card_icon_family}}-{{card_icon_color}}"></i>
306
+ {% endif %}
307
+ </span>
308
+ {% endif %}
309
+ </div>
310
+ <h3 class="m-0 {{card_title_translate}}">{{card_title}}</h3>
313
311
  </div>
314
- <h3 class="m-0 {{card_title_translate}}">{{card_title}}</h3>
315
312
  </div>
316
- </div>
317
313
 
318
- <div class="card-body g-min-height-200 r-text-300 mt-0">{{card_text}}</div>
319
- <div class="card-footer r-text-200 md-grey-900 text-lowercase">
320
- {% for data in card_buttons %} {% for item in data %} {% for button in item[1] %}
321
- {% assign key = button[0] %}
322
- {% assign value = button[1] %}
323
- {% if key == 'text' %} {% assign button_text = value %} {% endif %}
324
- {% if key == 'class' %} {% assign button_class = value %} {% endif %}
325
- {% if key == 'icon' %} {% assign button_icon = value %} {% endif %}
326
- {% if key == 'icon_family' %} {% assign button_icon_family = value %} {% endif %}
327
- {% if key == 'icon_color' %} {% assign button_icon_color = value %} {% endif %}
328
- {% if key == 'icon_size' %} {% assign button_icon_size = value %} {% endif %}
329
- {% if key == 'href' %} {% assign button_href = value %} {% endif %}
330
- {% if key == 'target' %} {% assign button_target = value %} {% endif %}
331
- {% endfor %} {% endfor %} {% endfor %}
332
-
333
- {% if button_target == null %}
334
- <a class="card-link md-grey-900" href="{{button_href}}">{{readmore_text}} · {{button_text}}</a>
335
- {% else %}
336
- <a class="card-link md-grey-900" href="{{button_href}}" target="{{button_target}}">{{readmore_text}} · {{button_text}}</a>
337
- {% endif %}
338
- </div>
314
+ <div class="card-body g-min-height-200 r-text-300 mt-0">{{card_text}}</div>
315
+ <div class="card-footer r-text-200 md-grey-900 text-lowercase">
316
+ {% for data in card_buttons %} {% for item in data %} {% for button in item[1] %}
317
+ {% assign key = button[0] %}
318
+ {% assign value = button[1] %}
319
+ {% if key == 'text' %} {% assign button_text = value %} {% endif %}
320
+ {% if key == 'class' %} {% assign button_class = value %} {% endif %}
321
+ {% if key == 'icon' %} {% assign button_icon = value %} {% endif %}
322
+ {% if key == 'icon_family' %} {% assign button_icon_family = value %} {% endif %}
323
+ {% if key == 'icon_color' %} {% assign button_icon_color = value %} {% endif %}
324
+ {% if key == 'icon_size' %} {% assign button_icon_size = value %} {% endif %}
325
+ {% if key == 'href' %} {% assign button_href = value %} {% endif %}
326
+ {% if key == 'target' %} {% assign button_target = value %} {% endif %}
327
+ {% endfor %} {% endfor %} {% endfor %}
328
+
329
+ {% if button_target == null %}
330
+ <a class="card-link md-grey-900" href="{{button_href}}">{{readmore_text}} · {{button_text}}</a>
331
+ {% else %}
332
+ <a class="card-link md-grey-900" href="{{button_href}}" target="{{button_target}}">{{readmore_text}} · {{button_text}}</a>
333
+ {% endif %}
334
+ </div>
339
335
 
340
- </article>
341
- {% endif %}
336
+ </article>
337
+ {% endif %}
342
338
 
343
- <!-- Calculate 'column setters' to manage BS break points for 'responsive' card deck (rcard-deck) -->
344
- {% assign sm = forloop.index | modulo: bs_card_deck.break_on_sm %}
345
- {% assign md = forloop.index | modulo: bs_card_deck.break_on_md %}
346
- {% assign lg = forloop.index | modulo: bs_card_deck.break_on_lg %}
347
- {% assign xl = forloop.index | modulo: bs_card_deck.break_on_xl %}
339
+ <!-- Calculate 'column setters' to manage BS break points for 'responsive' card deck (rcard-deck) -->
340
+ {% assign sm = forloop.index | modulo: bs_card_deck.break_on_sm %}
341
+ {% assign md = forloop.index | modulo: bs_card_deck.break_on_md %}
342
+ {% assign lg = forloop.index | modulo: bs_card_deck.break_on_lg %}
343
+ {% assign xl = forloop.index | modulo: bs_card_deck.break_on_xl %}
348
344
 
349
- <!-- Add 'column setters' for BS break points -->
350
- {% if sm == 0 %}
351
- <div class="w-100 d-none d-sm-block d-md-none"> <!-- break on sm --> </div>
352
- {% endif %}
345
+ <!-- Add 'column setters' for BS break points -->
346
+ {% if sm == 0 %}
347
+ <div class="w-100 d-none d-sm-block d-md-none"> <!-- break on sm --> </div>
348
+ {% endif %}
353
349
 
354
- {% if md == 0 %}
355
- <div class="w-100 d-none d-md-block d-lg-none"> <!-- break on md --> </div>
356
- {% endif %}
350
+ {% if md == 0 %}
351
+ <div class="w-100 d-none d-md-block d-lg-none"> <!-- break on md --> </div>
352
+ {% endif %}
357
353
 
358
- {% if lg == 0 %}
359
- <div class="w-100 d-none d-lg-block d-xl-none"> <!-- break on lg --> </div>
360
- {% endif %}
354
+ {% if lg == 0 %}
355
+ <div class="w-100 d-none d-lg-block d-xl-none"> <!-- break on lg --> </div>
356
+ {% endif %}
361
357
 
362
- {% if xl == 0 %}
363
- <div class="w-100 d-none d-xl-block"> <!-- break on xl --> </div>
364
- {% endif %}
365
- {% endfor %}
358
+ {% if xl == 0 %}
359
+ <div class="w-100 d-none d-xl-block"> <!-- break on xl --> </div>
360
+ {% endif %}
361
+ {% endfor %}
366
362
  </div>
367
363
  <!-- End Cards -->
368
- {% comment %} END cards
369
- -------------------------------------------------------------------- {% endcomment %}
370
364
 
371
365
  </div>
372
366
  <!-- END main container -->
@@ -413,11 +407,10 @@ exclude_from_search: true
413
407
  <div>
414
408
 
415
409
  {% if heading_position == 'left' %}
416
- <div class="{{panel_settings.animate}} mb-2">
417
- <h2 class="g-font-weight-500 mb-0 {{heading_translate}}">{{panel_settings.title}}</h2>
418
- <p class="tagline mb-0 {{heading_translate}}"><b>{{panel_settings.tagline}}</b></p>
419
- <div class="d-inline-block g-width-50 g-height-2 bg-primary mb-2"></div>
420
- </div>
410
+ <div class="{{panel_settings.animate}} mb-2">
411
+ <h2 class="g-font-weight-500 mb-0 {{heading_translate}}">{{panel_settings.title}}</h2>
412
+ <p class="tagline mb-0 {{heading_translate}}"><b>{{panel_settings.tagline}}</b></p>
413
+ <div class="d-inline-block g-width-50 g-height-2 bg-primary mb-2"></div>
421
414
  </div>
422
415
  {% endif %}
423
416
 
@@ -589,11 +582,10 @@ exclude_from_search: true
589
582
  <div class="noclass">
590
583
 
591
584
  {% if heading_position == 'left' %}
592
- <div class="{{panel_settings.animate}} mb-2">
593
- <h2 class="g-font-weight-500 mb-0 {{heading_translate}}">{{panel_settings.title}}</h2>
594
- <p class="tagline mb-0 {{heading_translate}}"><b>{{panel_settings.tagline}}</b></p>
595
- <div class="d-inline-block g-width-50 g-height-2 bg-primary mb-2"></div>
596
- </div>
585
+ <div class="{{panel_settings.animate}} mb-2">
586
+ <h2 class="g-font-weight-500 mb-0 {{heading_translate}}">{{panel_settings.title}}</h2>
587
+ <p class="tagline mb-0 {{heading_translate}}"><b>{{panel_settings.tagline}}</b></p>
588
+ <div class="d-inline-block g-width-50 g-height-2 bg-primary mb-2"></div>
597
589
  </div>
598
590
  {% endif %}
599
591
 
@@ -762,11 +754,10 @@ exclude_from_search: true
762
754
  <div>
763
755
 
764
756
  {% if heading_position == 'left' %}
765
- <div class="{{panel_settings.animate}} mb-2">
766
- <h2 class="g-font-weight-500 mb-0 {{heading_translate}}">{{panel_settings.title}}</h2>
767
- <p class="tagline mb-0 {{heading_translate}}"><b>{{panel_settings.tagline}}</b></p>
768
- <div class="d-inline-block g-width-50 g-height-2 bg-primary mb-2"></div>
769
- </div>
757
+ <div class="{{panel_settings.animate}} mb-2">
758
+ <h2 class="g-font-weight-500 mb-0 {{heading_translate}}">{{panel_settings.title}}</h2>
759
+ <p class="tagline mb-0 {{heading_translate}}"><b>{{panel_settings.tagline}}</b></p>
760
+ <div class="d-inline-block g-width-50 g-height-2 bg-primary mb-2"></div>
770
761
  </div>
771
762
  {% endif %}
772
763
 
@@ -779,9 +770,7 @@ exclude_from_search: true
779
770
  {% endif%}
780
771
 
781
772
  <!-- Description -->
782
- <div class="{{panel_settings.description_properties}}">
783
- {{panel_options.description}}
784
- </div>
773
+ <div class="{{panel_settings.description_properties}}">{{panel_options.description}}</div>
785
774
 
786
775
  </div>
787
776
  <!-- End Heading -->
@@ -815,7 +804,7 @@ exclude_from_search: true
815
804
 
816
805
  <!-- [INFO ] [~/assets/data/panel.html ] [ blocktype detected as: {{card_block}} ] -->
817
806
  {% if card_block == 'card-list' %}
818
- <div>
807
+ <div class="no-class">
819
808
  <ul id="{{panel_settings.id}}-scroll-group" class="scroll-group scroll-group-horizontal align-items-stretch flex-wrap">
820
809
  <!-- [INFO ] [~/assets/data/panel.html ] [ write post items (card_block == 'card-list')] -->
821
810
  {% for post in site.posts %}
@@ -154,6 +154,22 @@ j1.adapter.themer = (function (j1, window) {
154
154
  return false;
155
155
  }
156
156
 
157
+ // see: https://stackoverflow.com/questions/4301968/checking-a-url-in-jquery-javascript
158
+ // see: https://stackoverflow.com/questions/16481598/prevent-unhandled-jquery-ajax-error
159
+ //
160
+ var urlExists = function(url, callback) {
161
+ if ( ! $.isFunction(callback)) {
162
+ throw Error('Not a valid callback');
163
+ }
164
+
165
+ $.ajax({
166
+ type: 'HEAD',
167
+ url: url,
168
+ success: $.proxy(callback, this, true),
169
+ error: $.proxy(callback, this, false)
170
+ });
171
+ };
172
+
157
173
  // ---------------------------------------------------------------------------
158
174
  // Main object
159
175
  // ---------------------------------------------------------------------------
@@ -202,7 +218,7 @@ j1.adapter.themer = (function (j1, window) {
202
218
  user_state = j1.readCookie(cookie_names.user_state);
203
219
  user_consent = j1.readCookie(cookie_names.user_consent);
204
220
 
205
- logger.info('\n' + 'cookie ' + cookie_names.user_state + ' successfully loaded after: ' + interval_count * 25 + ' ms');
221
+ logger.debug('\n' + 'cookie ' + cookie_names.user_state + ' successfully loaded after: ' + interval_count * 25 + ' ms');
206
222
 
207
223
  // initial theme data
208
224
  if (user_state.theme_css === '') {
@@ -217,103 +233,108 @@ j1.adapter.themer = (function (j1, window) {
217
233
  secure: secure,
218
234
  expires: 365
219
235
  });
236
+
220
237
  if (!cookie_written) {
221
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_consent);
238
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_consent);
222
239
  }
223
240
  }
224
241
 
225
- // check cookie consistency
226
- // if (Object.keys(user_state).length > 2) {
227
- // logger.debug('\n' + 'consistent state detected for cookie: ' + cookie_names.user_state);
228
- // } else {
229
- // logger.fatal('\n' + 'inconsistent state detected for cookie: ' + cookie_names.user_state);
230
- // }
231
-
232
242
  // set the theme switcher state
233
243
  user_state.theme_switcher = themerOptions.enabled;
234
-
235
244
  if (themerOptions.enabled) {
236
- // enable BS ThemeSwitcher
237
- logger.info('\n' + 'themes detected as: enabled');
238
- logger.info('\n' + 'remote themes are being initialized: ' + user_state.theme_name);
239
-
240
- /* eslint-disable */
241
- // load list of remote themes
242
- $('#remote_themes').bootstrapThemeSwitcher.defaults = {
243
- debug: themerOptions.debug,
244
- saveToCookie: themerOptions.saveToCookie,
245
- cssThemeLink: themerOptions.cssThemeLink,
246
- cookieThemeName: themerOptions.cookieThemeName,
247
- cookieDefaultThemeName: themerOptions.cookieDefaultThemeName,
248
- cookieThemeCss: themerOptions.cookieThemeCss,
249
- cookieThemeExtensionCss: themerOptions.cookieThemeExtensionCss,
250
- cookieExpiration: themerOptions.cookieExpiration,
251
- cookiePath: themerOptions.cookiePath,
252
- defaultCssFile: themerOptions.defaultCssFile,
253
- bootswatchApiUrl: themerOptions.bootswatchApiUrl,
254
- bootswatchApiVersion: themerOptions.bootswatchApiVersion,
255
- loadFromBootswatch: themerOptions.loadFromBootswatch,
256
- localFeed: themerOptions.localThemes,
257
- excludeBootswatch: themerOptions.excludeBootswatch,
258
- includeBootswatch: themerOptions.includeBootswatch,
259
- skipIncludeBootswatch: themerOptions.skipIncludeBootswatch
260
- };
261
- /* eslint-enable */
262
- } else {
263
- logger.warn('\n' + 'themes detected as: disabled');
264
- logger.warn('\n' + 'no remote themes are available');
265
- }
266
-
267
- // continue processing if page is ready
268
- var dependencies_met_theme_applied = setInterval (function () {
269
- if (j1.getState() == 'finished') {
270
- styleLoaded = styleSheetLoaded(user_state.theme_css);
271
- theme_css_html = '<link rel="stylesheet" id="' + id + '" href="' + user_state.theme_css + '" type="text/css" />';
272
-
273
- // loading theme CSS file except on UNO
274
- if (!user_state.theme_name.includes('Uno') || !styleLoaded) {
275
- $('head').append(theme_css_html);
276
- _this.setState('finished');
277
- logger.debug('\n' + 'state: ' + _this.getState());
278
- logger.info('\n' + 'module initialized successfully');
279
- clearInterval(dependencies_met_theme_applied);
280
- } else if (user_state.theme_name.includes('Uno')) {
281
- _this.setState('finished');
282
- logger.debug('\n' + 'state: ' + _this.getState());
283
- logger.info('\n' + 'module initialized successfully');
284
- clearInterval(dependencies_met_theme_applied);
245
+ // enable BS ThemeSwitcher
246
+ logger.info('\n' + 'themes detected as: ' + themerOptions.enabled);
247
+ logger.info('\n' + 'remote themes are being initialized');
248
+
249
+ /* eslint-disable */
250
+ // load list of remote themes
251
+ $('#remote_themes').bootstrapThemeSwitcher.defaults = {
252
+ debug: themerOptions.debug,
253
+ saveToCookie: themerOptions.saveToCookie,
254
+ cssThemeLink: themerOptions.cssThemeLink,
255
+ cookieThemeName: themerOptions.cookieThemeName,
256
+ cookieDefaultThemeName: themerOptions.cookieDefaultThemeName,
257
+ cookieThemeCss: themerOptions.cookieThemeCss,
258
+ cookieThemeExtensionCss: themerOptions.cookieThemeExtensionCss,
259
+ cookieExpiration: themerOptions.cookieExpiration,
260
+ cookiePath: themerOptions.cookiePath,
261
+ defaultCssFile: themerOptions.defaultCssFile,
262
+ bootswatchApiUrl: themerOptions.bootswatchApiUrl,
263
+ bootswatchApiVersion: themerOptions.bootswatchApiVersion,
264
+ loadFromBootswatch: themerOptions.loadFromBootswatch,
265
+ localFeed: themerOptions.localThemes,
266
+ excludeBootswatch: themerOptions.excludeBootswatch,
267
+ includeBootswatch: themerOptions.includeBootswatch,
268
+ skipIncludeBootswatch: themerOptions.skipIncludeBootswatch
269
+ };
270
+ /* eslint-enable */
271
+ } else {
272
+ logger.warn('\n' + 'themes detected as: disabled');
273
+ logger.warn('\n' + 'no remote themes are available');
274
+ }
275
+
276
+ // validate theme to be loaded
277
+ urlExists(user_state.theme_css, function(success) {
278
+ // load theme
279
+ if (success) {
280
+ // continue processing if page is ready
281
+ var dependencies_met_theme_loaded = setInterval (function () {
282
+ if (j1.getState() == 'finished') {
283
+ theme_css_html = '<link rel="stylesheet" id="' + id + '" href="' + user_state.theme_css + '" type="text/css" />';
284
+ $('head').append(theme_css_html);
285
+
286
+ clearInterval(dependencies_met_theme_loaded);
287
+ }
288
+ }, 25); // END dependencies_met_theme_loaded
289
+ } else {
290
+ // invalid theme, fallback on default
291
+ logger.warn('\n' + 'themes CSS invalid: ' + user_state.theme_css);
292
+ theme_css_html = '<link rel="stylesheet" id="' + id + '" href="' + default_theme_css + '" type="text/css" />';
293
+ logger.warn('\n' + 'set default theme :' + default_theme_name);
294
+ logger.debug('\n' + 'theme CSS loaded: ' + default_theme_css);
295
+ $('head').append(theme_css_html);
296
+
297
+ // write theme defaults to cookie
298
+ user_state.theme_name = default_theme_name;
299
+ user_state.theme_css = default_theme_css;
300
+ user_state.theme_author = default_theme_author;
301
+ user_state.theme_author_url = default_theme_author_url;
302
+
303
+ cookie_written = j1.writeCookie({
304
+ name: cookie_names.user_state,
305
+ data: user_state,
306
+ secure: secure,
307
+ expires: 365
308
+ });
309
+
310
+ if (!cookie_written) {
311
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_consent);
285
312
  }
286
- }
287
- }, 25); // END dependencies_met_theme_applied
288
313
 
289
- // } else {
290
- // _this.setState('finished');
291
- // logger.debug('\n' + 'state: ' + _this.getState());
292
- // logger.info('\n' + 'themes detected as: disabled');
293
- // }
314
+ // reload page using the default thme
315
+ location.reload(true);
316
+ }
317
+ });
294
318
  clearInterval(dependencies_met_user_state_available);
295
319
  }
320
+ }, 25); // END dependencies_met_user_state_available
296
321
 
297
- if (interval_count > max_count) {
298
- logger.error('\n' + 'interval max count reached: ' + max_count);
299
- logger.error('\n' + 'check failed after: ' + max_count * 25 + ' ms');
300
- logger.error('\n' + 'loading cookie failed: ' + cookie_names.user_state);
301
-
302
- logger.debug('\n' + 'j1 cookies found:' + j1Cookies.length);
303
- j1Cookies.forEach(item => console.log('j1.core.switcher: ' + item));
304
- logger.debug('\n' + 'ga cookies found:' + gaCookies.length);
305
- gaCookies.forEach(item => console.log('j1.core.switcher: ' + item));
306
-
307
- // jadams, 2021-07-15: redirect to homepage
308
- // NOTE: UNCLEAR why it is needed to create the user state
309
- // cookie THIS way
310
- //
311
- logger.warn('\n' + 'redirect to home page');
312
- // window.location.href = error_page;
313
- window.location.href = '/';
314
- clearInterval(dependencies_met_user_state_available);
322
+ // set final module state if theme loaded
323
+ var dependencies_met_theme_applied = setInterval (function () {
324
+ user_state = j1.readCookie(cookie_names.user_state);
325
+ styleLoaded = styleSheetLoaded(user_state.theme_css);
326
+
327
+ if (styleLoaded) {
328
+ logger.info('\n' + 'theme loaded successfully: ' + user_state.theme_name);
329
+ logger.debug('\n' + 'theme CSS loaded: ' + user_state.theme_css);
330
+ _this.setState('finished');
331
+ logger.debug('\n' + 'state: ' + _this.getState());
332
+ logger.info('\n' + 'module initialized successfully');
333
+
334
+ clearInterval(dependencies_met_theme_applied);
315
335
  }
316
- }, 25); // END dependencies_met_user_state_available
336
+ }, 25); // END dependencies_met_theme_applied
337
+
317
338
  }, // END init
318
339
 
319
340
  // -------------------------------------------------------------------------