j1-template 2020.0.10 → 2020.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (542) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/blocks/ads/ad.html +64 -0
  3. data/_includes/themes/j1/blocks/footer/boxes/about_box.proc +1 -1
  4. data/_includes/themes/j1/blocks/footer/boxes/links_box.proc +2 -2
  5. data/_includes/themes/j1/blocks/footer/boxes/news_box.proc +2 -2
  6. data/_includes/themes/j1/layouts/content_generator_blog_archive.html +3 -2
  7. data/_includes/themes/j1/layouts/content_generator_collection.html +3 -2
  8. data/_includes/themes/j1/layouts/content_generator_page.html +26 -25
  9. data/_includes/themes/j1/layouts/content_generator_post.html +12 -12
  10. data/_includes/themes/j1/layouts/layout_metadata_generator.html +134 -4
  11. data/_includes/themes/j1/modules/connectors/ad/custom-provider.html +6 -9
  12. data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +9 -6
  13. data/_includes/themes/j1/modules/connectors/ads +3 -6
  14. data/_includes/themes/j1/modules/navigator/generator.html +0 -1
  15. data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +5 -5
  16. data/_includes/themes/j1/procedures/global/create_word_cloud.proc +5 -2
  17. data/_includes/themes/j1/procedures/layouts/content_writer.proc +8 -9
  18. data/_includes/themes/j1/procedures/layouts/module_writer.proc +3 -13
  19. data/_includes/themes/j1/procedures/posts/collate_timeline.proc +14 -14
  20. data/_layouts/default.html +76 -65
  21. data/apps/public/cc/index.adoc +2 -6
  22. data/assets/data/authclient.html +22 -12
  23. data/assets/data/banner.html +23 -23
  24. data/assets/data/carousel.json +30 -21
  25. data/assets/data/cookiebar.html +277 -0
  26. data/assets/data/footer.html +14 -7
  27. data/assets/data/galleries.json +90 -81
  28. data/assets/data/gallery_customizer.html +20 -11
  29. data/assets/data/jupyter/notebooks/_html/template.full.head.html +10 -10
  30. data/assets/data/jupyter/notebooks/_html/visualisation.html +11 -11
  31. data/assets/data/jupyter/notebooks/html/template.html +7 -7
  32. data/assets/data/jupyter/notebooks/html/visualisation.ok.html +12 -12
  33. data/assets/data/mdi_icons.json +55 -1
  34. data/assets/data/menu.html +16 -9
  35. data/assets/data/mmenu.html +48 -95
  36. data/assets/data/mmenu_sidebar.html +40 -44
  37. data/assets/data/mmenu_toc.html +20 -4
  38. data/assets/data/panel.html +41 -33
  39. data/assets/data/quicklinks.html +29 -19
  40. data/assets/data/search.json +165 -0
  41. data/assets/data/ssm.html +20 -9
  42. data/assets/data/themes.json +17 -6
  43. data/assets/data/twa_v1.json +54 -0
  44. data/assets/themes/j1/adapter/js/algolia.js +28 -17
  45. data/assets/themes/j1/adapter/js/attic.js +51 -40
  46. data/assets/themes/j1/adapter/js/carousel.js +27 -13
  47. data/assets/themes/j1/adapter/js/clipboard.js +232 -0
  48. data/assets/themes/j1/adapter/js/cookiebar.js +204 -0
  49. data/assets/themes/j1/adapter/js/framer.js +37 -21
  50. data/assets/themes/j1/adapter/js/gallery_customizer.js +230 -250
  51. data/assets/themes/j1/adapter/js/j1.js +534 -798
  52. data/assets/themes/j1/adapter/js/{justified_gallery.js → jf_gallery.js} +32 -22
  53. data/assets/themes/j1/adapter/js/lightbox.js +20 -10
  54. data/assets/themes/j1/adapter/js/logger.js +13 -6
  55. data/assets/themes/j1/adapter/js/mdb.js +164 -0
  56. data/assets/themes/j1/adapter/js/mmenu.js +60 -69
  57. data/assets/themes/j1/adapter/js/navigator.js +194 -162
  58. data/assets/themes/j1/adapter/js/searcher.js +30 -14
  59. data/assets/themes/j1/adapter/js/ssm.js +111 -88
  60. data/assets/themes/j1/adapter/js/themer.js +70 -102
  61. data/assets/themes/j1/adapter/js/toccer.js +30 -22
  62. data/assets/themes/j1/core/css/animate.css +2382 -0
  63. data/assets/themes/j1/core/css/animate.min.css +7 -0
  64. data/assets/themes/j1/core/css/fontawesome.css +4415 -0
  65. data/assets/themes/j1/core/css/fontawesome.min.css +1 -0
  66. data/assets/themes/j1/core/css/iconify-icons.css +4106 -0
  67. data/assets/themes/j1/core/css/iconify-icons.min.css +1 -0
  68. data/assets/themes/j1/core/css/material-design-icons.css +14532 -0
  69. data/assets/themes/j1/core/css/material-design-icons.min.css +1 -0
  70. data/assets/themes/j1/core/css/theme_extensions.css +207 -3034
  71. data/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
  72. data/assets/themes/j1/core/css/twemoji.css +9485 -0
  73. data/assets/themes/j1/core/css/twemoji.min.css +1 -0
  74. data/assets/themes/j1/core/css/uno.css +334 -3034
  75. data/assets/themes/j1/core/css/uno.min.css +1 -1
  76. data/assets/themes/j1/core/css/vendor.css +767 -33214
  77. data/assets/themes/j1/core/css/vendor.min.css +2 -9
  78. data/assets/themes/j1/core/js/template.js +25 -416
  79. data/assets/themes/j1/core/js/template.js.map +1 -1
  80. data/assets/themes/j1/core/js/template.min.js +1 -1
  81. data/assets/themes/j1/modules/backstretch/js/backstretch.js +1695 -0
  82. data/assets/themes/j1/modules/backstretch/js/backstretch.min.js +21 -0
  83. data/assets/themes/j1/modules/backstretch/js/backstretch.min.js.org +1 -0
  84. data/assets/themes/j1/modules/bmd/css/bootstrap-material-design.css +12177 -0
  85. data/assets/themes/j1/modules/bmd/css/bootstrap-material-design.min.css +8 -0
  86. data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.js +6930 -0
  87. data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.js.map +1 -0
  88. data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.min.js +1 -0
  89. data/assets/themes/j1/modules/bootstrap/css/bootstrap.css +10278 -0
  90. data/assets/themes/j1/modules/bootstrap/css/bootstrap.css.map +1 -0
  91. data/assets/themes/j1/modules/bootstrap/css/bootstrap.min.css +7 -0
  92. data/assets/themes/j1/modules/bootstrap/css/bootstrap.min.css.map +1 -0
  93. data/assets/themes/j1/modules/bootstrap/js/bootstrap.js +4420 -0
  94. data/assets/themes/j1/modules/bootstrap/js/bootstrap.js.map +1 -0
  95. data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js +7 -0
  96. data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js.map +1 -0
  97. data/assets/themes/j1/modules/bsDatepicker/css/datepicker.css +203 -0
  98. data/assets/themes/j1/modules/bsDatepicker/css/theme/uno.css +235 -0
  99. data/assets/themes/j1/modules/bsDatepicker/js/datepicker.js +509 -0
  100. data/assets/themes/j1/modules/bsDatepicker/less/datepicker.less +122 -0
  101. data/assets/themes/j1/modules/bsThemeSwitcher/js/switcher.js +435 -0
  102. data/assets/themes/j1/modules/bsThemeSwitcher/js/switcher.min.js +20 -0
  103. data/assets/themes/j1/{extensions → modules}/carousel/css/carousel.css +1 -1
  104. data/assets/themes/j1/{extensions → modules}/carousel/css/carousel.min.css +1 -1
  105. data/assets/themes/j1/{extensions → modules}/carousel/css/carousel_transitions.css +1 -1
  106. data/assets/themes/j1/{extensions → modules}/carousel/css/carousel_transitions.min.css +1 -1
  107. data/assets/themes/j1/{extensions → modules}/carousel/css/theme/uno.css +1 -1
  108. data/assets/themes/j1/{extensions → modules}/carousel/css/theme/uno.min.css +1 -1
  109. data/assets/themes/j1/{extensions → modules}/carousel/images/ajax-loader.gif +0 -0
  110. data/assets/themes/j1/{extensions → modules}/carousel/images/grabbing.png +0 -0
  111. data/assets/themes/j1/{extensions → modules}/carousel/images/owl-logo.png +0 -0
  112. data/assets/themes/j1/{extensions → modules}/carousel/images/owl.video.play.png +0 -0
  113. data/assets/themes/j1/{extensions → modules}/carousel/js/carousel.js +0 -0
  114. data/assets/themes/j1/{extensions → modules}/carousel/js/carousel.min.js +0 -0
  115. data/assets/themes/j1/modules/clipboard/LICENSE +20 -0
  116. data/assets/themes/j1/modules/clipboard/css/theme/uno.css +52 -0
  117. data/assets/themes/j1/modules/clipboard/css/theme/uno.min.css +52 -0
  118. data/assets/themes/j1/modules/clipboard/js/clipboard.js +975 -0
  119. data/assets/themes/j1/modules/clipboard/js/clipboard.min.js +7 -0
  120. data/assets/themes/j1/{extensions/iconify → modules/iconifyAPI}/js/iconify.min.js +0 -0
  121. data/assets/themes/j1/modules/iframeResizer/LICENSE +21 -0
  122. data/assets/themes/j1/modules/iframeResizer/examples/frame.absolute.html +127 -0
  123. data/assets/themes/j1/modules/iframeResizer/examples/frame.content.html +157 -0
  124. data/assets/themes/j1/modules/iframeResizer/examples/frame.hover.html +68 -0
  125. data/assets/themes/j1/modules/iframeResizer/examples/frame.nested.html +100 -0
  126. data/assets/themes/j1/modules/iframeResizer/examples/frame.textarea.html +45 -0
  127. data/assets/themes/j1/modules/iframeResizer/examples/frame.tolerance.html +113 -0
  128. data/assets/themes/j1/modules/iframeResizer/examples/index.html +83 -0
  129. data/assets/themes/j1/modules/iframeResizer/examples/two.html +88 -0
  130. data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.js +1288 -0
  131. data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.map +1 -0
  132. data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.min.js +10 -0
  133. data/assets/themes/j1/modules/iframeResizer/js/iframeResizer.js +1390 -0
  134. data/assets/themes/j1/modules/iframeResizer/js/iframeResizer.map +1 -0
  135. data/assets/themes/j1/modules/iframeResizer/js/iframeResizer.min.js +9 -0
  136. data/assets/themes/j1/modules/jekyllSearch/js/simple-jekyll-search.js +468 -0
  137. data/assets/themes/j1/modules/jekyllSearch/js/simple-jekyll-search.min.js +6 -0
  138. data/assets/themes/j1/modules/jqMouseWheel/README.md +76 -0
  139. data/assets/themes/j1/modules/jqMouseWheel/js/jquery.mousewheel.js +221 -0
  140. data/assets/themes/j1/modules/jqMouseWheel/js/jquery.mousewheel.min.js +9 -0
  141. data/assets/themes/j1/modules/jquery/js/jquery.js +10869 -0
  142. data/assets/themes/j1/modules/jquery/js/jquery.min.js +2 -0
  143. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/LICENSE +0 -0
  144. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/README.md +0 -0
  145. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/css/justifiedGallery.css +0 -0
  146. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/css/justifiedGallery.min.css +0 -0
  147. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/css/theme/uno.css +1 -1
  148. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.3.7.0.js +0 -0
  149. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.js +0 -0
  150. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.min.js +0 -0
  151. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/less/.csslintrc +0 -0
  152. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/less/justifiedGallery.less +0 -0
  153. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/css/justifiedGallery.css +0 -0
  154. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/css/justifiedGallery.min.css +0 -0
  155. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/css/theme/uno.css +1 -1
  156. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/js/jquery.justifiedGallery.js +0 -0
  157. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/js/jquery.justifiedGallery.min.js +0 -0
  158. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/justifiedGallery.css +0 -0
  159. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/justifiedGallery.min.css +0 -0
  160. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/theme/uno.css +1 -1
  161. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/theme/uno.min.css +1 -1
  162. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/js/justifiedGallery.js +0 -0
  163. data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/js/justifiedGallery.min.js +0 -0
  164. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-fb-comment-box.css +0 -0
  165. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-fb-comment-box.min.css +0 -0
  166. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-transitions.css +0 -0
  167. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-transitions.min.css +0 -0
  168. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lightgallery.css +0 -0
  169. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lightgallery.min.css +0 -0
  170. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.eot +0 -0
  171. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.svg +0 -0
  172. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.ttf +0 -0
  173. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.woff +0 -0
  174. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/loading.gif +0 -0
  175. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/video-play.png +0 -0
  176. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/vimeo-play.png +0 -0
  177. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/youtube-play.png +0 -0
  178. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/animation-w.png +0 -0
  179. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/customize-w.png +0 -0
  180. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/dynamic-w.png +0 -0
  181. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/facebook-icon.svg +0 -0
  182. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/googleplus-icon.svg +0 -0
  183. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/html5-w.png +0 -0
  184. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/linked-in.png +0 -0
  185. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/module-w.png +0 -0
  186. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/play-button.png +0 -0
  187. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/responsive-w.png +0 -0
  188. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/thumb-w.png +0 -0
  189. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/touch-w.png +0 -0
  190. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/twitter-icon.svg +0 -0
  191. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/twitter.png +0 -0
  192. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/video1-w.png +0 -0
  193. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/zoom-w.png +0 -0
  194. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/zoom.png +0 -0
  195. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/uno.css +1 -1
  196. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/uno.min.css +1 -1
  197. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/core/lightgallery.js +0 -0
  198. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/core/lightgallery.min.js +0 -0
  199. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/j1/j1-video.js +0 -0
  200. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/j1/j1-video.min.js +0 -0
  201. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-autoplay.js +0 -0
  202. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-autoplay.min.js +0 -0
  203. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-fullscreen.js +0 -0
  204. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-fullscreen.min.js +0 -0
  205. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-hash.js +0 -0
  206. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-hash.min.js +0 -0
  207. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-pager.js +0 -0
  208. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-pager.min.js +0 -0
  209. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-share.js +0 -0
  210. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-share.min.js +0 -0
  211. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-thumbnail.js +0 -0
  212. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-thumbnail.min.js +0 -0
  213. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-video.js +0 -0
  214. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-video.min.js +0 -0
  215. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-zoom.js +0 -0
  216. data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-zoom.min.js +0 -0
  217. data/assets/themes/j1/modules/lightbox/LICENSE +22 -0
  218. data/assets/themes/j1/modules/lightbox/css/lightbox.css +224 -0
  219. data/assets/themes/j1/modules/lightbox/css/lightbox.min.css +21 -0
  220. data/assets/themes/j1/modules/lightbox/css/theme/uno.css +25 -0
  221. data/assets/themes/j1/modules/lightbox/css/theme/uno.min.css +26 -0
  222. data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/close.png +0 -0
  223. data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/loading.gif +0 -0
  224. data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/next.png +0 -0
  225. data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/prev.png +0 -0
  226. data/assets/themes/j1/modules/lightbox/js/lightbox.js +583 -0
  227. data/assets/themes/j1/modules/lightbox/js/lightbox.min.js +35 -0
  228. data/assets/themes/j1/modules/mmenuLight/css/mmenu.css +392 -0
  229. data/assets/themes/j1/modules/mmenuLight/css/mmenu.min.css +393 -0
  230. data/assets/themes/j1/modules/mmenuLight/css/theme/uno.css +178 -0
  231. data/assets/themes/j1/modules/mmenuLight/css/theme/uno.min.css +170 -0
  232. data/assets/themes/j1/modules/mmenuLight/js/mmenu.js +563 -0
  233. data/assets/themes/j1/modules/mmenuLight/js/mmenu.min.js +30 -0
  234. data/assets/themes/j1/modules/noUISlider/LICENSE +13 -0
  235. data/assets/themes/j1/modules/noUISlider/css/nouislider.css +260 -0
  236. data/assets/themes/j1/modules/noUISlider/css/nouislider.min.css +1 -0
  237. data/assets/themes/j1/modules/noUISlider/js/nouislider.js +2312 -0
  238. data/assets/themes/j1/modules/noUISlider/js/nouislider.min.js +3 -0
  239. data/assets/themes/j1/modules/polyfills/js/msie.js +140 -0
  240. data/assets/themes/j1/modules/popper/js/popper.js +2623 -0
  241. data/assets/themes/j1/modules/popper/js/popper.js.map +1 -0
  242. data/assets/themes/j1/modules/popper/js/popper.min.js +4 -0
  243. data/assets/themes/j1/modules/popper/js/popper.min.js.map +1 -0
  244. data/assets/themes/j1/{extensions → modules}/rouge/css/base16.dark/theme.css +0 -0
  245. data/assets/themes/j1/{extensions → modules}/rouge/css/base16.light/theme.css +0 -0
  246. data/assets/themes/j1/{extensions → modules}/rouge/css/base16.monokai.dark/theme.css +0 -0
  247. data/assets/themes/j1/{extensions → modules}/rouge/css/base16.monokai.light/theme.css +0 -0
  248. data/assets/themes/j1/{extensions → modules}/rouge/css/base16.monokai/theme.css +0 -0
  249. data/assets/themes/j1/{extensions → modules}/rouge/css/base16.solarized.dark/theme.css +0 -0
  250. data/assets/themes/j1/{extensions → modules}/rouge/css/base16.solarized.light/theme.css +0 -0
  251. data/assets/themes/j1/{extensions → modules}/rouge/css/base16.solarized/theme.css +0 -0
  252. data/assets/themes/j1/{extensions → modules}/rouge/css/base16/theme.css +0 -0
  253. data/assets/themes/j1/{extensions → modules}/rouge/css/colorful/theme.css +0 -0
  254. data/assets/themes/j1/{extensions → modules}/rouge/css/github/theme.css +0 -0
  255. data/assets/themes/j1/{extensions → modules}/rouge/css/gruvbox.dark/theme.css +0 -0
  256. data/assets/themes/j1/{extensions → modules}/rouge/css/gruvbox.light/theme.css +0 -0
  257. data/assets/themes/j1/{extensions → modules}/rouge/css/gruvbox/theme.css +0 -0
  258. data/assets/themes/j1/{extensions → modules}/rouge/css/igorpro/theme.css +0 -0
  259. data/assets/themes/j1/{extensions → modules}/rouge/css/molokai/theme.css +0 -0
  260. data/assets/themes/j1/{extensions → modules}/rouge/css/monokai.sublime/theme.css +0 -0
  261. data/assets/themes/j1/{extensions → modules}/rouge/css/monokai/theme.css +0 -0
  262. data/assets/themes/j1/{extensions → modules}/rouge/css/pastie/theme.css +0 -0
  263. data/assets/themes/j1/{extensions → modules}/rouge/css/thankful_eyes/theme.css +0 -0
  264. data/assets/themes/j1/{extensions → modules}/rouge/css/tulip/theme.css +0 -0
  265. data/assets/themes/j1/modules/tocbot/css/theme/uno.css +89 -0
  266. data/assets/themes/j1/modules/tocbot/css/theme/uno.min.css +89 -0
  267. data/assets/themes/j1/modules/tocbot/css/tocbot.css +75 -0
  268. data/assets/themes/j1/modules/tocbot/css/tocbot.min.css +19 -0
  269. data/assets/themes/j1/modules/tocbot/js/tocbot.js +19 -0
  270. data/assets/themes/j1/modules/tocbot/js/tocbot.min.js +19 -0
  271. data/assets/themes/j1/modules/twemoji/js/LICENSE +21 -0
  272. data/assets/themes/j1/modules/twemoji/js/picker/LICENSE +21 -0
  273. data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.js +275 -0
  274. data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.min.js +275 -0
  275. data/assets/themes/j1/modules/twemoji/js/twemoji.js +589 -0
  276. data/assets/themes/j1/modules/twemoji/js/twemoji.min.js +25 -0
  277. data/assets/themes/j1/modules/util/js/js.cookie.js +163 -0
  278. data/assets/themes/j1/modules/util/js/lite-url.js +203 -0
  279. data/assets/themes/j1/modules/util/js/lite-url.min.js +7 -0
  280. data/assets/themes/j1/{extensions/log4javascript/log4javascript.min.js → modules/util/js/log4javascript.js} +0 -2
  281. data/assets/themes/j1/modules/util/js/platform.js +1260 -0
  282. data/assets/themes/j1/{extensions → modules}/videojs/css/themes/city.css +0 -0
  283. data/assets/themes/j1/{extensions → modules}/videojs/css/themes/city.min.css +0 -0
  284. data/assets/themes/j1/{extensions → modules}/videojs/css/themes/fantasy.css +0 -0
  285. data/assets/themes/j1/{extensions → modules}/videojs/css/themes/fantasy.min.css +0 -0
  286. data/assets/themes/j1/{extensions → modules}/videojs/css/themes/forest.css +0 -0
  287. data/assets/themes/j1/{extensions → modules}/videojs/css/themes/forest.min.css +0 -0
  288. data/assets/themes/j1/{extensions → modules}/videojs/css/themes/sea.css +0 -0
  289. data/assets/themes/j1/{extensions → modules}/videojs/css/themes/sea.min.css +0 -0
  290. data/assets/themes/j1/{extensions → modules}/videojs/css/video-js.css +0 -0
  291. data/assets/themes/j1/{extensions → modules}/videojs/css/video-js.min.css +0 -0
  292. data/assets/themes/j1/{extensions → modules}/videojs/js/video.js +0 -0
  293. data/assets/themes/j1/{extensions → modules}/videojs/js/video.min.js +0 -0
  294. data/assets/themes/j1/{extensions → modules}/vimeo/froogaloop/js/froogaloop2.min.js +0 -0
  295. data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.js +0 -0
  296. data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.js.map +0 -0
  297. data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.min.js +0 -0
  298. data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.min.js.map +0 -0
  299. data/lib/j1/version.rb +1 -1
  300. data/lib/starter_web/Gemfile +21 -12
  301. data/lib/starter_web/_config.yml +11 -10
  302. data/lib/starter_web/_data/_defaults/resources.yml +13 -13
  303. data/lib/starter_web/_data/blocks/banner.yml +23 -31
  304. data/lib/starter_web/_data/blocks/footer.yml +10 -3
  305. data/lib/starter_web/_data/blocks/panel.yml +21 -21
  306. data/lib/starter_web/_data/layouts/default.yml +10 -0
  307. data/lib/starter_web/_data/layouts/home.yml +7 -7
  308. data/lib/starter_web/_data/layouts/page.yml +15 -16
  309. data/lib/starter_web/_data/modules/advertising.yml +48 -0
  310. data/lib/starter_web/_data/modules/attics.yml +3 -39
  311. data/lib/starter_web/_data/modules/cookiebar.yml +2 -2
  312. data/lib/starter_web/_data/modules/defaults/attics.yml +17 -16
  313. data/lib/starter_web/_data/modules/defaults/cookie_consent.yml +75 -12
  314. data/lib/starter_web/_data/modules/defaults/cookiebar.yml +101 -50
  315. data/lib/starter_web/_data/modules/defaults/jekyll_search.yml +12 -9
  316. data/lib/starter_web/_data/modules/defaults/navigator.yml +55 -21
  317. data/lib/starter_web/_data/modules/jekyll_search.yml +1 -20
  318. data/lib/starter_web/_data/modules/navigator.yml +1 -1
  319. data/lib/starter_web/_data/modules/navigator_menu.yml +3 -0
  320. data/lib/starter_web/_data/modules/themer.yml +10 -11
  321. data/lib/starter_web/_data/resources.yml +379 -174
  322. data/lib/starter_web/_data/template_settings.yml +118 -6
  323. data/lib/starter_web/_data/utilities/util_srv.yml +1 -1
  324. data/lib/starter_web/_plugins/asciidoctor-extensions/banner.rb +43 -0
  325. data/lib/starter_web/_plugins/asciidoctor-extensions/fab-icon-inline.rb +1 -1
  326. data/lib/starter_web/_plugins/asciidoctor-extensions/fas-icon-inline.rb +2 -2
  327. data/lib/starter_web/_plugins/asciidoctor-extensions/iconify-icon-inline.rb +2 -2
  328. data/lib/starter_web/_plugins/asciidoctor-extensions/mdi-icon-inline.rb +2 -2
  329. data/lib/starter_web/_plugins/asciidoctor-extensions/panel.rb +43 -0
  330. data/lib/starter_web/_plugins/asciidoctor-extensions/twitter-emoji-inline.rb +2 -2
  331. data/lib/starter_web/_plugins/{asciidoctor-extensions/lorem-inline.rb → lorem-inline.rb} +0 -0
  332. data/lib/starter_web/_plugins/minifyJS.rb +54 -0
  333. data/lib/starter_web/_plugins/minifyJSON.rb +47 -0
  334. data/lib/starter_web/assets/images/modules/attics/aditya-joshi-1920x1280.webp +0 -0
  335. data/lib/starter_web/assets/images/modules/attics/admin-dashboard-bootstrap-1280x600.webp +0 -0
  336. data/lib/starter_web/assets/images/modules/attics/alex-holyoake-1920x1280.webp +0 -0
  337. data/lib/starter_web/assets/images/modules/attics/anaya-katlego-1920x1280.webp +0 -0
  338. data/lib/starter_web/assets/images/modules/attics/antonella-lombardi-1920x1280.webp +0 -0
  339. data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.webp +0 -0
  340. data/lib/starter_web/assets/images/modules/attics/banner/admin-dashboard-bootstrap-1280x800-bw.webp +0 -0
  341. data/lib/starter_web/assets/images/modules/attics/banner/docker-1280x600-bw.webp +0 -0
  342. data/lib/starter_web/assets/images/modules/attics/banner/jekyll.1200x600-bw.webp +0 -0
  343. data/lib/starter_web/assets/images/modules/attics/banner/library-1920x800-bw.webp +0 -0
  344. data/lib/starter_web/assets/images/modules/attics/banner/signpost-1920x800-bw.webp +0 -0
  345. data/lib/starter_web/assets/images/modules/attics/banner/water-journal-1280x600.webp +0 -0
  346. data/lib/starter_web/assets/images/modules/attics/banner/write-1280x600-bw.webp +0 -0
  347. data/lib/starter_web/assets/images/modules/attics/brandon-mowinkel-1920x1280.webp +0 -0
  348. data/lib/starter_web/assets/images/modules/attics/building-blocks-1920x1280-bw.webp +0 -0
  349. data/lib/starter_web/assets/images/modules/attics/cookies-1920x1200-bw.webp +0 -0
  350. data/lib/starter_web/assets/images/modules/attics/daniel-jensen-1920x1280.webp +0 -0
  351. data/lib/starter_web/assets/images/modules/attics/giammarco-boscaro-1920x1280.webp +0 -0
  352. data/lib/starter_web/assets/images/modules/attics/go-up-1920x1280-bw.webp +0 -0
  353. data/lib/starter_web/assets/images/modules/attics/ian-schneider-1920x1280.webp +0 -0
  354. data/lib/starter_web/assets/images/modules/attics/ideas-start-here-1920x1280-bw.webp +0 -0
  355. data/lib/starter_web/assets/images/modules/attics/jason-rosewell-1920x1280.webp +0 -0
  356. data/lib/starter_web/assets/images/modules/attics/jessica-ruscello-1920x1280.webp +0 -0
  357. data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.webp +0 -0
  358. data/lib/starter_web/assets/images/modules/attics/library-1920x1280-bw.webp +0 -0
  359. data/lib/starter_web/assets/images/modules/attics/matthaeus-1920x1280.webp +0 -0
  360. data/lib/starter_web/assets/images/modules/attics/nousnou-iwasaki-1920x1280.webp +0 -0
  361. data/lib/starter_web/assets/images/modules/attics/premium-1920x1280-bw.webp +0 -0
  362. data/lib/starter_web/assets/images/modules/attics/robert-v-ruggiero-1920x1280.webp +0 -0
  363. data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.webp +0 -0
  364. data/lib/starter_web/assets/images/modules/attics/runner-1920x1200-bw.webp +0 -0
  365. data/lib/starter_web/assets/images/modules/attics/spider-web-1920x1200-bw.webp +0 -0
  366. data/lib/starter_web/assets/images/modules/attics/the-place-1920x1280-bw.webp +0 -0
  367. data/lib/starter_web/assets/images/modules/attics/welcome-1920x1280-bw.webp +0 -0
  368. data/lib/starter_web/assets/images/modules/carousel/cats/cat-1.jpg +0 -0
  369. data/lib/starter_web/assets/images/modules/carousel/mega_cities/andreas-brucker_b.jpg +0 -0
  370. data/lib/starter_web/assets/images/modules/carousel/mega_cities/denys-nevozhai-1_b.jpg +0 -0
  371. data/lib/starter_web/assets/images/modules/carousel/mega_cities/denys-nevozhai-2_b.jpg +0 -0
  372. data/lib/starter_web/assets/images/modules/carousel/mega_cities/luca-bravo_b.jpg +0 -0
  373. data/lib/starter_web/assets/images/modules/carousel/mega_cities/thomas-tucker_b.jpg +0 -0
  374. data/lib/starter_web/assets/images/modules/gallery/mega_cities/banter-snaps_b.jpg +0 -0
  375. data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-1_b.jpg +0 -0
  376. data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-2-bw.jpg +0 -0
  377. data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-2_b.jpg +0 -0
  378. data/lib/starter_web/assets/images/modules/gallery/mega_cities/emmad-mazhari_b.jpg +0 -0
  379. data/lib/starter_web/assets/images/modules/gallery/mega_cities/ethan-brooke_b.jpg +0 -0
  380. data/lib/starter_web/assets/images/modules/gallery/mega_cities/federico-rizzarelli_b.jpg +0 -0
  381. data/lib/starter_web/assets/images/modules/gallery/mega_cities/gints-gailis_b.jpg +0 -0
  382. data/lib/starter_web/assets/images/modules/gallery/mega_cities/johan-mouchet_b.jpg +0 -0
  383. data/lib/starter_web/assets/images/modules/gallery/mega_cities/luca-bravo_b.jpg +0 -0
  384. data/lib/starter_web/assets/images/modules/gallery/mega_cities/oskars-sylwan_b.jpg +0 -0
  385. data/lib/starter_web/assets/images/modules/gallery/mega_cities/steven-diaz_b.jpg +0 -0
  386. data/lib/starter_web/assets/images/modules/gallery/mega_cities/thomas-tucker-bw.jpg +0 -0
  387. data/lib/starter_web/assets/images/modules/gallery/mega_cities/thomas-tucker_b.jpg +0 -0
  388. data/lib/starter_web/assets/images/pages/roundtrip/bootstrap-1920x1000-bw.webp +0 -0
  389. data/lib/starter_web/assets/images/pages/roundtrip/cards-1920x1280-bw.webp +0 -0
  390. data/lib/starter_web/assets/images/pages/roundtrip/emojies-1920x1280-bw.webp +0 -0
  391. data/lib/starter_web/assets/images/pages/roundtrip/icon-fonts-1920x1280-bw.webp +0 -0
  392. data/lib/starter_web/assets/images/pages/roundtrip/images-1920x1280-bw.webp +0 -0
  393. data/lib/starter_web/assets/images/pages/roundtrip/puzzle-1920x1280-bw.webp +0 -0
  394. data/lib/starter_web/assets/images/pages/roundtrip/tables-1920x1280-bw.webp +0 -0
  395. data/lib/starter_web/assets/images/pages/roundtrip/themes-1920x1280-bw.webp +0 -0
  396. data/lib/starter_web/assets/images/pages/roundtrip/typography-1920x1280-bw.webp +0 -0
  397. data/lib/starter_web/assets/videos/headers/still/underground-broadway.webp +0 -0
  398. data/lib/starter_web/assets/videos/headers/still/victoria-oskolovich-on-vimeo.webp +0 -0
  399. data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1-template.adoc.erb +5 -6
  400. data/lib/starter_web/collections/posts/public/featured/_posts/2018-05-01-confusion-about-base-url.adoc +2 -2
  401. data/lib/starter_web/collections/posts/public/featured/_posts/2019-05-01-top-open-source-static-site-generators.adoc +19 -19
  402. data/lib/starter_web/collections/posts/public/featured/_posts/2019-06-01-about-cookies.adoc +38 -42
  403. data/lib/starter_web/collections/posts/public/series/_posts/2018-11-01-docker-using-shared-folders.adoc +4 -7
  404. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +1 -3
  405. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +3 -3
  406. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +4 -4
  407. data/lib/starter_web/index.html +13 -12
  408. data/lib/starter_web/package.json +9 -9
  409. data/lib/starter_web/pages/public/about/about_site.adoc +1 -1
  410. data/lib/starter_web/pages/public/about/become_a_patron.adoc +1 -1
  411. data/lib/starter_web/pages/public/blog/navigator/archive.html +24 -18
  412. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +39 -34
  413. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +43 -30
  414. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +29 -29
  415. data/lib/starter_web/pages/public/blog/navigator/index.html +3 -3
  416. data/lib/starter_web/pages/public/learn/examples/floating_ad.adoc +221 -0
  417. data/lib/starter_web/pages/public/learn/{floating_sidebar.adoc → examples/floating_div.adoc} +60 -50
  418. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/000_includes/parts.asciidoc +1 -1
  419. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/100_meet_and_greet_jekyll.adoc +1 -0
  420. data/lib/starter_web/pages/public/learn/roundtrip/000_bs_tour.1.asciidoc +1 -2
  421. data/lib/starter_web/pages/public/learn/roundtrip/000_bs_tour.adoc +1 -2
  422. data/lib/starter_web/pages/public/learn/roundtrip/000_bs_tour_api.adoc +18 -20
  423. data/lib/starter_web/pages/public/learn/roundtrip/000_includes/attributes.asciidoc +1 -1
  424. data/lib/starter_web/pages/public/learn/roundtrip/000_includes/documents/410_table_3_column.asciidoc +1 -1
  425. data/lib/starter_web/pages/public/learn/roundtrip/000_includes/documents/419_advanced_modals_html.asciidoc +5 -5
  426. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +3 -3
  427. data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +2 -2
  428. data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +8 -4
  429. data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +37 -46
  430. data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +3 -3
  431. data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +10 -11
  432. data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +40 -40
  433. data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +21 -23
  434. data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/000_includes/attributes.asciidoc +69 -0
  435. data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/000_includes/documents/100_buttons.asciidoc +170 -0
  436. data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/mdb_previewer.adoc +52 -0
  437. data/lib/starter_web/pages/public/learn/vtutorials/000_includes/attributes.asciidoc +3 -3
  438. data/lib/starter_web/pages/public/learn/vtutorials/000_includes/documents/410_table_3_column.asciidoc +1 -1
  439. data/lib/starter_web/pages/public/learn/vtutorials/000_includes/documents/419_advanced_modals_html.asciidoc +5 -5
  440. data/lib/starter_web/pages/public/learn/whats_up.adoc +3 -3
  441. data/lib/starter_web/pages/public/legal/en/000_copyright.adoc +1 -1
  442. data/lib/starter_web/pages/public/legal/en/100_impress.adoc +1 -1
  443. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +1 -1
  444. data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +1 -1
  445. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/100_absolute_sizes.asciidoc +1 -1
  446. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/110_bs_grid_sizes.asciidoc +1 -1
  447. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/120_relative_sizes.asciidoc +1 -41
  448. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/200_rotate.asciidoc +1 -1
  449. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/300_flip.asciidoc +1 -1
  450. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/400_spin_pulsed.asciidoc +1 -1
  451. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/500_bw_color_palette.asciidoc +1 -1
  452. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/510_bs_color_palette.asciidoc +1 -1
  453. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/600_md_color_palette.asciidoc +1 -1
  454. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/601_md_color_palette_indigo.asciidoc +1 -1
  455. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/602_md_color_palette_pink.asciidoc +1 -1
  456. data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/100_bs_sizes.asciidoc +1 -1
  457. data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/100_relative_sizes.asciidoc +1 -1
  458. data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/200_rotate.asciidoc +1 -1
  459. data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/300_flip.asciidoc +1 -1
  460. data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/400_spin_pulsed.asciidoc +1 -1
  461. data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +672 -865
  462. data/lib/starter_web/pages/public/previewer/iframer.adoc +18 -16
  463. data/lib/starter_web/pages/public/previewer/justified_gallery.html +1 -1
  464. data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +1 -1
  465. data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +3 -3
  466. data/lib/starter_web/pages/public/site_search.adoc +1 -1
  467. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  468. data/lib/starter_web/utilsrv/package.json +1 -1
  469. metadata +295 -216
  470. data/assets/data/colors.json +0 -42
  471. data/assets/data/cookie_consent.html +0 -223
  472. data/assets/data/font_sizes.json +0 -42
  473. data/assets/data/messages.yml +0 -131
  474. data/assets/data/search.yml +0 -153
  475. data/assets/themes/j1/adapter/js/cookie_consent.js +0 -277
  476. data/assets/themes/j1/core/css/custom.scss +0 -28
  477. data/assets/themes/j1/core/css/globals.css +0 -14523
  478. data/assets/themes/j1/core/css/globals.min.css +0 -1
  479. data/assets/themes/j1/core/css/uno.scss +0 -28
  480. data/assets/themes/j1/core/css/vendor.scss +0 -28
  481. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.absolute.html +0 -86
  482. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.content.html +0 -58
  483. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.hover.html +0 -51
  484. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.nested.html +0 -68
  485. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.textarea.html +0 -46
  486. data/assets/themes/j1/extensions/iframe_resizer/examples/frame.tolerance.html +0 -79
  487. data/assets/themes/j1/extensions/iframe_resizer/examples/index.html +0 -70
  488. data/assets/themes/j1/extensions/iframe_resizer/examples/two.html +0 -71
  489. data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.js +0 -1104
  490. data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.map +0 -1
  491. data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.min.js +0 -10
  492. data/assets/themes/j1/extensions/log4javascript/log4javascript.js +0 -5826
  493. data/lib/starter_web/_data/modules/cookie_consent.yml +0 -128
  494. data/lib/starter_web/assets/images/modules/attics/aditya-joshi-1920x1280.jpg +0 -0
  495. data/lib/starter_web/assets/images/modules/attics/admin-dashboard-bootstrap-1280x600.png +0 -0
  496. data/lib/starter_web/assets/images/modules/attics/alex-holyoake-1920x1280.jpg +0 -0
  497. data/lib/starter_web/assets/images/modules/attics/anaya-katlego-1920x1280.jpg +0 -0
  498. data/lib/starter_web/assets/images/modules/attics/antonella-lombardi-1920x1280.jpg +0 -0
  499. data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.jpg +0 -0
  500. data/lib/starter_web/assets/images/modules/attics/banner/admin-dashboard-bootstrap-1280x800-bw.jpg +0 -0
  501. data/lib/starter_web/assets/images/modules/attics/banner/docker-1280x600-bw.jpg +0 -0
  502. data/lib/starter_web/assets/images/modules/attics/banner/jekyll.1200x600-bw.jpg +0 -0
  503. data/lib/starter_web/assets/images/modules/attics/banner/library-1920x800-bw.jpg +0 -0
  504. data/lib/starter_web/assets/images/modules/attics/banner/signpost-1920x800-bw.jpg +0 -0
  505. data/lib/starter_web/assets/images/modules/attics/banner/water-journal-1280x600.jpg +0 -0
  506. data/lib/starter_web/assets/images/modules/attics/banner/write-1280x600-bw.jpg +0 -0
  507. data/lib/starter_web/assets/images/modules/attics/brandon-mowinkel-1920x1280.jpg +0 -0
  508. data/lib/starter_web/assets/images/modules/attics/building-blocks-1920x1280-bw.jpg +0 -0
  509. data/lib/starter_web/assets/images/modules/attics/cookies-1920x1200-bw.jpg +0 -0
  510. data/lib/starter_web/assets/images/modules/attics/daniel-jensen-1920x1280.jpg +0 -0
  511. data/lib/starter_web/assets/images/modules/attics/giammarco-boscaro-1920x1280.jpg +0 -0
  512. data/lib/starter_web/assets/images/modules/attics/go-up-1920x1280-bw.jpg +0 -0
  513. data/lib/starter_web/assets/images/modules/attics/ian-schneider-1920x1280.jpg +0 -0
  514. data/lib/starter_web/assets/images/modules/attics/ideas-start-here-1920x1280-bw.jpg +0 -0
  515. data/lib/starter_web/assets/images/modules/attics/jason-rosewell-1920x1280.jpg +0 -0
  516. data/lib/starter_web/assets/images/modules/attics/jessica-ruscello-1920x1280.jpg +0 -0
  517. data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.jpg +0 -0
  518. data/lib/starter_web/assets/images/modules/attics/library-1920x1280-bw.jpg +0 -0
  519. data/lib/starter_web/assets/images/modules/attics/mae-mu-Vf9gbsLZyf0-unsplash.jpg +0 -0
  520. data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280-v.jpg +0 -0
  521. data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280.jpg +0 -0
  522. data/lib/starter_web/assets/images/modules/attics/matthaeus-1920x1280.jpg +0 -0
  523. data/lib/starter_web/assets/images/modules/attics/nousnou-iwasaki-1920x1280.jpg +0 -0
  524. data/lib/starter_web/assets/images/modules/attics/premium-1920x1280-bw.jpg +0 -0
  525. data/lib/starter_web/assets/images/modules/attics/robert-v-ruggiero-1920x1280.jpg +0 -0
  526. data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.jpg +0 -0
  527. data/lib/starter_web/assets/images/modules/attics/runner-1920x1200-bw.jpg +0 -0
  528. data/lib/starter_web/assets/images/modules/attics/spider-web-1920x1200-bw.jpg +0 -0
  529. data/lib/starter_web/assets/images/modules/attics/the-place-1920x1280-bw.jpg +0 -0
  530. data/lib/starter_web/assets/images/modules/attics/welcome-1920x1280-bw.jpg +0 -0
  531. data/lib/starter_web/assets/images/pages/roundtrip/bootstrap-1920x1000-bw.jpg +0 -0
  532. data/lib/starter_web/assets/images/pages/roundtrip/cards-1920x1280-bw.jpg +0 -0
  533. data/lib/starter_web/assets/images/pages/roundtrip/emojies-1920x1280-bw.jpg +0 -0
  534. data/lib/starter_web/assets/images/pages/roundtrip/icon-fonts-1920x1280-bw.jpg +0 -0
  535. data/lib/starter_web/assets/images/pages/roundtrip/images-1920x1280-bw.jpg +0 -0
  536. data/lib/starter_web/assets/images/pages/roundtrip/puzzle-1920x1280-bw.jpg +0 -0
  537. data/lib/starter_web/assets/images/pages/roundtrip/tables-1920x1280-bw.jpg +0 -0
  538. data/lib/starter_web/assets/images/pages/roundtrip/themes-1920x1280-bw.jpg +0 -0
  539. data/lib/starter_web/assets/images/pages/roundtrip/typography-1920x1280-bw.jpg +0 -0
  540. data/lib/starter_web/assets/videos/headers/still/underground-broadway.png +0 -0
  541. data/lib/starter_web/assets/videos/headers/still/victoria-oskolovich-on-vimeo.png +0 -0
  542. data/lib/starter_web/pages/public/clear_button.adoc +0 -121
@@ -0,0 +1,275 @@
1
+ /*
2
+ # -----------------------------------------------------------------------------
3
+ # ~/twemoji/twemoji-picker.js
4
+ # Twemoji-Picker v2017-06-03 implementation for J1 template
5
+ #
6
+ # Product/Info:
7
+ # https://jekyll.one
8
+ # https://github.com/xLs51/Twemoji-Picker
9
+ #
10
+ # Copyright (C) 2020 Juergen Adams
11
+ # Copyright (C) 2015 xLs51
12
+ #
13
+ # J1 Template is licensed under the MIT License.
14
+ # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
15
+ # Twemoji-Picker is licensed under under the MIT License.
16
+ # For details, https://github.com/xLs51/Twemoji-Picker
17
+ #
18
+ # -----------------------------------------------------------------------------
19
+ */
20
+ (function (e, c, g) {
21
+ var b = 150;
22
+ var d = {};
23
+ var a = "/assets/data/twa_v1.json";
24
+ e.TwemojiPicker = function (j, i) {
25
+ var h = this;
26
+ e.when(h._loadDatabase()).done(function (k) {
27
+ h.$el = e(j);
28
+ h._init(i)
29
+ })
30
+ };
31
+ e.TwemojiPicker.defaults = {
32
+ init: null,
33
+ size: 25,
34
+ icon: "grinning",
35
+ iconSize: 25,
36
+ height: 100,
37
+ width: null,
38
+ category: ["smile", "cherry-blossom", "video-game", "oncoming-automobile", "symbols"],
39
+ categorySize: 20,
40
+ pickerPosition: null,
41
+ pickerHeight: 150,
42
+ pickerWidth: null,
43
+ placeholder: "",
44
+ };
45
+ e.TwemojiPicker.prototype = {
46
+ _init: function (h) {
47
+ this.options = e.extend(true, {}, e.TwemojiPicker.defaults, h);
48
+ this._initPicker();
49
+ this._initCategory();
50
+ this._initTwemoji();
51
+ this._initText();
52
+ this._initStyle();
53
+ this._initEvents()
54
+ },
55
+ _loadDatabase: function f() {
56
+ return e.ajax({
57
+ url: a,
58
+ success: function (h) {
59
+ if (typeof h == "string") {
60
+ d = JSON.parse(h)
61
+ }
62
+ if (typeof h == "object") {
63
+ d = h
64
+ }
65
+ }
66
+ })
67
+ },
68
+ _initPicker: function () {
69
+ var h = this;
70
+ h.$id = "#" + h.$el["0"].id;
71
+ h.$pickerHeigth = h.options.height.replace("px", "");
72
+ h.$pickerHeigth = Number(h.$pickerHeigth);
73
+ h.$wrapper = h.$el.wrap('<div class="twemoji-wrap"></div>').parent();
74
+ h.$wrapper.append('<div class="twemoji-textarea" contentEditable="true" placeholder="' + h.options.placeholder + '"></div>');
75
+ h.$wrapper.append('<div class="twemoji-textarea-duplicate"></div>');
76
+ h.$wrapper.append('<div class="twemoji-icon-picker"> <span id="open-group" class="mr-2"><button type="button" name="open-group" class="btn btn-raised btn-flex btn-info mr-2"><i class="toggle-button mdi mdi-lg mr-1 mdi-toggle-switch-off"></i> Picker </button></span><span id="clear-textarea"><button type="button" name="clear-textarea" class="btn btn-raised btn-flex btn-secondary"><i class="mdi mdi-sticker-emoji mdi-lg mr-1"></i> Clear </button></span></div>');
77
+ h.$wrapper.append('<div class="twemoji-picker"></div>');
78
+ h.$el.hide();
79
+ h.$textarea = h.$wrapper.find(".twemoji-textarea");
80
+ h.$textareaDuplicate = h.$wrapper.find(".twemoji-textarea-duplicate").hide();
81
+ h.$iconPicker = h.$wrapper.find("#open-group");
82
+ h.$clearTextarea = h.$wrapper.find("#clear-textarea");
83
+ h.$picker = h.$wrapper.find(".twemoji-picker").hide()
84
+ },
85
+ _initCategory: function () {
86
+ var h = this;
87
+ var i = this.options.category;
88
+ this.categoryName = ["people", "nature", "object", "place", "symbol"];
89
+ this.$picker.append('<div class="twemoji-picker-category"></div>');
90
+ this.$pickerCategory = this.$picker.find(".twemoji-picker-category");
91
+ e.each(this.categoryName, function (j, k) {
92
+ h.$pickerCategory.append('<span data-category="' + k + '">' + h.imageFromName(i[j]) + "</span>")
93
+ });
94
+ this.$pickerCategory.find("span:first").addClass("active")
95
+ },
96
+ _initTwemoji: function () {
97
+ var h = this;
98
+ e.each(this.categoryName, function (j, k) {
99
+ h.$picker.append('<div class="twemoji-list ' + k + '"></div>');
100
+ e.each(d, function (i, l) {
101
+ if (l.category === k) {
102
+ h.$wrapper.find(".twemoji-picker ." + k).append('<span><img class="emoji" draggable="false" src="' + l.base64 + '" alt="' + l.value + '" title="' + l.name + '"></span>')
103
+ }
104
+ })
105
+ });
106
+ this.$twemojiList = this.$picker.find(".twemoji-list");
107
+ this.$twemojiList.not(":first").hide()
108
+ },
109
+ _initText: function () {
110
+ if (this.options.init) {
111
+ var j = this.options.init;
112
+ var i = /:([\w-]+):/g;
113
+ var h;
114
+ while (h == i.exec(j)) {
115
+ j = j.replace(h[0], this.imageFromName(h[1], true))
116
+ }
117
+ this.$textarea.html(j);
118
+ this.copyTextArea(this.$textarea.html())
119
+ }
120
+ },
121
+ _initStyle: function () {
122
+ this.$wrapper.css({
123
+ width: this.options.width ? this.options.width : "100%",
124
+ height: this.options.height ? this.options.height : "",
125
+ });
126
+ this.$wrapper.find("img").css({
127
+ width: this.options.size,
128
+ height: this.options.size,
129
+ });
130
+ this.$iconPicker.css({
131
+ width: this.options.iconSize,
132
+ height: this.options.iconSize,
133
+ });
134
+ this.$pickerCategory.find("img").css({
135
+ width: this.options.categorySize,
136
+ height: this.options.categorySize,
137
+ });
138
+ this.$twemojiList.css({
139
+ width: this.options.pickerWidth ? this.options.pickerWidth : "100%",
140
+ height: this.options.pickerHeight,
141
+ });
142
+ this.$picker.css({
143
+ width: this.options.pickerWidth ? this.options.pickerWidth : "100%",
144
+ top: this.options.pickerPosition === "top" ? "-" + this.$picker.outerHeight() + "px" : "",
145
+ })
146
+ },
147
+ _initEvents: function () {
148
+ var h = this;
149
+ this.$textarea.on("keyup", function () {
150
+ h.copyTextArea(e(this).html())
151
+ });
152
+ this.$iconPicker.on("click", function () {
153
+ var i = e(".twemoji-picker").height() + b;
154
+ e("#picker").height(i);
155
+ e(".toggle-button").toggleClass("mdi-toggle-switch-off mdi-toggle-switch");
156
+ if (!h.openedPicker) {
157
+ h.openPicker()
158
+ } else {
159
+ h.closePicker();
160
+ e("#picker").height(h.$pickerHeigth)
161
+ }
162
+ });
163
+ this.$clearTextarea.on("click", function () {
164
+ h.copyTextArea("");
165
+ e(h.$id).val("");
166
+ e(".twemoji-textarea > .emoji-span").remove()
167
+ });
168
+ this.$pickerCategory.find("span").on("click", function () {
169
+ var i = e(this).data("category");
170
+ h.openCategory(e(this), i)
171
+ });
172
+ this.$pickerCategory.find(".close").on("click", function () {
173
+ if (h.openedPicker) {
174
+ h.closePicker()
175
+ }
176
+ });
177
+ this.$twemojiList.find("img").on("click", function () {
178
+ h.copyTwemoji(e(this))
179
+ })
180
+ },
181
+ copyText: function (j) {
182
+ var i = document.createElement("textarea");
183
+ i.setAttribute("style", "position:fixed;opacity:0;top:100px;left:100px");
184
+ i.value = j;
185
+ document.body.appendChild(i);
186
+ i.select();
187
+ document.execCommand("copy");
188
+ var h = document.createElement("div");
189
+ h.setAttribute("class", "copied");
190
+ h.appendChild(document.createTextNode("Copied to Clipboard"));
191
+ document.body.appendChild(h);
192
+ setTimeout(function () {
193
+ document.body.removeChild(i);
194
+ document.body.removeChild(h)
195
+ }, 1500)
196
+ },
197
+ openPicker: function () {
198
+ this.$picker.show();
199
+ this.openedPicker = true
200
+ },
201
+ closePicker: function () {
202
+ this.$picker.hide();
203
+ this.openedPicker = false
204
+ },
205
+ openCategory: function (h, i) {
206
+ this.$pickerCategory.find("span").removeClass("active");
207
+ h.addClass("active");
208
+ this.$twemojiList.not(".twemoji-picker ." + i).hide();
209
+ this.$twemojiList.filter(".twemoji-picker ." + i).show()
210
+ },
211
+ copyTwemoji: function (l) {
212
+ var i = l.attr("alt");
213
+ var k = l.attr("src");
214
+ var j = l.attr("title");
215
+ var h = "emoji:" + j + "[]";
216
+ this.copyText(h);
217
+ this.$textarea.focus();
218
+ this.pasteAtCursor('<span class="emoji-span"><img class="emoji" src="' + k + '" title="' + j + '" alt="' + i + '" width="' + this.options.size + '" height="' + this.options.size + '"> ' + h + "</span> ");
219
+ this.copyTextArea(this.$textarea.html())
220
+ },
221
+ copyTextArea: function (j) {
222
+ var h = this.$textareaDuplicate.html(j);
223
+ h.find("img").replaceWith(function () {
224
+ return this.alt
225
+ });
226
+ var i = h.html();
227
+ this.$el.text(i)
228
+ },
229
+ imageFromName: function (i, j) {
230
+ var h = e.grep(d, function (k) {
231
+ return k.name == i
232
+ });
233
+ if (j) {
234
+ return '<img class="emoji" src="' + h[0].base64 + '" alt="' + h[0].value + '" width="' + this.options.size + '" height="' + this.options.size + '">'
235
+ }
236
+ return '<img class="emoji" draggable="false" src="' + h[0].base64 + '" alt="' + i + '">'
237
+ },
238
+ pasteAtCursor: function (m) {
239
+ var l, h;
240
+ if (c.getSelection) {
241
+ l = c.getSelection();
242
+ if (l.getRangeAt && l.rangeCount) {
243
+ h = l.getRangeAt(0);
244
+ h.deleteContents();
245
+ var i = document.createElement("div");
246
+ i.innerHTML = m;
247
+ var n = document.createDocumentFragment(),
248
+ k, j;
249
+ while ((k = i.firstChild)) {
250
+ j = n.appendChild(k)
251
+ }
252
+ h.insertNode(n);
253
+ if (j) {
254
+ h = h.cloneRange();
255
+ h.setStartAfter(j);
256
+ h.collapse(true);
257
+ l.removeAllRanges();
258
+ l.addRange(h)
259
+ }
260
+ }
261
+ } else {
262
+ if (document.selection && document.selection.type != "Control") {
263
+ document.selection.createRange().pasteHTML(m)
264
+ }
265
+ }
266
+ }
267
+ };
268
+ e.fn.twemojiPicker = function (i) {
269
+ var h = e.data(this, "twemojiPicker");
270
+ this.each(function () {
271
+ h ? h._init() : h = e.data(this, "twemojiPicker", new e.TwemojiPicker(this, i))
272
+ });
273
+ return h
274
+ }
275
+ })(jQuery, window);
@@ -0,0 +1,589 @@
1
+
2
+ /*
3
+ # -----------------------------------------------------------------------------
4
+ # ~/twemoji/twemoji.js
5
+ # Twemoji v13.0.0 implementation for J1 template
6
+ #
7
+ # Product/Info:
8
+ # https://jekyll.one
9
+ # https://github.com/twitter/twemoji
10
+ #
11
+ # Copyright (C) 2020 Juergen Adams
12
+ # Copyright (C) 2018 Twitter, Inc and other contributors
13
+ #
14
+ # J1 Template is licensed under the MIT License.
15
+ # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
16
+ # Twemoji is licensed under under the MIT License.
17
+ # See: https://github.com/twitter/twemoji/blob/gh-pages/LICENSE
18
+ #
19
+ # -----------------------------------------------------------------------------
20
+ */
21
+
22
+ /*! Copyright Twitter Inc. and other contributors. Licensed under MIT *//*
23
+ https://github.com/twitter/twemoji/blob/gh-pages/LICENSE
24
+ */
25
+
26
+ /*jslint indent: 2, browser: true, bitwise: true, plusplus: true */
27
+
28
+ var twemoji = (function (
29
+ // WARNING: this file is generated automatically via
30
+ // `node scripts/build.js`
31
+ // please update its `createTwemoji` function
32
+ // at the bottom of the same file instead.
33
+
34
+ ) {
35
+ 'use strict';
36
+
37
+ /*jshint maxparams:4 */
38
+
39
+ var
40
+ // the exported module object
41
+ twemoji = {
42
+
43
+
44
+ /////////////////////////
45
+ // properties //
46
+ /////////////////////////
47
+
48
+ // default assets url, by default will be Twitter Inc. CDN
49
+ base: 'https://twemoji.maxcdn.com/v/13.0.0/',
50
+
51
+ // default assets file extensions, by default '.png'
52
+ ext: '.png',
53
+
54
+ // default assets/folder size, by default "72x72"
55
+ // available via Twitter CDN: 72
56
+ size: '72x72',
57
+
58
+ // default class name, by default 'emoji'
59
+ className: 'emoji',
60
+
61
+ // basic utilities / helpers to convert code points
62
+ // to JavaScript surrogates and vice versa
63
+ convert: {
64
+
65
+ /**
66
+ * Given an HEX codepoint, returns UTF16 surrogate pairs.
67
+ *
68
+ * @param string generic codepoint, i.e. '1F4A9'
69
+ * @return string codepoint transformed into utf16 surrogates pair,
70
+ * i.e. \uD83D\uDCA9
71
+ *
72
+ * @example
73
+ * twemoji.convert.fromCodePoint('1f1e8');
74
+ * // "\ud83c\udde8"
75
+ *
76
+ * '1f1e8-1f1f3'.split('-').map(twemoji.convert.fromCodePoint).join('')
77
+ * // "\ud83c\udde8\ud83c\uddf3"
78
+ */
79
+ fromCodePoint: fromCodePoint,
80
+
81
+ /**
82
+ * Given UTF16 surrogate pairs, returns the equivalent HEX codepoint.
83
+ *
84
+ * @param string generic utf16 surrogates pair, i.e. \uD83D\uDCA9
85
+ * @param string optional separator for double code points, default='-'
86
+ * @return string utf16 transformed into codepoint, i.e. '1F4A9'
87
+ *
88
+ * @example
89
+ * twemoji.convert.toCodePoint('\ud83c\udde8\ud83c\uddf3');
90
+ * // "1f1e8-1f1f3"
91
+ *
92
+ * twemoji.convert.toCodePoint('\ud83c\udde8\ud83c\uddf3', '~');
93
+ * // "1f1e8~1f1f3"
94
+ */
95
+ toCodePoint: toCodePoint
96
+ },
97
+
98
+
99
+ /////////////////////////
100
+ // methods //
101
+ /////////////////////////
102
+
103
+ /**
104
+ * User first: used to remove missing images
105
+ * preserving the original text intent when
106
+ * a fallback for network problems is desired.
107
+ * Automatically added to Image nodes via DOM
108
+ * It could be recycled for string operations via:
109
+ * $('img.emoji').on('error', twemoji.onerror)
110
+ */
111
+ onerror: function onerror() {
112
+ if (this.parentNode) {
113
+ this.parentNode.replaceChild(createText(this.alt, false), this);
114
+ }
115
+ },
116
+
117
+ /**
118
+ * Main method/logic to generate either <img> tags or HTMLImage nodes.
119
+ * "emojify" a generic text or DOM Element.
120
+ *
121
+ * @overloads
122
+ *
123
+ * String replacement for `innerHTML` or server side operations
124
+ * twemoji.parse(string);
125
+ * twemoji.parse(string, Function);
126
+ * twemoji.parse(string, Object);
127
+ *
128
+ * HTMLElement tree parsing for safer operations over existing DOM
129
+ * twemoji.parse(HTMLElement);
130
+ * twemoji.parse(HTMLElement, Function);
131
+ * twemoji.parse(HTMLElement, Object);
132
+ *
133
+ * @param string|HTMLElement the source to parse and enrich with emoji.
134
+ *
135
+ * string replace emoji matches with <img> tags.
136
+ * Mainly used to inject emoji via `innerHTML`
137
+ * It does **not** parse the string or validate it,
138
+ * it simply replaces found emoji with a tag.
139
+ * NOTE: be sure this won't affect security.
140
+ *
141
+ * HTMLElement walk through the DOM tree and find emoji
142
+ * that are inside **text node only** (nodeType === 3)
143
+ * Mainly used to put emoji in already generated DOM
144
+ * without compromising surrounding nodes and
145
+ * **avoiding** the usage of `innerHTML`.
146
+ * NOTE: Using DOM elements instead of strings should
147
+ * improve security without compromising too much
148
+ * performance compared with a less safe `innerHTML`.
149
+ *
150
+ * @param Function|Object [optional]
151
+ * either the callback that will be invoked or an object
152
+ * with all properties to use per each found emoji.
153
+ *
154
+ * Function if specified, this will be invoked per each emoji
155
+ * that has been found through the RegExp except
156
+ * those follwed by the invariant \uFE0E ("as text").
157
+ * Once invoked, parameters will be:
158
+ *
159
+ * iconId:string the lower case HEX code point
160
+ * i.e. "1f4a9"
161
+ *
162
+ * options:Object all info for this parsing operation
163
+ *
164
+ * variant:char the optional \uFE0F ("as image")
165
+ * variant, in case this info
166
+ * is anyhow meaningful.
167
+ * By default this is ignored.
168
+ *
169
+ * If such callback will return a falsy value instead
170
+ * of a valid `src` to use for the image, nothing will
171
+ * actually change for that specific emoji.
172
+ *
173
+ *
174
+ * Object if specified, an object containing the following properties
175
+ *
176
+ * callback Function the callback to invoke per each found emoji.
177
+ * base string the base url, by default twemoji.base
178
+ * ext string the image extension, by default twemoji.ext
179
+ * size string the assets size, by default twemoji.size
180
+ *
181
+ * @example
182
+ *
183
+ * twemoji.parse("I \u2764\uFE0F emoji!");
184
+ * // I <img class="emoji" draggable="false" alt="❤️" src="/assets/2764.gif"/> emoji!
185
+ *
186
+ *
187
+ * twemoji.parse("I \u2764\uFE0F emoji!", function(iconId, options) {
188
+ * return '/assets/' + iconId + '.gif';
189
+ * });
190
+ * // I <img class="emoji" draggable="false" alt="❤️" src="/assets/2764.gif"/> emoji!
191
+ *
192
+ *
193
+ * twemoji.parse("I \u2764\uFE0F emoji!", {
194
+ * size: 72,
195
+ * callback: function(iconId, options) {
196
+ * return '/assets/' + options.size + '/' + iconId + options.ext;
197
+ * }
198
+ * });
199
+ * // I <img class="emoji" draggable="false" alt="❤️" src="/assets/72x72/2764.png"/> emoji!
200
+ *
201
+ */
202
+ parse: parse,
203
+
204
+ /**
205
+ * Given a string, invokes the callback argument
206
+ * per each emoji found in such string.
207
+ * This is the most raw version used by
208
+ * the .parse(string) method itself.
209
+ *
210
+ * @param string generic string to parse
211
+ * @param Function a generic callback that will be
212
+ * invoked to replace the content.
213
+ * This calback wil receive standard
214
+ * String.prototype.replace(str, callback)
215
+ * arguments such:
216
+ * callback(
217
+ * rawText, // the emoji match
218
+ * );
219
+ *
220
+ * and others commonly received via replace.
221
+ */
222
+ replace: replace,
223
+
224
+ /**
225
+ * Simplify string tests against emoji.
226
+ *
227
+ * @param string some text that might contain emoji
228
+ * @return boolean true if any emoji was found, false otherwise.
229
+ *
230
+ * @example
231
+ *
232
+ * if (twemoji.test(someContent)) {
233
+ * console.log("emoji All The Things!");
234
+ * }
235
+ */
236
+ test: test
237
+ },
238
+
239
+ // used to escape HTML special chars in attributes
240
+ escaper = {
241
+ '&': '&amp;',
242
+ '<': '&lt;',
243
+ '>': '&gt;',
244
+ "'": '&#39;',
245
+ '"': '&quot;'
246
+ },
247
+
248
+ // RegExp based on emoji's official Unicode standards
249
+ // http://www.unicode.org/Public/UNIDATA/EmojiSources.txt
250
+ re = /(?:\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udeeb\udeec\udef4-\udefc\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78\udd7a-\uddb4\uddb7\uddba\uddbc-\uddcb\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7a\ude80-\ude86\ude90-\udea8\udeb0-\udeb6\udec0-\udec2\uded0-\uded6]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,
251
+
252
+ // avoid runtime RegExp creation for not so smart,
253
+ // not JIT based, and old browsers / engines
254
+ UFE0Fg = /\uFE0F/g,
255
+
256
+ // avoid using a string literal like '\u200D' here because minifiers expand it inline
257
+ U200D = String.fromCharCode(0x200D),
258
+
259
+ // used to find HTML special chars in attributes
260
+ rescaper = /[&<>'"]/g,
261
+
262
+ // nodes with type 1 which should **not** be parsed
263
+ shouldntBeParsed = /^(?:iframe|noframes|noscript|script|select|style|textarea)$/,
264
+
265
+ // just a private shortcut
266
+ fromCharCode = String.fromCharCode;
267
+
268
+ return twemoji;
269
+
270
+
271
+ /////////////////////////
272
+ // private functions //
273
+ // declaration //
274
+ /////////////////////////
275
+
276
+ /**
277
+ * Shortcut to create text nodes
278
+ * @param string text used to create DOM text node
279
+ * @return Node a DOM node with that text
280
+ */
281
+ function createText(text, clean) {
282
+ return document.createTextNode(clean ? text.replace(UFE0Fg, '') : text);
283
+ }
284
+
285
+ /**
286
+ * Utility function to escape html attribute text
287
+ * @param string text use in HTML attribute
288
+ * @return string text encoded to use in HTML attribute
289
+ */
290
+ function escapeHTML(s) {
291
+ return s.replace(rescaper, replacer);
292
+ }
293
+
294
+ /**
295
+ * Default callback used to generate emoji src
296
+ * based on Twitter CDN
297
+ * @param string the emoji codepoint string
298
+ * @param string the default size to use, i.e. "36x36"
299
+ * @return string the image source to use
300
+ */
301
+ function defaultImageSrcGenerator(icon, options) {
302
+ return ''.concat(options.base, options.size, '/', icon, options.ext);
303
+ }
304
+
305
+ /**
306
+ * Given a generic DOM nodeType 1, walk through all children
307
+ * and store every nodeType 3 (#text) found in the tree.
308
+ * @param Element a DOM Element with probably some text in it
309
+ * @param Array the list of previously discovered text nodes
310
+ * @return Array same list with new discovered nodes, if any
311
+ */
312
+ function grabAllTextNodes(node, allText) {
313
+ var
314
+ childNodes = node.childNodes,
315
+ length = childNodes.length,
316
+ subnode,
317
+ nodeType;
318
+ while (length--) {
319
+ subnode = childNodes[length];
320
+ nodeType = subnode.nodeType;
321
+ // parse emoji only in text nodes
322
+ if (nodeType === 3) {
323
+ // collect them to process emoji later
324
+ allText.push(subnode);
325
+ }
326
+ // ignore all nodes that are not type 1, that are svg, or that
327
+ // should not be parsed as script, style, and others
328
+ else if (nodeType === 1 && !('ownerSVGElement' in subnode) &&
329
+ !shouldntBeParsed.test(subnode.nodeName.toLowerCase())) {
330
+ grabAllTextNodes(subnode, allText);
331
+ }
332
+ }
333
+ return allText;
334
+ }
335
+
336
+ /**
337
+ * Used to both remove the possible variant
338
+ * and to convert utf16 into code points.
339
+ * If there is a zero-width-joiner (U+200D), leave the variants in.
340
+ * @param string the raw text of the emoji match
341
+ * @return string the code point
342
+ */
343
+ function grabTheRightIcon(rawText) {
344
+ // if variant is present as \uFE0F
345
+ return toCodePoint(rawText.indexOf(U200D) < 0 ?
346
+ rawText.replace(UFE0Fg, '') :
347
+ rawText
348
+ );
349
+ }
350
+
351
+ /**
352
+ * DOM version of the same logic / parser:
353
+ * emojify all found sub-text nodes placing images node instead.
354
+ * @param Element generic DOM node with some text in some child node
355
+ * @param Object options containing info about how to parse
356
+ *
357
+ * .callback Function the callback to invoke per each found emoji.
358
+ * .base string the base url, by default twemoji.base
359
+ * .ext string the image extension, by default twemoji.ext
360
+ * .size string the assets size, by default twemoji.size
361
+ *
362
+ * @return Element same generic node with emoji in place, if any.
363
+ */
364
+ function parseNode(node, options) {
365
+ var
366
+ allText = grabAllTextNodes(node, []),
367
+ length = allText.length,
368
+ attrib,
369
+ attrname,
370
+ modified,
371
+ fragment,
372
+ subnode,
373
+ text,
374
+ match,
375
+ i,
376
+ index,
377
+ img,
378
+ rawText,
379
+ iconId,
380
+ src;
381
+ while (length--) {
382
+ modified = false;
383
+ fragment = document.createDocumentFragment();
384
+ subnode = allText[length];
385
+ text = subnode.nodeValue;
386
+ i = 0;
387
+ while ((match = re.exec(text))) {
388
+ index = match.index;
389
+ if (index !== i) {
390
+ fragment.appendChild(
391
+ createText(text.slice(i, index), true)
392
+ );
393
+ }
394
+ rawText = match[0];
395
+ iconId = grabTheRightIcon(rawText);
396
+ i = index + rawText.length;
397
+ src = options.callback(iconId, options);
398
+ if (iconId && src) {
399
+ img = new Image();
400
+ img.onerror = options.onerror;
401
+ img.setAttribute('draggable', 'false');
402
+ attrib = options.attributes(rawText, iconId);
403
+ for (attrname in attrib) {
404
+ if (
405
+ attrib.hasOwnProperty(attrname) &&
406
+ // don't allow any handlers to be set + don't allow overrides
407
+ attrname.indexOf('on') !== 0 &&
408
+ !img.hasAttribute(attrname)
409
+ ) {
410
+ img.setAttribute(attrname, attrib[attrname]);
411
+ }
412
+ }
413
+ img.className = options.className;
414
+ img.alt = rawText;
415
+ img.src = src;
416
+ modified = true;
417
+ fragment.appendChild(img);
418
+ }
419
+ if (!img) fragment.appendChild(createText(rawText, false));
420
+ img = null;
421
+ }
422
+ // is there actually anything to replace in here ?
423
+ if (modified) {
424
+ // any text left to be added ?
425
+ if (i < text.length) {
426
+ fragment.appendChild(
427
+ createText(text.slice(i), true)
428
+ );
429
+ }
430
+ // replace the text node only, leave intact
431
+ // anything else surrounding such text
432
+ subnode.parentNode.replaceChild(fragment, subnode);
433
+ }
434
+ }
435
+ return node;
436
+ }
437
+
438
+ /**
439
+ * String/HTML version of the same logic / parser:
440
+ * emojify a generic text placing images tags instead of surrogates pair.
441
+ * @param string generic string with possibly some emoji in it
442
+ * @param Object options containing info about how to parse
443
+ *
444
+ * .callback Function the callback to invoke per each found emoji.
445
+ * .base string the base url, by default twemoji.base
446
+ * .ext string the image extension, by default twemoji.ext
447
+ * .size string the assets size, by default twemoji.size
448
+ *
449
+ * @return the string with <img tags> replacing all found and parsed emoji
450
+ */
451
+ function parseString(str, options) {
452
+ return replace(str, function (rawText) {
453
+ var
454
+ ret = rawText,
455
+ iconId = grabTheRightIcon(rawText),
456
+ src = options.callback(iconId, options),
457
+ attrib,
458
+ attrname;
459
+ if (iconId && src) {
460
+ // recycle the match string replacing the emoji
461
+ // with its image counter part
462
+ ret = '<img '.concat(
463
+ 'class="', options.className, '" ',
464
+ 'draggable="false" ',
465
+ // needs to preserve user original intent
466
+ // when variants should be copied and pasted too
467
+ 'alt="',
468
+ rawText,
469
+ '"',
470
+ ' src="',
471
+ src,
472
+ '"'
473
+ );
474
+ attrib = options.attributes(rawText, iconId);
475
+ for (attrname in attrib) {
476
+ if (
477
+ attrib.hasOwnProperty(attrname) &&
478
+ // don't allow any handlers to be set + don't allow overrides
479
+ attrname.indexOf('on') !== 0 &&
480
+ ret.indexOf(' ' + attrname + '=') === -1
481
+ ) {
482
+ ret = ret.concat(' ', attrname, '="', escapeHTML(attrib[attrname]), '"');
483
+ }
484
+ }
485
+ ret = ret.concat('/>');
486
+ }
487
+ return ret;
488
+ });
489
+ }
490
+
491
+ /**
492
+ * Function used to actually replace HTML special chars
493
+ * @param string HTML special char
494
+ * @return string encoded HTML special char
495
+ */
496
+ function replacer(m) {
497
+ return escaper[m];
498
+ }
499
+
500
+ /**
501
+ * Default options.attribute callback
502
+ * @return null
503
+ */
504
+ function returnNull() {
505
+ return null;
506
+ }
507
+
508
+ /**
509
+ * Given a generic value, creates its squared counterpart if it's a number.
510
+ * As example, number 36 will return '36x36'.
511
+ * @param any a generic value.
512
+ * @return any a string representing asset size, i.e. "36x36"
513
+ * only in case the value was a number.
514
+ * Returns initial value otherwise.
515
+ */
516
+ function toSizeSquaredAsset(value) {
517
+ return typeof value === 'number' ?
518
+ value + 'x' + value :
519
+ value;
520
+ }
521
+
522
+
523
+ /////////////////////////
524
+ // exported functions //
525
+ // declaration //
526
+ /////////////////////////
527
+
528
+ function fromCodePoint(codepoint) {
529
+ var code = typeof codepoint === 'string' ?
530
+ parseInt(codepoint, 16) : codepoint;
531
+ if (code < 0x10000) {
532
+ return fromCharCode(code);
533
+ }
534
+ code -= 0x10000;
535
+ return fromCharCode(
536
+ 0xD800 + (code >> 10),
537
+ 0xDC00 + (code & 0x3FF)
538
+ );
539
+ }
540
+
541
+ function parse(what, how) {
542
+ if (!how || typeof how === 'function') {
543
+ how = {callback: how};
544
+ }
545
+ // if first argument is string, inject html <img> tags
546
+ // otherwise use the DOM tree and parse text nodes only
547
+ return (typeof what === 'string' ? parseString : parseNode)(what, {
548
+ callback: how.callback || defaultImageSrcGenerator,
549
+ attributes: typeof how.attributes === 'function' ? how.attributes : returnNull,
550
+ base: typeof how.base === 'string' ? how.base : twemoji.base,
551
+ ext: how.ext || twemoji.ext,
552
+ size: how.folder || toSizeSquaredAsset(how.size || twemoji.size),
553
+ className: how.className || twemoji.className,
554
+ onerror: how.onerror || twemoji.onerror
555
+ });
556
+ }
557
+
558
+ function replace(text, callback) {
559
+ return String(text).replace(re, callback);
560
+ }
561
+
562
+ function test(text) {
563
+ // IE6 needs a reset before too
564
+ re.lastIndex = 0;
565
+ var result = re.test(text);
566
+ re.lastIndex = 0;
567
+ return result;
568
+ }
569
+
570
+ function toCodePoint(unicodeSurrogates, sep) {
571
+ var
572
+ r = [],
573
+ c = 0,
574
+ p = 0,
575
+ i = 0;
576
+ while (i < unicodeSurrogates.length) {
577
+ c = unicodeSurrogates.charCodeAt(i++);
578
+ if (p) {
579
+ r.push((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)).toString(16));
580
+ p = 0;
581
+ } else if (0xD800 <= c && c <= 0xDBFF) {
582
+ p = c;
583
+ } else {
584
+ r.push(c.toString(16));
585
+ }
586
+ }
587
+ return r.join(sep || '-');
588
+ }
589
+ }());