j1-template 2023.2.7 → 2023.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (363) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/content_generator_news_panel_posts.html +2 -1
  3. data/_includes/themes/j1/layouts/content_generator_post.html +2 -2
  4. data/_includes/themes/j1/layouts/layout_metadata_generator.html +41 -38
  5. data/_includes/themes/j1/procedures/blocks/footer/boxes/about_box.proc +1 -1
  6. data/_includes/themes/j1/procedures/blocks/footer/boxes/contacts_box.proc +1 -1
  7. data/_includes/themes/j1/procedures/blocks/footer/boxes/issue.proc +1 -1
  8. data/_includes/themes/j1/procedures/blocks/footer/boxes/links_box.proc +1 -1
  9. data/_includes/themes/j1/procedures/blocks/footer/boxes/news_box.proc +1 -1
  10. data/_includes/themes/j1/procedures/layouts/default_writer.proc +1 -3
  11. data/_includes/themes/j1/procedures/layouts/module_writer.proc +7 -23
  12. data/_includes/themes/j1/procedures/layouts/resource_writer.proc +8 -8
  13. data/_layouts/compress.html +26 -21
  14. data/_layouts/default.html +36 -30
  15. data/assets/data/banner.html +5 -2
  16. data/assets/data/footer.html +15 -3
  17. data/assets/data/masterslider.html +1 -0
  18. data/assets/data/menu.html +4 -4
  19. data/assets/data/panel.html +6 -3
  20. data/assets/data/quicklinks.html +138 -149
  21. data/assets/error_pages/HTTP204.html +3 -3
  22. data/assets/error_pages/HTTP400.html +3 -3
  23. data/assets/error_pages/HTTP401.html +3 -3
  24. data/assets/error_pages/HTTP403.html +3 -3
  25. data/assets/error_pages/HTTP404.html +3 -3
  26. data/assets/error_pages/HTTP444.html +3 -3
  27. data/assets/error_pages/HTTP445.html +3 -3
  28. data/assets/error_pages/HTTP446.html +5 -5
  29. data/assets/error_pages/HTTP447.html +7 -7
  30. data/assets/error_pages/HTTP448.html +7 -7
  31. data/assets/error_pages/HTTP500.html +3 -3
  32. data/assets/error_pages/HTTP501.html +3 -3
  33. data/assets/error_pages/HTTP502.html +3 -3
  34. data/assets/error_pages/HTTP503.html +3 -3
  35. data/assets/themes/j1/adapter/js/advertising.js +109 -116
  36. data/assets/themes/j1/adapter/js/analytics.js +1 -1
  37. data/assets/themes/j1/adapter/js/asciidoctor.js +1 -1
  38. data/assets/themes/j1/adapter/js/attic.js +22 -14
  39. data/assets/themes/j1/adapter/js/bmd.js +1 -1
  40. data/assets/themes/j1/adapter/js/carousel.js +5 -4
  41. data/assets/themes/j1/adapter/js/clipboard.js +1 -1
  42. data/assets/themes/j1/adapter/js/comments.js +5 -5
  43. data/assets/themes/j1/adapter/js/cookieConsent.js +1 -1
  44. data/assets/themes/j1/adapter/js/customFunctions.js +1 -1
  45. data/assets/themes/j1/adapter/js/customModule.js +1 -1
  46. data/assets/themes/j1/adapter/js/dropdowns.js +4 -2
  47. data/assets/themes/j1/adapter/js/fab.js +9 -6
  48. data/assets/themes/j1/adapter/js/framer.js +1 -1
  49. data/assets/themes/j1/adapter/js/iconPicker.js +227 -0
  50. data/assets/themes/j1/adapter/js/j1.js +401 -76
  51. data/assets/themes/j1/adapter/js/justifiedGallery.js +9 -3
  52. data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +2 -2
  53. data/assets/themes/j1/adapter/js/lightbox.js +4 -3
  54. data/assets/themes/j1/adapter/js/logger.js +1 -1
  55. data/assets/themes/j1/adapter/js/lunr.js +1 -1
  56. data/assets/themes/j1/adapter/js/masonry.js +4 -3
  57. data/assets/themes/j1/adapter/js/masterslider.js +30 -57
  58. data/assets/themes/j1/adapter/js/mmenu.js +2 -2
  59. data/assets/themes/j1/adapter/js/navigator.js +7 -5
  60. data/assets/themes/j1/adapter/js/nbinteract.js +9 -9
  61. data/assets/themes/j1/adapter/js/particles.js +2 -2
  62. data/assets/themes/j1/adapter/js/rangeSlider.js +2 -2
  63. data/assets/themes/j1/adapter/js/rouge.js +2 -2
  64. data/assets/themes/j1/adapter/js/rtable.js +1 -1
  65. data/assets/themes/j1/adapter/js/rtextResizer.js +1 -1
  66. data/assets/themes/j1/adapter/js/scroller.js +97 -109
  67. data/assets/themes/j1/adapter/js/slick.js +28 -18
  68. data/assets/themes/j1/adapter/js/themeToggler.js +259 -0
  69. data/assets/themes/j1/adapter/js/themer.js +17 -8
  70. data/assets/themes/j1/adapter/js/toccer.js +9 -6
  71. data/assets/themes/j1/adapter/js/translator.js +4 -2
  72. data/assets/themes/j1/adapter/js/waves.js +6 -4
  73. data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.css +1322 -417
  74. data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.min.css +3 -3
  75. data/assets/themes/j1/core/css/themes/unodark/bootstrap.css +1983 -1266
  76. data/assets/themes/j1/core/css/themes/unodark/bootstrap.min.css +3 -3
  77. data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +10268 -9401
  78. data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +10 -10
  79. data/assets/themes/j1/core/css/vendor.css +0 -14
  80. data/assets/themes/j1/core/css/vendor.min.css +1 -1
  81. data/assets/themes/j1/modules/advertising/js/adInitializer.js +160 -0
  82. data/assets/themes/j1/modules/backstretch/js/backstretch.js +6 -4
  83. data/assets/themes/j1/modules/backstretch/js/backstretch.min.js +1 -1
  84. data/assets/themes/j1/modules/deeplAPI/js/deeplAPI.js +1 -1
  85. data/assets/themes/j1/modules/deeplAPI/js/deeplAPI.min.js +1 -1
  86. data/assets/themes/j1/modules/iconPicker/README.md +266 -0
  87. data/assets/themes/j1/modules/iconPicker/css/universal-icon-picker.css +419 -0
  88. data/assets/themes/j1/modules/iconPicker/css/universal-icon-picker.min.css +17 -0
  89. data/assets/themes/j1/modules/iconPicker/icons-libraries/font-awesome-brands.json +467 -0
  90. data/assets/themes/j1/modules/iconPicker/icons-libraries/font-awesome-brands.min.json +1 -0
  91. data/assets/themes/j1/modules/iconPicker/icons-libraries/font-awesome-regular.json +169 -0
  92. data/assets/themes/j1/modules/iconPicker/icons-libraries/font-awesome-regular.min.json +1 -0
  93. data/assets/themes/j1/modules/iconPicker/icons-libraries/font-awesome-solid.json +1136 -0
  94. data/assets/themes/j1/modules/iconPicker/icons-libraries/font-awesome-solid.min.json +1 -0
  95. data/assets/themes/j1/modules/iconPicker/icons-libraries/font-awesome.json +1772 -0
  96. data/assets/themes/j1/modules/iconPicker/icons-libraries/font-awesome.min.json +1 -0
  97. data/assets/themes/j1/modules/iconPicker/icons-libraries/mdi-icons-light.json +292 -0
  98. data/assets/themes/j1/modules/iconPicker/icons-libraries/mdi-icons-light.min.json +1 -0
  99. data/assets/themes/j1/modules/iconPicker/icons-libraries/mdi-icons-regular.json +7312 -0
  100. data/assets/themes/j1/modules/iconPicker/icons-libraries/mdi-icons-regular.min.json +1 -0
  101. data/assets/themes/j1/modules/iconPicker/images/magnifying-glass-solid.svg +1 -0
  102. data/assets/themes/j1/modules/iconPicker/images/star-of-life-solid.svg +3 -0
  103. data/assets/themes/j1/modules/iconPicker/images/xmark-solid.svg +3 -0
  104. data/assets/themes/j1/modules/iconPicker/js/universal-icon-picker.js +493 -0
  105. data/assets/themes/j1/modules/iconPicker/js/universal-icon-picker.min.js +17 -0
  106. data/assets/themes/j1/modules/jquery/AUTHORS.txt +372 -0
  107. data/assets/themes/j1/modules/jquery/LICENSE.txt +43 -0
  108. data/assets/themes/j1/modules/jquery/css/images/ui-icons_444444_256x240.png +0 -0
  109. data/assets/themes/j1/modules/jquery/css/images/ui-icons_555555_256x240.png +0 -0
  110. data/assets/themes/j1/modules/jquery/css/images/ui-icons_777620_256x240.png +0 -0
  111. data/assets/themes/j1/modules/jquery/css/images/ui-icons_777777_256x240.png +0 -0
  112. data/assets/themes/j1/modules/jquery/css/images/ui-icons_cc0000_256x240.png +0 -0
  113. data/assets/themes/j1/modules/jquery/css/images/ui-icons_ffffff_256x240.png +0 -0
  114. data/assets/themes/j1/modules/jquery/css/jquery-ui/jquery-ui.css +92 -92
  115. data/assets/themes/j1/modules/jquery/css/jquery-ui/jquery-ui.min.css +4 -4
  116. data/assets/themes/j1/modules/jquery/css/jquery-ui/jquery-ui.structure.css +88 -88
  117. data/assets/themes/j1/modules/jquery/css/jquery-ui/jquery-ui.structure.min.css +2 -2
  118. data/assets/themes/j1/modules/jquery/css/jquery-ui/jquery-ui.theme.css +4 -4
  119. data/assets/themes/j1/modules/jquery/css/jquery-ui/jquery-ui.theme.min.css +2 -2
  120. data/assets/themes/j1/modules/jquery/js/jquery-ui.js +13683 -13678
  121. data/assets/themes/j1/modules/jquery/js/jquery-ui.min.js +3 -3
  122. data/assets/themes/j1/modules/jquery/js/jquery.js +1029 -1203
  123. data/assets/themes/j1/modules/jquery/js/jquery.min.js +2 -2
  124. data/assets/themes/j1/modules/jquery/js/jquery.min.map +1 -1
  125. data/assets/themes/j1/modules/jquery-3.5.1/css/jquery-ui/jquery-ui.css +1315 -0
  126. data/assets/themes/j1/modules/jquery-3.5.1/css/jquery-ui/jquery-ui.min.css +7 -0
  127. data/assets/themes/j1/modules/jquery-3.5.1/css/jquery-ui/jquery-ui.structure.css +886 -0
  128. data/assets/themes/j1/modules/jquery-3.5.1/css/jquery-ui/jquery-ui.structure.min.css +5 -0
  129. data/assets/themes/j1/modules/jquery-3.5.1/css/jquery-ui/jquery-ui.theme.css +446 -0
  130. data/assets/themes/j1/modules/jquery-3.5.1/css/jquery-ui/jquery-ui.theme.min.css +5 -0
  131. data/assets/themes/j1/modules/jquery-3.5.1/js/extensions/hasClass.js +37 -0
  132. data/assets/themes/j1/modules/jquery-3.5.1/js/extensions/hasClass.min.js +17 -0
  133. data/assets/themes/j1/modules/jquery-3.5.1/js/extensions/removeClass.js +42 -0
  134. data/assets/themes/j1/modules/jquery-3.5.1/js/extensions/removeClass.min.js +17 -0
  135. data/assets/themes/j1/modules/jquery-3.5.1/js/jquery-ui.js +19057 -0
  136. data/assets/themes/j1/modules/jquery-3.5.1/js/jquery-ui.min.js +6 -0
  137. data/assets/themes/j1/modules/jquery-3.5.1/js/jquery.js +10872 -0
  138. data/assets/themes/j1/modules/jquery-3.5.1/js/jquery.min.js +2 -0
  139. data/assets/themes/j1/modules/jquery-3.5.1/js/jquery.min.map +1 -0
  140. data/assets/themes/j1/modules/jquery-3.5.1/js/require.js +2145 -0
  141. data/assets/themes/j1/modules/jquery-3.5.1/js/require.min.js +5 -0
  142. data/assets/themes/j1/modules/lightGallery/js/modules/j1/j1-video.js +2 -2
  143. data/assets/themes/j1/modules/lightGallery/js/modules/j1/j1-video.min.js +1 -1
  144. data/assets/themes/j1/modules/masterslider/css/theme/uno.css +9 -9
  145. data/assets/themes/j1/modules/masterslider/css/theme/uno.min.css +1 -1
  146. data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.css +2 -2
  147. data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.min.css +1 -1
  148. data/assets/themes/j1/modules/rouge/css/uno.dark/theme.css +136 -47
  149. data/assets/themes/j1/modules/rouge/css/uno.light/theme.css +9 -9
  150. data/assets/themes/j1/modules/scroller/js/scroller.js +76 -69
  151. data/assets/themes/j1/modules/scroller/js/scroller.min.js +1 -1
  152. data/assets/themes/j1/modules/translator/js/translator.js +1 -1
  153. data/assets/themes/j1/modules/translator/js/translator.min.js +1 -1
  154. data/lib/j1/version.rb +1 -1
  155. data/lib/starter_web/Gemfile +2 -2
  156. data/lib/starter_web/README.md +5 -5
  157. data/lib/starter_web/_config.yml +4 -1
  158. data/lib/starter_web/_data/blocks/banner.yml +8 -5
  159. data/lib/starter_web/_data/blocks/defaults/footer.yml +3 -3
  160. data/lib/starter_web/_data/blocks/footer.yml +9 -5
  161. data/lib/starter_web/_data/blocks/panel.yml +41 -38
  162. data/lib/starter_web/_data/j1_config.yml +68 -58
  163. data/lib/starter_web/_data/layouts/collection.yml +1 -0
  164. data/lib/starter_web/_data/layouts/default.yml +1 -1
  165. data/lib/starter_web/_data/layouts/home.yml +9 -9
  166. data/lib/starter_web/_data/layouts/news_panel_posts.yml +1 -0
  167. data/lib/starter_web/_data/layouts/page.yml +2 -1
  168. data/lib/starter_web/_data/layouts/post.yml +1 -0
  169. data/lib/starter_web/_data/layouts/raw.yml +1 -0
  170. data/lib/starter_web/_data/modules/advertising.yml +134 -61
  171. data/lib/starter_web/_data/modules/analytics.yml +2 -2
  172. data/lib/starter_web/_data/modules/attics.yml +4 -7
  173. data/lib/starter_web/_data/modules/defaults/advertising.yml +2 -1
  174. data/lib/starter_web/_data/modules/defaults/attics.yml +3 -3
  175. data/lib/starter_web/_data/modules/defaults/iconPicker.yml +42 -0
  176. data/lib/starter_web/_data/modules/defaults/navigator.yml +15 -13
  177. data/lib/starter_web/_data/modules/defaults/theme_toggler.yml +42 -0
  178. data/lib/starter_web/_data/modules/iconPicker.yml +64 -0
  179. data/lib/starter_web/_data/modules/masonry.yml +1 -1
  180. data/lib/starter_web/_data/modules/masterslider.yml +5 -5
  181. data/lib/starter_web/_data/modules/navigator_menu.yml +150 -41
  182. data/lib/starter_web/_data/modules/scroller.yml +8 -8
  183. data/lib/starter_web/_data/modules/theme_toggler.yml +29 -0
  184. data/lib/starter_web/_data/modules/themer.yml +0 -6
  185. data/lib/starter_web/_data/resources.yml +53 -52
  186. data/lib/starter_web/_data/templates/feed.xml +1 -1
  187. data/lib/starter_web/_includes/attributes.asciidoc +57 -50
  188. data/lib/starter_web/_plugins/asciidoctor/google-ad-block.rb +47 -0
  189. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  190. data/lib/starter_web/assets/images/icons/mdi/mdi.svg +1 -0
  191. data/lib/starter_web/assets/images/icons/mdi/mdil.svg +1 -0
  192. data/lib/starter_web/assets/images/modules/attics/1920x1280/alexander-redl.jpg +0 -0
  193. data/lib/starter_web/assets/images/modules/attics/1920x1280/alina-grubnyak.jpg +0 -0
  194. data/lib/starter_web/assets/images/modules/attics/1920x1280/andrea-badino.jpg +0 -0
  195. data/lib/starter_web/assets/images/modules/attics/1920x1280/brad-neathery.jpg +0 -0
  196. data/lib/starter_web/assets/images/modules/attics/1920x1280/bruno-figueiredo.jpg +0 -0
  197. data/lib/starter_web/assets/images/modules/attics/1920x1280/clem-onojeghuo.jpg +0 -0
  198. data/lib/starter_web/assets/images/modules/attics/1920x1280/core_web_vitals_best.png +0 -0
  199. data/lib/starter_web/assets/images/modules/attics/1920x1280/crawford-jolly.jpg +0 -0
  200. data/lib/starter_web/assets/images/modules/attics/1920x1280/eleni-afiontzi.jpg +0 -0
  201. data/lib/starter_web/assets/images/modules/attics/1920x1280/fly-d.jpg +0 -0
  202. data/lib/starter_web/assets/images/modules/attics/1920x1280/guillaume-bolduc.jpg +0 -0
  203. data/lib/starter_web/assets/images/modules/attics/1920x1280/harpal-singh.jpg +0 -0
  204. data/lib/starter_web/assets/images/modules/attics/1920x1280/hayden-mills-2.jpg +0 -0
  205. data/lib/starter_web/assets/images/modules/attics/1920x1280/j1-content-mockup-1.jpg +0 -0
  206. data/lib/starter_web/assets/images/modules/attics/1920x1280/j1-content-mockup-2.jpg +0 -0
  207. data/lib/starter_web/assets/images/modules/attics/1920x1280/j1-content-mockup-3.jpg +0 -0
  208. data/lib/starter_web/assets/images/modules/attics/1920x1280/j1-starter-mockup-1.jpg +0 -0
  209. data/lib/starter_web/assets/images/modules/attics/1920x1280/john-schnobrich-2.jpg +0 -0
  210. data/lib/starter_web/assets/images/modules/attics/1920x1280/josep-martins.jpg +0 -0
  211. data/lib/starter_web/assets/images/modules/attics/1920x1280/josh-liu.jpg +0 -0
  212. data/lib/starter_web/assets/images/modules/attics/1920x1280/kelly-sikkemal.jpg +0 -0
  213. data/lib/starter_web/assets/images/modules/attics/1920x1280/kira-auf-der-heide.jpg +0 -0
  214. data/lib/starter_web/assets/images/modules/attics/1920x1280/kristopher-roller.jpg +0 -0
  215. data/lib/starter_web/assets/images/modules/attics/1920x1280/kristopher-roller.webp +0 -0
  216. data/lib/starter_web/assets/images/modules/attics/1920x1280/matthaeus.jpg +0 -0
  217. data/lib/starter_web/assets/images/modules/attics/1920x1280/melanie-deziel.jpg +0 -0
  218. data/lib/starter_web/assets/images/modules/attics/1920x1280/milad-fakurian.jpg +0 -0
  219. data/lib/starter_web/assets/images/modules/attics/1920x1280/mohammad-rahmani.jpg +0 -0
  220. data/lib/starter_web/assets/images/modules/attics/1920x1280/nasa.jpg +0 -0
  221. data/lib/starter_web/assets/images/modules/attics/1920x1280/quino-al-2.jpg +0 -0
  222. data/lib/starter_web/assets/images/modules/attics/1920x1280/recha-oktaviani.jpg +0 -0
  223. data/lib/starter_web/assets/images/modules/attics/building-blocks-1920x1280.jpg +0 -0
  224. data/lib/starter_web/assets/images/modules/attics/christina-1920x1280.jpg +0 -0
  225. data/lib/starter_web/assets/images/modules/attics/cookies-1920x1200.jpg +0 -0
  226. data/lib/starter_web/assets/images/modules/attics/katie-moum-1920x1280.jpg +0 -0
  227. data/lib/starter_web/assets/images/pages/core_web_vitals/core_web_vitals_best.jpg +0 -0
  228. data/lib/starter_web/assets/images/pages/core_web_vitals/core_web_vitals_best.png +0 -0
  229. data/lib/starter_web/assets/images/pages/core_web_vitals/core_web_vitals_best_full.png +0 -0
  230. data/lib/starter_web/assets/images/pages/html_validator/appdevtools-html-validator.jpg +0 -0
  231. data/lib/starter_web/assets/images/pages/html_validator/freeformatter-html-validator.jpg +0 -0
  232. data/lib/starter_web/assets/images/pages/html_validator/w3c-nu-checker.jpg +0 -0
  233. data/lib/starter_web/assets/images/pages/html_validator/w3c-validator.jpg +0 -0
  234. data/lib/starter_web/collections/_biography/a-life-in-questions.adoc +8 -9
  235. data/lib/starter_web/collections/_biography/becoming.adoc +22 -9
  236. data/lib/starter_web/collections/_biography/born-to-run.adoc +27 -9
  237. data/lib/starter_web/collections/_biography/forty-autumns.adoc +19 -12
  238. data/lib/starter_web/collections/_biography/not-dead-yet.adoc +24 -14
  239. data/lib/starter_web/collections/_biography/princess-diarist-the.adoc +23 -14
  240. data/lib/starter_web/collections/_biography/when-breath-becomes-air.adoc +24 -11
  241. data/lib/starter_web/collections/_fantasy/harry-potter-deathly-hallows.adoc +14 -10
  242. data/lib/starter_web/collections/_fantasy/harry-potter-philosophers-stone.adoc +11 -8
  243. data/lib/starter_web/collections/_fantasy/mistborn-trilogy.adoc +7 -8
  244. data/lib/starter_web/collections/_fantasy/ready-player-one.adoc +17 -14
  245. data/lib/starter_web/collections/_fantasy/sword-of-destiny.adoc +12 -13
  246. data/lib/starter_web/collections/_fantasy/terry-pratchet-diary.adoc +15 -15
  247. data/lib/starter_web/collections/_people/diana-petersen.adoc +2 -0
  248. data/lib/starter_web/collections/_people/larry-parker.adoc +2 -0
  249. data/lib/starter_web/collections/_people/parveen-anand.adoc +2 -0
  250. data/lib/starter_web/collections/_portfolio/branding.adoc +5 -0
  251. data/lib/starter_web/collections/_portfolio/graphic_design.adoc +5 -0
  252. data/lib/starter_web/collections/_portfolio/identity.adoc +5 -0
  253. data/lib/starter_web/collections/_portfolio/illustration.adoc +5 -0
  254. data/lib/starter_web/collections/_portfolio/photography.adoc +5 -0
  255. data/lib/starter_web/collections/_portfolio/web_design.adoc +5 -0
  256. data/lib/starter_web/collections/_romance/breath-of-snow-and-ashes-a.adoc +8 -5
  257. data/lib/starter_web/collections/_romance/dressmaker-the.adoc +14 -14
  258. data/lib/starter_web/collections/_romance/fiery-cross-the.adoc +12 -9
  259. data/lib/starter_web/collections/_romance/it-ends-with-us.adoc +14 -11
  260. data/lib/starter_web/collections/_romance/outlander-novel.adoc +48 -25
  261. data/lib/starter_web/collections/_romance/virgins-outlander-short-story.adoc +30 -15
  262. data/lib/starter_web/index.html +6 -14
  263. data/lib/starter_web/package.json +3 -3
  264. data/lib/starter_web/pages/public/about/features.adoc +1 -1
  265. data/lib/starter_web/pages/public/about/reporting_issues.adoc +1 -1
  266. data/lib/starter_web/pages/public/blog/navigator/index.html +2 -2
  267. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_all_books.adoc +1 -1
  268. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_biography.adoc +1 -1
  269. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_fantasy.adoc +1 -1
  270. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_romance.adoc +1 -1
  271. data/lib/starter_web/pages/public/learn/bookshelf/jekyll_collections.adoc +75 -65
  272. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/attributes.asciidoc +58 -0
  273. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/accordion.asciidoc +34 -0
  274. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/alerts.asciidoc +15 -0
  275. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/badges.asciidoc +9 -0
  276. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/body.asciidoc +14 -0
  277. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/breadcrumbs.asciidoc +14 -0
  278. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/buttons.asciidoc +75 -0
  279. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/cards.asciidoc +22 -0
  280. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/carousel.asciidoc +37 -0
  281. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/close.asciidoc +15 -0
  282. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/code.asciidoc +14 -0
  283. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/color_system.asciidoc +353 -0
  284. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/components.asciidoc +69 -0
  285. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/dropdowns.asciidoc +53 -0
  286. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/figures.asciidoc +5 -0
  287. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/forms.asciidoc +270 -0
  288. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/grid.asciidoc +49 -0
  289. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/links.asciidoc +21 -0
  290. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/list_groups.asciidoc +28 -0
  291. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/modals.asciidoc +43 -0
  292. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/navbar.asciidoc +45 -0
  293. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/navs.asciidoc +28 -0
  294. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/offcanvas.asciidoc +16 -0
  295. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/options.asciidoc +30 -0
  296. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/pagination.asciidoc +40 -0
  297. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/paragraph.asciidoc +5 -0
  298. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/placeholders.asciidoc +5 -0
  299. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/popovers.asciidoc +28 -0
  300. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/position.asciidoc +8 -0
  301. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/progress_bars.asciidoc +12 -0
  302. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/spacing.asciidoc +14 -0
  303. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/spinners.asciidoc +12 -0
  304. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/tables.asciidoc +55 -0
  305. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/thumbnails.asciidoc +9 -0
  306. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/toasts.asciidoc +18 -0
  307. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/tooltips.asciidoc +28 -0
  308. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/typography.asciidoc +115 -0
  309. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/z_index.asciidoc +26 -0
  310. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/tables/_table.asciidoc +9 -0
  311. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/tables/accordion.asciidoc +87 -0
  312. data/lib/starter_web/pages/public/learn/bs_sass_variables/bs_sass_variables.adoc +262 -0
  313. data/lib/starter_web/pages/public/learn/cheatsheet/gem.adoc +255 -0
  314. data/lib/starter_web/pages/public/learn/cheatsheet/git.adoc +1458 -0
  315. data/lib/starter_web/pages/public/learn/cheatsheet/j1.adoc +63 -0
  316. data/lib/starter_web/pages/public/learn/cheatsheet/yaml.adoc +514 -0
  317. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/attributes.asciidoc +59 -0
  318. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/documents/100_chapter.asciidoc +541 -0
  319. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/documents/200_chapter.asciidoc +33 -0
  320. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/build_command_options.asciidoc +72 -0
  321. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/files_and_folders.asciidoc +66 -0
  322. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/global_configuration_options.asciidoc +63 -0
  323. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/global_variables.asciidoc +26 -0
  324. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/page_variables.asciidoc +54 -0
  325. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/serve_command_options.asciidoc +45 -0
  326. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/site_variables.asciidoc +59 -0
  327. data/lib/starter_web/pages/public/learn/core_web_vitals/core_web_vitals.adoc +442 -0
  328. data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +1 -1
  329. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/100_gistblock.asciidoc +3 -4
  330. data/lib/starter_web/pages/public/learn/roundtrip/asciidoc_extensions.adoc +2 -2
  331. data/lib/starter_web/pages/public/learn/roundtrip/icon_fonts.adoc +10 -10
  332. data/lib/starter_web/pages/public/learn/roundtrip/present_images.adoc +8 -1
  333. data/lib/starter_web/pages/public/learn/roundtrip/responsive_tables.adoc +3 -3
  334. data/lib/starter_web/pages/public/learn/where_to_go.adoc +39 -45
  335. data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +2 -2
  336. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +2 -2
  337. data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +2 -2
  338. data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +93 -4
  339. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  340. data/lib/starter_web/utilsrv/package.json +1 -1
  341. metadata +133 -24
  342. data/_includes/themes/j1/modules/ads/google_ad_content_home.html +0 -11
  343. data/_includes/themes/j1/modules/ads/google_ad_top_home.html +0 -11
  344. data/assets/themes/j1/core/css/nbinteract-tutorial/styles.css +0 -1711
  345. data/assets/themes/j1/core/css/nbinteract-tutorial/styles.min.css +0 -1
  346. data/assets/themes/j1/modules/advertising/js/google/adInitializer.js +0 -127
  347. data/assets/themes/j1/modules/deeplAPI/js/deeplAPI.2.js +0 -460
  348. data/assets/themes/j1/modules/mdiPreviewer/css/previewer.css +0 -97
  349. data/assets/themes/j1/modules/mdiPreviewer/css/previewer.min.css +0 -15
  350. data/assets/themes/j1/modules/mdiPreviewer/js/previewer.js +0 -115
  351. data/assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js +0 -15
  352. data/assets/themes/j1/modules/mdilPreviewer/css/previewer.css +0 -97
  353. data/assets/themes/j1/modules/mdilPreviewer/css/previewer.min.css +0 -15
  354. data/assets/themes/j1/modules/mdilPreviewer/js/previewer.js +0 -125
  355. data/assets/themes/j1/modules/mdilPreviewer/js/previewer.min.js +0 -15
  356. data/lib/starter_web/_includes/themes/j1/modules/ads/google_ad_content_home.html +0 -11
  357. data/lib/starter_web/_includes/themes/j1/modules/ads/google_ad_top_home.html +0 -11
  358. /data/lib/starter_web/assets/images/{promo → quotes/promo}/home/screenshot.jpg +0 -0
  359. /data/lib/starter_web/assets/images/{promo → quotes/promo}/jekyll/jekyll-faq.jpg +0 -0
  360. /data/lib/starter_web/assets/images/{promo → quotes/promo}/jekyll/jekyll-generator.jpg +0 -0
  361. /data/lib/starter_web/assets/images/{promo → quotes/promo}/jekyll/jekyll-generator.png +0 -0
  362. /data/lib/starter_web/assets/images/{promo → quotes/promo}/jekyll/jekyll-og.png +0 -0
  363. /data/lib/starter_web/assets/images/{promo → quotes/promo}/jekyll/scalable/jekyll-faq.psd +0 -0
@@ -0,0 +1,493 @@
1
+ /*
2
+ # -----------------------------------------------------------------------------
3
+ # ~/theme_uno/modules/iconPicker/js/universal-icon-picker.js
4
+ # UniversalIconPicker v.1.1.0 implementation for J1 Theme
5
+ #
6
+ # Product/Info:
7
+ # https://jekyll.one
8
+ # https://github.com/migliori/universal-icon-picker
9
+ #
10
+ # Copyright (C) 2023 Juergen Adams
11
+ # Copyright (C) 2023 Gilles Migliori
12
+ #
13
+ # J1 Theme is licensed under the MIT License.
14
+ # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md
15
+ # -----------------------------------------------------------------------------
16
+ */
17
+ const iconPickerUrl = document.currentScript.src.replace(/js\/([a-z\.-]+)$/gm, '');
18
+ const loadedDependencies = [];
19
+
20
+ (function (root, factory) {
21
+ if (typeof define === 'function' && define.amd) {
22
+ define([], factory('UniversalIconPicker'));
23
+ } else if (typeof exports === 'object') {
24
+ module.exports = factory('UniversalIconPicker');
25
+ } else {
26
+ root['UniversalIconPicker'] = factory('UniversalIconPicker');
27
+ }
28
+ }(this, function () {
29
+ 'use strict';
30
+
31
+ const createDomEle = function (string) {
32
+ const ele = document.createElement('div');
33
+ ele.innerHTML = string;
34
+ return ele.firstChild;
35
+ }
36
+
37
+ const debounce = function (func, wait, immediate) {
38
+ let timeout;
39
+ return function () {
40
+ const context = this,
41
+ args = arguments;
42
+ const later = function () {
43
+ timeout = null;
44
+ if (!immediate) func.apply(context, args);
45
+ };
46
+ const callNow = immediate && !timeout;
47
+ clearTimeout(timeout);
48
+ timeout = setTimeout(later, wait);
49
+ if (callNow) func.apply(context, args);
50
+ };
51
+ };
52
+
53
+ const escapeHtml = function (text) {
54
+ const map = {
55
+ '&': '&',
56
+ '<': '&lt;',
57
+ '>': '&gt;',
58
+ '"': '&quot;',
59
+ "'": '&#039;'
60
+ };
61
+
62
+ return text.replace(/[&<>"']/g, function (m) { return map[m]; });
63
+ };
64
+
65
+ /**
66
+ * Merge defaults with user options
67
+ * @param {Object} defaults Default settings
68
+ * @param {Object} options User options
69
+ */
70
+ const extend = function (defaults, options) {
71
+ let prop, extended = {};
72
+ for (prop in defaults) {
73
+ if (Object.prototype.hasOwnProperty.call(defaults, prop)) {
74
+ extended[prop] = defaults[prop];
75
+ }
76
+ }
77
+ for (prop in options) {
78
+ if (Object.prototype.hasOwnProperty.call(options, prop)) {
79
+ extended[prop] = options[prop];
80
+ }
81
+ }
82
+
83
+ return extended;
84
+ };
85
+
86
+ const getLibraryName = function (string) {
87
+ return string.replace(/([A-Z])/g, ' $1');
88
+ }
89
+
90
+ /**
91
+ * Plugin Object
92
+ * @param selector The html selector to initialize
93
+ * @param {Object} options User options
94
+ * @constructor
95
+ */
96
+ function UniversalIconPicker (selector, options) {
97
+ this.selector = selector;
98
+
99
+ let defaults = {
100
+ allowEmpty: true,
101
+ iconLibraries: null,
102
+ iconLibrariesCss: null,
103
+ mode: 'autoload', // autoload | onrequest
104
+ onBeforeOpen: null,
105
+ onReset: null,
106
+ onSelect: null,
107
+ resetSelector: null,
108
+ loadCustomCss: false
109
+ };
110
+ this.options = extend(defaults, options);
111
+
112
+ this.activeLibraryId = '';
113
+ this.filterIcon = '';
114
+ this.iconEventsLoaded = false;
115
+ this.iconLibraries = {};
116
+ this.iconLibrariesLoaded = false;
117
+ this.iconMarkup = '';
118
+ this.iconWrap = '';
119
+ this.idSuffix = '-' + this.selector.replace(/[#\s[\]="]/g, '');
120
+ this.sideBarBtn = '';
121
+ this.sideBarList = [];
122
+
123
+ this.universalWrap = '<div class="uip-modal uip-open" id="uip-modal' + this.idSuffix + '"><div class="uip-modal--content"><div class="uip-modal--header"><div class="uip-modal--header-logo-area"><span class="uip-modal--header-logo-title">Icon Picker</span></div><div class="uip-modal--header-close-btn"><img src="' + iconPickerUrl + '/images/xmark-solid.svg" width="40" height="40" alt="Close" title="Close" /></div></div><div class="uip-modal--body"><div id="uip-modal--sidebar' + this.idSuffix + '" class="uip-modal--sidebar"><div class="uip-modal--sidebar-tabs"></div></div><div id="uip-modal--icon-preview-wrap' + this.idSuffix + '" class="uip-modal--icon-preview-wrap"><div class="uip-modal--icon-search"><input name="" value="" placeholder="Filter by name..."><img src="' + iconPickerUrl + '/images/magnifying-glass-solid.svg" width="20" height="16" alt="Search" title="Search" /></div><div class="uip-modal--icon-preview-inner"><div id="uip-modal--icon-preview' + this.idSuffix + '" class="uip-modal--icon-preview"></div></div></div></div><div class="uip-modal--footer"><button class="uip-insert-icon-button mt-3 mb-3 mr-6">Copy to clipboard</button></div></div></div>';
124
+
125
+ this.universalDomEle = createDomEle(this.universalWrap);
126
+ this.sidebarTabs = this.universalDomEle.querySelector('.uip-modal--sidebar-tabs');
127
+ this.previewWrap = this.universalDomEle.querySelector('#uip-modal--icon-preview' + this.idSuffix);
128
+ this.searchInput = this.universalDomEle.querySelector('.uip-modal--icon-search input');
129
+ if (this.options.mode === 'autoload') {
130
+ this.init();
131
+ } else {
132
+ document.querySelector(this.selector).addEventListener('click', this.init.bind(this), { once: true });
133
+ }
134
+ }
135
+
136
+
137
+ // Plugin prototype
138
+ UniversalIconPicker.prototype = {
139
+
140
+ /* Public functions
141
+ ------------------------------------------------------------------------ */
142
+
143
+ init: function () {
144
+ this._loadCssFiles();
145
+ if (this.options.mode !== 'autoload') {
146
+ this._onBeforeOpen().then(() => {
147
+ this.open();
148
+ });
149
+ }
150
+ document.querySelector(this.selector).addEventListener('click', () => {
151
+ this._onBeforeOpen().then(() => {
152
+ this.open();
153
+ });
154
+ });
155
+
156
+ //Remove selected icon
157
+ if (this.options.resetSelector) {
158
+ document.querySelector(this.options.resetSelector).addEventListener('click', this.options.onReset);
159
+ }
160
+ },
161
+
162
+ open: function () {
163
+ this._loadIconLibraries().then(() => {
164
+ this.iconLibrariesLoaded = true;
165
+ if (!document.getElementById('uip-modal' + this.idSuffix)) {
166
+ // push universal dom to body
167
+ document.body.appendChild(this.universalDomEle);
168
+
169
+ // jadams, 2023-05-21: disable page scrolling if modal is OPEN
170
+ document.body.classList.add('stop-scrolling');
171
+
172
+ // Icon library close by clicking close button
173
+ this.universalDomEle.querySelector('.uip-modal--header-close-btn').addEventListener('click', () => {
174
+ this.universalDomEle.classList.add('uip-close');
175
+ this.universalDomEle.classList.remove('uip-open');
176
+ // jadams, 2023-05-21: (re-)enable page scrolling if modal is CLOSED
177
+ document.body.classList.remove('stop-scrolling');
178
+ });
179
+
180
+ // Insert button
181
+ this.universalDomEle.querySelector('.uip-insert-icon-button').addEventListener('click', () => {
182
+ let selected = this.universalDomEle.querySelector('.universal-selected');
183
+
184
+ if (selected) {
185
+ let iconHtml = selected.querySelector('i').outerHTML;
186
+ let jsonOutput = {
187
+ 'libraryId': selected.dataset.libraryId,
188
+ 'libraryName': selected.dataset.libraryName,
189
+ 'iconHtml': null,
190
+ 'iconMarkup': null,
191
+ 'iconClass': null,
192
+ 'iconText': null
193
+ };
194
+ if (!selected.querySelector('i').classList.value.match('uip-icon-none')) {
195
+ jsonOutput.iconHtml = iconHtml;
196
+ jsonOutput.iconMarkup = escapeHtml(iconHtml);
197
+ jsonOutput.iconClass = selected.querySelector('i').classList.value;
198
+ jsonOutput.iconText = selected.querySelector('i').innerText;
199
+ }
200
+
201
+ this.options.onSelect(jsonOutput);
202
+ }
203
+ // jadams, 2023-05-21: disable modal CLOSE on a select
204
+ // this.universalDomEle.classList.add('uip-close');
205
+ // this.universalDomEle.classList.remove('uip-open');
206
+ });
207
+ } else {
208
+ // Icon library open if dom element exist
209
+ this.universalDomEle.classList.remove('uip-close');
210
+ this.universalDomEle.classList.add('uip-open');
211
+ // jadams, 2023-05-21: disable page scrolling if modal is OPEN
212
+ document.body.classList.add('stop-scrolling');
213
+ }
214
+
215
+ if (!this.iconEventsLoaded) {
216
+ // selected icon highlighted by adding class
217
+ this.universalDomEle.querySelectorAll('.uip-icon-item').forEach((item) => {
218
+ item.addEventListener('click', (evt) => {
219
+ this.iconWrap.forEach((el) => {
220
+ el.classList.remove('universal-selected');
221
+ });
222
+ evt.currentTarget.classList.toggle('universal-selected');
223
+ });
224
+ item.addEventListener('dblclick', (evt) => {
225
+ this.universalDomEle.querySelector('.uip-insert-icon-button').click();
226
+ });
227
+ });
228
+ this.iconEventsLoaded = true;
229
+ }
230
+
231
+ this.universalDomEle.querySelector('.uip-modal--icon-search input').focus();
232
+ });
233
+ },
234
+
235
+ setOptions: function (opts) {
236
+ this.options = extend(this.options, opts);
237
+ if (opts.iconLibrariesCss) {
238
+ this._loadCssFiles();
239
+ }
240
+ if (opts.iconLibraries) {
241
+ // dom icon events need to be reloaded
242
+ this.iconEventsLoaded = false;
243
+ this.iconLibrariesLoaded = false;
244
+ this._resetIconAndSidebarList();
245
+ }
246
+ },
247
+
248
+ /* Private functions
249
+ ------------------------------------------------------------------------ */
250
+
251
+ _clickHandlerFunc: function (e) {
252
+ if (!e.currentTarget.classList.contains('universal-active')) {
253
+ this.sideBarBtn.forEach(function (item) {
254
+ item.classList.remove('universal-active');
255
+ });
256
+ e.currentTarget.classList.add('universal-active')
257
+ }
258
+ this._sidebarFilterFunc(e.currentTarget.dataset['libraryId']);
259
+ },
260
+
261
+ _iconItemMarkup: function (libraryName, libraryItem) {
262
+ let markup = '',
263
+ library = libraryItem['icon-style'],
264
+ prefix = libraryItem['prefix'];
265
+
266
+ if (this.options.allowEmpty) {
267
+ markup += '<div class="uip-icon-item" data-library-id="' + library + '" data-filter="" data-library-name="' + libraryName + '"><div class="uip-icon-item-inner"><i class="' + prefix + ' uip-icon-none">&nbsp;</i><div class="uip-icon-item-name" title="None">None</div></div></div>';
268
+ }
269
+ if (prefix.match(/^material-icons/)) {
270
+ libraryItem['icons'].forEach(function (item) {
271
+ markup += '<div class="uip-icon-item" data-library-id="' + library + '" data-filter="' + item + '" data-library-name="' + libraryName + '"><div class="uip-icon-item-inner"><i class="' + prefix + '">' + item + '</i><div class="uip-icon-item-name" title="' + item + '">' + item.replace("-", " ") + '</div></div></div>';
272
+ });
273
+ } else {
274
+ libraryItem['icons'].forEach(function (item) {
275
+ markup += '<div class="uip-icon-item" data-library-id="' + library + '" data-filter="' + item + '" data-library-name="' + libraryName + '"><div class="uip-icon-item-inner"><i class="' + [prefix, item].join('') + '"></i><div class="uip-icon-item-name" title="' + item + '">' + item.replace("-", " ") + '</div></div></div>';
276
+ });
277
+ }
278
+
279
+ return markup;
280
+ },
281
+
282
+ _iconItemPush: function (arrayList) {
283
+ this.previewWrap.innerHTML = '';
284
+ arrayList.forEach((item) => {
285
+ this.previewWrap.appendChild(item[1]);
286
+ });
287
+ },
288
+
289
+ _loadCssFiles: function () {
290
+ let link = document.createElement('link');
291
+ if (!loadedDependencies.includes('universal-icon-picker.min.css') & !this.options.loadCustomCss) {
292
+ link.rel = 'stylesheet';
293
+ link.type = 'text/css';
294
+ link.href = iconPickerUrl + 'css/universal-icon-picker.min.css';
295
+ link.media = 'screen';
296
+ document.head.appendChild(link);
297
+ loadedDependencies.push('universal-icon-picker.min.css');
298
+ }
299
+ if (this.options.iconLibrariesCss) {
300
+ this.options.iconLibrariesCss.forEach(cssFile => {
301
+ if (!loadedDependencies.includes(cssFile)) {
302
+ let cssFileLink = iconPickerUrl + 'css/' + cssFile;
303
+ if (cssFile.match(/^http|^\/\//)) {
304
+ cssFileLink = cssFile;
305
+ }
306
+ link = document.createElement('link');
307
+ link.rel = 'stylesheet';
308
+ link.type = 'text/css';
309
+ link.href = cssFileLink;
310
+ link.media = 'screen';
311
+ document.head.appendChild(link);
312
+ loadedDependencies.push(cssFile);
313
+ }
314
+ });
315
+ }
316
+ },
317
+
318
+ _loadIconLibraries: async function (i = 0) {
319
+ if (!this.options.iconLibraries) {
320
+ console.error('Universal icon picker - no icon library loaded');
321
+ return false;
322
+ }
323
+ if (this.iconLibrariesLoaded) {
324
+ return true;
325
+ }
326
+ if (i === 0 && this.options.iconLibraries.length > 1) {
327
+ this.sideBarList.push({
328
+ "title": "all icons",
329
+ "list-icon": "",
330
+ "library-id": "all",
331
+ "prefix": ""
332
+ });
333
+ }
334
+
335
+ let iconLib = this.options.iconLibraries[i];
336
+
337
+ await fetch(iconPickerUrl + 'icons-libraries/' + iconLib)
338
+ .then(response => response.json())
339
+ .then(data => {
340
+ // Success!
341
+ const camelCasedIconLibrary = iconLib.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); }).replace(/\.[a-z.]+$/, '');
342
+ let newLibrary = {};
343
+ newLibrary[camelCasedIconLibrary] = data;
344
+ Object.assign(this.iconLibraries, newLibrary); // new icon library merge
345
+ if (i + 1 === this.options.iconLibraries.length) {
346
+ //set icon and sidebar list
347
+ this._setIconAndSidebarList();
348
+
349
+ this.activeLibraryId = this.sideBarList[0]['library-id'];
350
+
351
+ //sidebar list markup push
352
+ this.sidebarTabs.innerHTML = this._sideBarListMarkup(this.sideBarList);
353
+
354
+ //icon markup push
355
+ this.previewWrap.innerHTML = this.iconMarkup;
356
+
357
+ // get all icon wrapper dom element
358
+ this.iconWrap = this.previewWrap.querySelectorAll('.uip-icon-item');
359
+
360
+ //set event lisner to search input
361
+ this.searchInput.addEventListener('keyup', debounce(this._searchFunc, 100).bind(this), false);
362
+
363
+ //get all sidebar list item wrapper dom element
364
+ this.sideBarBtn = this.sidebarTabs.querySelectorAll('.uip-modal--sidebar-tab-item');
365
+
366
+ //set click event lisner to sidebar list item
367
+ this.sideBarBtn.forEach((item) => {
368
+ item.addEventListener('click', this._clickHandlerFunc.bind(this), false);
369
+ });
370
+
371
+ return true;
372
+ } else {
373
+ return this._loadIconLibraries(i + 1);
374
+ }
375
+ }).catch((error) => {
376
+ console.log(error);
377
+ return error;
378
+ });
379
+ },
380
+
381
+ _onBeforeOpen: async function () {
382
+ if (typeof (this.options.onBeforeOpen) === 'function') {
383
+ return this.options.onBeforeOpen();
384
+ }
385
+ },
386
+
387
+ _resetIconAndSidebarList: function () {
388
+ this.sideBarList = [];
389
+ this.iconMarkup = '';
390
+ this.iconLibraries = {};
391
+ this.iconWrap = '';
392
+ this.filterIcon = '';
393
+ this.sideBarBtn = '';
394
+ this.activeLibraryId = '';
395
+ },
396
+
397
+ _searchFunc: function (e) {
398
+ // console.log(this.value.toLowerCase());
399
+
400
+ const searchText = e.target.value.toLowerCase();
401
+ this._searchFilterFunc(searchText, 'filter');
402
+
403
+ },
404
+
405
+ _searchFilterFunc: function (filterText, dataName) {
406
+ this.filterIcon = Object.entries(this.iconWrap).filter((item) => {
407
+ if (-1 == item[1].dataset[dataName].indexOf(filterText) || (this.activeLibraryId !== 'all' && item[1].dataset['libraryId'] !== this.activeLibraryId)) {
408
+ return false;
409
+ }
410
+ return true;
411
+ });
412
+
413
+ this._iconItemPush(this.filterIcon);
414
+
415
+ },
416
+
417
+ _setIconAndSidebarList: function () {
418
+ for (const [libraryName, libraryContent] of Object.entries(this.iconLibraries)) {
419
+ this._setSideBarList(getLibraryName(libraryName), libraryContent);
420
+ this._setIconMarkup(libraryName, libraryContent);
421
+ }
422
+ },
423
+
424
+ _setIconMarkup: function (libraryName, libraryContent) {
425
+ if (libraryContent.icons !== undefined) {
426
+ this.iconMarkup += this._iconItemMarkup(libraryName, libraryContent)
427
+ } else {
428
+ Object.entries(libraryContent).forEach((item) => {
429
+ this.iconMarkup += this._iconItemMarkup(libraryName, item[1])
430
+ });
431
+ }
432
+ },
433
+
434
+ _sidebarFilterFunc: function (filterText) {
435
+ this.activeLibraryId = filterText;
436
+ this.filterIcon = Object.entries(this.iconWrap).filter(function (item) {
437
+ if ('all' === filterText || filterText === item[1].dataset['libraryId']) {
438
+ return true;
439
+ }
440
+ return false;
441
+ });
442
+
443
+ this._iconItemPush(this.filterIcon);
444
+
445
+ },
446
+
447
+ _setSideBarList: function (libraryName, libraryContent) {
448
+ let listItem;
449
+ if (libraryContent.icons !== undefined) {
450
+ listItem = {
451
+ 'title': libraryName,
452
+ 'prefix': libraryContent['prefix'] !== undefined ? libraryContent['prefix'] : '',
453
+ 'list-icon': libraryContent['list-icon'] !== undefined ? libraryContent['list-icon'] : '',
454
+ 'library-id': libraryContent['icon-style'] !== undefined ? libraryContent['icon-style'] : 'all',
455
+ };
456
+ this.sideBarList.push(listItem);
457
+ } else {
458
+ Object.entries(libraryContent).forEach(item => {
459
+ listItem = {
460
+ "title": libraryName + ' - ' + item[0],
461
+ "prefix": item[1]['prefix'] !== undefined ? item[1]['prefix'] : '',
462
+ "list-icon": item[1]['list-icon'] !== undefined ? item[1]['list-icon'] : "",
463
+ "library-id": item[1]['icon-style'] !== undefined ? item[1]['icon-style'] : "all",
464
+ };
465
+ this.sideBarList.push(listItem)
466
+ });
467
+ }
468
+ },
469
+
470
+ _sideBarListMarkup: function (sideBarList) {
471
+ let markup = '';
472
+ sideBarList.forEach((item) => {
473
+ let activeClazz = '';
474
+ if (item['library-id'] === this.activeLibraryId) {
475
+ activeClazz = ' universal-active';
476
+ }
477
+ if ('all' !== item['library-id']) {
478
+ let iconTag = '<i class="' + item['list-icon'] + '"></i>';
479
+ if (item['prefix'].match(/^material-icons/)) {
480
+ iconTag = '<i class="' + item['prefix'] + '">' + item['list-icon'] + '</i>';
481
+ }
482
+ markup += '<div class="uip-modal--sidebar-tab-item' + activeClazz + '" data-library-id="' + item['library-id'] + '">' + iconTag + item['title'] + '</div>';
483
+ } else {
484
+ markup += '<div class="uip-modal--sidebar-tab-item' + activeClazz + '" data-library-id="' + item['library-id'] + '"><img src="' + iconPickerUrl + '/images/star-of-life-solid.svg" width="13.125px" height="auto" alt="All" title="All" />' + item['title'] + '</div>';
485
+ }
486
+ });
487
+
488
+ return markup;
489
+ }
490
+ };
491
+
492
+ return UniversalIconPicker;
493
+ }));
@@ -0,0 +1,17 @@
1
+ /*
2
+ # -----------------------------------------------------------------------------
3
+ # ~/theme_uno/modules/iconPicker/js/universal-icon-picker.min.js
4
+ # UniversalIconPicker v.1.1.0 implementation for J1 Theme
5
+ #
6
+ # Product/Info:
7
+ # https://jekyll.one
8
+ # https://github.com/migliori/universal-icon-picker
9
+ #
10
+ # Copyright (C) 2023 Juergen Adams
11
+ # Copyright (C) 2023 Gilles Migliori
12
+ #
13
+ # J1 Theme is licensed under the MIT License.
14
+ # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md
15
+ # -----------------------------------------------------------------------------
16
+ */
17
+ const iconPickerUrl=document.currentScript.src.replace(/js\/([a-z\.-]+)$/gm,""),loadedDependencies=[];!function(i,e){"function"==typeof define&&define.amd?define([],e("UniversalIconPicker")):"object"==typeof exports?module.exports=e("UniversalIconPicker"):i.UniversalIconPicker=e("UniversalIconPicker")}(this,function(){"use strict";let i=function(i){let e=document.createElement("div");return e.innerHTML=i,e.firstChild},e=function(i,e,t){let s;return function(){let r=this,n=arguments,a=function(){s=null,t||i.apply(r,n)},o=t&&!s;clearTimeout(s),s=setTimeout(a,e),o&&i.apply(r,n)}},t=function(i){let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return i.replace(/[&<>"']/g,function(i){return e[i]})},s=function(i,e){let t,s={};for(t in i)Object.prototype.hasOwnProperty.call(i,t)&&(s[t]=i[t]);for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(s[t]=e[t]);return s};function r(e,t){this.selector=e,this.options=s({allowEmpty:!0,iconLibraries:null,iconLibrariesCss:null,mode:"autoload",onBeforeOpen:null,onReset:null,onSelect:null,resetSelector:null,loadCustomCss:!1},t),this.activeLibraryId="",this.filterIcon="",this.iconEventsLoaded=!1,this.iconLibraries={},this.iconLibrariesLoaded=!1,this.iconMarkup="",this.iconWrap="",this.idSuffix="-"+this.selector.replace(/[#\s[\]="]/g,""),this.sideBarBtn="",this.sideBarList=[],this.universalWrap='<div class="uip-modal uip-open" id="uip-modal'+this.idSuffix+'"><div class="uip-modal--content"><div class="uip-modal--header"><div class="uip-modal--header-logo-area"><span class="uip-modal--header-logo-title">Icon Picker</span></div><div class="uip-modal--header-close-btn"><img src="'+iconPickerUrl+'/images/xmark-solid.svg" width="40" height="40" alt="Close" title="Close" /></div></div><div class="uip-modal--body"><div id="uip-modal--sidebar'+this.idSuffix+'" class="uip-modal--sidebar"><div class="uip-modal--sidebar-tabs"></div></div><div id="uip-modal--icon-preview-wrap'+this.idSuffix+'" class="uip-modal--icon-preview-wrap"><div class="uip-modal--icon-search"><input name="" value="" placeholder="Filter by name..."><img src="'+iconPickerUrl+'/images/magnifying-glass-solid.svg" width="20" height="16" alt="Search" title="Search" /></div><div class="uip-modal--icon-preview-inner"><div id="uip-modal--icon-preview'+this.idSuffix+'" class="uip-modal--icon-preview"></div></div></div></div><div class="uip-modal--footer"><button class="uip-insert-icon-button mt-3 mb-3 mr-6">Copy to clipboard</button></div></div></div>',this.universalDomEle=i(this.universalWrap),this.sidebarTabs=this.universalDomEle.querySelector(".uip-modal--sidebar-tabs"),this.previewWrap=this.universalDomEle.querySelector("#uip-modal--icon-preview"+this.idSuffix),this.searchInput=this.universalDomEle.querySelector(".uip-modal--icon-search input"),"autoload"===this.options.mode?this.init():document.querySelector(this.selector).addEventListener("click",this.init.bind(this),{once:!0})}return r.prototype={init:function(){this._loadCssFiles(),"autoload"!==this.options.mode&&this._onBeforeOpen().then(()=>{this.open()}),document.querySelector(this.selector).addEventListener("click",()=>{this._onBeforeOpen().then(()=>{this.open()})}),this.options.resetSelector&&document.querySelector(this.options.resetSelector).addEventListener("click",this.options.onReset)},open:function(){this._loadIconLibraries().then(()=>{this.iconLibrariesLoaded=!0,document.getElementById("uip-modal"+this.idSuffix)?(this.universalDomEle.classList.remove("uip-close"),this.universalDomEle.classList.add("uip-open"),document.body.classList.add("stop-scrolling")):(document.body.appendChild(this.universalDomEle),document.body.classList.add("stop-scrolling"),this.universalDomEle.querySelector(".uip-modal--header-close-btn").addEventListener("click",()=>{this.universalDomEle.classList.add("uip-close"),this.universalDomEle.classList.remove("uip-open"),document.body.classList.remove("stop-scrolling")}),this.universalDomEle.querySelector(".uip-insert-icon-button").addEventListener("click",()=>{let i=this.universalDomEle.querySelector(".universal-selected");if(i){let e=i.querySelector("i").outerHTML,s={libraryId:i.dataset.libraryId,libraryName:i.dataset.libraryName,iconHtml:null,iconMarkup:null,iconClass:null,iconText:null};i.querySelector("i").classList.value.match("uip-icon-none")||(s.iconHtml=e,s.iconMarkup=t(e),s.iconClass=i.querySelector("i").classList.value,s.iconText=i.querySelector("i").innerText),this.options.onSelect(s)}})),this.iconEventsLoaded||(this.universalDomEle.querySelectorAll(".uip-icon-item").forEach(i=>{i.addEventListener("click",i=>{this.iconWrap.forEach(i=>{i.classList.remove("universal-selected")}),i.currentTarget.classList.toggle("universal-selected")}),i.addEventListener("dblclick",i=>{this.universalDomEle.querySelector(".uip-insert-icon-button").click()})}),this.iconEventsLoaded=!0),this.universalDomEle.querySelector(".uip-modal--icon-search input").focus()})},setOptions:function(i){this.options=s(this.options,i),i.iconLibrariesCss&&this._loadCssFiles(),i.iconLibraries&&(this.iconEventsLoaded=!1,this.iconLibrariesLoaded=!1,this._resetIconAndSidebarList())},_clickHandlerFunc:function(i){i.currentTarget.classList.contains("universal-active")||(this.sideBarBtn.forEach(function(i){i.classList.remove("universal-active")}),i.currentTarget.classList.add("universal-active")),this._sidebarFilterFunc(i.currentTarget.dataset.libraryId)},_iconItemMarkup:function(i,e){let t="",s=e["icon-style"],r=e.prefix;return this.options.allowEmpty&&(t+='<div class="uip-icon-item" data-library-id="'+s+'" data-filter="" data-library-name="'+i+'"><div class="uip-icon-item-inner"><i class="'+r+' uip-icon-none">&nbsp;</i><div class="uip-icon-item-name" title="None">None</div></div></div>'),r.match(/^material-icons/)?e.icons.forEach(function(e){t+='<div class="uip-icon-item" data-library-id="'+s+'" data-filter="'+e+'" data-library-name="'+i+'"><div class="uip-icon-item-inner"><i class="'+r+'">'+e+'</i><div class="uip-icon-item-name" title="'+e+'">'+e.replace("-"," ")+"</div></div></div>"}):e.icons.forEach(function(e){t+='<div class="uip-icon-item" data-library-id="'+s+'" data-filter="'+e+'" data-library-name="'+i+'"><div class="uip-icon-item-inner"><i class="'+[r,e].join("")+'"></i><div class="uip-icon-item-name" title="'+e+'">'+e.replace("-"," ")+"</div></div></div>"}),t},_iconItemPush:function(i){this.previewWrap.innerHTML="",i.forEach(i=>{this.previewWrap.appendChild(i[1])})},_loadCssFiles:function(){let i=document.createElement("link");!loadedDependencies.includes("universal-icon-picker.min.css")&!this.options.loadCustomCss&&(i.rel="stylesheet",i.type="text/css",i.href=iconPickerUrl+"css/universal-icon-picker.min.css",i.media="screen",document.head.appendChild(i),loadedDependencies.push("universal-icon-picker.min.css")),this.options.iconLibrariesCss&&this.options.iconLibrariesCss.forEach(e=>{if(!loadedDependencies.includes(e)){let t=iconPickerUrl+"css/"+e;e.match(/^http|^\/\//)&&(t=e),(i=document.createElement("link")).rel="stylesheet",i.type="text/css",i.href=t,i.media="screen",document.head.appendChild(i),loadedDependencies.push(e)}})},_loadIconLibraries:async function(i=0){if(!this.options.iconLibraries)return console.error("Universal icon picker - no icon library loaded"),!1;if(this.iconLibrariesLoaded)return!0;0===i&&this.options.iconLibraries.length>1&&this.sideBarList.push({title:"all icons","list-icon":"","library-id":"all",prefix:""});let t=this.options.iconLibraries[i];await fetch(iconPickerUrl+"icons-libraries/"+t).then(i=>i.json()).then(s=>{let r=t.replace(/-([a-z])/g,function(i){return i[1].toUpperCase()}).replace(/\.[a-z.]+$/,""),n={};return(n[r]=s,Object.assign(this.iconLibraries,n),i+1===this.options.iconLibraries.length)?(this._setIconAndSidebarList(),this.activeLibraryId=this.sideBarList[0]["library-id"],this.sidebarTabs.innerHTML=this._sideBarListMarkup(this.sideBarList),this.previewWrap.innerHTML=this.iconMarkup,this.iconWrap=this.previewWrap.querySelectorAll(".uip-icon-item"),this.searchInput.addEventListener("keyup",e(this._searchFunc,100).bind(this),!1),this.sideBarBtn=this.sidebarTabs.querySelectorAll(".uip-modal--sidebar-tab-item"),this.sideBarBtn.forEach(i=>{i.addEventListener("click",this._clickHandlerFunc.bind(this),!1)}),!0):this._loadIconLibraries(i+1)}).catch(i=>(console.log(i),i))},_onBeforeOpen:async function(){if("function"==typeof this.options.onBeforeOpen)return this.options.onBeforeOpen()},_resetIconAndSidebarList:function(){this.sideBarList=[],this.iconMarkup="",this.iconLibraries={},this.iconWrap="",this.filterIcon="",this.sideBarBtn="",this.activeLibraryId=""},_searchFunc:function(i){let e=i.target.value.toLowerCase();this._searchFilterFunc(e,"filter")},_searchFilterFunc:function(i,e){this.filterIcon=Object.entries(this.iconWrap).filter(t=>-1!=t[1].dataset[e].indexOf(i)&&("all"===this.activeLibraryId||t[1].dataset.libraryId===this.activeLibraryId)),this._iconItemPush(this.filterIcon)},_setIconAndSidebarList:function(){for(let[i,e]of Object.entries(this.iconLibraries)){var t;this._setSideBarList((t=i).replace(/([A-Z])/g," $1"),e),this._setIconMarkup(i,e)}},_setIconMarkup:function(i,e){void 0!==e.icons?this.iconMarkup+=this._iconItemMarkup(i,e):Object.entries(e).forEach(e=>{this.iconMarkup+=this._iconItemMarkup(i,e[1])})},_sidebarFilterFunc:function(i){this.activeLibraryId=i,this.filterIcon=Object.entries(this.iconWrap).filter(function(e){return"all"===i||i===e[1].dataset.libraryId}),this._iconItemPush(this.filterIcon)},_setSideBarList:function(i,e){let t;void 0!==e.icons?(t={title:i,prefix:void 0!==e.prefix?e.prefix:"","list-icon":void 0!==e["list-icon"]?e["list-icon"]:"","library-id":void 0!==e["icon-style"]?e["icon-style"]:"all"},this.sideBarList.push(t)):Object.entries(e).forEach(e=>{t={title:i+" - "+e[0],prefix:void 0!==e[1].prefix?e[1].prefix:"","list-icon":void 0!==e[1]["list-icon"]?e[1]["list-icon"]:"","library-id":void 0!==e[1]["icon-style"]?e[1]["icon-style"]:"all"},this.sideBarList.push(t)})},_sideBarListMarkup:function(i){let e="";return i.forEach(i=>{let t="";if(i["library-id"]===this.activeLibraryId&&(t=" universal-active"),"all"!==i["library-id"]){let s='<i class="'+i["list-icon"]+'"></i>';i.prefix.match(/^material-icons/)&&(s='<i class="'+i.prefix+'">'+i["list-icon"]+"</i>"),e+='<div class="uip-modal--sidebar-tab-item'+t+'" data-library-id="'+i["library-id"]+'">'+s+i.title+"</div>"}else e+='<div class="uip-modal--sidebar-tab-item'+t+'" data-library-id="'+i["library-id"]+'"><img src="'+iconPickerUrl+'/images/star-of-life-solid.svg" width="13.125px" height="auto" alt="All" title="All" />'+i.title+"</div>"}),e}},r});