j1-template 2020.0.3 → 2020.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/content_generator_blog_archive.html +22 -18
  3. data/_includes/themes/j1/layouts/content_generator_collection.html +15 -12
  4. data/_includes/themes/j1/layouts/content_generator_page.html +16 -17
  5. data/_includes/themes/j1/layouts/content_generator_post.html +21 -26
  6. data/_includes/themes/j1/modules/navigator/generator.html +45 -29
  7. data/{lib/starter_web/apps → apps}/public/cc/cc.yml +0 -0
  8. data/{lib/starter_web/apps → apps}/public/cc/index.adoc +0 -0
  9. data/assets/data/menu.html +2 -1
  10. data/assets/data/mmenu.html +3 -3
  11. data/assets/data/{sidebar.html → mmenu_sidebar.html} +24 -18
  12. data/assets/data/mmenu_toc.html +45 -0
  13. data/assets/data/quicklinks.html +9 -4
  14. data/assets/data/ssm.html +231 -0
  15. data/assets/error_pages/HTTP204.html +3 -3
  16. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/algolia.js +3 -3
  17. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/attic.js +4 -4
  18. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/carousel.js +3 -3
  19. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/cookie_consent.js +0 -0
  20. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/framer.js +3 -3
  21. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/gallery_customizer.js +0 -0
  22. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/j1.js +18 -39
  23. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/justified_gallery.js +0 -0
  24. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/lightbox.js +0 -0
  25. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/logger.js +0 -0
  26. data/assets/themes/j1/adapter/js/mmenu.js +452 -0
  27. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/navigator.js +29 -35
  28. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/searcher.js +0 -0
  29. data/assets/themes/j1/adapter/js/ssm.js +518 -0
  30. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/themer.js +1 -1
  31. data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/toccer.js +46 -153
  32. data/assets/themes/j1/core/css/globals.css +1 -1
  33. data/assets/themes/j1/core/css/theme_extensions.css +681 -117
  34. data/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
  35. data/assets/themes/j1/core/css/uno.css +691 -117
  36. data/assets/themes/j1/core/css/uno.min.css +1 -1
  37. data/assets/themes/j1/core/css/vendor.css +4 -1
  38. data/assets/themes/j1/core/css/vendor.min.css +1 -1
  39. data/assets/themes/j1/core/js/template.js +40 -30
  40. data/assets/themes/j1/core/js/template.js.map +1 -1
  41. data/assets/themes/j1/core/js/template.min.js +1 -1
  42. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/carousel.css +0 -0
  43. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/carousel.min.css +0 -0
  44. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/carousel_transitions.css +0 -0
  45. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/carousel_transitions.min.css +0 -0
  46. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/theme/uno.css +0 -0
  47. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/theme/uno.min.css +0 -0
  48. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/images/ajax-loader.gif +0 -0
  49. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/images/grabbing.png +0 -0
  50. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/images/owl-logo.png +0 -0
  51. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/images/owl.video.play.png +0 -0
  52. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/js/carousel.js +0 -0
  53. data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/js/carousel.min.js +0 -0
  54. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iconify/js/iconify.min.js +0 -0
  55. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.absolute.html +0 -0
  56. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.content.html +0 -0
  57. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.hover.html +0 -0
  58. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.nested.html +0 -0
  59. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.textarea.html +0 -0
  60. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.tolerance.html +0 -0
  61. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/index.html +0 -0
  62. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/two.html +0 -0
  63. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.js +0 -0
  64. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.map +0 -0
  65. data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.min.js +0 -0
  66. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/LICENSE +0 -0
  67. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/README.md +0 -0
  68. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/css/justifiedGallery.css +0 -0
  69. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/css/justifiedGallery.min.css +0 -0
  70. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/css/theme/uno.css +0 -0
  71. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/js/justifiedGallery.3.7.0.js +0 -0
  72. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/js/justifiedGallery.js +0 -0
  73. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/js/justifiedGallery.min.js +0 -0
  74. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/less/.csslintrc +0 -0
  75. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/less/justifiedGallery.less +0 -0
  76. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v4.0.0/css/justifiedGallery.css +0 -0
  77. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v4.0.0/css/justifiedGallery.min.css +0 -0
  78. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v4.0.0/css/theme/uno.css +0 -0
  79. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v4.0.0/js/jquery.justifiedGallery.js +0 -0
  80. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v4.0.0/js/jquery.justifiedGallery.min.js +0 -0
  81. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/css/justifiedGallery.css +0 -0
  82. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/css/justifiedGallery.min.css +0 -0
  83. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/css/theme/uno.css +0 -0
  84. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/css/theme/uno.min.css +0 -0
  85. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/js/justifiedGallery.js +0 -0
  86. data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/js/justifiedGallery.min.js +0 -0
  87. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lg-fb-comment-box.css +0 -0
  88. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lg-fb-comment-box.min.css +0 -0
  89. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lg-transitions.css +0 -0
  90. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lg-transitions.min.css +0 -0
  91. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lightgallery.css +0 -0
  92. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lightgallery.min.css +0 -0
  93. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/fonts/lg.eot +0 -0
  94. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/fonts/lg.svg +0 -0
  95. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/fonts/lg.ttf +0 -0
  96. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/fonts/lg.woff +0 -0
  97. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/img/loading.gif +0 -0
  98. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/img/video-play.png +0 -0
  99. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/img/vimeo-play.png +0 -0
  100. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/img/youtube-play.png +0 -0
  101. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/animation-w.png +0 -0
  102. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/customize-w.png +0 -0
  103. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/dynamic-w.png +0 -0
  104. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/facebook-icon.svg +0 -0
  105. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/googleplus-icon.svg +0 -0
  106. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/html5-w.png +0 -0
  107. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/linked-in.png +0 -0
  108. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/module-w.png +0 -0
  109. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/play-button.png +0 -0
  110. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/responsive-w.png +0 -0
  111. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/thumb-w.png +0 -0
  112. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/touch-w.png +0 -0
  113. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/twitter-icon.svg +0 -0
  114. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/twitter.png +0 -0
  115. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/video1-w.png +0 -0
  116. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/zoom-w.png +0 -0
  117. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/zoom.png +0 -0
  118. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/uno.css +0 -0
  119. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/uno.min.css +0 -0
  120. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/core/lightgallery.js +0 -0
  121. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/core/lightgallery.min.js +0 -0
  122. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/j1/j1-video.js +0 -0
  123. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/j1/j1-video.min.js +0 -0
  124. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-autoplay.js +0 -0
  125. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-autoplay.min.js +0 -0
  126. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-fullscreen.js +0 -0
  127. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-fullscreen.min.js +0 -0
  128. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-hash.js +0 -0
  129. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-hash.min.js +0 -0
  130. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-pager.js +0 -0
  131. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-pager.min.js +0 -0
  132. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-share.js +0 -0
  133. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-share.min.js +0 -0
  134. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-thumbnail.js +0 -0
  135. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-thumbnail.min.js +0 -0
  136. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-video.js +0 -0
  137. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-video.min.js +0 -0
  138. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-zoom.js +0 -0
  139. data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-zoom.min.js +0 -0
  140. data/{lib/starter_web/assets → assets}/themes/j1/extensions/log4javascript/log4javascript.js +0 -0
  141. data/{lib/starter_web/assets → assets}/themes/j1/extensions/log4javascript/log4javascript.min.js +0 -0
  142. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.dark/theme.css +0 -0
  143. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.light/theme.css +0 -0
  144. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.monokai.dark/theme.css +0 -0
  145. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.monokai.light/theme.css +0 -0
  146. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.monokai/theme.css +0 -0
  147. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.solarized.dark/theme.css +0 -0
  148. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.solarized.light/theme.css +0 -0
  149. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.solarized/theme.css +0 -0
  150. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16/theme.css +0 -0
  151. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/colorful/theme.css +0 -0
  152. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/github/theme.css +0 -0
  153. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/gruvbox.dark/theme.css +0 -0
  154. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/gruvbox.light/theme.css +0 -0
  155. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/gruvbox/theme.css +0 -0
  156. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/igorpro/theme.css +0 -0
  157. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/molokai/theme.css +0 -0
  158. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/monokai.sublime/theme.css +0 -0
  159. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/monokai/theme.css +0 -0
  160. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/pastie/theme.css +0 -0
  161. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/thankful_eyes/theme.css +0 -0
  162. data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/tulip/theme.css +0 -0
  163. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/city.css +0 -0
  164. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/city.min.css +0 -0
  165. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/fantasy.css +0 -0
  166. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/fantasy.min.css +0 -0
  167. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/forest.css +0 -0
  168. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/forest.min.css +0 -0
  169. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/sea.css +0 -0
  170. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/sea.min.css +0 -0
  171. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/video-js.css +0 -0
  172. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/video-js.min.css +0 -0
  173. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/js/video.js +0 -0
  174. data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/js/video.min.js +0 -0
  175. data/{lib/starter_web/assets → assets}/themes/j1/extensions/vimeo/froogaloop/js/froogaloop2.min.js +0 -0
  176. data/{lib/starter_web/assets → assets}/themes/j1/extensions/vimeo/player/js/player.js +0 -0
  177. data/{lib/starter_web/assets → assets}/themes/j1/extensions/vimeo/player/js/player.js.map +0 -0
  178. data/{lib/starter_web/assets → assets}/themes/j1/extensions/vimeo/player/js/player.min.js +0 -0
  179. data/{lib/starter_web/assets → assets}/themes/j1/extensions/vimeo/player/js/player.min.js.map +0 -0
  180. data/lib/j1/version.rb +1 -1
  181. data/lib/starter_web/Gemfile +2 -2
  182. data/lib/starter_web/_config.yml +12 -139
  183. data/lib/starter_web/_data/modules/authentication.yml +1 -1
  184. data/lib/starter_web/_data/modules/defaults/navigator.yml +2 -24
  185. data/lib/starter_web/_data/modules/defaults/ssm.yml +50 -0
  186. data/lib/starter_web/_data/modules/defaults/toccer.yml +14 -15
  187. data/lib/starter_web/_data/modules/navigator.yml +158 -97
  188. data/lib/starter_web/_data/modules/ssm.yml +133 -0
  189. data/lib/starter_web/_data/modules/toccer.yml +20 -62
  190. data/lib/starter_web/_data/resources.yml +27 -49
  191. data/lib/starter_web/_data/template_settings.yml +13 -13
  192. data/lib/starter_web/_plugins/uglify.rb +41 -0
  193. data/lib/starter_web/assets/images/modules/icons/j1/{j1..ico → j1.ico} +0 -0
  194. data/lib/starter_web/collections/posts/public/{jekyll → featured}/_posts/2018-05-01-confusion-about-base-url.adoc +0 -0
  195. data/lib/starter_web/package.json +1 -1
  196. data/lib/starter_web/pages/public/about/about_site.adoc +3 -3
  197. data/lib/starter_web/pages/public/about/become_a_patron.adoc +9 -11
  198. data/lib/starter_web/pages/public/learn/floating_sidebar.adoc +199 -0
  199. data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +3 -3
  200. data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +6 -7
  201. data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +9 -5
  202. data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +22 -24
  203. data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +27 -30
  204. data/lib/starter_web/pages/public/learn/whats_up.adoc +12 -11
  205. data/lib/starter_web/pages/public/legal/en/500_support.adoc +1 -1
  206. data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/200_rotate.asciidoc +1 -1
  207. data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +2 -3
  208. data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +3 -3
  209. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  210. data/lib/starter_web/utilsrv/package.json +1 -1
  211. metadata +167 -172
  212. data/assets/themes/j1/core/css/globals.scss +0 -28
  213. data/lib/starter_web/_data/modules/back2top.yml +0 -40
  214. data/lib/starter_web/_data/modules/defaults/back2top.yml +0 -147
  215. data/lib/starter_web/_data/modules/defaults/smooth_scroll.yml +0 -169
  216. data/lib/starter_web/_data/modules/smooth_scroll.yml +0 -169
  217. data/lib/starter_web/assets/themes/j1/adapter/js/back2top.js +0 -227
  218. data/lib/starter_web/assets/themes/j1/adapter/js/mmenu.js +0 -269
  219. data/lib/starter_web/assets/themes/j1/adapter/js/scroller.js +0 -177
  220. data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/css/mmenu-light.css +0 -384
  221. data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/css/mmenu-light.min.css +0 -10
  222. data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/js/mmenu-light.js +0 -213
  223. data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/js/mmenu-light.min.js +0 -205
  224. data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/js/mmenu-light.polyfills.js +0 -118
@@ -72,8 +72,6 @@ regenerate: true
72
72
  {% assign nav_quicklinks_settings = navigator_settings.nav_quicklinks %}
73
73
  {% assign nav_topsearch_defaults = navigator_defaults.nav_topsearch %}
74
74
  {% assign nav_topsearch_settings = navigator_settings.nav_topsearch %}
75
- {% assign nav_sidebar_defaults = navigator_defaults.nav_sidebar %}
76
- {% assign nav_sidebar_settings = navigator_settings.nav_sidebar %}
77
75
  {% assign nav_authclient_defaults = authentication_defaults.auth_client %}
78
76
  {% assign nav_authclient_settings = authentication_settings.auth_client %}
79
77
 
@@ -84,12 +82,10 @@ regenerate: true
84
82
  {% assign nav_menu_options = nav_menu_defaults | merge: nav_menu_settings %}
85
83
  {% assign quicklinks_options = nav_quicklinks_defaults | merge: nav_quicklinks_settings %}
86
84
  {% assign topsearch_options = nav_topsearch_defaults | merge: nav_topsearch_settings %}
87
- {% assign sidebar_options = nav_sidebar_defaults | merge: nav_sidebar_settings %}
88
85
  {% assign authclient_options = nav_authclient_defaults | merge: nav_authclient_settings %}
89
86
 
90
87
  {% assign nav_bar_id = navigator_defaults.nav_bar.id %}
91
88
  {% assign nav_menu_id = navigator_defaults.nav_menu.id %}
92
- {% assign nav_sidebar_id = navigator_defaults.nav_sidebar.id %}
93
89
  {% assign nav_quicklinks_id = navigator_defaults.nav_quicklinks.id %}
94
90
  {% assign nav_navbar_media_breakpoint = navigator_defaults.nav_bar.media_breakpoint %}
95
91
  {% assign authclient_modals_id = navigator_defaults.nav_authclient.xhr_container_id %}
@@ -142,14 +138,12 @@ j1.adapter['navigator'] = (function (j1, window) {
142
138
 
143
139
  var nav_menu_id = '{{nav_menu_id}}';
144
140
  var nav_quicklinks_id = '{{nav_quicklinks_id}}';
145
- var nav_sidebar_id = '{{nav_sidebar_id}}';
146
141
  var authclient_modals_id = '{{authclient_modals_id}}';
147
142
 
148
143
  var colors_data_path = '{{template_config.colors_data_path}}';
149
144
  var font_size_data_path = '{{template_config.font_size_data_path}}';
150
145
  var nav_menu_data_path = '{{nav_menu_options.data_path}}';
151
146
  var nav_quicklinks_data_path = '{{quicklinks_options.data_path}}';
152
- var nav_sidebar_data_path = '{{sidebar_options.data_path}}';
153
147
  var authclient_modals_data_path = '{{authclient_options.xhr_data_path}}';
154
148
 
155
149
  var cookie_names = j1.getCookieNames();
@@ -206,13 +200,11 @@ j1.adapter['navigator'] = (function (j1, window) {
206
200
  var navMenuConfig = {};
207
201
  var navQuicklinksConfig = {};
208
202
  var navTopsearchConfig = {};
209
- var navSidebarConfig = {};
210
203
  var navAuthClientConfig = {};
211
204
  var navBarOptions = {};
212
205
  var navMenuOptions = {};
213
206
  var navQuicklinksOptions = {};
214
207
  var navTopsearchOptions = {};
215
- var navSidebarOptions = {};
216
208
  var navAuthClientOptions = {};
217
209
  var navAuthMAnagerConfig = {};
218
210
 
@@ -221,7 +213,6 @@ j1.adapter['navigator'] = (function (j1, window) {
221
213
  navMenuConfig = $.extend({}, {{nav_menu_options | replace: '=>', ':' }});
222
214
  navQuicklinksConfig = $.extend({}, {{quicklinks_options | replace: '=>', ':' }});
223
215
  navTopsearchConfig = $.extend({}, {{topsearch_options | replace: '=>', ':' }});
224
- navSidebarConfig = $.extend({}, {{sidebar_options | replace: '=>', ':' }});
225
216
  navAuthClientConfig = $.extend({}, {{authclient_options | replace: '=>', ':' }});
226
217
 
227
218
  navAuthMAnagerConfig = $.extend({}, {{authentication_options | replace: '=>', ':' }});
@@ -234,7 +225,6 @@ j1.adapter['navigator'] = (function (j1, window) {
234
225
  navMenuOptions = j1.mergeData(navMenuConfig, navDefaults.nav_menu);
235
226
  navQuicklinksOptions = j1.mergeData(navQuicklinksConfig, navDefaults.nav_quicklinks);
236
227
  navTopsearchOptions = j1.mergeData(navTopsearchConfig, navDefaults.nav_topsearch);
237
- navSidebarOptions = j1.mergeData(navSidebarConfig, navDefaults.nav_sidebar);
238
228
  navAuthClientConfig = j1.mergeData(navAuthClientConfig, navDefaults.nav_authclient);
239
229
 
240
230
  // save config settings into the navigator object for global access
@@ -244,7 +234,6 @@ j1.adapter['navigator'] = (function (j1, window) {
244
234
  j1.adapter.navigator['navMenuOptions'] = navMenuOptions;
245
235
  j1.adapter.navigator['navQuicklinksOptions'] = navQuicklinksOptions;
246
236
  j1.adapter.navigator['navTopsearchOptions'] = navTopsearchOptions;
247
- j1.adapter.navigator['navSidebarOptions'] = navSidebarOptions;
248
237
  j1.adapter.navigator['navAuthClientConfig'] = navAuthClientConfig;
249
238
  j1.adapter.navigator['navAuthManagerConfig'] = navAuthMAnagerConfig;
250
239
 
@@ -255,35 +244,48 @@ j1.adapter['navigator'] = (function (j1, window) {
255
244
  logger.info('state: ' + _this.getState());
256
245
  logger.info('module is being initialized');
257
246
 
247
+ // -----------------------------------------------------------------------
248
+ // Load HTML data (AJAX)
249
+ // -----------------------------------------------------------------------
250
+ // jadams, 202-06-24: Promise (chain) if $.when seems NOT to work correctly.
251
+ // It semms a chain using .then will be a better solution to make it sure
252
+ // that the last Deferred set the state to 'data_loaded'.
253
+ // Found the final state randomly set to 'null' what prevent the module
254
+ // to run mmenuInitializer.
255
+ // Workaround: Set 'data_loaded' to be returned by all Deferred in
256
+ // the chain.
257
+ // See: https://stackoverflow.com/questions/5436327/jquery-deferreds-and-promises-then-vs-done
258
+ //
258
259
  // -----------------------------------------------------------------------
259
260
  // data loader
260
261
  // -----------------------------------------------------------------------
261
262
  logger.info('run deferred data load');
262
263
  $.when (
263
- j1.xhrData (// sidebar
264
- 'j1.adapter.navigator', {
265
- xhr_container_id: navSidebarOptions.xhr_container_id,
266
- xhr_data_path: navSidebarOptions.xhr_data_path },
267
- null),
268
- j1.xhrData (// quicklinks
264
+ j1.xhrData ( // quicklinks
269
265
  'j1.adapter.navigator', {
270
266
  xhr_container_id: navQuicklinksOptions.xhr_container_id,
271
267
  xhr_data_path: navQuicklinksOptions.xhr_data_path },
272
268
  null),
273
- j1.xhrData (// authclient
269
+ j1.xhrData ( // authclient
274
270
  'j1.adapter.navigator', {
275
271
  xhr_container_id: navAuthClientConfig.xhr_container_id,
276
272
  xhr_data_path: navAuthClientConfig.xhr_data_path },
277
273
  null),
278
- j1.xhrData (// menubar
274
+ j1.xhrData ( // menubar
279
275
  'j1.adapter.navigator', {
280
276
  xhr_container_id: navMenuOptions.xhr_container_id,
281
277
  xhr_data_path: navMenuOptions.xhr_data_path },
282
278
  'data_loaded'))
283
- .done (function (sideBar, quickLinks, authclient, menuBar) {
279
+ .done (function (quickLinks, authclient, menuBar) {
284
280
  // ---------------------------------------------------------------------
285
281
  // core initializer
286
282
  // ---------------------------------------------------------------------
283
+
284
+ // Make sure that Load HTML data (AJAX) is finished
285
+ // setTimeout (function() {
286
+ // _this.setState('data_loaded');
287
+ // }, 150);
288
+
287
289
  var dependencies_met_navigator_core = setInterval (function () {
288
290
  if (_this.getState() === 'data_loaded') {
289
291
  _this.setState('processing');
@@ -330,8 +332,7 @@ j1.adapter['navigator'] = (function (j1, window) {
330
332
  logger.info('apply styles');
331
333
  _this.setCSS (
332
334
  navBarOptions, navMenuOptions,
333
- navQuicklinksOptions, navTopsearchOptions,
334
- navSidebarOptions
335
+ navQuicklinksOptions, navTopsearchOptions
335
336
  );
336
337
 
337
338
  logger.info('init auth client');
@@ -375,12 +376,12 @@ j1.adapter['navigator'] = (function (j1, window) {
375
376
 
376
377
  // -------------------------------------------------------------------------
377
378
  // Initialize JS portion for the dialogs (modals) used by J1AuthClient
378
- // NOTE: Currently cookie|sidebar updates NOT processed at the NAV module
379
+ // NOTE: Currently cookie updates NOT processed at the NAV module
379
380
  // All updates on Cookies are managed by Cookie Consent.
380
381
  // To be considered to re-add cookie updates for the auth state
381
382
  // -------------------------------------------------------------------------
382
383
  initAuthClient: function(auth_config) {
383
- var logger = log4javascript.getLogger('j1.adapter.navigator.initAuthClient');
384
+ var logger = log4javascript.getLogger('j1.adapter.navigator.initAuthClient');
384
385
  var user_session = j1.readCookie(cookie_user_session_name);
385
386
 
386
387
  _this.modalEventHandler(auth_config);
@@ -532,7 +533,7 @@ j1.adapter['navigator'] = (function (j1, window) {
532
533
  // setCSS
533
534
  // Set dynamic CSS styles
534
535
  // -------------------------------------------------------------------------
535
- setCSS: function (navBarOptions, navMenuOptions, navQuicklinksOptions, navTopsearchOptions, navSidebarOptions) {
536
+ setCSS: function (navBarOptions, navMenuOptions, navQuicklinksOptions, navTopsearchOptions) {
536
537
  var logger = log4javascript.getLogger("j1.adapter.navigator.setCSS");
537
538
  var gridBreakpoint_lg = '992px';
538
539
  var gridBreakpoint_md = '768px';
@@ -577,9 +578,6 @@ j1.adapter['navigator'] = (function (j1, window) {
577
578
  navTopsearchOptions.input_color = j1.setColorData(navTopsearchOptions.input_color);
578
579
  navTopsearchOptions.background_color = j1.setColorData(navTopsearchOptions.background_color);
579
580
 
580
- {% comment %} Set|Resolve navSidebarOptions
581
- -------------------------------------------------------------------------- {% endcomment %}
582
- navSidebarOptions.background_color = j1.setColorData(navSidebarOptions.background_color);
583
581
 
584
582
  {% comment %} Set dymanic styles
585
583
  -------------------------------------------------------------------------- {% endcomment %}
@@ -601,14 +599,14 @@ j1.adapter['navigator'] = (function (j1, window) {
601
599
  $('head').append("<style>@media (min-width: " +gridBreakpoint_lg+ ") { nav.navbar.navigator.navbar-scrolled.light { background-color: " +bg_scrolled+ " !important; } }</style>");
602
600
 
603
601
  // Menubar collapsed (mobile)
604
- $('head').append('<style>.navbar-collapse.collapse.show { background-color: ' +bg_scrolled+ ' !important; }</style>');
602
+ // $('head').append('<style>.navbar-collapse.collapse.show { background-color: ' +bg_scrolled+ ' !important; }</style>');
605
603
 
606
604
 
607
605
  /* Navbar media-queries, LARGE Window|Desktop (>= 1024) */
608
606
  /* jadams: Oversized menu bar fixed by: overflow: hidden */
609
607
  // $('head').append("<style>@media (max-width: " +gridBreakpoint_lg+ ") { nav.navbar.navigator { background-color: " +navBarOptions.background_color_collapsed+ " !important; overflow: hidden; } }</style>");
610
- $('head').append("<style>@media (max-width: " +gridBreakpoint_lg+ ") { nav.navbar.navigator { background-color: " +bg_collapsed+ " !important; overflow: hidden; } }</style>");
611
- //$('head').append("<style>@media (max-width: 1023px) { row { margin-left: 0 !important; margin-right: 0 !important; } }</style>");
608
+ // $('head').append("<style>@media (max-width: " +gridBreakpoint_lg+ ") { nav.navbar.navigator { background-color: " +bg_collapsed+ " !important; overflow: hidden; } }</style>");
609
+ // $('head').append("<style>@media (max-width: 1023px) { row { margin-left: 0 !important; margin-right: 0 !important; } }</style>");
612
610
 
613
611
  {% comment %} navQuicklinks styles
614
612
  -------------------------------------------------------------------------- {% endcomment %}
@@ -676,10 +674,6 @@ j1.adapter['navigator'] = (function (j1, window) {
676
674
  $('head').append("<style>.top-search .input-group-addon { color: " +navTopsearchOptions.input_color+ " !important; }</style>");
677
675
  $('head').append("<style>.top-search .input.form-control { color: " +navTopsearchOptions.input_color+ " !important; }</style>");
678
676
 
679
- {% comment %} navSidebar styles
680
- -------------------------------------------------------------------------- {% endcomment %}
681
- $('head').append("<style>.side { background-color: " +navSidebarOptions.background_color+ " !important; }</style>");
682
-
683
677
  return true;
684
678
  }, // END setCSS
685
679
 
@@ -0,0 +1,518 @@
1
+ ---
2
+ regenerate: true
3
+ ---
4
+
5
+ {% capture cache %}
6
+
7
+ {% comment %}
8
+ # -----------------------------------------------------------------------------
9
+ # ~/assets/themes/j1/adapter/js/ssm.js
10
+ # Liquid template to adapt SSM Core functions
11
+ #
12
+ # Product/Info:
13
+ # https://jekyll.one
14
+ #
15
+ # Copyright (C) 2020 Juergen Adams
16
+ #
17
+ # J1 Template is licensed under the MIT License.
18
+ # For details, see https://jekyll.one
19
+ # -----------------------------------------------------------------------------
20
+ # Test data:
21
+ # {{ liquid_var | debug }}
22
+ # -----------------------------------------------------------------------------
23
+ {% endcomment %}
24
+
25
+ {% comment %} Liquid var initialization
26
+ -------------------------------------------------------------------------------- {% endcomment %}
27
+
28
+ {% comment %} Set config files
29
+ -------------------------------------------------------------------------------- {% endcomment %}
30
+ {% assign site_config = site %}
31
+ {% assign template_config = site.data.template_settings %}
32
+ {% assign modules = site.data.modules %}
33
+
34
+ {% comment %} Set config data
35
+ -------------------------------------------------------------------------------- {% endcomment %}
36
+ {% assign toccer_defaults = modules.defaults.toccer.defaults %}
37
+ {% assign toccer_settings = modules.toccer.settings %}
38
+ {% assign ssm_settings = modules.ssm.settings %}
39
+ {% assign ssm_defaults = modules.defaults.ssm.defaults %}
40
+
41
+ {% comment %} Set config options
42
+ -------------------------------------------------------------------------------- {% endcomment %}
43
+ {% assign toccer_options = toccer_defaults | merge: toccer_settings %}
44
+ {% assign ssm_options = ssm_defaults | merge: ssm_settings %}
45
+
46
+ /*
47
+ # -----------------------------------------------------------------------------
48
+ # ~/assets/themes/j1/adapter/js/ssm.js
49
+ # JS Adapter for J1 SSM (Sticky Side Menu)
50
+ #
51
+ # Product/Info:
52
+ # {{site.data.template_settings.theme_author_url}}
53
+ #
54
+ # Copyright (C) 2020 Juergen Adams
55
+ #
56
+ # J1 Template is licensed under the MIT License.
57
+ # For details, see {{site.data.template_settings.theme_author_url}}
58
+ # -----------------------------------------------------------------------------
59
+ # Adapter generated: {{site.time}}
60
+ # -----------------------------------------------------------------------------
61
+ */
62
+ 'use strict';
63
+
64
+ j1.adapter['ssm'] = (function (j1, window) {
65
+
66
+ // ---------------------------------------------------------------------------
67
+ // globals
68
+ // ---------------------------------------------------------------------------
69
+ var environment = '{{environment}}';
70
+ var dclFinished = false;
71
+ var moduleOptions = {};
72
+ var cookie_names = j1.getCookieNames();
73
+ var user_state;
74
+ var user_session;
75
+ var user_data;
76
+ var sect1Nodes;
77
+ var sect12Nodes;
78
+ var _this;
79
+ var logger;
80
+ var logText;
81
+
82
+ // ---------------------------------------------------------------------------
83
+ // helper functions
84
+ // ---------------------------------------------------------------------------
85
+
86
+
87
+ // ---------------------------------------------------------------------------
88
+ // main object
89
+ // ---------------------------------------------------------------------------
90
+ return {
91
+
92
+ // -------------------------------------------------------------------------
93
+ // module initializer
94
+ // -------------------------------------------------------------------------
95
+ init: function (options) {
96
+
97
+ // create seetings object from frontmatterOptions
98
+ var frontmatterOptions = options != null ? $.extend({}, options) : {};
99
+
100
+ // initialize state flag
101
+ j1.adapter.ssm.state = 'pending';
102
+
103
+ // -----------------------------------------------------------------------
104
+ // defaults
105
+ // -----------------------------------------------------------------------
106
+ var settings = $.extend({
107
+ module_name: 'j1.adapter.ssm',
108
+ generated: '{{site.time}}'
109
+ }, options);
110
+
111
+ // -----------------------------------------------------------------------
112
+ // globals
113
+ // -----------------------------------------------------------------------
114
+ _this = j1.adapter.ssm;
115
+ logger = log4javascript.getLogger('j1.adapter.ssm');
116
+ sect12Nodes = $("[class$='sect1'],[class$='sect2'");
117
+ sect1Nodes = $("[class$='sect1']");
118
+
119
+ // -----------------------------------------------------------------------
120
+ // options loader
121
+ // -----------------------------------------------------------------------
122
+ var ssmMenuOptions = $.extend({}, {{nav_ssm_options | replace: '=>', ':' }});
123
+ var ssmOptions = $.extend({}, {{ssm_options | replace: 'nil', 'null' | replace: '=>', ':' }});
124
+ var xhr_data_path;
125
+ var menu_id;
126
+
127
+ // Load (individual) frontmatter options (currently NOT used)
128
+ //
129
+ if (options != null) { var frontmatterOptions = $.extend({}, options) }
130
+
131
+ if (typeof frontmatterOptions !== 'undefined') {
132
+ moduleOptions = j1.mergeData(ssmOptions, frontmatterOptions);
133
+ }
134
+
135
+ // save config settings into the mmenu object for global access
136
+ //
137
+ j1.adapter.ssm['moduleOptions'] = moduleOptions;
138
+
139
+ _this.setState('started');
140
+ logger.info('state: ' + _this.getState());
141
+ logger.info('module is being initialized');
142
+
143
+ // jadams, 2020-06-24: Set max_count to 100 what cause to wait 2.5s
144
+ // for J1 Navigator to finish (init)
145
+ //
146
+ var interval_count = 0;
147
+ var max_count = 100;
148
+
149
+ var dependencies_met_navigator = setInterval(function() {
150
+ interval_count += 1;
151
+ if ( j1.adapter.navigator.getState() == 'finished' ) {
152
+ logger.info('dependencies of module navigator met for: mmenu');
153
+ logger.info('dependencies of module navigator met after: ' + interval_count * 25 + ' ms');
154
+ j1.core.ssm.init (moduleOptions);
155
+ _this.ssmLoader(moduleOptions);
156
+ clearInterval(dependencies_met_navigator);
157
+ }
158
+ if (interval_count > max_count) {
159
+ logger.warn('dependency check failed for module: navigator');
160
+ logger.warn('dependencies of module navigator met after: ' + interval_count * 25 + ' ms');
161
+ j1.core.ssm.init (moduleOptions);
162
+ _this.ssmLoader(moduleOptions);
163
+ clearInterval(dependencies_met_navigator);
164
+ }
165
+ }, 25);
166
+
167
+ }, // END init
168
+
169
+ // -------------------------------------------------------------------------
170
+ // SSM Loader
171
+ // -------------------------------------------------------------------------
172
+ ssmLoader: function (ssmOptions) {
173
+ var menu_id;
174
+ var xhr_data_path;
175
+
176
+ // cast text-based booleans
177
+ var isToc = (ssmOptions.toc === 'true');
178
+
179
+ _this.setState('loading');
180
+ logger.info('status: ' + _this.getState());
181
+ logger.info('load HTML data for ssm');
182
+
183
+ {% assign id_list = "" %}
184
+
185
+ $.when (
186
+ {% assign menu_id = ssm_options.xhr_container_id %}
187
+ {% assign xhr_data_path = ssm_options.xhr_data_path %}
188
+ j1.xhrData (
189
+ 'j1.adapter.ssm', {
190
+ xhr_container_id: "{{menu_id}}",
191
+ xhr_data_path: "{{xhr_data_path}}" },
192
+ 'data_loaded')
193
+ ).done (function (ssm) {
194
+ // ---------------------------------------------------------------------
195
+ // Initialize MMenu Navs and Drawers
196
+ // ---------------------------------------------------------------------
197
+ var dependencies_met_mmenu_initialized = setInterval (function () {
198
+ if (ssm) {
199
+ if(isToc) {
200
+ logger.info('toc enabled in page');
201
+ if ( j1.adapter.toccer.getState() == 'finished' ) {
202
+ logger.info('initializing toccer: finished');
203
+ _this.setState('processing');
204
+ logger.info('status: ' + _this.getState());
205
+ logger.info('initialize ssm menu');
206
+ if ( ssmOptions.mode === 'icon') {
207
+ logger.info('icon mode detected');
208
+ }
209
+ _this.scrollSpy(ssmOptions);
210
+ _this.buttonInitializer(ssmOptions);
211
+ clearInterval(dependencies_met_mmenu_initialized);
212
+ }
213
+ } else {
214
+ logger.info('toc disabled in page');
215
+ $('#ssm_toc').closest('.ssm-btn').hide()
216
+ _this.scrollSpy(ssmOptions);
217
+ _this.buttonInitializer(ssmOptions);
218
+ clearInterval(dependencies_met_mmenu_initialized);
219
+ }
220
+ } else {
221
+ logger.error('initialize ssm failed, HTML data NOT loaded');
222
+ }
223
+ }, 25); // END dependencies_met_mmenu_loaded
224
+ }); // END done
225
+ }, // END dataLoader
226
+
227
+ // -------------------------------------------------------------------------
228
+ // Button Initializer
229
+ // -------------------------------------------------------------------------
230
+ buttonInitializer: function (ssmOptions) {
231
+ var eventHandler;
232
+
233
+ {% for item in ssm_options.items %} {% if item.enabled %}
234
+
235
+ {% comment %} Identify the menu (item) type
236
+ -------------------------------------------------------------------------- {% endcomment %}
237
+ {% if item.sublevel %}
238
+ {% assign menu_type = 'sublevel_menu' %}
239
+ {% else %}
240
+ {% assign menu_type = 'top_level_item' %}
241
+ {% endif %}
242
+
243
+ {% if menu_type == 'top_level_item' %}
244
+ {% assign button_id = item.id %}
245
+
246
+ // Create an eventhandler instance if id exists: {{button_id}}
247
+ if ($('#{{button_id}}').length) {
248
+ eventHandler = "{{item.event_handler}}"
249
+
250
+ // check if eventhandler configured is a SINGLE word
251
+ if (eventHandler.split(" ").length == 1) {
252
+ logger.info('register pre-configured eventhandler {{item.event_handler}} on id: {{button_id}}');
253
+ $('#{{button_id}}').each(function(e) {
254
+ var $this = $(this);
255
+ $this.on('click', function(e) {
256
+ j1.adapter.ssm.{{item.event_handler}}(sect1Nodes);
257
+ });
258
+ });
259
+ } else {
260
+ logger.info('register custom eventhandler on id: {{button_id}}');
261
+ }
262
+
263
+ } // END items (buttons)
264
+ {% endif %} // menu_type 'top_level_item'
265
+ {% endif %} // ENDIF button_id enabled
266
+ {% endfor %} // ENDFOR items
267
+ }, // END buttonInitializer
268
+
269
+ // -------------------------------------------------------------------------
270
+ // Eventhandler
271
+
272
+ // -------------------------------------------------------------------------
273
+ // open mobile menu
274
+ // -------------------------------------------------------------------------
275
+ open_ssm_toc: function (id) {
276
+ logger.info('eventhandler fired on id: ' + id );
277
+ }, // END open_ssm_toc
278
+
279
+ // -------------------------------------------------------------------------
280
+ // scroll to previous section
281
+ // -------------------------------------------------------------------------
282
+ scroll_previous_section: function (nodes) {
283
+ var previous_header_id;
284
+ var currentNode;
285
+ var prev_node;
286
+ var anchor_id;
287
+
288
+ var index = 0;
289
+ var maxNode = $(nodes).length - 1;
290
+ var $toc = $("#sidebar");
291
+ var current_header_id = $toc.find(".is-active-link").attr('href');
292
+
293
+ // logger.info('eventhandler fired on id: ' + id );
294
+
295
+ nodes.each(function() {
296
+ currentNode = $(this).find(current_header_id);
297
+ if (currentNode.length) {
298
+ if (index > maxNode) {
299
+ return false
300
+ } else {
301
+ prev_node = (index > 0) ? nodes[index-1] : nodes[index];
302
+ previous_header_id = $(prev_node).find(":header").first()[0].id;
303
+ anchor_id = '#' + previous_header_id;
304
+
305
+ $('a[href*="' + current_header_id + '"]').removeClass('is-active-link');
306
+ $('a[href*="' + previous_header_id + '"]').addClass('is-active-link');
307
+
308
+ j1.core.scrollSmooth.scroll( anchor_id, {
309
+ duration: {{toccer_options.scrollSmoothDuration}},
310
+ offset: {{toccer_options.scrollSmoothOffset}},
311
+ callback: null
312
+ });
313
+ return false;
314
+ }
315
+ }
316
+ (index < maxNode) ? index++ : index;
317
+ });
318
+ }, // END scroll_previous_section
319
+
320
+ // -------------------------------------------------------------------------
321
+ // scroll to next section
322
+ // -------------------------------------------------------------------------
323
+ scroll_next_section: function (nodes) {
324
+ var next_header_id;
325
+ var currentNode;
326
+ var nextNode;
327
+ var anchor_id;
328
+
329
+ var index = 0;
330
+ var maxNode = $(nodes).length -1;
331
+ var $toc = $("#sidebar");
332
+ var current_header_id = $toc.find(".is-active-link").attr('href');
333
+
334
+ // logger.info('eventhandler fired on id: ' + id );
335
+
336
+ nodes.each(function() {
337
+ currentNode = $(this).find(current_header_id);
338
+ if (currentNode.length) {
339
+ if (index == maxNode) {
340
+ return false
341
+ } else {
342
+ nextNode = nodes[index+1];
343
+ next_header_id = $(nextNode).closest().find(":header").first();
344
+ next_header_id = $(nextNode).find(":header").first()[0].id;
345
+ anchor_id = '#' + next_header_id;
346
+
347
+ $('a[href*="' + current_header_id + '"]').removeClass('is-active-link');
348
+ $('a[href*="' + next_header_id + '"]').addClass('is-active-link');
349
+
350
+ j1.core.scrollSmooth.scroll( anchor_id, {
351
+ duration: {{toccer_options.scrollSmoothDuration}},
352
+ offset: {{toccer_options.scrollSmoothOffset}},
353
+ callback: null
354
+ });
355
+ return false;
356
+ }
357
+ }
358
+ (index < maxNode) ? index++ : index;
359
+ });
360
+ }, // END scroll_next_section
361
+
362
+ // -------------------------------------------------------------------------
363
+ // scroll to top
364
+ // -------------------------------------------------------------------------
365
+ scroll_to_top: function () {
366
+ var dest = 0;
367
+
368
+ // logger.info('eventhandler fired on id: ' + id );
369
+
370
+ $('html, body').animate({
371
+ scrollTop: dest
372
+ }, 500);
373
+ }, // END scroll_top
374
+
375
+ // -------------------------------------------------------------------------
376
+ // scroll to bottom
377
+ // -------------------------------------------------------------------------
378
+ scroll_to_bottom: function () {
379
+ var $page = $(document);
380
+ var $footer = $('#j1_footer');
381
+ var f = $footer.length ? $footer.outerHeight() : 0;
382
+ var pageHeight = $page.height() - f - 400;
383
+ var pageHeightOuter = $page.outerHeight()
384
+
385
+ // logger.info('eventhandler fired on id: ' + id );
386
+
387
+ $('html, body').animate({
388
+ scrollTop: pageHeight
389
+ }, 500);
390
+ }, // END scroll_bottom
391
+
392
+ // -------------------------------------------------------------------------
393
+ // scroll to comments (Disqus)
394
+ // -------------------------------------------------------------------------
395
+ scroll_to_comments: function () {
396
+ // logger.info('eventhandler fired on id: ' + id );
397
+ }, // END scroll_comments
398
+
399
+ // -------------------------------------------------------------------------
400
+ // create generic alert
401
+ // -------------------------------------------------------------------------
402
+ alert_me: function (id) {
403
+ // logger.info('eventhandler fired on id: ' + id );
404
+ alert ("Hello world!");
405
+ }, // END alert_me
406
+ // -------------------------------------------------------------------------
407
+ // messageHandler
408
+ // Manage messages (paylods) send from other J1 modules
409
+ // -------------------------------------------------------------------------
410
+ messageHandler: function (sender, message) {
411
+ // var json_message = JSON.stringify(message, undefined, 2); // multiline
412
+ var json_message = JSON.stringify(message);
413
+
414
+ logText = 'received message from ' + sender + ': ' + json_message;
415
+ logger.debug(logText);
416
+
417
+ // -----------------------------------------------------------------------
418
+ // Process commands|actions
419
+ // -----------------------------------------------------------------------
420
+ if (message.type === 'command' && message.action === 'module_initialized') {
421
+ //
422
+ // Place handling of command|action here
423
+ //
424
+ logger.info(message.text);
425
+ }
426
+ if (message.type === 'command' && message.action === 'status') {
427
+ logger.info('messageHandler: received - ' + message.action);
428
+ }
429
+
430
+ //
431
+ // Place handling of other command|action here
432
+ //
433
+
434
+ return true;
435
+ }, // END messageHandler
436
+
437
+ // -------------------------------------------------------------------------
438
+ // setState
439
+ // Set the current (processing) state of the module
440
+ // -------------------------------------------------------------------------
441
+ setState: function (stat) {
442
+ j1.adapter.ssm.state = stat;
443
+ }, // END setState
444
+
445
+ // -------------------------------------------------------------------------
446
+ // getState
447
+ // Returns the current (processing) state of the module
448
+ // -------------------------------------------------------------------------
449
+ getState: function () {
450
+ return j1.adapter.ssm.state;
451
+ }, // END state
452
+
453
+ // -------------------------------------------------------------------------
454
+ // Manage (top) position and sizes (@media breakpoints) of the
455
+ // SSM container depending on the size of the page header (attic)
456
+ // -------------------------------------------------------------------------
457
+ scrollSpy: function (options) {
458
+ logger = log4javascript.getLogger('j1.adapter.ssm.scrollSpy');
459
+
460
+ $(window).scroll(function(event){
461
+ var $navbar = $('nav.navbar');
462
+ var $pagehead = $('.attic');
463
+ var $main_content = $('.js-toc-content');
464
+ var $adblock = $('#adblock');
465
+ var $footer = $('#j1_footer');
466
+ var $ssmContainer = $('#ssm-container');
467
+ var $page = $(document);
468
+
469
+ var offset = 0;
470
+ var pageOffset = -120;
471
+ var scrollPos = $(document).scrollTop();
472
+ var pageHeight = $page.height()
473
+ var pageHeightOuter = $page.outerHeight()
474
+
475
+ // var m = parseInt(pagehead.css('margin-bottom'), 10);
476
+ var m = $main_content.offset().top;
477
+ var s = $ssmContainer.length ? $ssmContainer.height() : 0;
478
+ var f = $footer.length ? $footer.outerHeight() : 0;
479
+ var n = $navbar.length ? $navbar.height() : 0;
480
+ // var h = $pagehead.length ? $pagehead.outerHeight() : 0;
481
+ var a = $adblock.length ? $adblock.outerHeight() : 0;
482
+
483
+ // var o = n + h + a + offset;
484
+ // var o = n + m + offset;
485
+ var o = n + offset;
486
+
487
+ // space above the (fixed) ssm container
488
+ var showSsmPos = m + pageOffset;
489
+
490
+ // space below the (fixed) ssm container
491
+ var hideSsmPos = pageHeight - s - f + pageOffset;
492
+
493
+ // set the top position of ssm container for navbar modes
494
+ // e.g. "sticky" (navbar-fixed)
495
+ if($navbar.hasClass('navbar-fixed')){
496
+ $('#ssm-container').css('top', o);
497
+ } else {
498
+ $('#ssm-container').css('top', m);
499
+ }
500
+
501
+ // show|hide ssm container on scroll position in page
502
+ //
503
+ ( scrollPos >= showSsmPos ) && ( scrollPos <= hideSsmPos )
504
+ ? $ssmContainer.css('display','block')
505
+ : $ssmContainer.css('display','none');
506
+
507
+ logger.debug('content pos detected as: ' + m + 'px');
508
+ logger.debug('scroll pos detected as: ' + scrollPos + 'px');
509
+ }); // END setTop on scroll
510
+
511
+ } // END scrollSpy
512
+
513
+ }; // END return
514
+ })(j1, window);
515
+
516
+ {% endcapture %}
517
+ {{ cache | strip_empty_lines }}
518
+ {% assign cache = nil %}