j1-template 2023.2.6 → 2023.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (373) 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 -9402
  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 -4
  265. data/lib/starter_web/pages/public/about/reporting_issues.adoc +1 -3
  266. data/lib/starter_web/pages/public/blog/navigator/archive/allview.html +0 -5
  267. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +0 -4
  268. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +0 -5
  269. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +0 -5
  270. data/lib/starter_web/pages/public/blog/navigator/index.html +2 -6
  271. data/lib/starter_web/pages/public/features/general.adoc +0 -4
  272. data/lib/starter_web/pages/public/features/template.adoc +0 -4
  273. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_all_books.adoc +1 -3
  274. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_biography.adoc +1 -1
  275. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_fantasy.adoc +1 -1
  276. data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_romance.adoc +1 -2
  277. data/lib/starter_web/pages/public/learn/bookshelf/jekyll_collections.adoc +75 -66
  278. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/attributes.asciidoc +58 -0
  279. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/accordion.asciidoc +34 -0
  280. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/alerts.asciidoc +15 -0
  281. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/badges.asciidoc +9 -0
  282. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/body.asciidoc +14 -0
  283. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/breadcrumbs.asciidoc +14 -0
  284. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/buttons.asciidoc +75 -0
  285. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/cards.asciidoc +22 -0
  286. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/carousel.asciidoc +37 -0
  287. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/close.asciidoc +15 -0
  288. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/code.asciidoc +14 -0
  289. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/color_system.asciidoc +353 -0
  290. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/components.asciidoc +69 -0
  291. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/dropdowns.asciidoc +53 -0
  292. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/figures.asciidoc +5 -0
  293. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/forms.asciidoc +270 -0
  294. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/grid.asciidoc +49 -0
  295. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/links.asciidoc +21 -0
  296. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/list_groups.asciidoc +28 -0
  297. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/modals.asciidoc +43 -0
  298. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/navbar.asciidoc +45 -0
  299. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/navs.asciidoc +28 -0
  300. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/offcanvas.asciidoc +16 -0
  301. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/options.asciidoc +30 -0
  302. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/pagination.asciidoc +40 -0
  303. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/paragraph.asciidoc +5 -0
  304. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/placeholders.asciidoc +5 -0
  305. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/popovers.asciidoc +28 -0
  306. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/position.asciidoc +8 -0
  307. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/progress_bars.asciidoc +12 -0
  308. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/spacing.asciidoc +14 -0
  309. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/spinners.asciidoc +12 -0
  310. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/tables.asciidoc +55 -0
  311. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/thumbnails.asciidoc +9 -0
  312. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/toasts.asciidoc +18 -0
  313. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/tooltips.asciidoc +28 -0
  314. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/typography.asciidoc +115 -0
  315. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/documents/z_index.asciidoc +26 -0
  316. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/tables/_table.asciidoc +9 -0
  317. data/lib/starter_web/pages/public/learn/bs_sass_variables/_includes/tables/accordion.asciidoc +87 -0
  318. data/lib/starter_web/pages/public/learn/bs_sass_variables/bs_sass_variables.adoc +262 -0
  319. data/lib/starter_web/pages/public/learn/cheatsheet/gem.adoc +255 -0
  320. data/lib/starter_web/pages/public/learn/cheatsheet/git.adoc +1458 -0
  321. data/lib/starter_web/pages/public/learn/cheatsheet/j1.adoc +63 -0
  322. data/lib/starter_web/pages/public/learn/cheatsheet/yaml.adoc +514 -0
  323. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/attributes.asciidoc +59 -0
  324. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/documents/100_chapter.asciidoc +541 -0
  325. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/documents/200_chapter.asciidoc +33 -0
  326. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/build_command_options.asciidoc +72 -0
  327. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/files_and_folders.asciidoc +66 -0
  328. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/global_configuration_options.asciidoc +63 -0
  329. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/global_variables.asciidoc +26 -0
  330. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/page_variables.asciidoc +54 -0
  331. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/serve_command_options.asciidoc +45 -0
  332. data/lib/starter_web/pages/public/learn/core_web_vitals/_includes/tables/site_variables.asciidoc +59 -0
  333. data/lib/starter_web/pages/public/learn/core_web_vitals/core_web_vitals.adoc +442 -0
  334. data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +1 -1
  335. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/100_gistblock.asciidoc +3 -4
  336. data/lib/starter_web/pages/public/learn/roundtrip/asciidoc_extensions.adoc +2 -2
  337. data/lib/starter_web/pages/public/learn/roundtrip/icon_fonts.adoc +10 -10
  338. data/lib/starter_web/pages/public/learn/roundtrip/lunr_search.adoc +0 -2
  339. data/lib/starter_web/pages/public/learn/roundtrip/present_images.adoc +8 -2
  340. data/lib/starter_web/pages/public/learn/roundtrip/responsive_tables.adoc +3 -7
  341. data/lib/starter_web/pages/public/learn/where_to_go.adoc +39 -45
  342. data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +2 -6
  343. data/lib/starter_web/pages/public/legal/en/200_impress.adoc +0 -1
  344. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +2 -6
  345. data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +2 -6
  346. data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +0 -2
  347. data/lib/starter_web/pages/public/plans/plans.adoc +0 -2
  348. data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +93 -7
  349. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  350. data/lib/starter_web/utilsrv/package.json +1 -1
  351. metadata +133 -24
  352. data/_includes/themes/j1/modules/ads/google_ad_content_home.html +0 -11
  353. data/_includes/themes/j1/modules/ads/google_ad_top_home.html +0 -11
  354. data/assets/themes/j1/core/css/nbinteract-tutorial/styles.css +0 -1711
  355. data/assets/themes/j1/core/css/nbinteract-tutorial/styles.min.css +0 -1
  356. data/assets/themes/j1/modules/advertising/js/google/adInitializer.js +0 -127
  357. data/assets/themes/j1/modules/deeplAPI/js/deeplAPI.2.js +0 -460
  358. data/assets/themes/j1/modules/mdiPreviewer/css/previewer.css +0 -97
  359. data/assets/themes/j1/modules/mdiPreviewer/css/previewer.min.css +0 -15
  360. data/assets/themes/j1/modules/mdiPreviewer/js/previewer.js +0 -115
  361. data/assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js +0 -15
  362. data/assets/themes/j1/modules/mdilPreviewer/css/previewer.css +0 -97
  363. data/assets/themes/j1/modules/mdilPreviewer/css/previewer.min.css +0 -15
  364. data/assets/themes/j1/modules/mdilPreviewer/js/previewer.js +0 -125
  365. data/assets/themes/j1/modules/mdilPreviewer/js/previewer.min.js +0 -15
  366. data/lib/starter_web/_includes/themes/j1/modules/ads/google_ad_content_home.html +0 -11
  367. data/lib/starter_web/_includes/themes/j1/modules/ads/google_ad_top_home.html +0 -11
  368. /data/lib/starter_web/assets/images/{promo → quotes/promo}/home/screenshot.jpg +0 -0
  369. /data/lib/starter_web/assets/images/{promo → quotes/promo}/jekyll/jekyll-faq.jpg +0 -0
  370. /data/lib/starter_web/assets/images/{promo → quotes/promo}/jekyll/jekyll-generator.jpg +0 -0
  371. /data/lib/starter_web/assets/images/{promo → quotes/promo}/jekyll/jekyll-generator.png +0 -0
  372. /data/lib/starter_web/assets/images/{promo → quotes/promo}/jekyll/jekyll-og.png +0 -0
  373. /data/lib/starter_web/assets/images/{promo → quotes/promo}/jekyll/scalable/jekyll-faq.psd +0 -0
@@ -17,4 +17,4 @@
17
17
  # See: https://github.com/danielgindi/jquery-backstretch
18
18
  # -----------------------------------------------------------------------------
19
19
  */
20
- "use strict";!function(t,e,i){var r,o=/^.*(youtu\.be\/|youtube\.com\/v\/|youtube\.com\/embed\/|youtube\.com\/watch\?v=|youtube\.com\/watch\?.*\&v=)([^#\&\?]*).*/i;t.fn.backstretch=function(r,o){var a,n=arguments;return 0===t(e).scrollTop()&&e.scrollTo(0,0),this.each(function(e){var s=t(this),h=s.data("backstretch");if(h){if("string"==typeof n[0]&&"function"==typeof h[n[0]]){var c=h[n[0]].apply(h,Array.prototype.slice.call(n,1));c===h&&(c=i),c!==i&&((a=a||[])[e]=c);return}o=t.extend(h.options,o),h.hasOwnProperty("destroy")&&h.destroy(!0)}if(!r||r&&0===r.length){var d=s.css("background-image");d&&"none"!==d?r=[{url:s.css("backgroundImage").replace(/url\(|\)|"|'/g,"")}]:t.error("No images were supplied for Backstretch, or element must have a CSS-defined background image.")}h=new b(this,r,o||{}),s.data("backstretch",h)}),a?1===a.length?a[0]:a:this},t.backstretch=function(e,i){return t("body").backstretch(e,i).data("backstretch")},t.expr[":"].backstretch=function(e){return i!==t(e).data("backstretch")},t.fn.backstretch.defaults={debug:!1,duration:5e3,transition:"fade",transitionDuration:0,animateFirst:!0,alignX:.5,alignY:.5,paused:!1,start:0,preload:2,preloadSize:1,resolutionRefreshRate:2500,resolutionChangeRatioThreshold:.1};var a,n,s,h,c,d,l={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},itemWrapper:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"100%",height:"100%",zIndex:-999999},item:{position:"absolute",margin:0,padding:0,border:"none",width:"100%",height:"100%",maxWidth:"none"}},u=(a=function(t){for(var e=1;e<t.length;e++){for(var i=t[e],r=e;t[r-1]&&parseInt(t[r-1].width,10)>parseInt(i.width,10);)t[r]=t[r-1],--r;t[r]=i}return t},n=function(t,i,r){var o=e.devicePixelRatio||1,a=S();X();for(var n,s,h=i>t?"portrait":t>i?"landscape":"square",c=0,d=0;d<r.length&&("string"==typeof(s=r[d])&&(s=r[d]={url:s}),s.pixelRatio&&"auto"!==s.pixelRatio&&parseFloat(s.pixelRatio)!==o||s.deviceOrientation&&s.deviceOrientation!==a||s.windowOrientation&&s.windowOrientation!==a||s.orientation&&s.orientation!==h||(c=d,n=t,"auto"===s.pixelRatio&&(t*=o),!(s.width>=n)));d++);return r[Math.min(d,c)]},s=function(t,e){if("string"==typeof t)t=t.replace(/{{(width|height)}}/g,e);else if(t instanceof Array)for(var i=0;i<t.length;i++)t[i].src?t[i].src=s(t[i].src,e):t[i]=s(t[i],e);return t},function(e,i){for(var r=e.width(),o=e.height(),h=[],c=function(t,e){return"width"===e?r:"height"===e?o:t},d=0;d<i.length;d++)if(t.isArray(i[d])){i[d]=a(i[d]);var l=n(r,o,i[d]);h.push(l)}else{"string"==typeof i[d]&&(i[d]={url:i[d]});var u=t.extend({},i[d]);u.url=s(u.url,c),h.push(u)}return h}),p=function(t){return o.test(t.url)||t.isVideo},g=(h=[],c=function(t){for(var e=0;e<h.length;e++)if(h[e].src===t.src)return h[e];return h.push(t),t},d=function(t,e,i){"function"==typeof e&&e.call(t,i)},function e(i,r,o,a,n){if(void 0!==i){t.isArray(i)||(i=[i]),arguments.length<5&&"function"==typeof arguments[arguments.length-1]&&(n=arguments[arguments.length-1]),r="function"!=typeof r&&r?r:0,o="function"==typeof o||!o||o<0?i.length:Math.min(o,i.length),a="function"!=typeof a&&a?a:1,r>=i.length&&(r=0,o=0),a<0&&(a=o),a=Math.min(a,o);var s,h=i.slice(r+a,o-a);if(!(o=(i=i.slice(r,a)).length)){d(i,n,!0);return}for(var l=0,u=function(){++l===o&&(d(i,n,!h),e(h,0,0,a,n))},g=0;g<i.length;g++)!p(i[g])&&((s=new Image).src=i[g].url,(s=c(s)).complete?u():t(s).on("load error",u))}}),f=function(e){for(var i=[],r=0;r<e.length;r++)"string"==typeof e[r]?i.push({url:e[r]}):t.isArray(e[r])?i.push(f(e[r])):i.push(y(e[r]));return i},y=function(t,r){return(t.centeredX||t.centeredY)&&(e.console&&e.console.log&&e.console.log("jquery.backstretch: `centeredX`/`centeredY` is deprecated, please use `alignX`/`alignY`"),t.centeredX&&(t.alignX=.5),t.centeredY&&(t.alignY=.5)),i!==t.speed&&(e.console&&e.console.log&&e.console.log("jquery.backstretch: `speed` is deprecated, please use `transitionDuration`"),t.transitionDuration=t.speed,t.transition="fade"),i!==t.resolutionChangeRatioTreshold&&(e.console.log("jquery.backstretch: `treshold` is a typo!"),t.resolutionChangeRatioThreshold=t.resolutionChangeRatioTreshold),i!==t.fadeFirst&&(t.animateFirst=t.fadeFirst),i!==t.fade&&(t.transitionDuration=t.fade,t.transition="fade"),t.scale&&(t.scale=$(t.scale)),v(t)},v=function(t,e){return"left"===t.alignX?t.alignX=0:"center"===t.alignX?t.alignX=.5:"right"===t.alignX?t.alignX=1:(i!==t.alignX||e)&&(t.alignX=parseFloat(t.alignX),isNaN(t.alignX)&&(t.alignX=.5)),"top"===t.alignY?t.alignY=0:"center"===t.alignY?t.alignY=.5:"bottom"===t.alignY?t.alignY=1:(i!==t.alignX||e)&&(t.alignY=parseFloat(t.alignY),isNaN(t.alignY)&&(t.alignY=.5)),t},m={cover:"cover",fit:"fit","fit-smaller":"fit-smaller",fill:"fill"};function $(t){return m.hasOwnProperty(t)?t:"cover"}var b=function(i,r,o){this.options=t.extend({},t.fn.backstretch.defaults,o||{}),this.firstShow=!0,y(this.options,!0),this.images=f(t.isArray(r)?r:[r]),this.options.paused&&(this.paused=!0),this.options.start>=this.images.length&&(this.options.start=this.images.length-1),this.options.start<0&&(this.options.start=0),this.isBody=i===document.body;var a=t(e);this.$container=t(i),this.$root=this.isBody?H?a:t(document):this.$container,this.originalImages=this.images,this.images=u(this.options.alwaysTestWindowResolution?a:this.$root,this.originalImages),g(this.images,this.options.start||0,this.options.preload||1);var n=this.$container.children(".backstretch").first();if(this.$wrap=n.length?n:t('<div class="backstretch"></div>').css(this.options.bypassCss?{}:l.wrap).appendTo(this.$container),!this.options.bypassCss){if(!this.isBody){var s=this.$container.css("position"),h=this.$container.css("zIndex");this.$container.css({position:"static"===s?"relative":s,zIndex:"auto"===h?0:h}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&H?"fixed":"absolute"})}this.index=this.options.start,this.show(this.index),a.on("resize.backstretch",t.proxy(this.resize,this)).on("orientationchange.backstretch",t.proxy(function(){this.isBody&&0===e.pageYOffset&&(e.scrollTo(0,1),this.resize())},this))},w=function(e){var r=e.transition||"fade";"string"==typeof r&&r.indexOf("|")>-1&&(r=r.split("|")),r instanceof Array&&(r=r[Math.round(Math.random()*(r.length-1))]);var o=e.new,a=e.old?e.old:t([]);switch(r.toString().toLowerCase()){default:case"fade":o.fadeIn({duration:e.duration,complete:e.complete,easing:e.easing||i});break;case"fadeinout":case"fade_in_out":var n=function(){o.fadeIn({duration:e.duration/2,complete:e.complete,easing:e.easing||i})};a.length?a.fadeOut({duration:e.duration/2,complete:n,easing:e.easing||i}):n();break;case"pushleft":case"push_left":case"pushright":case"push_right":case"pushup":case"push_up":case"pushdown":case"push_down":case"coverleft":case"cover_left":case"coverright":case"cover_right":case"coverup":case"cover_up":case"coverdown":case"cover_down":var s=r.match(/^(cover|push)_?(.*)$/),h="left"===s[2]?"right":"right"===s[2]?"left":"down"===s[2]?"top":"up"===s[2]?"bottom":"right",c={display:""},d={};if(c[h]="-100%",d[h]=0,o.css(c).animate(d,{duration:e.duration,complete:function(){o.css(h,""),e.complete.apply(this,arguments)},easing:e.easing||i}),"push"===s[1]&&a.length){var l={};l[h]="100%",a.animate(l,{duration:e.duration,complete:function(){a.css("display","none")},easing:e.easing||i})}}};b.prototype={resize:function(){try{var o,a,n=log4javascript.getLogger("j1.core.attic"),s=this.options.alwaysTestWindowResolution?t(e):this.$root,h=s.width(),c=s.height(),d=h/(this._lastResizeContainerWidth||0),l=c/(this._lastResizeContainerHeight||0),p=this.options.resolutionChangeRatioThreshold||0;if((h!==this._lastResizeContainerWidth||c!==this._lastResizeContainerHeight)&&(Math.abs(d-1)>=p||isNaN(d)||Math.abs(l-1)>=p||isNaN(l))&&(this._lastResizeContainerWidth=h,this._lastResizeContainerHeight=c,this.images=u(s,this.originalImages),this.options.preload&&g(this.images,(this.index+1)%this.images.length,this.options.preload),1===this.images.length&&this._currentImage.url!==this.images[0].url)){var f=this;clearTimeout(f._selectAnotherResolutionTimeout),f._selectAnotherResolutionTimeout=setTimeout(function(){f.show(0)},this.options.resolutionRefreshRate)}var y={left:0,top:0,right:"auto",bottom:"auto"},v=this.isBody?this.$root.width():this.$root.innerWidth(),m=this.isBody?e.innerHeight?e.innerHeight:this.$root.height():this.$root.innerHeight(),b=this.$itemWrapper.data("width"),w=this.$itemWrapper.data("height"),_=b/w||1,x=i===this._currentImage.alignX?this.options.alignX:this._currentImage.alignX,k=i===this._currentImage.alignY?this.options.alignY:this._currentImage.alignY,W=$(this._currentImage.scale||this.options.scale);if(this.options.debug&&(r="\nresize: boxHeight x boxWidth: "+m+" x "+v,n.debug(r)),"fit"===W||"fit-smaller"===W){if(o=b,a=w,o>v||a>m||"fit-smaller"===W){var T=v/m;T>_?(o=Math.floor(m*_),a=m):T<_?(o=v,a=Math.floor(v/_)):(o=v,a=m)}}else"fill"===W?(o=v,a=m):(o=Math.max(m*_,v),a=Math.max(o/_,m));y.top=-(a-m)*k,y.left=-(o-v)*x,y.width=o,y.height=a,this.options.bypassCss||this.$wrap.css({width:v,height:m}).find(">.backstretch-item").not(".deleteable").each(function(){t(this).find("img,video,iframe").css(y)});var R=t.Event("backstretch.resize",{relatedTarget:this.$container[0]});this.$container.trigger(R,this)}catch(Y){r="resize: jadams, IE7 hack to let it fail gracefully: "+Y,n.warn(r)}return this},show:function(e,r){var o=log4javascript.getLogger("j1.core.attic");if(!(Math.abs(e)>this.images.length-1)){var a=this,n=a.$wrap.find(">.backstretch-item").addClass("deleteable"),s=a.videoWrapper,h={relatedTarget:a.$container[0]};a.$container.trigger(t.Event("backstretch.before",h),[a,e]),this.index=e;var c=a.images[e];clearTimeout(a._cycleTimeout),delete a.videoWrapper;var d=p(c);return d?(a.videoWrapper=new _(c),a.$item=a.videoWrapper.$video.css("pointer-events","none")):a.$item=t("<img />"),a.$itemWrapper=t('<div class="backstretch-item">').append(a.$item),this.options.bypassCss?a.$itemWrapper.css({display:"none"}):(a.$itemWrapper.css(l.itemWrapper),a.$item.css(l.item)),a.$item.bind(d?"canplay":"load",function(c){var l=t(this).parent(),u=l.data("options");r&&(u=t.extend({},u,r));var p=this.naturalWidth||this.videoWidth||this.width,g=this.naturalHeight||this.videoHeight||this.height;l.data("width",p).data("height",g);var f=function(t){return i!==u[t]?u[t]:a.options[t]},y=f("transition"),v=f("transitionEasing"),m=f("transitionDuration"),$=function(){s&&(s.stop(),s.destroy()),n.remove(),!a.paused&&a.images.length>1&&a.cycle(),a.options.bypassCss||a.isBody,t(["before","after","show"]).each(function(){a.$container.trigger(t.Event("backstretch."+this,h),[a,e])}),d&&a.videoWrapper.play()};(!a.firstShow||a.options.animateFirst)&&m&&y?w({new:l,old:n,transition:y,duration:m,easing:v,complete:$}):(l.show(),$()),a.firstShow=!1;var b=this.naturalWidth||this.videoWidth||this.width,_=this.naturalHeight||this.videoHeight||this.height;a.options.debug&&o.debug("show: imageHeight x imageWidth: "+_+" x "+b);var x="#"+a.$container["0"].id,k=setInterval(function(){t(x).is(":visible")&&(clearInterval(k),o.debug("\ncontainer visible on id: "+x),a.resize())},50)}),a.$itemWrapper.appendTo(a.$wrap),a.$item.attr("alt",c.alt||""),a.$itemWrapper.data("options",c),d||a.$item.attr("src",c.url),a._currentImage=c,a}},current:function(){return this.index},next:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(this.index<this.images.length-1?this.index+1:0),this.show.apply(this,t)},prev:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(0===this.index?this.images.length-1:this.index-1),this.show.apply(this,t)},pause:function(){return this.paused=!0,this.videoWrapper&&this.videoWrapper.pause(),this},resume:function(){return this.paused=!1,this.videoWrapper&&this.videoWrapper.play(),this.cycle(),this},cycle:function(){if(this.images.length>1){clearTimeout(this._cycleTimeout);var e=this._currentImage&&this._currentImage.duration||this.options.duration,i=p(this._currentImage),r=function(){this.$item.off(".cycle"),this.paused||this.next()};if(i){if(!this._currentImage.loop){var o=0;this.$item.on("playing.cycle",function(){var e=t(this).data("player");clearTimeout(o),void 0!==e&&(o=setTimeout(function(){e.pause(),e.$video.trigger("ended")},(e.getDuration()-e.getCurrentTime())*1e3))}).on("ended.cycle",function(){clearTimeout(o)})}this.$item.on("error.cycle initerror.cycle",t.proxy(r,this))}i&&!this._currentImage.duration?this.$item.on("ended.cycle",t.proxy(r,this)):this._cycleTimeout=setTimeout(t.proxy(r,this),e)}return this},destroy:function(i){t(e).off("resize.backstretch orientationchange.backstretch"),this.videoWrapper&&this.videoWrapper.destroy(),clearTimeout(this._cycleTimeout),i||this.$wrap.remove(),this.$container.removeData("backstretch")}};var _=function(){this.init.apply(this,arguments)};_.prototype.init=function(r){var a,n=this,s=function(){n.$video=a,n.video=a[0]},h="video";if(!(r.url instanceof Array)&&o.test(r.url)&&(h="youtube"),n.type=h,"youtube"===h){_.loadYoutubeAPI(),n.ytId=r.url.match(o)[2];var c="https://www.youtube.com/embed/"+n.ytId+"?rel=0&autoplay=0&showinfo=0&controls=0&modestbranding=1&cc_load_policy=0&disablekb=1&iv_load_policy=3&loop=0&enablejsapi=1&origin="+encodeURIComponent(e.location.origin);n.__ytStartMuted=!!r.mute||i===r.mute,a=t("<iframe />").attr({src_to_load:c}).css({border:0,margin:0,padding:0}).data("player",n),r.loop&&a.on("ended.loop",function(){n.__manuallyStopped||n.play()}),n.ytReady=!1,s(),e.YT?(n._initYoutube(),a.trigger("initsuccess")):t(e).one("youtube_api_load",function(){n._initYoutube(),a.trigger("initsuccess")})}else{a=t("<video>").prop("autoplay",!1).prop("controls",!1).prop("loop",!!r.loop).prop("muted",!!r.mute||i===r.mute).prop("preload","auto").prop("poster",r.poster||"");for(var d=r.url instanceof Array?r.url:[r.url],l=0;l<d.length;l++){var u=d[l];"string"==typeof u&&(u={src:u}),t("<source>").attr("src",u.src).attr("type",u.type||null).appendTo(a)}a[0].canPlayType&&d.length?a.trigger("initsuccess"):a.trigger("initerror"),s()}},_.prototype._initYoutube=function(){var i=this,r=e.YT;i.$video.attr("src",i.$video.attr("src_to_load")).removeAttr("src_to_load");var o=!!i.$video[0].parentNode;if(!o){var a=t("<div>").css("display","none !important").appendTo(document.body);i.$video.appendTo(a)}var n=new r.Player(i.video,{events:{onReady:function(){i.__ytStartMuted&&n.mute(),o||(i.$video[0].parentNode===a[0]&&i.$video.detach(),a.remove()),i.ytReady=!0,i._updateYoutubeSize(),i.$video.trigger("canplay")},onStateChange:function(t){switch(t.data){case r.PlayerState.PLAYING:i.$video.trigger("playing");break;case r.PlayerState.ENDED:i.$video.trigger("ended");break;case r.PlayerState.PAUSED:i.$video.trigger("pause");break;case r.PlayerState.BUFFERING:i.$video.trigger("waiting");break;case r.PlayerState.CUED:i.$video.trigger("canplay")}},onPlaybackQualityChange:function(){i._updateYoutubeSize(),i.$video.trigger("resize")},onError:function(t){i.hasError=!0,i.$video.trigger({type:"error",error:t})}}});return i.ytPlayer=n,i},_.prototype._updateYoutubeSize=function(){var t=this;switch(t.ytPlayer.getPlaybackQuality()||"medium"){case"small":t.video.videoWidth=426,t.video.videoHeight=240;break;case"medium":t.video.videoWidth=640,t.video.videoHeight=360;break;default:case"large":t.video.videoWidth=854,t.video.videoHeight=480;break;case"hd720":t.video.videoWidth=1280,t.video.videoHeight=720;break;case"hd1080":t.video.videoWidth=1920,t.video.videoHeight=1080;break;case"highres":t.video.videoWidth=2560,t.video.videoHeight=1440}return t},_.prototype.play=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&(t.$video.trigger("play"),t.ytPlayer.playVideo()):t.video.play(),t},_.prototype.pause=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&t.ytPlayer.pauseVideo():t.video.pause(),t},_.prototype.stop=function(){var t=this;return t.__manuallyStopped=!0,"youtube"===t.type?t.ytReady&&(t.ytPlayer.pauseVideo(),t.ytPlayer.seekTo(0)):(t.video.pause(),t.video.currentTime=0),t},_.prototype.destroy=function(){return this.ytPlayer&&this.ytPlayer.destroy(),this.$video.remove(),this},_.prototype.getCurrentTime=function(t){return"youtube"!==this.type?this.video.currentTime:this.ytReady?this.ytPlayer.getCurrentTime():0},_.prototype.setCurrentTime=function(t){var e=this;return"youtube"===e.type?e.ytReady&&e.ytPlayer.seekTo(t,!0):e.video.currentTime=t,e},_.prototype.getDuration=function(){return"youtube"!==this.type?this.video.duration:this.ytReady?this.ytPlayer.getDuration():0},_.loadYoutubeAPI=function(){if(!e.YT){t("script[src*=www\\.youtube\\.com\\/iframe_api]").length||t('<script type="text/javascript" src="https://www.youtube.com/iframe_api">').appendTo("body");var i=setInterval(function(){e.YT&&e.YT.loaded&&(t(e).trigger("youtube_api_load"),clearTimeout(i))},50)}};var x,k,W,T,R,Y,I,P,C,z,S=function(){if("matchMedia"in e){if(e.matchMedia("(orientation: portrait)").matches)return"portrait";if(e.matchMedia("(orientation: landscape)").matches)return"landscape"}return screen.height>screen.width?"portrait":"landscape"},X=function(){return e.innerHeight>e.innerWidth?"portrait":e.innerWidth>e.innerHeight?"landscape":"square"},H=(x=navigator.userAgent,k=navigator.platform,T=!!(W=x.match(/AppleWebKit\/([0-9]+)/))&&W[1],Y=!!(R=x.match(/Fennec\/([0-9]+)/))&&R[1],P=!!(I=x.match(/Opera Mobi\/([0-9]+)/))&&I[1],z=!!(C=x.match(/MSIE ([0-9]+)/))&&C[1],!((k.indexOf("iPhone")>-1||k.indexOf("iPad")>-1||k.indexOf("iPod")>-1)&&T&&T<534||e.operamini&&"[object OperaMini]"===({}).toString.call(e.operamini)||I&&P<7458||x.indexOf("Android")>-1&&T&&T<533||Y&&Y<6||"palmGetResource"in e&&T&&T<534||x.indexOf("MeeGo")>-1&&x.indexOf("NokiaBrowser/8.5.0")>-1||z&&z<=6))}(jQuery,window);
20
+ !function(t,e,i){var r,a=/^.*(youtu\.be\/|youtube\.com\/v\/|youtube\.com\/embed\/|youtube\.com\/watch\?v=|youtube\.com\/watch\?.*\&v=)([^#\&\?]*).*/i;t.fn.backstretch=function(r,a){var o,n=arguments;return 0===t(e).scrollTop()&&e.scrollTo(0,0),this.each((function(e){var s=t(this),h=s.data("backstretch");if(h){if("string"==typeof n[0]&&"function"==typeof h[n[0]]){var c=h[n[0]].apply(h,Array.prototype.slice.call(n,1));return c===h&&(c=i),void(c!==i&&((o=o||[])[e]=c))}a=t.extend(h.options,a),h.hasOwnProperty("destroy")&&h.destroy(!0)}if(!r||r&&0===r.length){var d=s.css("background-image");d&&"none"!==d?r=[{url:s.css("backgroundImage").replace(/url\(|\)|"|'/g,"")}]:t.error("No images were supplied for Backstretch, or element must have a CSS-defined background image.")}h=new w(this,r,a||{}),s.data("backstretch",h)})),o?1===o.length?o[0]:o:this},t.backstretch=function(e,i){return t("body").backstretch(e,i).data("backstretch")},t.expr[":"].backstretch=function(e){return t(e).data("backstretch")!==i},t.fn.backstretch.defaults={debug:!1,duration:5e3,transition:"fade",transitionDuration:0,animateFirst:!0,alignX:.5,alignY:.5,paused:!1,start:0,preload:2,preloadSize:1,resolutionRefreshRate:2500,resolutionChangeRatioThreshold:.1};var o,n,s,h,c,d,l={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},itemWrapper:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"100%",height:"100%",zIndex:-999999},item:{position:"absolute",margin:0,padding:0,border:"none",width:"100%",height:"100%",maxWidth:"none"}},u=(o=function(t){for(var e=1;e<t.length;e++){for(var i=t[e],r=e;t[r-1]&&parseInt(t[r-1].width,10)>parseInt(i.width,10);)t[r]=t[r-1],--r;t[r]=i}return t},n=function(t,i,r){for(var a,o,n=e.devicePixelRatio||1,s=z(),h=(S(),i>t?"portrait":t>i?"landscape":"square"),c=0,d=0;d<r.length&&("string"==typeof(o=r[d])&&(o=r[d]={url:o}),o.pixelRatio&&"auto"!==o.pixelRatio&&parseFloat(o.pixelRatio)!==n||o.deviceOrientation&&o.deviceOrientation!==s||o.windowOrientation&&o.windowOrientation!==s||o.orientation&&o.orientation!==h||(c=d,a=t,"auto"===o.pixelRatio&&(t*=n),!(o.width>=a)));d++);return r[Math.min(d,c)]},s=function(t,e){if("string"==typeof t)t=t.replace(/{{(width|height)}}/g,e);else if(t instanceof Array)for(var i=0;i<t.length;i++)t[i].src?t[i].src=s(t[i].src,e):t[i]=s(t[i],e);return t},function(e,i){for(var r=e.width(),a=e.height(),h=[],c=function(t,e){return"width"===e?r:"height"===e?a:t},d=0;d<i.length;d++)if(t.isArray(i[d])){i[d]=o(i[d]);var l=n(r,a,i[d]);h.push(l)}else{"string"==typeof i[d]&&(i[d]={url:i[d]});var u=t.extend({},i[d]);u.url=s(u.url,c),h.push(u)}return h}),p=function(t){return a.test(t.url)||t.isVideo},g=(h=[],c=function(t){for(var e=0;e<h.length;e++)if(h[e].src===t.src)return h[e];return h.push(t),t},d=function(t,e,i){"function"==typeof e&&e.call(t,i)},function e(i,r,a,o,n){if(void 0!==i){t.isArray(i)||(i=[i]),arguments.length<5&&"function"==typeof arguments[arguments.length-1]&&(n=arguments[arguments.length-1]),r="function"!=typeof r&&r?r:0,a="function"==typeof a||!a||a<0?i.length:Math.min(a,i.length),o="function"!=typeof o&&o?o:1,r>=i.length&&(r=0,a=0),o<0&&(o=a),o=Math.min(o,a);var s=i.slice(r+o,a-o);if(i=i.slice(r,o),a=i.length)for(var h,l=0,u=function(){++l===a&&(d(i,n,!s),e(s,0,0,o,n))},g=0;g<i.length;g++)p(i[g])||((h=new Image).src=i[g].url,(h=c(h)).complete?u():t(h).on("load error",u));else d(i,n,!0)}}),y=function(e){for(var i=[],r=0;r<e.length;r++)"string"==typeof e[r]?i.push({url:e[r]}):t.isArray(e[r])?i.push(y(e[r])):i.push(f(e[r]));return i},f=function(t,r){return(t.centeredX||t.centeredY)&&(e.console&&e.console.log&&e.console.log("jquery.backstretch: `centeredX`/`centeredY` is deprecated, please use `alignX`/`alignY`"),t.centeredX&&(t.alignX=.5),t.centeredY&&(t.alignY=.5)),t.speed!==i&&(e.console&&e.console.log&&e.console.log("jquery.backstretch: `speed` is deprecated, please use `transitionDuration`"),t.transitionDuration=t.speed,t.transition="fade"),t.resolutionChangeRatioTreshold!==i&&(e.console.log("jquery.backstretch: `treshold` is a typo!"),t.resolutionChangeRatioThreshold=t.resolutionChangeRatioTreshold),t.fadeFirst!==i&&(t.animateFirst=t.fadeFirst),t.fade!==i&&(t.transitionDuration=t.fade,t.transition="fade"),t.scale&&(t.scale=b(t.scale)),v(t)},v=function(t,e){return"left"===t.alignX?t.alignX=0:"center"===t.alignX?t.alignX=.5:"right"===t.alignX?t.alignX=1:(t.alignX!==i||e)&&(t.alignX=parseFloat(t.alignX),isNaN(t.alignX)&&(t.alignX=.5)),"top"===t.alignY?t.alignY=0:"center"===t.alignY?t.alignY=.5:"bottom"===t.alignY?t.alignY=1:(t.alignX!==i||e)&&(t.alignY=parseFloat(t.alignY),isNaN(t.alignY)&&(t.alignY=.5)),t},m={cover:"cover",fit:"fit","fit-smaller":"fit-smaller",fill:"fill"};function b(t){return m.hasOwnProperty(t)?t:"cover"}var w=function(i,r,a){this.options=t.extend({},t.fn.backstretch.defaults,a||{}),this.firstShow=!0,f(this.options,!0),this.images=y(t.isArray(r)?r:[r]),this.options.paused&&(this.paused=!0),this.options.start>=this.images.length&&(this.options.start=this.images.length-1),this.options.start<0&&(this.options.start=0),this.isBody=i===document.body;var o=t(e);this.$container=t(i),this.$root=this.isBody?A?o:t(document):this.$container,this.originalImages=this.images,this.images=u(this.options.alwaysTestWindowResolution?o:this.$root,this.originalImages),g(this.images,this.options.start||0,this.options.preload||1);var n=this.$container.children(".backstretch").first();if(this.$wrap=n.length?n:t('<div class="backstretch"></div>').css(this.options.bypassCss?{}:l.wrap).appendTo(this.$container),!this.options.bypassCss){if(!this.isBody){var s=this.$container.css("position"),h=this.$container.css("zIndex");this.$container.css({position:"static"===s?"relative":s,zIndex:"auto"===h?0:h}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&A?"fixed":"absolute"})}this.index=this.options.start,this.show(this.index),o.on("resize.backstretch",t.proxy(this.resize,this)).on("orientationchange.backstretch",t.proxy((function(){this.isBody&&0===e.pageYOffset&&(e.scrollTo(0,1),this.resize())}),this))};w.prototype={resize:function(){try{var a=log4javascript.getLogger("j1.core.attic"),o=this.options.alwaysTestWindowResolution?t(e):this.$root,n=o.width(),s=o.height(),h=n/(this._lastResizeContainerWidth||0),c=s/(this._lastResizeContainerHeight||0),d=this.options.resolutionChangeRatioThreshold||0;if((n!==this._lastResizeContainerWidth||s!==this._lastResizeContainerHeight)&&(Math.abs(h-1)>=d||isNaN(h)||Math.abs(c-1)>=d||isNaN(c))&&(this._lastResizeContainerWidth=n,this._lastResizeContainerHeight=s,this.images=u(o,this.originalImages),this.options.preload&&g(this.images,(this.index+1)%this.images.length,this.options.preload),1===this.images.length&&this._currentImage.url!==this.images[0].url)){var l=this;clearTimeout(l._selectAnotherResolutionTimeout),l._selectAnotherResolutionTimeout=setTimeout((function(){l.show(0)}),this.options.resolutionRefreshRate)}var p,y,f={left:0,top:0,right:"auto",bottom:"auto"},v=this.isBody?this.$root.width():this.$root.innerWidth(),m=this.isBody?e.innerHeight?e.innerHeight:this.$root.height():this.$root.innerHeight(),w=this.$itemWrapper.data("width"),_=this.$itemWrapper.data("height"),$=w/_||1,x=this._currentImage.alignX===i?this.options.alignX:this._currentImage.alignX,T=this._currentImage.alignY===i?this.options.alignY:this._currentImage.alignY,k=b(this._currentImage.scale||this.options.scale);if(this.options.debug&&(r="\nresize: boxHeight x boxWidth: "+m+" x "+v,a.debug(r)),"fit"===k||"fit-smaller"===k){if(y=_,(p=w)>v||y>m||"fit-smaller"===k){var W=v/m;W>$?(p=Math.floor(m*$),y=m):W<$?(p=v,y=Math.floor(v/$)):(p=v,y=m)}}else"fill"===k?(p=v,y=m):(p=Math.max(m*$,v),y=Math.max(p/$,m));f.top=-(y-m)*T,f.left=-(p-v)*x,f.width=p,f.height=y,this.options.bypassCss||this.$wrap.css({width:v,height:m}).find(">.backstretch-item").not(".deleteable").each((function(){t(this).find("img,video,iframe").css(f)}));var I=t.Event("backstretch.resize",{relatedTarget:this.$container[0]});this.$container.trigger(I,this)}catch(t){r="resize: jadams, IE7 hack to let it fail gracefully: "+t,a.warn(r)}return this},show:function(e,r){var a=log4javascript.getLogger("j1.core.attic");if(!(Math.abs(e)>this.images.length-1)){var o=this,n=o.$wrap.find(">.backstretch-item").addClass("deleteable"),s=o.videoWrapper,h={relatedTarget:o.$container[0]};o.$container.trigger(t.Event("backstretch.before",h),[o,e]),this.index=e;var c=o.images[e];clearTimeout(o._cycleTimeout),delete o.videoWrapper;var d=p(c);return d?(o.videoWrapper=new _(c),o.$item=o.videoWrapper.$video.css("pointer-events","none")):o.$item=t("<img />"),o.$itemWrapper=t('<div class="backstretch-item">').append(o.$item),this.options.bypassCss?o.$itemWrapper.css({display:"none"}):(o.$itemWrapper.css(l.itemWrapper),o.$item.css(l.item)),o.$item.bind(d?"canplay":"load",(function(c){var l=t(this).parent(),u=l.data("options");r&&(u=t.extend({},u,r));var p=this.naturalWidth||this.videoWidth||this.width,g=this.naturalHeight||this.videoHeight||this.height;l.data("width",p).data("height",g);var y=function(t){return u[t]!==i?u[t]:o.options[t]},f=y("transition"),v=y("transitionEasing"),m=y("transitionDuration"),b=function(){s&&(s.stop(),s.destroy()),n.remove(),!o.paused&&o.images.length>1&&o.cycle(),!o.options.bypassCss&&o.isBody,t(["before","after","show"]).each((function(){o.$container.trigger(t.Event("backstretch."+this,h),[o,e])})),d&&o.videoWrapper.play()};o.firstShow&&!o.options.animateFirst||!m||!f?(l.show(),b()):function(e){var r=e.transition||"fade";"string"==typeof r&&r.indexOf("|")>-1&&(r=r.split("|")),r instanceof Array&&(r=r[Math.round(Math.random()*(r.length-1))]);var a=e.new,o=e.old?e.old:t([]);switch(r.toString().toLowerCase()){default:case"fade":a.fadeIn({duration:e.duration,complete:e.complete,easing:e.easing||i});break;case"fadeinout":case"fade_in_out":var n=function(){a.fadeIn({duration:e.duration/2,complete:e.complete,easing:e.easing||i})};o.length?o.fadeOut({duration:e.duration/2,complete:n,easing:e.easing||i}):n();break;case"pushleft":case"push_left":case"pushright":case"push_right":case"pushup":case"push_up":case"pushdown":case"push_down":case"coverleft":case"cover_left":case"coverright":case"cover_right":case"coverup":case"cover_up":case"coverdown":case"cover_down":var s=r.match(/^(cover|push)_?(.*)$/),h="left"===s[2]?"right":"right"===s[2]?"left":"down"===s[2]?"top":"up"===s[2]?"bottom":"right",c={display:""},d={};if(c[h]="-100%",d[h]=0,a.css(c).animate(d,{duration:e.duration,complete:function(){a.css(h,""),e.complete.apply(this,arguments)},easing:e.easing||i}),"push"===s[1]&&o.length){var l={};l[h]="100%",o.animate(l,{duration:e.duration,complete:function(){o.css("display","none")},easing:e.easing||i})}}}({new:l,old:n,transition:f,duration:m,easing:v,complete:b}),o.firstShow=!1;var w=this.naturalWidth||this.videoWidth||this.width,_="show: imageHeight x imageWidth: "+(this.naturalHeight||this.videoHeight||this.height)+" x "+w;o.options.debug&&a.debug(_);var $="#"+o.$container[0].id,x=setInterval((function(){t($).is(":visible")&&(a.debug("\ncontainer visible on id: "+$),o.resize(),clearInterval(x))}),10)})),o.$itemWrapper.appendTo(o.$wrap),o.$item.attr("alt",c.alt||""),o.$itemWrapper.data("options",c),d||o.$item.attr("src",c.url),o._currentImage=c,o}},current:function(){return this.index},next:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(this.index<this.images.length-1?this.index+1:0),this.show.apply(this,t)},prev:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(0===this.index?this.images.length-1:this.index-1),this.show.apply(this,t)},pause:function(){return this.paused=!0,this.videoWrapper&&this.videoWrapper.pause(),this},resume:function(){return this.paused=!1,this.videoWrapper&&this.videoWrapper.play(),this.cycle(),this},cycle:function(){if(this.images.length>1){clearTimeout(this._cycleTimeout);var e=this._currentImage&&this._currentImage.duration||this.options.duration,i=p(this._currentImage),r=function(){this.$item.off(".cycle"),this.paused||this.next()};if(i){if(!this._currentImage.loop){var a=0;this.$item.on("playing.cycle",(function(){var e=t(this).data("player");clearTimeout(a),void 0!==e&&(a=setTimeout((function(){e.pause(),e.$video.trigger("ended")}),1e3*(e.getDuration()-e.getCurrentTime())))})).on("ended.cycle",(function(){clearTimeout(a)}))}this.$item.on("error.cycle initerror.cycle",t.proxy(r,this))}i&&!this._currentImage.duration?this.$item.on("ended.cycle",t.proxy(r,this)):this._cycleTimeout=setTimeout(t.proxy(r,this),e)}return this},destroy:function(i){t(e).off("resize.backstretch orientationchange.backstretch"),this.videoWrapper&&this.videoWrapper.destroy(),clearTimeout(this._cycleTimeout),i||this.$wrap.remove(),this.$container.removeData("backstretch")}};var _=function(){this.init.apply(this,arguments)};_.prototype.init=function(r){var o,n=this,s=function(){n.$video=o,n.video=o[0]},h="video";if(r.url instanceof Array||!a.test(r.url)||(h="youtube"),n.type=h,"youtube"===h){_.loadYoutubeAPI(),n.ytId=r.url.match(a)[2];var c="https://www.youtube.com/embed/"+n.ytId+"?rel=0&autoplay=0&showinfo=0&controls=0&modestbranding=1&cc_load_policy=0&disablekb=1&iv_load_policy=3&loop=0&enablejsapi=1&origin="+encodeURIComponent(e.location.origin);n.__ytStartMuted=!!r.mute||r.mute===i,o=t("<iframe />").attr({src_to_load:c}).css({border:0,margin:0,padding:0}).data("player",n),r.loop&&o.on("ended.loop",(function(){n.__manuallyStopped||n.play()})),n.ytReady=!1,s(),e.YT?(n._initYoutube(),o.trigger("initsuccess")):t(e).one("youtube_api_load",(function(){n._initYoutube(),o.trigger("initsuccess")}))}else{o=t("<video>").prop("autoplay",!1).prop("controls",!1).prop("loop",!!r.loop).prop("muted",!!r.mute||r.mute===i).prop("preload","auto").prop("poster",r.poster||"");for(var d=r.url instanceof Array?r.url:[r.url],l=0;l<d.length;l++){var u=d[l];"string"==typeof u&&(u={src:u}),t("<source>").attr("src",u.src).attr("type",u.type||null).appendTo(o)}o[0].canPlayType&&d.length?o.trigger("initsuccess"):o.trigger("initerror"),s()}},_.prototype._initYoutube=function(){var i=this,r=e.YT;i.$video.attr("src",i.$video.attr("src_to_load")).removeAttr("src_to_load");var a=!!i.$video[0].parentNode;if(!a){var o=t("<div>").css("display","none !important").appendTo(document.body);i.$video.appendTo(o)}var n=new r.Player(i.video,{events:{onReady:function(){i.__ytStartMuted&&n.mute(),a||(i.$video[0].parentNode===o[0]&&i.$video.detach(),o.remove()),i.ytReady=!0,i._updateYoutubeSize(),i.$video.trigger("canplay")},onStateChange:function(t){switch(t.data){case r.PlayerState.PLAYING:i.$video.trigger("playing");break;case r.PlayerState.ENDED:i.$video.trigger("ended");break;case r.PlayerState.PAUSED:i.$video.trigger("pause");break;case r.PlayerState.BUFFERING:i.$video.trigger("waiting");break;case r.PlayerState.CUED:i.$video.trigger("canplay")}},onPlaybackQualityChange:function(){i._updateYoutubeSize(),i.$video.trigger("resize")},onError:function(t){i.hasError=!0,i.$video.trigger({type:"error",error:t})}}});return i.ytPlayer=n,i},_.prototype._updateYoutubeSize=function(){var t=this;switch(t.ytPlayer.getPlaybackQuality()||"medium"){case"small":t.video.videoWidth=426,t.video.videoHeight=240;break;case"medium":t.video.videoWidth=640,t.video.videoHeight=360;break;default:case"large":t.video.videoWidth=854,t.video.videoHeight=480;break;case"hd720":t.video.videoWidth=1280,t.video.videoHeight=720;break;case"hd1080":t.video.videoWidth=1920,t.video.videoHeight=1080;break;case"highres":t.video.videoWidth=2560,t.video.videoHeight=1440}return t},_.prototype.play=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&(t.$video.trigger("play"),t.ytPlayer.playVideo()):t.video.play(),t},_.prototype.pause=function(){var t=this;return t.__manuallyStopped=!1,"youtube"===t.type?t.ytReady&&t.ytPlayer.pauseVideo():t.video.pause(),t},_.prototype.stop=function(){var t=this;return t.__manuallyStopped=!0,"youtube"===t.type?t.ytReady&&(t.ytPlayer.pauseVideo(),t.ytPlayer.seekTo(0)):(t.video.pause(),t.video.currentTime=0),t},_.prototype.destroy=function(){var t=this;return t.ytPlayer&&t.ytPlayer.destroy(),t.$video.remove(),t},_.prototype.getCurrentTime=function(t){var e=this;return"youtube"!==e.type?e.video.currentTime:e.ytReady?e.ytPlayer.getCurrentTime():0},_.prototype.setCurrentTime=function(t){var e=this;return"youtube"===e.type?e.ytReady&&e.ytPlayer.seekTo(t,!0):e.video.currentTime=t,e},_.prototype.getDuration=function(){var t=this;return"youtube"!==t.type?t.video.duration:t.ytReady?t.ytPlayer.getDuration():0},_.loadYoutubeAPI=function(){if(!e.YT){t("script[src*=www\\.youtube\\.com\\/iframe_api]").length||t('<script type="text/javascript" src="https://www.youtube.com/iframe_api">').appendTo("body");var i=setInterval((function(){e.YT&&e.YT.loaded&&(t(e).trigger("youtube_api_load"),clearTimeout(i))}),10)}};var $,x,T,k,W,I,R,Y,P,C,z=function(){if("matchMedia"in e){if(e.matchMedia("(orientation: portrait)").matches)return"portrait";if(e.matchMedia("(orientation: landscape)").matches)return"landscape"}return screen.height>screen.width?"portrait":"landscape"},S=function(){return e.innerHeight>e.innerWidth?"portrait":e.innerWidth>e.innerHeight?"landscape":"square"},A=($=navigator.userAgent,x=navigator.platform,T=$.match(/AppleWebKit\/([0-9]+)/),k=!!T&&T[1],W=$.match(/Fennec\/([0-9]+)/),I=!!W&&W[1],R=$.match(/Opera Mobi\/([0-9]+)/),Y=!!R&&R[1],P=$.match(/MSIE ([0-9]+)/),C=!!P&&P[1],!((x.indexOf("iPhone")>-1||x.indexOf("iPad")>-1||x.indexOf("iPod")>-1)&&k&&k<534||e.operamini&&"[object OperaMini]"==={}.toString.call(e.operamini)||R&&Y<7458||$.indexOf("Android")>-1&&k&&k<533||I&&I<6||"palmGetResource"in e&&k&&k<534||$.indexOf("MeeGo")>-1&&$.indexOf("NokiaBrowser/8.5.0")>-1||C&&C<=6))}(jQuery,window);
@@ -99,7 +99,7 @@
99
99
  logger.info('\n' + 'translate: started');
100
100
  clearInterval(dependencies_met_page_ready);
101
101
  }
102
- }, 25);
102
+ }, 10);
103
103
  },
104
104
 
105
105
  // decryptData: function (message = '', key = '', iv = '') {
@@ -15,4 +15,4 @@
15
15
  # See: https://www.dotnetcurry.com/jquery/1069/authoring-jquery-plugins
16
16
  # -----------------------------------------------------------------------------
17
17
  */
18
- (function(e,c,a,g){var d="deeplAPI",f={api:"free",auth_key:"",source_lang:"auto",target_lang:"DE",max_chars:false,split_sentences:"1",preserve_formatting:"0",formality:"default",tag_handling:false,outline_detection:true,non_splitting_tags:false,splitting_tags:false,ignore_tags:false,onInit:function(){},onBeforeTranslation:function(){},onAfterTranslation:function(){}};function b(i,h){this.element=i;this.settings=e.extend({},f,h);this.settings.elementID="#"+this.element.id;this.xhr=new XMLHttpRequest();this.init(this.settings)}e.extend(b.prototype,{init:function(q){var k=this;var o=log4javascript.getLogger("deeplAPI.init");var h="/assets/data/private.json";var i=q;var m;var p;var j;var l;o.info("\ninitialize: started");e.ajax({url:h,dataType:"text",success:function(r){p=atob(r);l=JSON.parse(p);m=l.translators.deepl.auth_key},error:function(r,t,s){o.error("\nfailed to retrieve JSON data from: "+h)}});var n=setInterval(function(){if(typeof m!=="undefined"){i.auth_key=m;k.translate(i);o.info("\ninitialize: finished");o.info("\ntranslate: started");clearInterval(n)}})},prepareXHR:function(h){if(h.api==="free"){this.xhr.open("POST","https://api-free.deepl.com/v2/translate",true)}else{if(h.api==="pro"){this.xhr.open("POST","https://api.deepl.com/v2/translate",true)}else{this.xhr.open("POST","https://api-free.deepl.com/v2/translate",true)}}this.xhr.setRequestHeader("Accept","*/*");this.xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded")},prepareText:function(h){return h.split("\n")},translate:function(C){const H=log4javascript.getLogger("deeplAPI.translate");const n=4;const t=200;const u=["BG","CS","DA","DE","EL","EN-GB","EN-US","EN","ES","ET","FI","FR","HU","IT","JA","LT","LV","NL","PL","PT-PT","PT-BR","PT","RO","RU","SK","SL","SV","ZH"];const h=["DE","FR","IT","ES","NL","PL","PT","PT-BR","RU"];const r=["xml"];const w=C.targetElement;const q=e(w).length;const D="Translation failed.\nReason: ";const o="Translation skipped.\nReason: ";var y;var F;var v;var x={};x["400"]="Bad request. Please check error message and your parameters.";x["401"]="Authorization failed. Please supply a valid DeepL-Auth-Key.";x["403"]="Forbidden. The access to the requested resource is denied, because of insufficient access rights.";x["404"]="The requested resource could not be found.";x["413"]="The request size exceeds the limit.";x["415"]="The requested entries format specified in the Accept header is not supported.";x["429"]="Too many requests. Please wait and resend your request.";x["456"]="Quota exceeded. The maximum amount of glossaries has been reached.";x["500"]="Internal server error";x["503"]="Resource currently unavailable. Try again later.";x["529"]="Too many requests. Please wait and resend your request.";var l;var k="";var j="";var B="";var E="";var m;var G;if(q){y=(w.includes(".")||w.includes("#"))?w.substring(1):w;F=e(w).get(0).nodeName;if(F==="TEXTAREA"){B=this.element.value}else{if(F==="P"){j=this.element;B=e(w).text()}}v=B.length}else{H.error("\ntarget element does not exists: "+w);return false}if(C.max_char&&B.length>C.max_char){var s=B.substring(0,C.max_char-3);B=s+" ...";H.info("\nlimit for source text (max: "+C.max_char+") reached: "+B.length)}E=this.prepareText(B);this.prepareXHR(C);var p="";for(var A=0;A<E.length;A++){p+="&text="+E[A]}this.xhr.onload=function(){if(this.readyState===n){if(this.status===t){var I=JSON.parse(this.responseText);var J="";for(var K=0;K<I.translations.length;K++){J+=I.translations[K].text;J+="\n"}H.info("\ntranslation: finished");if(F==="TEXTAREA"){e(w).val(J)}else{if(F==="P"){e(w).text(J)}}}else{H.error("\nAPI returned "+this.status+": "+x[this.status])}}};m=this.settings.source_lang;G=this.settings.target_lang;if(this.settings.source_lang!=="auto"){this.settings.source_lang=(u.indexOf(this.settings.source_lang)>-1)?this.settings.source_lang:false}this.settings.target_lang=(u.indexOf(this.settings.target_lang)>-1)?this.settings.target_lang:false;if(!this.settings.auth_key||!this.settings.source_lang||!this.settings.target_lang){if(!this.settings.auth_key){l="NO AUTH key passed.";H.error("\ninvalid option found. "+l)}if(!this.settings.source_lang){l="WRONG source language passed: "+m;H.error("\ninvalid option found. "+l)}if(!this.settings.target_lang){l="WRONG target language passed: "+G;H.error("\ninvalid option found. "+l)}if(F==="TEXTAREA"){e(w).val(D+l)}else{if(F==="P"){e(w).text(D+l)}}return false}if(!v){l="NO text found for translation";if(F==="TEXTAREA"){e(w).val(o+l)}else{if(F==="P"){e(w).text(o+l)}}H.warn("\nno text found for translation");return false}if(this.settings.formality!=="default"){if(!(h.indexOf(this.settings.target_lang)>-1)){H.warn("\nwrong language found for formality setting: "+this.settings.target_lang)}this.settings.formality=(h.indexOf(this.settings.target_lang)>-1)?this.settings.formality:"default"}if(this.settings.tag_handling){var z=this.settings.tag_handling;this.settings.tag_handling=(r.indexOf(this.settings.tag_handling)>-1)?this.settings.tag_handling:false;if(this.settings.tag_handling){this.settings.non_splitting_tags=this.settings.non_splitting_tags?encodeURIComponent(this.settings.non_splitting_tags):false;this.settings.splitting_tags=this.settings.splitting_tags?encodeURIComponent(this.settings.splitting_tags):false;this.settings.ignore_tags=this.settings.ignore_tags?encodeURIComponent(this.settings.ignore_tags):false}else{H.error("\ninvalid option found for tag handling : "+z);H.warn("\ndisable option: tag_handling");if(this.settings.non_splitting_tags){H.warn("\ndisable option: "+this.settings.non_splitting_tags);this.settings.non_splitting_tags=false}if(this.settings.splitting_tags){H.warn("\ndisable option : "+this.settings.splitting_tags);this.settings.splitting_tags=false}if(this.settings.ignore_tags){H.warn("\ndisable option: "+this.settings.ignore_tags);this.settings.ignore_tags=false}}}else{if(this.settings.non_splitting_tags){H.warn("\ninvalid option found: "+this.settings.non_splitting_tags);this.settings.non_splitting_tags=false}if(this.settings.splitting_tags){H.warn("\ninvalid option found: "+this.settings.splitting_tags);this.settings.splitting_tags=false}if(this.settings.ignore_tags){H.warn("\ninvalid option found: "+this.settings.ignore_tags);this.settings.ignore_tags=false}}k="auth_key="+this.settings.auth_key;k+=(this.settings.source_lang!=="auto")?"&source_lang="+this.settings.source_lang:"";k+="&target_lang="+this.settings.target_lang;k+=(this.settings.formality!=="default")?"&formality="+this.settings.formality:"";k+=(this.settings.split_sentences)?"&split_sentences="+this.settings.formality:"";k+=(this.settings.tag_handling)?"&tag_handling="+this.settings.tag_handling:"&tag_handling=0";k+=(this.settings.tag_handling&&this.settings.non_splitting_tags)?"&non_splitting_tags="+this.settings.non_splitting_tags:"";k+=(this.settings.tag_handling&&this.settings.splitting_tags)?"&splitting_tags="+this.settings.splitting_tags:"";k+=(this.settings.tag_handling&&this.settings.ignore_tags)?"&ignore_tags="+this.settings.ignore_tags:"";k+=p;this.xhr.send(k)}});e.fn[d]=function(i){var h=arguments;if(i===g||typeof i==="object"){return this.each(function(){if(!e.data(this,"plugin_"+d)){e.data(this,"plugin_"+d,new b(this,i))}})}else{if(typeof i==="string"&&i[0]!=="_"&&i!=="init"){var j;this.each(function(){var k=e.data(this,"plugin_"+d);if(k instanceof b&&typeof k[i]==="function"){j=k[i].apply(k,Array.prototype.slice.call(h,1))}if(i==="destroy"){e.data(this,"plugin_"+d,null)}});return j!==g?j:this}}}})(jQuery,window,document);
18
+ !function(t,s,n,e){"use strict";var i="deeplAPI",a={api:"free",auth_key:"",source_lang:"auto",target_lang:"DE",max_chars:!1,split_sentences:"1",preserve_formatting:"0",formality:"default",tag_handling:!1,outline_detection:!0,non_splitting_tags:!1,splitting_tags:!1,ignore_tags:!1,onInit:function(){},onBeforeTranslation:function(){},onAfterTranslation:function(){}};function g(s,n){this.element=s,this.settings=t.extend({},a,n),this.settings.elementID="#"+this.element.id,this.xhr=new XMLHttpRequest,this.init(this.settings)}t.extend(g.prototype,{init:function(s){var n,e,i,a=this,g=log4javascript.getLogger("deeplAPI.init"),r="/assets/data/private.json",o=s;g.info("\ninitialize: started"),t.ajax({url:r,dataType:"text",success:function(t){n=(i=JSON.parse(e=atob(t))).translators.deepl.auth_key},error:function(t,s,n){g.error("\nfailed to retrieve JSON data from: "+r)}});var l=setInterval(function(){void 0!==n&&(o.auth_key=n,a.translate(o),g.info("\ninitialize: finished"),g.info("\ntranslate: started"),clearInterval(l))},10)},prepareXHR:function(t){"free"===t.api?this.xhr.open("POST","https://api-free.deepl.com/v2/translate",!0):"pro"===t.api?this.xhr.open("POST","https://api.deepl.com/v2/translate",!0):this.xhr.open("POST","https://api-free.deepl.com/v2/translate",!0),this.xhr.setRequestHeader("Accept","*/*"),this.xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded")},prepareText:function(t){return t.split("\n")},translate:function(s){let n=log4javascript.getLogger("deeplAPI.translate"),e=["BG","CS","DA","DE","EL","EN-GB","EN-US","EN","ES","ET","FI","FR","HU","IT","JA","LT","LV","NL","PL","PT-PT","PT-BR","PT","RO","RU","SK","SL","SV","ZH"],i=["DE","FR","IT","ES","NL","PL","PT","PT-BR","RU"],a=s.targetElement,g=t(a).length,r="Translation failed.\nReason: ",o="Translation skipped.\nReason: ";var l,h,d,u,p,f,c={};c["400"]="Bad request. Please check error message and your parameters.",c["401"]="Authorization failed. Please supply a valid DeepL-Auth-Key.",c["403"]="Forbidden. The access to the requested resource is denied, because of insufficient access rights.",c["404"]="The requested resource could not be found.",c["413"]="The request size exceeds the limit.",c["415"]="The requested entries format specified in the Accept header is not supported.",c["429"]="Too many requests. Please wait and resend your request.",c["456"]="Quota exceeded. The maximum amount of glossaries has been reached.",c["500"]="Internal server error",c["503"]="Resource currently unavailable. Try again later.",c["529"]="Too many requests. Please wait and resend your request.";var m="",x="",T="",y="";if(!g)return n.error("\ntarget element does not exists: "+a),!1;l=a.includes(".")||a.includes("#")?a.substring(1):a,"TEXTAREA"===(h=t(a).get(0).nodeName)?T=this.element.value:"P"===h&&(x=this.element,T=t(a).text()),d=T.length,s.max_char&&T.length>s.max_char&&(T=T.substring(0,s.max_char-3)+" ...",n.info("\nlimit for source text (max: "+s.max_char+") reached: "+T.length)),y=this.prepareText(T),this.prepareXHR(s);for(var v="",_=0;_<y.length;_++)v+="&text="+y[_];if(this.xhr.onload=function(){if(4===this.readyState){if(200===this.status){for(var s=JSON.parse(this.responseText),e="",i=0;i<s.translations.length;i++)e+=s.translations[i].text,e+="\n";n.info("\ntranslation: finished"),"TEXTAREA"===h?t(a).val(e):"P"===h&&t(a).text(e)}else n.error("\nAPI returned "+this.status+": "+c[this.status])}},p=this.settings.source_lang,f=this.settings.target_lang,"auto"!==this.settings.source_lang&&(this.settings.source_lang=e.indexOf(this.settings.source_lang)>-1&&this.settings.source_lang),this.settings.target_lang=e.indexOf(this.settings.target_lang)>-1&&this.settings.target_lang,!this.settings.auth_key||!this.settings.source_lang||!this.settings.target_lang)return this.settings.auth_key||(u="NO AUTH key passed.",n.error("\ninvalid option found. "+u)),this.settings.source_lang||(u="WRONG source language passed: "+p,n.error("\ninvalid option found. "+u)),this.settings.target_lang||(u="WRONG target language passed: "+f,n.error("\ninvalid option found. "+u)),"TEXTAREA"===h?t(a).val(r+u):"P"===h&&t(a).text(r+u),!1;if(!d)return u="NO text found for translation","TEXTAREA"===h?t(a).val(o+u):"P"===h&&t(a).text(o+u),n.warn("\nno text found for translation"),!1;if("default"!==this.settings.formality&&(i.indexOf(this.settings.target_lang)>-1||n.warn("\nwrong language found for formality setting: "+this.settings.target_lang),this.settings.formality=i.indexOf(this.settings.target_lang)>-1?this.settings.formality:"default"),this.settings.tag_handling){var $=this.settings.tag_handling;this.settings.tag_handling=["xml"].indexOf(this.settings.tag_handling)>-1&&this.settings.tag_handling,this.settings.tag_handling?(this.settings.non_splitting_tags=!!this.settings.non_splitting_tags&&encodeURIComponent(this.settings.non_splitting_tags),this.settings.splitting_tags=!!this.settings.splitting_tags&&encodeURIComponent(this.settings.splitting_tags),this.settings.ignore_tags=!!this.settings.ignore_tags&&encodeURIComponent(this.settings.ignore_tags)):(n.error("\ninvalid option found for tag handling : "+$),n.warn("\ndisable option: tag_handling"),this.settings.non_splitting_tags&&(n.warn("\ndisable option: "+this.settings.non_splitting_tags),this.settings.non_splitting_tags=!1),this.settings.splitting_tags&&(n.warn("\ndisable option : "+this.settings.splitting_tags),this.settings.splitting_tags=!1),this.settings.ignore_tags&&(n.warn("\ndisable option: "+this.settings.ignore_tags),this.settings.ignore_tags=!1))}else this.settings.non_splitting_tags&&(n.warn("\ninvalid option found: "+this.settings.non_splitting_tags),this.settings.non_splitting_tags=!1),this.settings.splitting_tags&&(n.warn("\ninvalid option found: "+this.settings.splitting_tags),this.settings.splitting_tags=!1),this.settings.ignore_tags&&(n.warn("\ninvalid option found: "+this.settings.ignore_tags),this.settings.ignore_tags=!1);m="auth_key="+this.settings.auth_key,m+="auto"!==this.settings.source_lang?"&source_lang="+this.settings.source_lang:"",m+="&target_lang="+this.settings.target_lang,m+="default"!==this.settings.formality?"&formality="+this.settings.formality:"",m+=this.settings.split_sentences?"&split_sentences="+this.settings.formality:"",m+=this.settings.tag_handling?"&tag_handling="+this.settings.tag_handling:"&tag_handling=0",m+=this.settings.tag_handling&&this.settings.non_splitting_tags?"&non_splitting_tags="+this.settings.non_splitting_tags:"",m+=this.settings.tag_handling&&this.settings.splitting_tags?"&splitting_tags="+this.settings.splitting_tags:"",m+=this.settings.tag_handling&&this.settings.ignore_tags?"&ignore_tags="+this.settings.ignore_tags:"",m+=v,this.xhr.send(m)}}),t.fn[i]=function(s){var n,a=arguments;return s===e||"object"==typeof s?this.each(function(){t.data(this,"plugin_"+i)||t.data(this,"plugin_"+i,new g(this,s))}):"string"==typeof s&&"_"!==s[0]&&"init"!==s?(this.each(function(){var e=t.data(this,"plugin_"+i);e instanceof g&&"function"==typeof e[s]&&(n=e[s].apply(e,Array.prototype.slice.call(a,1))),"destroy"===s&&t.data(this,"plugin_"+i,null)}),n!==e?n:this):void 0}}(jQuery,window,document);
@@ -0,0 +1,266 @@
1
+
2
+ # Universal Icon Picker
3
+
4
+ ![Language: Vanilla JS](https://img.shields.io/badge/-vanilla%20js-555?logo=JavaScript)
5
+ ![Dependencies: none](https://img.shields.io/badge/dependencies-none-04B54E)
6
+ ![GitHub file size in bytes](https://img.shields.io/github/size/migliori/universal-icon-picker/assets/js/universal-icon-picker.min.js)
7
+ [![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)
8
+
9
+ Nice small Javascript **Icon Picker for any icon library**
10
+
11
+ *Vanilla Javascript* - *No dependency* - *2.6ko gzipped*
12
+
13
+ Originally forked from [aesthetic-icon-picker](https://github.com/sh-sabbir/aesthetic-icon-picker/tree/20d6aa6134311b44891809cc852dbf247a029495)
14
+
15
+ ## Demo
16
+
17
+ [https://universal-icon-picker.miglisoft.com](https://universal-icon-picker.miglisoft.com)
18
+
19
+ ## Features
20
+
21
+ - Load any icon library from a single JSON file
22
+ - Load the icon fonts stylesheets from local files or CDNs
23
+ - Autoload the icon fonts (JSON + stylesheets) or load them only on request
24
+ - Add as many icon libraries as you like to each instance of the plugin
25
+ - Create multiple instances and triggers on the same page
26
+ - Change the icon libraries attached to an instance whenever you want
27
+ - Group icons of the same family by categories
28
+ - Load one or more styles from the same icon family individually
29
+ - Search / Filter icons
30
+ - Built-in `onSelect()` and `onReset()` callback functions
31
+ - Attach the Icon Picker to any HTML element
32
+ - Add your favourite icon libraries very easily
33
+
34
+ ## Integrated icon libraries
35
+
36
+ ### Font Awesome
37
+
38
+ - All
39
+ - Solid
40
+ - Regular
41
+ - Brands
42
+
43
+ ### Material Icons
44
+
45
+ - Filled
46
+ - Outlined
47
+ - Round
48
+ - Sharp
49
+ - Two-tone
50
+
51
+ ### Other icon libraries
52
+
53
+ - Bootstrap Icons
54
+ - Elegant Icons
55
+ - Feather Icons
56
+ - Fomantic UI Icons
57
+ - Foundation Icons
58
+ - Happy Icons
59
+ - Icomoon
60
+ - Open-iconic
61
+ - Tabler Icons
62
+ - Weather Icons
63
+ - Zondicons
64
+
65
+ ## Installation
66
+
67
+ Clone / download or install with npm
68
+
69
+ ```bash
70
+ npm install @migliori/universal-icon-picker@1.1.6
71
+ ```
72
+
73
+ ## Usage/Examples
74
+
75
+ ```html
76
+ <!DOCTYPE html>
77
+ <html lang="en">
78
+
79
+ <head>
80
+ <meta charset="UTF-8">
81
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
82
+ </head>
83
+
84
+ <body>
85
+ <button id="selector" title="Open the icon picker">Click to open</button>
86
+ <script src="universal-icon-picker/assets/js/universal-icon-picker.min.js"></script>
87
+
88
+ <script>
89
+ document.addEventListener('DOMContentLoaded', function(event) {
90
+ var uip = new UniversalIconPicker('#selector', options);
91
+ });
92
+ </script>
93
+
94
+ </body>
95
+
96
+ </html>
97
+ ```
98
+
99
+ ## Options
100
+
101
+ | option | type | value |
102
+ |------------------|------------|----------------------------------------------------------------------------------------------------------------------------------------|
103
+ | allowEmpty | *Boolean* | Add an empty icon selector in the beginning of each icon list.<br />Default: true |
104
+ | iconLibraries | *Array* | Array of JSON icon libraries in `assets/icons-libraries`.<br />Default: `null` |
105
+ | iconLibrariesCss | *Array* | Array of CSS icon libraries in `assets/stylesheets` or from any CDN. Leave empty if your page already loads them.<br />Default: `null` |
106
+ | mode | *String* | `'autoload'` or `'onrequest'`. Default: `'autoload'` |
107
+ | onReset | *Function* | Callback function when the user clicks the `reset` button.<br />Default: `null` |
108
+ | onSelect | *Function* | Callback function when the user clicks the `insert` button.<br />Default: `null` |
109
+ | resetSelector | *String* | Selector for the HTML *reset* button on your page.<br />Default: `null` |
110
+ | loadCustomCss | *Boolean* | If true, universal icon picker does **not** load its own css allowing for custom css. Default: `false` |
111
+ ## Configuring loaded assets
112
+
113
+ Universtal icon picker will retrieve some assets from the server based on where ths script itself was retrieved from (`assets/js/universal-icon-picker.min.js`) :
114
+
115
+ 1. Icons from the `assets/images`folder
116
+ 2. Icon library json files from the `assets/icon-libraries` folder
117
+
118
+ Also, the naming of the library names in the sidebar is derived from their file name in `assets/icon-libraries`.
119
+
120
+ In most cases this will just work fine. For some installations, however, you need to adjust the exact paths from where to retrieve those assets.
121
+
122
+ ### Configuring icon assets
123
+
124
+ Three option settings overwrite the paths for the three icons used:
125
+
126
+ | option | type | value |
127
+ |------------------|----------|------------------------------------------------------|
128
+ | closeUrl | *String* | Path of the close button icon (some type of "x") |
129
+ | starUrl | *String* | Path of the star icon for the side bar |
130
+ | searchUrl | *String* | Path of the magnifying glass icon for the search bar |
131
+
132
+ ### Configuring library assets
133
+
134
+ Library assets are defined by `iconLibraries`. If the library does include a slash (`/`) it is assumed to be an URL or path of the library's json file. If it does not include a slash the library is searched for in the `assets/icon-libraries` folder.
135
+
136
+
137
+
138
+ ### Example
139
+
140
+ ```javascript
141
+ const options = {
142
+ iconLibraries: [
143
+ 'happy-icons.min.json',
144
+ 'font-awesome.min.json'
145
+ ],
146
+ iconLibrariesCss: [
147
+ 'happy-icons.min.css',
148
+ 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css'
149
+ ],
150
+ resetSelector: '#uip-reset-btn',
151
+ onSelect: function(jsonIconData) {
152
+ document.getElementById('output-icon').innerHTML = jsonIconData.iconMarkup;
153
+
154
+ console.log(jsonIconData);
155
+ /* will output something like:
156
+ {
157
+ "libraryId": "fa-solid",
158
+ "libraryName": "fontAwesome",
159
+ "iconHtml": "<i class=\"fa-solid fa-oil-can\"></i>",
160
+ "iconMarkup": "&lt;i class=&quot;fa-solid fa-oil-can&quot;&gt;&lt;/i&gt;",
161
+ "iconClass": "fa-solid fa-oil-can",
162
+ "iconText": ""
163
+ }
164
+ */
165
+ },
166
+ onReset: function() {
167
+ document.getElementById('output-icon').innerHTML = '';
168
+ }
169
+ }
170
+
171
+ // Instanciate the Icon Picker
172
+ var uip = new UniversalIconPicker('#selector', options);
173
+ ```
174
+
175
+ See the source code of the [demo](https://universal-icon-picker.miglisoft.com) for more examples
176
+
177
+ ## Public methods
178
+
179
+ - ### setOptions(options)
180
+
181
+ Update the *options* of an Icon Picker instance
182
+
183
+ Example:
184
+
185
+ ```javascript
186
+ // Instanciate the Icon Picker
187
+
188
+ var uip = new UniversalIconPicker('#selector', options);
189
+
190
+ // later, change the icon libraries
191
+ uip.setOptions({
192
+ iconLibraries: ['weather-icons.min.json'],
193
+ iconLibrariesCss: ['weather-icons.min.css']
194
+ });
195
+
196
+ ```
197
+
198
+ Live demo: [https://universal-icon-picker.miglisoft.com/demo/demo-4.html](https://universal-icon-picker.miglisoft.com/demo/demo-4.html)
199
+
200
+ ## Change / Upgrade Fontawesome version & icons
201
+
202
+ A built-in tool is provided to get the Fontawesome icon list from the Fontawesome API and for Bootstrap icons to scrape the Bootstrap icon list from their website.
203
+
204
+ To choose the Fontawesome version:
205
+
206
+ 1. open `tools/fontawesome-icons-list.html` in your code editor and change the version number:
207
+
208
+ ```html
209
+ // set the fontawesome version version here
210
+ const fontawesomeVersion = '6.0.0';
211
+ ```
212
+
213
+ 2. open it in your browser to retrieve the JSON list
214
+
215
+ 3. save the complete list in `assets/icon-libraries/font-awesome.json` and each style (brands, regular, solid) in the appropriate json file (`assets/icon-libraries/font-awesome-brands.json`, ...)
216
+
217
+ 4. minify the json files to `.min.json`
218
+
219
+ For Bootstrap icons use `tools/bootstrap-icons-list.html`. It scrapes the latest version from the website. You will need to add the version number manually to the generated json file.
220
+
221
+ ## Screenshots
222
+
223
+ ![Universal Icon Picker Screenshot](https://universal-icon-picker.miglisoft.com/demo/assets/images/screenshot.png)
224
+
225
+ ## Contributing
226
+
227
+ Contributions are always welcome!
228
+
229
+ Please contact us for any improvement suggestions or send your pull requests
230
+
231
+ ## Changelog
232
+
233
+ 2022/02/23
234
+
235
+ - First release
236
+ - fix icon selections when changing the icon library programatically with setOptions()
237
+ - update README
238
+
239
+ 2022/02/26
240
+
241
+ - detect absolute css urls starting without protocol ; ie: '//domain.com/my-font.css'
242
+ - allow more complex trigger button selectors ; ie: '#div button["name=iconpicker-opener"]'
243
+ - add the "onBeforeOpen" option
244
+ - add the "onBeforeOpen" demo (demo 5)
245
+
246
+ 2022/11/18
247
+
248
+ - update npm package
249
+
250
+ 2023/02/09
251
+
252
+ - add Fomantic UI icons
253
+
254
+ 2023/03/09
255
+
256
+ - add loadCustomCss option
257
+ - Double click inserts icon
258
+
259
+
260
+ ## License
261
+
262
+ [MIT](https://choosealicense.com/licenses/mit/)
263
+
264
+ ## Credits
265
+
266
+ Thanks to Sabbir for his [Aesthetic Icon Picker](https://github.com/sh-sabbir/aesthetic-icon-picker/tree/20d6aa6134311b44891809cc852dbf247a029495), which gave me a clean & strong base code for this project.