j1-template 2020.0.19 → 2020.0.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (506) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/blocks/ads/ad.html +2 -2
  3. data/_includes/themes/j1/blocks/footer/boxes/about_box.proc +1 -1
  4. data/_includes/themes/j1/blocks/footer/boxes/links_box.proc +3 -3
  5. data/_includes/themes/j1/blocks/footer/boxes/news_box.proc +1 -1
  6. data/_includes/themes/j1/blocks/footer/generator.html +2 -2
  7. data/_includes/themes/j1/layouts/content_generator_blog_archive.html +11 -11
  8. data/_includes/themes/j1/layouts/content_generator_collection.html +2 -2
  9. data/_includes/themes/j1/layouts/content_generator_page.html +4 -4
  10. data/_includes/themes/j1/layouts/content_generator_post.html +64 -162
  11. data/_includes/themes/j1/layouts/layout_metadata_generator.html +2 -2
  12. data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +15 -1
  13. data/_includes/themes/j1/modules/connectors/ads +2 -2
  14. data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +2 -4
  15. data/_includes/themes/j1/modules/connectors/analytics +2 -2
  16. data/_includes/themes/j1/modules/connectors/comment/disqus.html +38 -25
  17. data/_includes/themes/j1/modules/connectors/comments +2 -2
  18. data/_includes/themes/j1/modules/connectors/translator +2 -2
  19. data/_includes/themes/j1/modules/navigator/generator.html +17 -8
  20. data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +36 -26
  21. data/_includes/themes/j1/procedures/global/attributes_loader.proc +117 -0
  22. data/_includes/themes/j1/procedures/global/create_bs_button.proc +4 -3
  23. data/_includes/themes/j1/procedures/global/create_word_cloud.proc +17 -13
  24. data/_includes/themes/j1/procedures/global/get_documents_dir.proc +1 -1
  25. data/_includes/themes/j1/procedures/global/set_env_entry_document.proc +3 -3
  26. data/_includes/themes/j1/procedures/global/setup.proc +9 -9
  27. data/_includes/themes/j1/procedures/layouts/content_writer.proc +1 -2
  28. data/_includes/themes/j1/procedures/layouts/module_writer.proc +1 -1
  29. data/_includes/themes/j1/procedures/posts/collate_calendar.proc +1 -1
  30. data/_includes/themes/j1/procedures/posts/collate_list.proc +1 -1
  31. data/_includes/themes/j1/procedures/posts/collate_timeline.proc +18 -17
  32. data/_includes/themes/j1/procedures/posts/create_series_header.proc +9 -5
  33. data/_layouts/default.html +3 -3
  34. data/_layouts/home.html +2 -2
  35. data/apps/public/cc/cc.yml +37 -38
  36. data/assets/data/authclient.html +2 -2
  37. data/assets/data/banner.html +25 -21
  38. data/assets/data/carousel.json +1 -1
  39. data/assets/data/cookiebar.html +17 -13
  40. data/assets/data/fam.html +124 -0
  41. data/assets/data/footer.html +1 -1
  42. data/assets/data/galleries.json +1 -1
  43. data/assets/data/gallery_customizer.html +19 -7
  44. data/assets/data/mdi_icons.json +1 -1
  45. data/assets/data/menu.html +2 -2
  46. data/assets/data/mmenu.html +2 -2
  47. data/assets/data/mmenu_sidebar.html +4 -4
  48. data/assets/data/mmenu_toc.html +1 -1
  49. data/assets/data/panel.html +113 -67
  50. data/assets/data/quicklinks.html +16 -16
  51. data/assets/data/themes.json +9 -9
  52. data/assets/data/twa_v1.json +1 -1
  53. data/assets/error_pages/HTTP204.html +1 -0
  54. data/assets/error_pages/HTTP400.html +3 -2
  55. data/assets/error_pages/HTTP401.html +3 -2
  56. data/assets/error_pages/HTTP403.html +3 -2
  57. data/assets/error_pages/HTTP404.html +3 -2
  58. data/assets/error_pages/HTTP500.html +3 -2
  59. data/assets/error_pages/HTTP501.html +3 -2
  60. data/assets/error_pages/HTTP502.html +3 -2
  61. data/assets/error_pages/HTTP503.html +3 -2
  62. data/assets/error_pages/HTTP520.html +3 -2
  63. data/assets/error_pages/HTTP521.html +3 -2
  64. data/assets/error_pages/HTTP533.html +3 -2
  65. data/assets/themes/j1/adapter/js/algolia.js +2 -2
  66. data/assets/themes/j1/adapter/js/attic.js +2 -2
  67. data/assets/themes/j1/adapter/js/{mdb.js → bmd.js} +11 -11
  68. data/assets/themes/j1/adapter/js/carousel.js +6 -6
  69. data/assets/themes/j1/adapter/js/clipboard.js +3 -3
  70. data/assets/themes/j1/adapter/js/cookiebar.js +1 -1
  71. data/assets/themes/j1/adapter/js/{ssm.js → fam.js} +275 -148
  72. data/assets/themes/j1/adapter/js/framer.js +74 -62
  73. data/assets/themes/j1/adapter/js/gallery_customizer.js +4 -3
  74. data/assets/themes/j1/adapter/js/j1.js +25 -19
  75. data/assets/themes/j1/adapter/js/jf_gallery.js +4 -4
  76. data/assets/themes/j1/adapter/js/lightbox.js +2 -2
  77. data/assets/themes/j1/adapter/js/logger.js +2 -2
  78. data/assets/themes/j1/adapter/js/{searcher.js → lunr_search.js} +68 -65
  79. data/assets/themes/j1/adapter/js/mmenu.js +16 -10
  80. data/assets/themes/j1/adapter/js/navigator.js +81 -60
  81. data/assets/themes/j1/adapter/js/rouge.js +246 -0
  82. data/assets/themes/j1/adapter/js/rtable.js +181 -0
  83. data/assets/themes/j1/adapter/js/themer.js +63 -110
  84. data/assets/themes/j1/adapter/js/toccer.js +72 -32
  85. data/assets/themes/j1/core/css/animate.css +15 -15
  86. data/assets/themes/j1/core/css/bootstrap.css +0 -14
  87. data/assets/themes/j1/core/css/custom.scss +28 -0
  88. data/assets/themes/j1/core/css/globals.css +14523 -0
  89. data/assets/themes/j1/core/css/globals.min.css +1 -0
  90. data/assets/themes/j1/core/css/globals.scss +28 -0
  91. data/assets/themes/j1/core/css/{icons-fontawesome.css → icon-fonts/fontawesome.css} +17 -17
  92. data/assets/themes/j1/core/css/{icons-fontawesome.min.css → icon-fonts/fontawesome.min.css} +0 -0
  93. data/assets/themes/j1/core/css/{icons-iconify.css → icon-fonts/iconify.css} +15 -15
  94. data/assets/themes/j1/core/css/{icons-iconify.min.css → icon-fonts/iconify.min.css} +0 -0
  95. data/assets/themes/j1/core/css/{icons-materialdesign.css → icon-fonts/materialdesign.css} +17 -17
  96. data/assets/themes/j1/core/css/{icons-materialdesign.min.css → icon-fonts/materialdesign.min.css} +0 -0
  97. data/assets/themes/j1/core/css/{icons-twemoji.css → icon-fonts/twemoji.css} +18 -18
  98. data/assets/themes/j1/core/css/{icons-twemoji.min.css → icon-fonts/twemoji.min.css} +0 -0
  99. data/assets/themes/j1/core/css/{theme-extensions.css → theme_extensions.css} +3625 -1816
  100. data/assets/themes/j1/core/css/theme_extensions.min.css +1 -0
  101. data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.css +7171 -0
  102. data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.min.css +6 -0
  103. data/assets/themes/j1/core/css/{uno-dark.css → themes/uno-dark/bootstrap.css} +548 -316
  104. data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.min.css +6 -0
  105. data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +22519 -0
  106. data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +8 -0
  107. data/assets/themes/j1/core/css/uno.css +5284 -15518
  108. data/assets/themes/j1/core/css/uno.min.css +1 -8
  109. data/assets/themes/j1/core/css/uno.scss +28 -0
  110. data/assets/themes/j1/core/css/vendor.css +102 -73
  111. data/assets/themes/j1/core/css/vendor.min.css +1 -1
  112. data/assets/themes/j1/core/css/vendor.scss +28 -0
  113. data/assets/themes/j1/core/js/template.js +6 -11
  114. data/assets/themes/j1/core/js/template.js.map +1 -1
  115. data/assets/themes/j1/core/js/template.min.js +1 -1
  116. data/assets/themes/j1/modules/backstretch/js/backstretch.js +12 -13
  117. data/assets/themes/j1/modules/backstretch/js/backstretch.min.js +12 -13
  118. data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.full.js +6930 -0
  119. data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.js +6 -0
  120. data/assets/themes/j1/modules/carousel/css/carousel.css +8 -9
  121. data/assets/themes/j1/modules/carousel/css/carousel.min.css +7 -9
  122. data/assets/themes/j1/modules/carousel/css/carousel_transitions.css +7 -8
  123. data/assets/themes/j1/modules/carousel/css/carousel_transitions.min.css +7 -9
  124. data/assets/themes/j1/modules/carousel/css/theme/uno.css +39 -48
  125. data/assets/themes/j1/modules/carousel/css/theme/uno.min.css +8 -9
  126. data/assets/themes/j1/modules/cash/js/cash.js +1374 -0
  127. data/assets/themes/j1/modules/cash/js/cash.min.js +42 -0
  128. data/assets/themes/j1/modules/clipboard/css/theme/uno.css +9 -9
  129. data/assets/themes/j1/modules/clipboard/css/theme/uno.min.css +8 -45
  130. data/assets/themes/j1/modules/fam/css/uno/fam.css +369 -0
  131. data/assets/themes/j1/modules/fam/js/fam.js +477 -0
  132. data/assets/themes/j1/modules/iframeResizer/examples/frame.nested.html +1 -1
  133. data/assets/themes/j1/modules/iframeResizer/js/{iframeResizer.js → resizer.js} +0 -0
  134. data/assets/themes/j1/modules/iframeResizer/js/{iframeResizer.map → resizer.map} +0 -0
  135. data/assets/themes/j1/modules/iframeResizer/js/{iframeResizer.min.js → resizer.min.js} +0 -0
  136. data/assets/themes/j1/modules/jquery/js/jquery.js +7 -4
  137. data/assets/themes/j1/modules/jquery/js/jquery.min.js +2 -2
  138. data/assets/themes/j1/modules/jquery/js/require.js +2145 -0
  139. data/assets/themes/j1/modules/jquery/js/require.min.js +5 -0
  140. data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.css +13 -13
  141. data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.min.css +8 -31
  142. data/assets/themes/j1/modules/lightGallery/css/themes/uno.css +7 -8
  143. data/assets/themes/j1/modules/lightGallery/css/themes/uno.min.css +8 -10
  144. data/assets/themes/j1/modules/lightbox/css/lightbox.css +11 -12
  145. data/assets/themes/j1/modules/lightbox/css/lightbox.min.css +11 -12
  146. data/assets/themes/j1/modules/lightbox/css/theme/uno.css +7 -7
  147. data/assets/themes/j1/modules/lightbox/css/theme/uno.min.css +7 -8
  148. data/assets/themes/j1/modules/lightbox/js/lightbox.js +12 -13
  149. data/assets/themes/j1/modules/lightbox/js/lightbox.min.js +11 -27
  150. data/assets/themes/j1/modules/lunrSearch/css/lunr_search.css +32 -0
  151. data/assets/themes/j1/modules/lunrSearch/css/lunr_search.min.css +25 -0
  152. data/assets/themes/j1/modules/lunrSearch/js/dateformat.js +125 -0
  153. data/assets/themes/j1/modules/lunrSearch/js/dateformat.min.js +14 -0
  154. data/assets/themes/j1/modules/lunrSearch/js/lunr.js +3475 -0
  155. data/assets/themes/j1/modules/lunrSearch/js/lunr.min.js +51 -0
  156. data/assets/themes/j1/modules/lunrSearch/js/lunr_search.js +184 -0
  157. data/assets/themes/j1/modules/lunrSearch/js/lunr_search.min.js +17 -0
  158. data/assets/themes/j1/modules/lunrSearch/js/mustache.js +772 -0
  159. data/assets/themes/j1/modules/lunrSearch/js/mustache.min.js +772 -0
  160. data/assets/themes/j1/modules/lunrSearch/js/uri.js +2340 -0
  161. data/assets/themes/j1/modules/lunrSearch/js/uri.min.js +93 -0
  162. data/assets/themes/j1/modules/materialize/js/anime.js +1283 -0
  163. data/assets/themes/j1/modules/materialize/js/anime.min.js +34 -0
  164. data/assets/themes/j1/modules/materialize/js/autocomplete.js +450 -0
  165. data/assets/themes/j1/modules/materialize/js/buttons.js +409 -0
  166. data/assets/themes/j1/modules/materialize/js/cards.js +40 -0
  167. data/assets/themes/j1/modules/materialize/js/carousel.js +717 -0
  168. data/assets/themes/j1/modules/materialize/js/cash-dom.js +1044 -0
  169. data/assets/themes/j1/modules/materialize/js/cash.js +960 -0
  170. data/assets/themes/j1/modules/materialize/js/characterCounter.js +136 -0
  171. data/assets/themes/j1/modules/materialize/js/chips.js +481 -0
  172. data/assets/themes/j1/modules/materialize/js/collapsible.js +275 -0
  173. data/assets/themes/j1/modules/materialize/js/component.js +44 -0
  174. data/assets/themes/j1/modules/materialize/js/datepicker.js +975 -0
  175. data/assets/themes/j1/modules/materialize/js/dropdown.js +617 -0
  176. data/assets/themes/j1/modules/materialize/js/forms.js +275 -0
  177. data/assets/themes/j1/modules/materialize/js/global.js +427 -0
  178. data/assets/themes/j1/modules/materialize/js/materialbox.js +453 -0
  179. data/assets/themes/j1/modules/materialize/js/modal.js +382 -0
  180. data/assets/themes/j1/modules/materialize/js/parallax.js +138 -0
  181. data/assets/themes/j1/modules/materialize/js/pushpin.js +145 -0
  182. data/assets/themes/j1/modules/materialize/js/range.js +263 -0
  183. data/assets/themes/j1/modules/materialize/js/ripple.js +335 -0
  184. data/assets/themes/j1/modules/materialize/js/scrollspy.js +295 -0
  185. data/assets/themes/j1/modules/materialize/js/select.js +432 -0
  186. data/assets/themes/j1/modules/materialize/js/sidenav.js +580 -0
  187. data/assets/themes/j1/modules/materialize/js/slider.js +359 -0
  188. data/assets/themes/j1/modules/materialize/js/tabs.js +402 -0
  189. data/assets/themes/j1/modules/materialize/js/tapTarget.js +314 -0
  190. data/assets/themes/j1/modules/materialize/js/timepicker.js +647 -0
  191. data/assets/themes/j1/modules/materialize/js/toasts.js +310 -0
  192. data/assets/themes/j1/modules/materialize/js/tooltip.js +303 -0
  193. data/assets/themes/j1/modules/materialize/js/waves.js +335 -0
  194. data/assets/themes/j1/modules/materialize/scss/components/_badges.scss +55 -0
  195. data/assets/themes/j1/modules/materialize/scss/components/_buttons.scss +322 -0
  196. data/assets/themes/j1/modules/materialize/scss/components/_cards.scss +195 -0
  197. data/assets/themes/j1/modules/materialize/scss/components/_carousel.scss +90 -0
  198. data/assets/themes/j1/modules/materialize/scss/components/_chips.scss +90 -0
  199. data/assets/themes/j1/modules/materialize/scss/components/_collapsible.scss +91 -0
  200. data/assets/themes/j1/modules/materialize/scss/components/_color-classes.scss +32 -0
  201. data/assets/themes/j1/modules/materialize/scss/components/_color-variables.scss +370 -0
  202. data/assets/themes/j1/modules/materialize/scss/components/_datepicker.scss +191 -0
  203. data/assets/themes/j1/modules/materialize/scss/components/_dropdown.scss +85 -0
  204. data/assets/themes/j1/modules/materialize/scss/components/_global.scss +769 -0
  205. data/assets/themes/j1/modules/materialize/scss/components/_grid.scss +156 -0
  206. data/assets/themes/j1/modules/materialize/scss/components/_icons-material-design.scss +5 -0
  207. data/assets/themes/j1/modules/materialize/scss/components/_materialbox.scss +43 -0
  208. data/assets/themes/j1/modules/materialize/scss/components/_modal.scss +94 -0
  209. data/assets/themes/j1/modules/materialize/scss/components/_navbar.scss +208 -0
  210. data/assets/themes/j1/modules/materialize/scss/components/_normalize.scss +447 -0
  211. data/assets/themes/j1/modules/materialize/scss/components/_preloader.scss +334 -0
  212. data/assets/themes/j1/modules/materialize/scss/components/_pulse.scss +34 -0
  213. data/assets/themes/j1/modules/materialize/scss/components/_sidenav.scss +216 -0
  214. data/assets/themes/j1/modules/materialize/scss/components/_slider.scss +92 -0
  215. data/assets/themes/j1/modules/materialize/scss/components/_table_of_contents.scss +33 -0
  216. data/assets/themes/j1/modules/materialize/scss/components/_tabs.scss +99 -0
  217. data/assets/themes/j1/modules/materialize/scss/components/_tapTarget.scss +103 -0
  218. data/assets/themes/j1/modules/materialize/scss/components/_timepicker.scss +183 -0
  219. data/assets/themes/j1/modules/materialize/scss/components/_toast.scss +58 -0
  220. data/assets/themes/j1/modules/materialize/scss/components/_tooltip.scss +32 -0
  221. data/assets/themes/j1/modules/materialize/scss/components/_transitions.scss +13 -0
  222. data/assets/themes/j1/modules/materialize/scss/components/_typography.scss +60 -0
  223. data/assets/themes/j1/modules/materialize/scss/components/_variables.scss +349 -0
  224. data/assets/themes/j1/modules/materialize/scss/components/_waves.scss +114 -0
  225. data/assets/themes/j1/modules/materialize/scss/components/forms/_checkboxes.scss +200 -0
  226. data/assets/themes/j1/modules/materialize/scss/components/forms/_file-input.scss +44 -0
  227. data/assets/themes/j1/modules/materialize/scss/components/forms/_forms.scss +22 -0
  228. data/assets/themes/j1/modules/materialize/scss/components/forms/_input-fields.scss +354 -0
  229. data/assets/themes/j1/modules/materialize/scss/components/forms/_radio-buttons.scss +115 -0
  230. data/assets/themes/j1/modules/materialize/scss/components/forms/_range.scss +161 -0
  231. data/assets/themes/j1/modules/materialize/scss/components/forms/_select.scss +180 -0
  232. data/assets/themes/j1/modules/materialize/scss/components/forms/_switches.scss +89 -0
  233. data/assets/themes/j1/modules/materialize/scss/materialize.scss +41 -0
  234. data/assets/themes/j1/modules/mmenuLight/css/mmenu.css +11 -11
  235. data/assets/themes/j1/modules/mmenuLight/css/theme/uno.min.css +37 -11
  236. data/assets/themes/j1/modules/popper/js/popper.js +1 -1
  237. data/assets/themes/j1/modules/popper/js/popper.js.map +1 -1
  238. data/assets/themes/j1/modules/popper/js/popper.min.js.map +1 -1
  239. data/assets/themes/j1/modules/rouge/js/select.js +25 -0
  240. data/assets/themes/j1/modules/rtable/LICENSE +22 -0
  241. data/assets/themes/j1/modules/rtable/README.md +418 -0
  242. data/assets/themes/j1/modules/rtable/css/tablesaw.stackonly.css +148 -0
  243. data/assets/themes/j1/modules/rtable/css/theme/uno.css +191 -0
  244. data/assets/themes/j1/modules/rtable/css/theme/uno.min.css +191 -0
  245. data/assets/themes/j1/modules/rtable/js/rtable.js +692 -0
  246. data/assets/themes/j1/modules/rtable/js/rtable.min.js +690 -0
  247. data/assets/themes/j1/modules/rtable/js/tablesaw-init.js +18 -0
  248. data/assets/themes/j1/modules/rtable/js/tablesaw.stackonly.js +2371 -0
  249. data/assets/themes/j1/modules/{bsThemeSwitcher → themeSwitcher}/js/switcher.js +15 -17
  250. data/assets/themes/j1/modules/themeSwitcher/js/switcher.min.js +26 -0
  251. data/assets/themes/j1/modules/twemoji/css/picker/twemoji-picker.css +1 -1
  252. data/assets/themes/j1/modules/twemoji/css/picker/twemoji-picker.min.css +1 -1
  253. data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.js +2 -2
  254. data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.min.js +2 -257
  255. data/assets/themes/j1/modules/twemoji/js/twemoji.js +11 -11
  256. data/assets/themes/j1/modules/twemoji/js/twemoji.min.js +11 -12
  257. data/lib/j1/commands/generate.rb +6 -6
  258. data/lib/j1/version.rb +1 -1
  259. data/lib/j1_app/j1_auth_manager/config.rb +2 -2
  260. data/lib/starter_web/Gemfile +12 -16
  261. data/lib/starter_web/_config.yml +162 -22
  262. data/lib/starter_web/_data/apps/carousel.yml +10 -10
  263. data/lib/starter_web/_data/apps/justified_gallery.yml +44 -10
  264. data/lib/starter_web/_data/blocks/banner.yml +32 -27
  265. data/lib/starter_web/_data/blocks/defaults/banner.yml +14 -13
  266. data/lib/starter_web/_data/blocks/defaults/footer.yml +1 -1
  267. data/lib/starter_web/_data/blocks/defaults/panel.yml +3 -2
  268. data/lib/starter_web/_data/blocks/footer.yml +1 -1
  269. data/lib/starter_web/_data/blocks/panel.yml +24 -25
  270. data/lib/starter_web/_data/{template_settings.yml → j1_config.yml} +64 -11
  271. data/lib/starter_web/_data/layouts/home.yml +20 -10
  272. data/lib/starter_web/_data/layouts/page.yml +10 -0
  273. data/lib/starter_web/_data/layouts/post.yml +10 -0
  274. data/lib/starter_web/_data/modules/defaults/cookiebar.yml +3 -1
  275. data/lib/starter_web/_data/modules/defaults/{ssm.yml → fam.yml} +12 -15
  276. data/lib/starter_web/_data/modules/defaults/lunr_search.yml +171 -0
  277. data/lib/starter_web/_data/modules/defaults/navigator.yml +5 -5
  278. data/lib/starter_web/_data/modules/defaults/themer.yml +8 -13
  279. data/lib/starter_web/_data/modules/defaults/toccer.yml +4 -2
  280. data/lib/starter_web/_data/modules/fam.yml +158 -0
  281. data/lib/starter_web/_data/modules/{back2top.yml → lunr_search.yml} +15 -9
  282. data/lib/starter_web/_data/modules/navigator.yml +2 -2
  283. data/lib/starter_web/_data/modules/navigator_menu.yml +16 -10
  284. data/lib/starter_web/_data/modules/themer.yml +0 -18
  285. data/lib/starter_web/_data/modules/toccer.yml +0 -73
  286. data/lib/starter_web/_data/resources.yml +195 -67
  287. data/lib/starter_web/_includes/attributes.asciidoc +194 -0
  288. data/lib/starter_web/_includes/breadcrumbs.html +11 -0
  289. data/lib/starter_web/_includes/documents/licenses/mit.asciidoc +19 -0
  290. data/lib/starter_web/{collections/posts/private → _includes/documents}/readme +0 -0
  291. data/lib/starter_web/_includes/tables/jekyll_variables.asciidoc +45 -0
  292. data/lib/starter_web/_includes/tables/template_variables.asciidoc +46 -0
  293. data/lib/starter_web/_plugins/debug.rb +0 -1
  294. data/lib/starter_web/_plugins/filters.rb +0 -1
  295. data/lib/starter_web/_plugins/{lorem-inline.rb → lorem_inline.rb} +1 -2
  296. data/lib/starter_web/_plugins/lunr_index.rb +313 -0
  297. data/lib/starter_web/_plugins/prettify.rb +0 -3
  298. data/lib/starter_web/_plugins/simple_search_filter.rb +0 -1
  299. data/lib/starter_web/_plugins/symlink_watcher.rb +2 -3
  300. data/lib/starter_web/assets/images/modules/attics/banner/lunr-banner-1280x800.jpg +0 -0
  301. data/lib/starter_web/assets/images/modules/attics/katie-moum-1920x1280.jpg +0 -0
  302. data/lib/starter_web/assets/images/modules/attics/tldr-1920x800.jpg +0 -0
  303. data/lib/starter_web/assets/images/pages/winlogbeat/coordinate-map.png +0 -0
  304. data/lib/starter_web/assets/images/pages/winlogbeat/kibana-powershell.jpg +0 -0
  305. data/lib/starter_web/assets/images/pages/winlogbeat/option_ignore_outgoing.png +0 -0
  306. data/lib/starter_web/assets/images/pages/winlogbeat/winlogbeat-dashboard.png +0 -0
  307. data/lib/starter_web/collections/posts/{protected → private/_posts}/readme +0 -0
  308. data/{assets/README.md → lib/starter_web/collections/posts/protected/_posts/readme} +0 -0
  309. data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1-template.adoc.erb +77 -80
  310. data/lib/starter_web/collections/posts/public/featured/_posts/2018-05-01-confusion-about-base-url.adoc +21 -10
  311. data/lib/starter_web/collections/posts/public/featured/_posts/2019-05-01-top-open-source-static-site-generators.adoc +41 -31
  312. data/lib/starter_web/collections/posts/public/featured/_posts/2019-06-01-about-cookies.adoc +32 -27
  313. data/lib/starter_web/collections/posts/public/featured/_posts/_includes/attributes.asciidoc +38 -0
  314. data/lib/starter_web/collections/posts/public/featured/_posts/_includes/documents/readme +0 -0
  315. data/lib/starter_web/collections/posts/public/featured/_posts/{000_includes → _includes/documents}/unsplash-badge.asciidoc +0 -0
  316. data/lib/starter_web/collections/posts/public/featured/_posts/_includes/tables/readme +0 -0
  317. data/lib/starter_web/collections/posts/public/series/_posts/2018-11-01-docker-using-shared-folders.adoc +494 -502
  318. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +144 -0
  319. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +146 -0
  320. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +146 -0
  321. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +146 -0
  322. data/lib/starter_web/collections/posts/public/{featured/_posts/000_includes → series/_posts/_includes}/attributes.asciidoc +8 -18
  323. data/lib/starter_web/collections/posts/public/series/_posts/{000_includes → _includes}/documents/100-docker-using-shared-folders.asciidoc +0 -0
  324. data/lib/starter_web/collections/posts/public/series/_posts/{000_includes → _includes}/documents/loop.sh +0 -0
  325. data/lib/starter_web/collections/posts/public/series/_posts/{000_includes → _includes}/tables/debug_variables.asciidoc +0 -0
  326. data/lib/starter_web/collections/posts/public/test_posts/_posts/2020-09-11-test_post.adoc +218 -0
  327. data/lib/starter_web/collections/posts/public/{wikipedia/_posts/000_includes → test_posts/_posts/_includes}/attributes.asciidoc +9 -21
  328. data/lib/starter_web/collections/posts/public/test_posts/_posts/_includes/documents/readme +0 -0
  329. data/lib/starter_web/collections/posts/public/{wikipedia/_posts/000_includes → test_posts/_posts/_includes}/tables/debug_variables.asciidoc +0 -0
  330. data/lib/starter_web/collections/posts/public/test_posts/_posts/_includes/tables/readme +0 -0
  331. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +16 -8
  332. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +2 -7
  333. data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +2 -6
  334. data/lib/starter_web/collections/posts/public/wikipedia/_posts/_includes/attributes.asciidoc +37 -0
  335. data/lib/starter_web/collections/posts/public/wikipedia/_posts/_includes/documents/readme +0 -0
  336. data/lib/starter_web/collections/posts/public/wikipedia/_posts/_includes/tables/readme +0 -0
  337. data/lib/starter_web/index.html +16 -10
  338. data/lib/starter_web/package.json +5 -2
  339. data/lib/starter_web/pages/protected/site_search.adoc +8 -19
  340. data/lib/starter_web/pages/public/about/about_site.adoc +0 -2
  341. data/lib/starter_web/pages/public/about/become_a_patron.adoc +1 -3
  342. data/lib/starter_web/pages/public/blog/navigator/archive.html +34 -9
  343. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +40 -16
  344. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +32 -8
  345. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +8 -4
  346. data/lib/starter_web/pages/public/blog/navigator/index.html +6 -3
  347. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/100_meet_and_greet_jekyll.adoc +15 -21
  348. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/200_preparations.adoc +32 -27
  349. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/300_first_awesome_web.adoc +32 -27
  350. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/{000_includes → _includes}/attributes.asciidoc +15 -13
  351. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/documents/100_meet_and_greet_jekyll.asciidoc +31 -0
  352. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/{000_includes → _includes}/documents/200_preparations.asciidoc +0 -0
  353. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/{000_includes → _includes}/documents/300_first_awesome_web.asciidoc +0 -0
  354. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/{000_includes → _includes}/parts.asciidoc +1 -1
  355. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/tables/debug_variables.asciidoc +48 -0
  356. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/tables/readme +0 -0
  357. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +76 -111
  358. data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +37 -45
  359. data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +51 -63
  360. data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +74 -80
  361. data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +64 -84
  362. data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +34 -42
  363. data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +281 -91
  364. data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +138 -52
  365. data/lib/starter_web/pages/public/learn/roundtrip/600_lunr.adoc +236 -0
  366. data/lib/starter_web/pages/public/learn/roundtrip/610_fam.adoc +294 -0
  367. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/attributes.asciidoc +10 -29
  368. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/100_gistblock.asciidoc +28 -0
  369. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/documents/410_bottom_info.asciidoc +2 -2
  370. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/documents/410_bottom_left_warning.asciidoc +2 -2
  371. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/documents/410_bottom_right_danger.asciidoc +2 -2
  372. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/documents/410_central_success.asciidoc +2 -2
  373. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/documents/410_full_height_left_info.asciidoc +2 -2
  374. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/documents/410_full_height_right_success.asciidoc +2 -2
  375. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/documents/410_table_3_column.asciidoc +1 -1
  376. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/documents/410_top_info.asciidoc +2 -2
  377. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/documents/410_top_left_info.asciidoc +2 -2
  378. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/documents/410_top_right_success.asciidoc +2 -2
  379. data/lib/starter_web/pages/public/learn/roundtrip/{000_includes → _includes}/documents/419_advanced_modals_demo.asciidoc +16 -16
  380. data/lib/starter_web/pages/public/learn/roundtrip/_includes/tables/readme +0 -0
  381. data/lib/starter_web/pages/public/learn/{whats_up.adoc → where_to_go.adoc} +31 -46
  382. data/lib/starter_web/pages/public/legal/de/100_impress.adoc +3 -2
  383. data/lib/starter_web/pages/public/legal/de/200_terms_of_use.adoc +2 -1
  384. data/lib/starter_web/pages/public/legal/de/300_privacy.adoc +7 -12
  385. data/lib/starter_web/pages/public/legal/de/400_license_agreement.adoc +2 -1
  386. data/lib/starter_web/pages/public/legal/de/500_support.adoc +2 -1
  387. data/lib/starter_web/pages/public/legal/en/000_copyright.adoc +32 -28
  388. data/lib/starter_web/pages/public/legal/en/100_impress.adoc +12 -8
  389. data/lib/starter_web/pages/public/legal/en/200_terms_of_use.adoc +17 -12
  390. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +38 -36
  391. data/lib/starter_web/pages/public/legal/en/400_license_agreement.adoc +15 -6
  392. data/lib/starter_web/pages/public/legal/en/500_support.adoc +12 -4
  393. data/lib/starter_web/pages/public/legal/en/eu/cookie.policy.asciidoc +1 -1
  394. data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +68 -68
  395. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/attributes.asciidoc +22 -8
  396. data/lib/starter_web/pages/public/previewer/_includes/documents/licenses/mit.asciidoc +19 -0
  397. data/lib/starter_web/pages/public/previewer/_includes/documents/readme +0 -0
  398. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/mdi_icons/100_absolute_sizes.asciidoc +1 -1
  399. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/mdi_icons/110_bs_grid_sizes.asciidoc +1 -1
  400. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/mdi_icons/120_relative_sizes.asciidoc +1 -1
  401. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/mdi_icons/200_rotate.asciidoc +1 -1
  402. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/mdi_icons/300_flip.asciidoc +1 -1
  403. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/mdi_icons/400_spin_pulsed.asciidoc +1 -1
  404. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/mdi_icons/500_bw_color_palette.asciidoc +1 -1
  405. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/mdi_icons/510_bs_color_palette.asciidoc +1 -1
  406. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/mdi_icons/600_md_color_palette.asciidoc +1 -1
  407. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/mdi_icons/601_md_color_palette_indigo.asciidoc +1 -1
  408. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/mdi_icons/602_md_color_palette_pink.asciidoc +1 -1
  409. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/twitter_emoji/100_bs_sizes.asciidoc +1 -1
  410. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/twitter_emoji/100_relative_sizes.asciidoc +1 -1
  411. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/twitter_emoji/200_rotate.asciidoc +1 -1
  412. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/twitter_emoji/300_flip.asciidoc +1 -1
  413. data/lib/starter_web/pages/public/previewer/{000_includes → _includes}/tables/twitter_emoji/400_spin_pulsed.asciidoc +1 -1
  414. data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +860 -595
  415. data/lib/starter_web/pages/public/previewer/iframer.adoc +48 -41
  416. data/lib/starter_web/pages/public/previewer/justified_gallery.html +15 -7
  417. data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +21 -26
  418. data/lib/starter_web/pages/public/previewer/rouge.adoc +205 -0
  419. data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +21 -27
  420. data/lib/starter_web/pages/public/test_pages/_includes/attributes.asciidoc +49 -0
  421. data/lib/starter_web/pages/public/{learn/roundtrip/000_includes → test_pages/_includes}/documents/100_gistblock.asciidoc +0 -0
  422. data/lib/starter_web/pages/public/test_pages/_includes/tables/000_bem_specifiers.asciidoc +22 -0
  423. data/lib/starter_web/pages/public/test_pages/_includes/tables/000_specifier_examples.asciidoc +56 -0
  424. data/lib/starter_web/pages/public/test_pages/breadcrumbs_tester.adoc +62 -0
  425. data/lib/starter_web/pages/public/test_pages/carousel_captions.adoc +1045 -0
  426. data/lib/starter_web/pages/public/test_pages/deck_of_posts.adoc +165 -0
  427. data/lib/starter_web/pages/public/test_pages/floating_actions_button.adoc +523 -0
  428. data/lib/starter_web/pages/public/{learn/examples → test_pages}/floating_ad.adoc +8 -21
  429. data/lib/starter_web/pages/public/{learn/examples → test_pages}/floating_div.adoc +25 -38
  430. data/lib/starter_web/pages/public/test_pages/lunr_tester.adoc +89 -0
  431. data/lib/starter_web/pages/public/{000_nav_pagination_tester.adoc → test_pages/nav_pagination_tester.adoc} +9 -22
  432. data/lib/starter_web/pages/public/test_pages/page_attribute_tester.adoc +196 -0
  433. data/lib/starter_web/pages/public/test_pages/responsive_images.adoc +213 -0
  434. data/lib/starter_web/pages/public/test_pages/responsive_tables.adoc +210 -0
  435. data/lib/starter_web/pages/public/test_pages/toccer_tester.adoc +2245 -0
  436. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/attributes.asciidoc +0 -0
  437. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/100_gistblock.asciidoc +0 -0
  438. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/410_bottom_info.asciidoc +0 -0
  439. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/410_bottom_left_warning.asciidoc +0 -0
  440. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/410_bottom_right_danger.asciidoc +0 -0
  441. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/410_central_success.asciidoc +0 -0
  442. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/410_full_height_left_info.asciidoc +0 -0
  443. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/410_full_height_right_success.asciidoc +0 -0
  444. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/410_table_3_column.asciidoc +1 -1
  445. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/410_top_info.asciidoc +0 -0
  446. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/410_top_left_info.asciidoc +0 -0
  447. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/410_top_right_success.asciidoc +0 -0
  448. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_includes/documents/419_advanced_modals_html.asciidoc +0 -0
  449. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/000_test_youtube_video.adoc +0 -0
  450. data/lib/starter_web/pages/public/{learn → test_pages}/vtutorials/100_basic_video.adoc +0 -0
  451. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  452. data/lib/starter_web/utilsrv/package.json +1 -1
  453. metadata +261 -146
  454. data/assets/data/jupyter/notebooks/_html/template.full.head.html +0 -75
  455. data/assets/data/jupyter/notebooks/_html/visualisation.html +0 -968
  456. data/assets/data/jupyter/notebooks/html/template.html +0 -50
  457. data/assets/data/jupyter/notebooks/html/visualisation.ok.html +0 -949
  458. data/assets/data/jupyter/notebooks/tutorial.ipynb +0 -169
  459. data/assets/data/jupyter/notebooks/visualisation.ipynb +0 -9413
  460. data/assets/data/search.json +0 -165
  461. data/assets/data/ssm.html +0 -242
  462. data/assets/themes/j1/adapter/js/back2top.js +0 -233
  463. data/assets/themes/j1/core/css/theme-extensions.min.css +0 -1
  464. data/assets/themes/j1/core/css/uno-dark.min.css +0 -6
  465. data/assets/themes/j1/modules/backstretch/js/backstretch.min.js.org +0 -1
  466. data/assets/themes/j1/modules/bootstrap/css/bootstrap.css +0 -10278
  467. data/assets/themes/j1/modules/bootstrap/css/bootstrap.css.map +0 -1
  468. data/assets/themes/j1/modules/bootstrap/css/bootstrap.min.css +0 -7
  469. data/assets/themes/j1/modules/bootstrap/css/bootstrap.min.css.map +0 -1
  470. data/assets/themes/j1/modules/bootstrap/js/bootstrap.js +0 -4420
  471. data/assets/themes/j1/modules/bootstrap/js/bootstrap.js.map +0 -1
  472. data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js +0 -7
  473. data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js.map +0 -1
  474. data/assets/themes/j1/modules/bsDatepicker/css/datepicker.css +0 -203
  475. data/assets/themes/j1/modules/bsDatepicker/css/theme/uno.css +0 -235
  476. data/assets/themes/j1/modules/bsDatepicker/js/datepicker.js +0 -509
  477. data/assets/themes/j1/modules/bsDatepicker/less/datepicker.less +0 -122
  478. data/assets/themes/j1/modules/bsThemeSwitcher/js/switcher.min.js +0 -20
  479. data/assets/themes/j1/modules/jekyllSearch/js/simple-jekyll-search.js +0 -468
  480. data/assets/themes/j1/modules/jekyllSearch/js/simple-jekyll-search.min.js +0 -6
  481. data/assets/themes/j1/modules/jqMouseWheel/README.md +0 -76
  482. data/assets/themes/j1/modules/jqMouseWheel/js/jquery.mousewheel.js +0 -221
  483. data/assets/themes/j1/modules/jqMouseWheel/js/jquery.mousewheel.min.js +0 -9
  484. data/assets/themes/j1/modules/noUISlider/LICENSE +0 -13
  485. data/assets/themes/j1/modules/noUISlider/css/nouislider.css +0 -260
  486. data/assets/themes/j1/modules/noUISlider/css/nouislider.min.css +0 -1
  487. data/assets/themes/j1/modules/noUISlider/js/nouislider.js +0 -2312
  488. data/assets/themes/j1/modules/noUISlider/js/nouislider.min.js +0 -3
  489. data/assets/themes/j1/modules/polyfills/js/msie.js +0 -140
  490. data/assets/themes/j1/modules/tocbot/css/theme/uno.css +0 -89
  491. data/assets/themes/j1/modules/tocbot/css/theme/uno.min.css +0 -89
  492. data/assets/themes/j1/modules/tocbot/css/tocbot.css +0 -75
  493. data/assets/themes/j1/modules/tocbot/css/tocbot.min.css +0 -19
  494. data/assets/themes/j1/modules/tocbot/js/tocbot.js +0 -19
  495. data/assets/themes/j1/modules/tocbot/js/tocbot.min.js +0 -19
  496. data/lib/starter_web/_data/modules/defaults/back2top.yml +0 -146
  497. data/lib/starter_web/_data/modules/defaults/cookie_consent.yml +0 -132
  498. data/lib/starter_web/_data/modules/defaults/stickybits.yml +0 -36
  499. data/lib/starter_web/_data/modules/ssm.yml +0 -142
  500. data/lib/starter_web/assets/images/modules/attics/welcome-1920x1280-bw.jpg +0 -0
  501. data/lib/starter_web/collections/posts/public/series/_posts/000_includes/attributes.asciidoc +0 -66
  502. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/000_includes/documents/100_meet_and_greet_jekyll.asciidoc +0 -31
  503. data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/000_includes/attributes.asciidoc +0 -69
  504. data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/000_includes/documents/100_buttons.asciidoc +0 -170
  505. data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/mdb_previewer.adoc +0 -52
  506. data/lib/starter_web/pages/public/learn/roundtrip/bs_tour.js +0 -98
@@ -0,0 +1,617 @@
1
+ (function($, anim) {
2
+ 'use strict';
3
+
4
+ let _defaults = {
5
+ alignment: 'left',
6
+ autoFocus: true,
7
+ constrainWidth: true,
8
+ container: null,
9
+ coverTrigger: true,
10
+ closeOnClick: true,
11
+ hover: false,
12
+ inDuration: 150,
13
+ outDuration: 250,
14
+ onOpenStart: null,
15
+ onOpenEnd: null,
16
+ onCloseStart: null,
17
+ onCloseEnd: null,
18
+ onItemClick: null
19
+ };
20
+
21
+ /**
22
+ * @class
23
+ */
24
+ class Dropdown extends Component {
25
+ constructor(el, options) {
26
+ super(Dropdown, el, options);
27
+
28
+ this.el.M_Dropdown = this;
29
+ Dropdown._dropdowns.push(this);
30
+
31
+ this.id = M.getIdFromTrigger(el);
32
+ this.dropdownEl = document.getElementById(this.id);
33
+ this.$dropdownEl = $(this.dropdownEl);
34
+
35
+ /**
36
+ * Options for the dropdown
37
+ * @member Dropdown#options
38
+ * @prop {String} [alignment='left'] - Edge which the dropdown is aligned to
39
+ * @prop {Boolean} [autoFocus=true] - Automatically focus dropdown el for keyboard
40
+ * @prop {Boolean} [constrainWidth=true] - Constrain width to width of the button
41
+ * @prop {Element} container - Container element to attach dropdown to (optional)
42
+ * @prop {Boolean} [coverTrigger=true] - Place dropdown over trigger
43
+ * @prop {Boolean} [closeOnClick=true] - Close on click of dropdown item
44
+ * @prop {Boolean} [hover=false] - Open dropdown on hover
45
+ * @prop {Number} [inDuration=150] - Duration of open animation in ms
46
+ * @prop {Number} [outDuration=250] - Duration of close animation in ms
47
+ * @prop {Function} onOpenStart - Function called when dropdown starts opening
48
+ * @prop {Function} onOpenEnd - Function called when dropdown finishes opening
49
+ * @prop {Function} onCloseStart - Function called when dropdown starts closing
50
+ * @prop {Function} onCloseEnd - Function called when dropdown finishes closing
51
+ */
52
+ this.options = $.extend({}, Dropdown.defaults, options);
53
+
54
+ /**
55
+ * Describes open/close state of dropdown
56
+ * @type {Boolean}
57
+ */
58
+ this.isOpen = false;
59
+
60
+ /**
61
+ * Describes if dropdown content is scrollable
62
+ * @type {Boolean}
63
+ */
64
+ this.isScrollable = false;
65
+
66
+ /**
67
+ * Describes if touch moving on dropdown content
68
+ * @type {Boolean}
69
+ */
70
+ this.isTouchMoving = false;
71
+
72
+ this.focusedIndex = -1;
73
+ this.filterQuery = [];
74
+
75
+ // Move dropdown-content after dropdown-trigger
76
+ if (!!this.options.container) {
77
+ $(this.options.container).append(this.dropdownEl);
78
+ } else {
79
+ this.$el.after(this.dropdownEl);
80
+ }
81
+
82
+ this._makeDropdownFocusable();
83
+ this._resetFilterQueryBound = this._resetFilterQuery.bind(this);
84
+ this._handleDocumentClickBound = this._handleDocumentClick.bind(this);
85
+ this._handleDocumentTouchmoveBound = this._handleDocumentTouchmove.bind(this);
86
+ this._handleDropdownClickBound = this._handleDropdownClick.bind(this);
87
+ this._handleDropdownKeydownBound = this._handleDropdownKeydown.bind(this);
88
+ this._handleTriggerKeydownBound = this._handleTriggerKeydown.bind(this);
89
+ this._setupEventHandlers();
90
+ }
91
+
92
+ static get defaults() {
93
+ return _defaults;
94
+ }
95
+
96
+ static init(els, options) {
97
+ return super.init(this, els, options);
98
+ }
99
+
100
+ /**
101
+ * Get Instance
102
+ */
103
+ static getInstance(el) {
104
+ let domElem = !!el.jquery ? el[0] : el;
105
+ return domElem.M_Dropdown;
106
+ }
107
+
108
+ /**
109
+ * Teardown component
110
+ */
111
+ destroy() {
112
+ this._resetDropdownStyles();
113
+ this._removeEventHandlers();
114
+ Dropdown._dropdowns.splice(Dropdown._dropdowns.indexOf(this), 1);
115
+ this.el.M_Dropdown = undefined;
116
+ }
117
+
118
+ /**
119
+ * Setup Event Handlers
120
+ */
121
+ _setupEventHandlers() {
122
+ // Trigger keydown handler
123
+ this.el.addEventListener('keydown', this._handleTriggerKeydownBound);
124
+
125
+ // Item click handler
126
+ this.dropdownEl.addEventListener('click', this._handleDropdownClickBound);
127
+
128
+ // Hover event handlers
129
+ if (this.options.hover) {
130
+ this._handleMouseEnterBound = this._handleMouseEnter.bind(this);
131
+ this.el.addEventListener('mouseenter', this._handleMouseEnterBound);
132
+ this._handleMouseLeaveBound = this._handleMouseLeave.bind(this);
133
+ this.el.addEventListener('mouseleave', this._handleMouseLeaveBound);
134
+ this.dropdownEl.addEventListener('mouseleave', this._handleMouseLeaveBound);
135
+
136
+ // Click event handlers
137
+ } else {
138
+ this._handleClickBound = this._handleClick.bind(this);
139
+ this.el.addEventListener('click', this._handleClickBound);
140
+ }
141
+ }
142
+
143
+ /**
144
+ * Remove Event Handlers
145
+ */
146
+ _removeEventHandlers() {
147
+ this.el.removeEventListener('keydown', this._handleTriggerKeydownBound);
148
+ this.dropdownEl.removeEventListener('click', this._handleDropdownClickBound);
149
+
150
+ if (this.options.hover) {
151
+ this.el.removeEventListener('mouseenter', this._handleMouseEnterBound);
152
+ this.el.removeEventListener('mouseleave', this._handleMouseLeaveBound);
153
+ this.dropdownEl.removeEventListener('mouseleave', this._handleMouseLeaveBound);
154
+ } else {
155
+ this.el.removeEventListener('click', this._handleClickBound);
156
+ }
157
+ }
158
+
159
+ _setupTemporaryEventHandlers() {
160
+ // Use capture phase event handler to prevent click
161
+ document.body.addEventListener('click', this._handleDocumentClickBound, true);
162
+ document.body.addEventListener('touchend', this._handleDocumentClickBound);
163
+ document.body.addEventListener('touchmove', this._handleDocumentTouchmoveBound);
164
+ this.dropdownEl.addEventListener('keydown', this._handleDropdownKeydownBound);
165
+ }
166
+
167
+ _removeTemporaryEventHandlers() {
168
+ // Use capture phase event handler to prevent click
169
+ document.body.removeEventListener('click', this._handleDocumentClickBound, true);
170
+ document.body.removeEventListener('touchend', this._handleDocumentClickBound);
171
+ document.body.removeEventListener('touchmove', this._handleDocumentTouchmoveBound);
172
+ this.dropdownEl.removeEventListener('keydown', this._handleDropdownKeydownBound);
173
+ }
174
+
175
+ _handleClick(e) {
176
+ e.preventDefault();
177
+ this.open();
178
+ }
179
+
180
+ _handleMouseEnter() {
181
+ this.open();
182
+ }
183
+
184
+ _handleMouseLeave(e) {
185
+ let toEl = e.toElement || e.relatedTarget;
186
+ let leaveToDropdownContent = !!$(toEl).closest('.dropdown-content').length;
187
+ let leaveToActiveDropdownTrigger = false;
188
+
189
+ let $closestTrigger = $(toEl).closest('.dropdown-trigger');
190
+ if (
191
+ $closestTrigger.length &&
192
+ !!$closestTrigger[0].M_Dropdown &&
193
+ $closestTrigger[0].M_Dropdown.isOpen
194
+ ) {
195
+ leaveToActiveDropdownTrigger = true;
196
+ }
197
+
198
+ // Close hover dropdown if mouse did not leave to either active dropdown-trigger or dropdown-content
199
+ if (!leaveToActiveDropdownTrigger && !leaveToDropdownContent) {
200
+ this.close();
201
+ }
202
+ }
203
+
204
+ _handleDocumentClick(e) {
205
+ let $target = $(e.target);
206
+ if (
207
+ this.options.closeOnClick &&
208
+ $target.closest('.dropdown-content').length &&
209
+ !this.isTouchMoving
210
+ ) {
211
+ // isTouchMoving to check if scrolling on mobile.
212
+ setTimeout(() => {
213
+ this.close();
214
+ }, 0);
215
+ } else if (
216
+ $target.closest('.dropdown-trigger').length ||
217
+ !$target.closest('.dropdown-content').length
218
+ ) {
219
+ setTimeout(() => {
220
+ this.close();
221
+ }, 0);
222
+ }
223
+ this.isTouchMoving = false;
224
+ }
225
+
226
+ _handleTriggerKeydown(e) {
227
+ // ARROW DOWN OR ENTER WHEN SELECT IS CLOSED - open Dropdown
228
+ if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ENTER) && !this.isOpen) {
229
+ e.preventDefault();
230
+ this.open();
231
+ }
232
+ }
233
+
234
+ /**
235
+ * Handle Document Touchmove
236
+ * @param {Event} e
237
+ */
238
+ _handleDocumentTouchmove(e) {
239
+ let $target = $(e.target);
240
+ if ($target.closest('.dropdown-content').length) {
241
+ this.isTouchMoving = true;
242
+ }
243
+ }
244
+
245
+ /**
246
+ * Handle Dropdown Click
247
+ * @param {Event} e
248
+ */
249
+ _handleDropdownClick(e) {
250
+ // onItemClick callback
251
+ if (typeof this.options.onItemClick === 'function') {
252
+ let itemEl = $(e.target).closest('li')[0];
253
+ this.options.onItemClick.call(this, itemEl);
254
+ }
255
+ }
256
+
257
+ /**
258
+ * Handle Dropdown Keydown
259
+ * @param {Event} e
260
+ */
261
+ _handleDropdownKeydown(e) {
262
+ if (e.which === M.keys.TAB) {
263
+ e.preventDefault();
264
+ this.close();
265
+
266
+ // Navigate down dropdown list
267
+ } else if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) && this.isOpen) {
268
+ e.preventDefault();
269
+ let direction = e.which === M.keys.ARROW_DOWN ? 1 : -1;
270
+ let newFocusedIndex = this.focusedIndex;
271
+ let foundNewIndex = false;
272
+ do {
273
+ newFocusedIndex = newFocusedIndex + direction;
274
+
275
+ if (
276
+ !!this.dropdownEl.children[newFocusedIndex] &&
277
+ this.dropdownEl.children[newFocusedIndex].tabIndex !== -1
278
+ ) {
279
+ foundNewIndex = true;
280
+ break;
281
+ }
282
+ } while (newFocusedIndex < this.dropdownEl.children.length && newFocusedIndex >= 0);
283
+
284
+ if (foundNewIndex) {
285
+ this.focusedIndex = newFocusedIndex;
286
+ this._focusFocusedItem();
287
+ }
288
+
289
+ // ENTER selects choice on focused item
290
+ } else if (e.which === M.keys.ENTER && this.isOpen) {
291
+ // Search for <a> and <button>
292
+ let focusedElement = this.dropdownEl.children[this.focusedIndex];
293
+ let $activatableElement = $(focusedElement)
294
+ .find('a, button')
295
+ .first();
296
+
297
+ // Click a or button tag if exists, otherwise click li tag
298
+ if (!!$activatableElement.length) {
299
+ $activatableElement[0].click();
300
+ } else if (!!focusedElement) {
301
+ focusedElement.click();
302
+ }
303
+
304
+ // Close dropdown on ESC
305
+ } else if (e.which === M.keys.ESC && this.isOpen) {
306
+ e.preventDefault();
307
+ this.close();
308
+ }
309
+
310
+ // CASE WHEN USER TYPE LETTERS
311
+ let letter = String.fromCharCode(e.which).toLowerCase(),
312
+ nonLetters = [9, 13, 27, 38, 40];
313
+ if (letter && nonLetters.indexOf(e.which) === -1) {
314
+ this.filterQuery.push(letter);
315
+
316
+ let string = this.filterQuery.join(''),
317
+ newOptionEl = $(this.dropdownEl)
318
+ .find('li')
319
+ .filter((el) => {
320
+ return (
321
+ $(el)
322
+ .text()
323
+ .toLowerCase()
324
+ .indexOf(string) === 0
325
+ );
326
+ })[0];
327
+
328
+ if (newOptionEl) {
329
+ this.focusedIndex = $(newOptionEl).index();
330
+ this._focusFocusedItem();
331
+ }
332
+ }
333
+
334
+ this.filterTimeout = setTimeout(this._resetFilterQueryBound, 1000);
335
+ }
336
+
337
+ /**
338
+ * Setup dropdown
339
+ */
340
+ _resetFilterQuery() {
341
+ this.filterQuery = [];
342
+ }
343
+
344
+ _resetDropdownStyles() {
345
+ this.$dropdownEl.css({
346
+ display: '',
347
+ width: '',
348
+ height: '',
349
+ left: '',
350
+ top: '',
351
+ 'transform-origin': '',
352
+ transform: '',
353
+ opacity: ''
354
+ });
355
+ }
356
+
357
+ _makeDropdownFocusable() {
358
+ // Needed for arrow key navigation
359
+ this.dropdownEl.tabIndex = 0;
360
+
361
+ // Only set tabindex if it hasn't been set by user
362
+ $(this.dropdownEl)
363
+ .children()
364
+ .each(function(el) {
365
+ if (!el.getAttribute('tabindex')) {
366
+ el.setAttribute('tabindex', 0);
367
+ }
368
+ });
369
+ }
370
+
371
+ _focusFocusedItem() {
372
+ if (
373
+ this.focusedIndex >= 0 &&
374
+ this.focusedIndex < this.dropdownEl.children.length &&
375
+ this.options.autoFocus
376
+ ) {
377
+ this.dropdownEl.children[this.focusedIndex].focus();
378
+ }
379
+ }
380
+
381
+ _getDropdownPosition() {
382
+ let offsetParentBRect = this.el.offsetParent.getBoundingClientRect();
383
+ let triggerBRect = this.el.getBoundingClientRect();
384
+ let dropdownBRect = this.dropdownEl.getBoundingClientRect();
385
+
386
+ let idealHeight = dropdownBRect.height;
387
+ let idealWidth = dropdownBRect.width;
388
+ let idealXPos = triggerBRect.left - dropdownBRect.left;
389
+ let idealYPos = triggerBRect.top - dropdownBRect.top;
390
+
391
+ let dropdownBounds = {
392
+ left: idealXPos,
393
+ top: idealYPos,
394
+ height: idealHeight,
395
+ width: idealWidth
396
+ };
397
+
398
+ // Countainer here will be closest ancestor with overflow: hidden
399
+ let closestOverflowParent = !!this.dropdownEl.offsetParent
400
+ ? this.dropdownEl.offsetParent
401
+ : this.dropdownEl.parentNode;
402
+
403
+ let alignments = M.checkPossibleAlignments(
404
+ this.el,
405
+ closestOverflowParent,
406
+ dropdownBounds,
407
+ this.options.coverTrigger ? 0 : triggerBRect.height
408
+ );
409
+
410
+ let verticalAlignment = 'top';
411
+ let horizontalAlignment = this.options.alignment;
412
+ idealYPos += this.options.coverTrigger ? 0 : triggerBRect.height;
413
+
414
+ // Reset isScrollable
415
+ this.isScrollable = false;
416
+
417
+ if (!alignments.top) {
418
+ if (alignments.bottom) {
419
+ verticalAlignment = 'bottom';
420
+ } else {
421
+ this.isScrollable = true;
422
+
423
+ // Determine which side has most space and cutoff at correct height
424
+ if (alignments.spaceOnTop > alignments.spaceOnBottom) {
425
+ verticalAlignment = 'bottom';
426
+ idealHeight += alignments.spaceOnTop;
427
+ idealYPos -= alignments.spaceOnTop;
428
+ } else {
429
+ idealHeight += alignments.spaceOnBottom;
430
+ }
431
+ }
432
+ }
433
+
434
+ // If preferred horizontal alignment is possible
435
+ if (!alignments[horizontalAlignment]) {
436
+ let oppositeAlignment = horizontalAlignment === 'left' ? 'right' : 'left';
437
+ if (alignments[oppositeAlignment]) {
438
+ horizontalAlignment = oppositeAlignment;
439
+ } else {
440
+ // Determine which side has most space and cutoff at correct height
441
+ if (alignments.spaceOnLeft > alignments.spaceOnRight) {
442
+ horizontalAlignment = 'right';
443
+ idealWidth += alignments.spaceOnLeft;
444
+ idealXPos -= alignments.spaceOnLeft;
445
+ } else {
446
+ horizontalAlignment = 'left';
447
+ idealWidth += alignments.spaceOnRight;
448
+ }
449
+ }
450
+ }
451
+
452
+ if (verticalAlignment === 'bottom') {
453
+ idealYPos =
454
+ idealYPos - dropdownBRect.height + (this.options.coverTrigger ? triggerBRect.height : 0);
455
+ }
456
+ if (horizontalAlignment === 'right') {
457
+ idealXPos = idealXPos - dropdownBRect.width + triggerBRect.width;
458
+ }
459
+ return {
460
+ x: idealXPos,
461
+ y: idealYPos,
462
+ verticalAlignment: verticalAlignment,
463
+ horizontalAlignment: horizontalAlignment,
464
+ height: idealHeight,
465
+ width: idealWidth
466
+ };
467
+ }
468
+
469
+ /**
470
+ * Animate in dropdown
471
+ */
472
+ _animateIn() {
473
+ anim.remove(this.dropdownEl);
474
+ anim({
475
+ targets: this.dropdownEl,
476
+ opacity: {
477
+ value: [0, 1],
478
+ easing: 'easeOutQuad'
479
+ },
480
+ scaleX: [0.3, 1],
481
+ scaleY: [0.3, 1],
482
+ duration: this.options.inDuration,
483
+ easing: 'easeOutQuint',
484
+ complete: (anim) => {
485
+ if (this.options.autoFocus) {
486
+ this.dropdownEl.focus();
487
+ }
488
+
489
+ // onOpenEnd callback
490
+ if (typeof this.options.onOpenEnd === 'function') {
491
+ this.options.onOpenEnd.call(this, this.el);
492
+ }
493
+ }
494
+ });
495
+ }
496
+
497
+ /**
498
+ * Animate out dropdown
499
+ */
500
+ _animateOut() {
501
+ anim.remove(this.dropdownEl);
502
+ anim({
503
+ targets: this.dropdownEl,
504
+ opacity: {
505
+ value: 0,
506
+ easing: 'easeOutQuint'
507
+ },
508
+ scaleX: 0.3,
509
+ scaleY: 0.3,
510
+ duration: this.options.outDuration,
511
+ easing: 'easeOutQuint',
512
+ complete: (anim) => {
513
+ this._resetDropdownStyles();
514
+
515
+ // onCloseEnd callback
516
+ if (typeof this.options.onCloseEnd === 'function') {
517
+ this.options.onCloseEnd.call(this, this.el);
518
+ }
519
+ }
520
+ });
521
+ }
522
+
523
+ /**
524
+ * Place dropdown
525
+ */
526
+ _placeDropdown() {
527
+ // Set width before calculating positionInfo
528
+ let idealWidth = this.options.constrainWidth
529
+ ? this.el.getBoundingClientRect().width
530
+ : this.dropdownEl.getBoundingClientRect().width;
531
+ this.dropdownEl.style.width = idealWidth + 'px';
532
+
533
+ let positionInfo = this._getDropdownPosition();
534
+ this.dropdownEl.style.left = positionInfo.x + 'px';
535
+ this.dropdownEl.style.top = positionInfo.y + 'px';
536
+ this.dropdownEl.style.height = positionInfo.height + 'px';
537
+ this.dropdownEl.style.width = positionInfo.width + 'px';
538
+ this.dropdownEl.style.transformOrigin = `${
539
+ positionInfo.horizontalAlignment === 'left' ? '0' : '100%'
540
+ } ${positionInfo.verticalAlignment === 'top' ? '0' : '100%'}`;
541
+ }
542
+
543
+ /**
544
+ * Open Dropdown
545
+ */
546
+ open() {
547
+ if (this.isOpen) {
548
+ return;
549
+ }
550
+ this.isOpen = true;
551
+
552
+ // onOpenStart callback
553
+ if (typeof this.options.onOpenStart === 'function') {
554
+ this.options.onOpenStart.call(this, this.el);
555
+ }
556
+
557
+ // Reset styles
558
+ this._resetDropdownStyles();
559
+ this.dropdownEl.style.display = 'block';
560
+
561
+ this._placeDropdown();
562
+ this._animateIn();
563
+ this._setupTemporaryEventHandlers();
564
+ }
565
+
566
+ /**
567
+ * Close Dropdown
568
+ */
569
+ close() {
570
+ if (!this.isOpen) {
571
+ return;
572
+ }
573
+ this.isOpen = false;
574
+ this.focusedIndex = -1;
575
+
576
+ // onCloseStart callback
577
+ if (typeof this.options.onCloseStart === 'function') {
578
+ this.options.onCloseStart.call(this, this.el);
579
+ }
580
+
581
+ this._animateOut();
582
+ this._removeTemporaryEventHandlers();
583
+
584
+ if (this.options.autoFocus) {
585
+ this.el.focus();
586
+ }
587
+ }
588
+
589
+ /**
590
+ * Recalculate dimensions
591
+ */
592
+ recalculateDimensions() {
593
+ if (this.isOpen) {
594
+ this.$dropdownEl.css({
595
+ width: '',
596
+ height: '',
597
+ left: '',
598
+ top: '',
599
+ 'transform-origin': ''
600
+ });
601
+ this._placeDropdown();
602
+ }
603
+ }
604
+ }
605
+
606
+ /**
607
+ * @static
608
+ * @memberof Dropdown
609
+ */
610
+ Dropdown._dropdowns = [];
611
+
612
+ M.Dropdown = Dropdown;
613
+
614
+ if (M.jQueryLoaded) {
615
+ M.initializeJqueryWrapper(Dropdown, 'dropdown', 'M_Dropdown');
616
+ }
617
+ })(cash, M.anime);