j1-template 2020.0.5 → 2020.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/layouts/content_generator_post.html +2 -2
- data/_includes/themes/j1/modules/navigator/generator.html +8 -8
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +8 -3
- data/_includes/themes/j1/procedures/layouts/module_writer.proc +1 -1
- data/{lib/starter_web/apps → apps}/public/cc/cc.yml +0 -0
- data/{lib/starter_web/apps → apps}/public/cc/index.adoc +0 -0
- data/assets/data/mmenu.html +1 -1
- data/assets/data/mmenu_sidebar.html +1 -1
- data/assets/data/mmenu_toc.html +1 -1
- data/assets/data/search.yml +32 -10
- data/assets/data/ssm.html +16 -12
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/algolia.js +24 -16
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/attic.js +35 -34
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/carousel.js +34 -23
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/cookie_consent.js +8 -0
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/framer.js +11 -4
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/gallery_customizer.js +16 -8
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/j1.js +87 -139
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/justified_gallery.js +50 -33
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/lightbox.js +9 -1
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/logger.js +12 -4
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/mmenu.js +35 -14
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/navigator.js +77 -75
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/searcher.js +10 -2
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/ssm.js +89 -69
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/themer.js +11 -3
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/toccer.js +54 -156
- data/assets/themes/j1/core/css/theme_extensions.css +599 -118
- data/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
- data/assets/themes/j1/core/css/uno.css +609 -118
- data/assets/themes/j1/core/css/uno.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.css +4 -1
- data/assets/themes/j1/core/css/vendor.min.css +1 -1
- data/assets/themes/j1/core/js/template.js +40 -30
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.min.js +1 -1
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/carousel.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/carousel.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/carousel_transitions.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/carousel_transitions.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/theme/uno.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/css/theme/uno.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/images/ajax-loader.gif +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/images/grabbing.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/images/owl-logo.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/images/owl.video.play.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/js/carousel.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/carousel/js/carousel.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iconify/js/iconify.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.absolute.html +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.content.html +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.hover.html +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.nested.html +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.textarea.html +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/frame.tolerance.html +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/index.html +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/examples/two.html +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.map +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/LICENSE +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/README.md +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/css/justifiedGallery.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/css/justifiedGallery.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/css/theme/uno.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/js/justifiedGallery.3.7.0.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/js/justifiedGallery.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/js/justifiedGallery.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/less/.csslintrc +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v3.7.0/less/justifiedGallery.less +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v4.0.0/css/justifiedGallery.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v4.0.0/css/justifiedGallery.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v4.0.0/css/theme/uno.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v4.0.0/js/jquery.justifiedGallery.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/_versions/v4.0.0/js/jquery.justifiedGallery.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/css/justifiedGallery.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/css/justifiedGallery.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/css/theme/uno.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/css/theme/uno.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/js/justifiedGallery.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/justified_gallery/js/justifiedGallery.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lg-fb-comment-box.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lg-fb-comment-box.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lg-transitions.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lg-transitions.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lightgallery.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/core/lightgallery.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/fonts/lg.eot +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/fonts/lg.svg +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/fonts/lg.ttf +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/fonts/lg.woff +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/img/loading.gif +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/img/video-play.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/img/vimeo-play.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/img/youtube-play.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/animation-w.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/customize-w.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/dynamic-w.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/facebook-icon.svg +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/googleplus-icon.svg +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/html5-w.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/linked-in.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/module-w.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/play-button.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/responsive-w.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/thumb-w.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/touch-w.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/twitter-icon.svg +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/twitter.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/video1-w.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/zoom-w.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/icons/zoom.png +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/uno.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/css/themes/uno.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/core/lightgallery.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/core/lightgallery.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/j1/j1-video.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/j1/j1-video.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-autoplay.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-autoplay.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-fullscreen.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-fullscreen.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-hash.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-hash.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-pager.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-pager.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-share.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-share.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-thumbnail.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-thumbnail.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-video.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-video.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-zoom.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/light_gallery/js/modules/lg-zoom.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/log4javascript/log4javascript.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/log4javascript/log4javascript.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.dark/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.light/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.monokai.dark/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.monokai.light/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.monokai/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.solarized.dark/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.solarized.light/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16.solarized/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/base16/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/colorful/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/github/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/gruvbox.dark/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/gruvbox.light/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/gruvbox/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/igorpro/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/molokai/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/monokai.sublime/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/monokai/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/pastie/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/thankful_eyes/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/rouge/css/tulip/theme.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/city.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/city.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/fantasy.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/fantasy.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/forest.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/forest.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/sea.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/themes/sea.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/video-js.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/css/video-js.min.css +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/js/video.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/videojs/js/video.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/vimeo/froogaloop/js/froogaloop2.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/vimeo/player/js/player.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/vimeo/player/js/player.js.map +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/vimeo/player/js/player.min.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/extensions/vimeo/player/js/player.min.js.map +0 -0
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +2 -2
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/navigator.yml +4 -3
- data/lib/starter_web/_data/modules/defaults/ssm.yml +3 -3
- data/lib/starter_web/_data/modules/defaults/toccer.yml +9 -14
- data/lib/starter_web/_data/modules/jekyll_search.yml +3 -2
- data/lib/starter_web/_data/modules/navigator.yml +4 -1
- data/lib/starter_web/_data/modules/ssm.yml +10 -1
- data/lib/starter_web/_data/modules/toccer.yml +15 -63
- data/lib/starter_web/_data/resources.yml +5 -54
- data/lib/starter_web/_data/template_settings.yml +13 -13
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/about/about_site.adoc +3 -3
- data/lib/starter_web/pages/public/about/become_a_patron.adoc +9 -11
- data/lib/starter_web/pages/public/clear_button.adoc +121 -0
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/100_meet_and_greet_jekyll.adoc +9 -4
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +6 -7
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +7 -3
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +22 -24
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +27 -30
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +54 -48
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +5 -3
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +159 -175
- data/assets/themes/j1/core/css/globals.scss +0 -28
- data/lib/starter_web/_data/modules/back2top.yml +0 -40
- data/lib/starter_web/_data/modules/defaults/back2top.yml +0 -147
- data/lib/starter_web/_data/modules/defaults/smooth_scroll.yml +0 -169
- data/lib/starter_web/_data/modules/navigator.yml.new +0 -232
- data/lib/starter_web/_data/modules/smooth_scroll.yml +0 -169
- data/lib/starter_web/assets/themes/j1/adapter/js/back2top.js +0 -227
- data/lib/starter_web/assets/themes/j1/adapter/js/mmenu.js.new +0 -432
- data/lib/starter_web/assets/themes/j1/adapter/js/scroller.js +0 -177
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/css/mmenu-light.css +0 -384
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/css/mmenu-light.min.css +0 -384
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/css/themes/uno.css +0 -95
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/css/themes/uno.min.css +0 -95
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/js/mmenu-light.js +0 -11
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/js/mmenu-light.min.js +0 -11
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/js/mmenu-light.polyfills.js +0 -118
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/js/mmenu-light.polyfills.min.js +0 -118
@@ -1,169 +0,0 @@
|
|
1
|
-
# ------------------------------------------------------------------------------
|
2
|
-
# ~/_data/modules/smooth_scroll.yml
|
3
|
-
# User configuration settings for J1 Smoothscroll module
|
4
|
-
#
|
5
|
-
# Product/Info:
|
6
|
-
# https://jekyll.one
|
7
|
-
#
|
8
|
-
# Copyright (C) 2020 Juergen Adams
|
9
|
-
#
|
10
|
-
# J1 Template is licensed under the MIT License.
|
11
|
-
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
12
|
-
#
|
13
|
-
# ------------------------------------------------------------------------------
|
14
|
-
|
15
|
-
# ------------------------------------------------------------------------------
|
16
|
-
# About this configuration (used for J1 CC only)
|
17
|
-
#
|
18
|
-
about_config:
|
19
|
-
|
20
|
-
title: SmoothScroll
|
21
|
-
scope: User settings
|
22
|
-
location: _data/modules/smooth_scroll.yml
|
23
|
-
|
24
|
-
# ------------------------------------------------------------------------------
|
25
|
-
# User configuration settings
|
26
|
-
#
|
27
|
-
settings:
|
28
|
-
|
29
|
-
# ------------------------------------------------------------------------------
|
30
|
-
# J1 Scroll Manager settings
|
31
|
-
# ------------------------------------------------------------------------------
|
32
|
-
# SmoothScroll settings
|
33
|
-
# Enables smooth vertical page scrolling on Mouse Wheel, Keyboard and Touchpad
|
34
|
-
#
|
35
|
-
# enabled
|
36
|
-
# ----------------------------------------------------------------------------
|
37
|
-
# Enables|Disables the use of SmoothControl
|
38
|
-
#
|
39
|
-
# values: boolean (true|false)
|
40
|
-
# default: false
|
41
|
-
#
|
42
|
-
# SCROLLING CORE
|
43
|
-
# --------------
|
44
|
-
#
|
45
|
-
# frameRate
|
46
|
-
# ----------------------------------------------------------------------------
|
47
|
-
# ...
|
48
|
-
#
|
49
|
-
# values: integer (Hz)
|
50
|
-
# default: 150
|
51
|
-
#
|
52
|
-
# animationTime
|
53
|
-
# ----------------------------------------------------------------------------
|
54
|
-
# ...
|
55
|
-
#
|
56
|
-
# values: integer (msec)
|
57
|
-
# default: 400
|
58
|
-
#
|
59
|
-
# stepSize
|
60
|
-
# ----------------------------------------------------------------------------
|
61
|
-
# ...
|
62
|
-
#
|
63
|
-
# values: integer (px)
|
64
|
-
# default: 100
|
65
|
-
#
|
66
|
-
# ACCELERATION SETTINGS
|
67
|
-
# ---------------------
|
68
|
-
#
|
69
|
-
# accelerationDelta
|
70
|
-
# ----------------------------------------------------------------------------
|
71
|
-
# ...
|
72
|
-
#
|
73
|
-
# values: integer
|
74
|
-
# default: 50
|
75
|
-
#
|
76
|
-
# accelerationMax
|
77
|
-
# ----------------------------------------------------------------------------
|
78
|
-
# ...
|
79
|
-
#
|
80
|
-
# values: integer
|
81
|
-
# default: 3
|
82
|
-
#
|
83
|
-
# KEYBOARD SETTINGS
|
84
|
-
# -----------------
|
85
|
-
#
|
86
|
-
# keyboardSupport
|
87
|
-
# ----------------------------------------------------------------------------
|
88
|
-
# Enables|Disables Keyboard support for smooth scrolling
|
89
|
-
#
|
90
|
-
# values: boolean (true|false)
|
91
|
-
# default: true
|
92
|
-
#
|
93
|
-
# arrowScroll
|
94
|
-
# ----------------------------------------------------------------------------
|
95
|
-
# Number of pixels to scroll when pressing a keyboard arrow key
|
96
|
-
#
|
97
|
-
# values: integer (px)
|
98
|
-
# default: 50
|
99
|
-
#
|
100
|
-
# PULSE ALGORITHM SETTINGS
|
101
|
-
# ------------------------
|
102
|
-
#
|
103
|
-
# pulseAlgorithm
|
104
|
-
# ----------------------------------------------------------------------------
|
105
|
-
# Enables easing of the scrolling animation. When disabled, the page
|
106
|
-
# animation will be linear (ratio of "tail" to "acceleration")
|
107
|
-
#
|
108
|
-
# values: boolean (true|false)
|
109
|
-
# default: true
|
110
|
-
#
|
111
|
-
# pulseScale
|
112
|
-
# ----------------------------------------------------------------------------
|
113
|
-
# Defines the speed of pulse step scrolling
|
114
|
-
#
|
115
|
-
# values: integer
|
116
|
-
# default: 4
|
117
|
-
#
|
118
|
-
# pulseNormalize
|
119
|
-
# ----------------------------------------------------------------------------
|
120
|
-
# ...
|
121
|
-
#
|
122
|
-
# values: integer
|
123
|
-
# default: 1
|
124
|
-
#
|
125
|
-
# TOUCHPAD SETTINGS
|
126
|
-
# -----------------
|
127
|
-
#
|
128
|
-
# touchpadSupport
|
129
|
-
# ----------------------------------------------------------------------------
|
130
|
-
# Enables|Disables Touchpad support for smooth scrolling
|
131
|
-
#
|
132
|
-
# values: boolean (true|false)
|
133
|
-
# default: false
|
134
|
-
#
|
135
|
-
# OTHER SETTINGS
|
136
|
-
# --------------
|
137
|
-
#
|
138
|
-
# fixedBackground
|
139
|
-
# ----------------------------------------------------------------------------
|
140
|
-
# ...
|
141
|
-
#
|
142
|
-
# values: boolean (true|false)
|
143
|
-
# default: true
|
144
|
-
#
|
145
|
-
# excluded
|
146
|
-
# ----------------------------------------------------------------------------
|
147
|
-
# ...
|
148
|
-
#
|
149
|
-
# values: string
|
150
|
-
# default: empty string
|
151
|
-
# ------------------------------------------------------------------------------
|
152
|
-
enabled: false
|
153
|
-
frameRate: 150
|
154
|
-
animationTime: 400
|
155
|
-
stepSize: 100
|
156
|
-
accelerationDelta: 50
|
157
|
-
accelerationMax: 3
|
158
|
-
keyboardSupport: true
|
159
|
-
arrowScroll: 50
|
160
|
-
pulseAlgorithm: true
|
161
|
-
pulseScale: 4
|
162
|
-
pulseNormalize: 1
|
163
|
-
touchpadSupport: false
|
164
|
-
fixedBackground: true
|
165
|
-
excluded:
|
166
|
-
|
167
|
-
|
168
|
-
# ------------------------------------------------------------------------------
|
169
|
-
# END config
|
@@ -1,227 +0,0 @@
|
|
1
|
-
---
|
2
|
-
regenerate: false
|
3
|
-
---
|
4
|
-
|
5
|
-
{% capture cache %}
|
6
|
-
|
7
|
-
{% comment %}
|
8
|
-
# -----------------------------------------------------------------------------
|
9
|
-
# ~/assets/themes/j1/adapter/js/back2top.js
|
10
|
-
# Liquid template to adapt Back2Top Core functions
|
11
|
-
#
|
12
|
-
# Product/Info:
|
13
|
-
# https://jekyll.one
|
14
|
-
# http://dynamicdrive.com/dynamicindex3/scrolltop.htm
|
15
|
-
#
|
16
|
-
# Copyright (C) 2020 Juergen Adams
|
17
|
-
# Copyright (C) 2009 dynamicdrive.com
|
18
|
-
#
|
19
|
-
# J1 Template is licensed under the MIT License.
|
20
|
-
# For details, see https://jekyll.one
|
21
|
-
# -----------------------------------------------------------------------------
|
22
|
-
# Test data:
|
23
|
-
# {{ liquid_var | debug }}
|
24
|
-
# -----------------------------------------------------------------------------
|
25
|
-
{% endcomment %}
|
26
|
-
|
27
|
-
{% comment %} Liquid procedures
|
28
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
29
|
-
{% capture select_color %}themes/{{site.template.name}}/procedures/global/select_color.proc{% endcapture %}
|
30
|
-
|
31
|
-
{% comment %} Set global settings
|
32
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
33
|
-
{% assign environment = site.environment %}
|
34
|
-
{% assign template_version = site.version %}
|
35
|
-
|
36
|
-
|
37
|
-
{% comment %} Process YML config data
|
38
|
-
================================================================================ {% endcomment %}
|
39
|
-
|
40
|
-
{% comment %} Set config files
|
41
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
42
|
-
{% assign template_config = site.data.template_settings %}
|
43
|
-
{% assign blocks = site.data.blocks %}
|
44
|
-
{% assign modules = site.data.modules %}
|
45
|
-
|
46
|
-
{% comment %} Set config data
|
47
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
48
|
-
{% assign back2top_defaults = modules.defaults.back2top.defaults %}
|
49
|
-
{% assign back2top_settings = modules.back2top.settings %}
|
50
|
-
|
51
|
-
{% comment %} Set config options
|
52
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
53
|
-
{% assign back2top_options = back2top_defaults | merge: back2top_settings %}
|
54
|
-
{% assign active_color = back2top_options.active_color %}
|
55
|
-
{% assign background_color = back2top_options.background_color %}
|
56
|
-
{% assign back2top_icon = back2top_options.icon %}
|
57
|
-
{% assign color = back2top_options.color %}
|
58
|
-
|
59
|
-
{% if back2top_options.icon_family == 'MDI' %}
|
60
|
-
{% assign back2top_icon_family = 'Material Design Icons' %}
|
61
|
-
{% elsif moduleOptions.icon_family == 'FA' %}
|
62
|
-
{% assign back2top_icon_family = 'FontAweSome' %}
|
63
|
-
{% else %}
|
64
|
-
{% assign back2top_icon_family = 'Material Design Icons' %}
|
65
|
-
{% endif %}
|
66
|
-
|
67
|
-
|
68
|
-
/*
|
69
|
-
# -----------------------------------------------------------------------------
|
70
|
-
# ~/assets/themes/j1/adapter/js/back2top.js
|
71
|
-
# JS Adapter for J1 Back2Top
|
72
|
-
#
|
73
|
-
# Product/Info:
|
74
|
-
# https://jekyll.one
|
75
|
-
# http://dynamicdrive.com/dynamicindex3/scrolltop.htm
|
76
|
-
#
|
77
|
-
# Copyright (C) 2020 Juergen Adams
|
78
|
-
# Copyright (C) 2009 dynamicdrive.com
|
79
|
-
#
|
80
|
-
# J1 Template is licensed under the MIT License.
|
81
|
-
# For details, see https://jekyll.one
|
82
|
-
#
|
83
|
-
# -----------------------------------------------------------------------------
|
84
|
-
# Adapter generated: {{site.time}}
|
85
|
-
# -----------------------------------------------------------------------------
|
86
|
-
*/
|
87
|
-
'use strict';
|
88
|
-
|
89
|
-
{% comment %} Main
|
90
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
91
|
-
j1.adapter['back2top'] = (function (j1, window) {
|
92
|
-
|
93
|
-
{% comment %} Set global variables
|
94
|
-
------------------------------------------------------------------------------ {% endcomment %}
|
95
|
-
var environment = '{{environment}}';
|
96
|
-
var moduleOptions = {};
|
97
|
-
var _this;
|
98
|
-
var logger;
|
99
|
-
var logText;
|
100
|
-
|
101
|
-
// ---------------------------------------------------------------------------
|
102
|
-
// Helper functions
|
103
|
-
// ---------------------------------------------------------------------------
|
104
|
-
|
105
|
-
// ---------------------------------------------------------------------------
|
106
|
-
// Main object
|
107
|
-
// ---------------------------------------------------------------------------
|
108
|
-
return {
|
109
|
-
|
110
|
-
// -------------------------------------------------------------------------
|
111
|
-
// Initializer
|
112
|
-
// -------------------------------------------------------------------------
|
113
|
-
init: function (options) {
|
114
|
-
// initialize state flag
|
115
|
-
j1.adapter.back2top.state = 'pending';
|
116
|
-
|
117
|
-
// -----------------------------------------------------------------------
|
118
|
-
// Default module settings
|
119
|
-
// -----------------------------------------------------------------------
|
120
|
-
var settings = $.extend({
|
121
|
-
module_name: 'j1.adapter.back2top',
|
122
|
-
generated: '{{site.time}}'
|
123
|
-
}, options);
|
124
|
-
|
125
|
-
{% comment %} Set global variables
|
126
|
-
-------------------------------------------------------------------------- {% endcomment %}
|
127
|
-
_this = j1.adapter.back2top;
|
128
|
-
logger = log4javascript.getLogger('j1.adapter.back2top');
|
129
|
-
|
130
|
-
{% comment %} Load module config from yml data
|
131
|
-
-------------------------------------------------------------------------- {% endcomment %}
|
132
|
-
// Load module DEFAULTS|CONFIG
|
133
|
-
moduleOptions = $.extend({}, {{back2top_options | replace: '=>', ':' | replace: 'nil', '""'}});
|
134
|
-
|
135
|
-
if (typeof settings !== 'undefined') {
|
136
|
-
moduleOptions = j1.mergeData(moduleOptions, settings);
|
137
|
-
}
|
138
|
-
|
139
|
-
if (moduleOptions.enabled) {
|
140
|
-
_this.setState('started');
|
141
|
-
logger.info('state: ' + _this.getState());
|
142
|
-
logger.info('module is being initialized');
|
143
|
-
|
144
|
-
_this.setCss();
|
145
|
-
j1.core.back2top.init(moduleOptions);
|
146
|
-
|
147
|
-
_this.setState('finished');
|
148
|
-
logger.info('state: ' + _this.getState());
|
149
|
-
} else {
|
150
|
-
_this.setState('finished');
|
151
|
-
logger.info('state: ' + _this.getState());
|
152
|
-
logger.warn('module back2top disabled');
|
153
|
-
}
|
154
|
-
|
155
|
-
return true;
|
156
|
-
}, // END init
|
157
|
-
|
158
|
-
// -------------------------------------------------------------------------
|
159
|
-
// Set dynamic styles for Back2Top
|
160
|
-
// -------------------------------------------------------------------------
|
161
|
-
setCss: function () {
|
162
|
-
var bg_primary = j1.getStyleValue('bg-primary', 'background-color');
|
163
|
-
|
164
|
-
var dependencies_met_back2top_adapter = setInterval(function() {
|
165
|
-
if (typeof j1.colors !== 'undefined') {
|
166
|
-
$('head').append('<style>#topcontrol { background: ' + j1.colors['{{background_color}}'] + '; }</style>');
|
167
|
-
// $('head').append('<style>#topcontrol:hover { background: ' + j1.colors['{{active_color}}'] + '; }</style>');
|
168
|
-
$('head').append('<style>#topcontrol:hover { background: ' +bg_primary+ '; }</style>');
|
169
|
-
$('head').append('<style>#topcontrol:after { content: "\\{{back2top_icon}}"; font-family: {{back2top_icon_family}}; }</style>');
|
170
|
-
// clear interval checking
|
171
|
-
clearInterval(dependencies_met_back2top_adapter);
|
172
|
-
} // END 'getState'
|
173
|
-
}, 50); // END 'dataLoaded'
|
174
|
-
|
175
|
-
return true;
|
176
|
-
}, // END setCss
|
177
|
-
|
178
|
-
// -------------------------------------------------------------------------
|
179
|
-
// messageHandler: MessageHandler for J1 CookieConsent module
|
180
|
-
// Manage messages send from other J1 modules
|
181
|
-
// -------------------------------------------------------------------------
|
182
|
-
messageHandler: function (sender, message) {
|
183
|
-
// var json_message = JSON.stringify(message, undefined, 2);
|
184
|
-
var json_message = JSON.stringify(message);
|
185
|
-
|
186
|
-
logText = 'received message from ' + sender + ': ' + json_message;
|
187
|
-
logger.debug(logText);
|
188
|
-
|
189
|
-
// -----------------------------------------------------------------------
|
190
|
-
// Process commands|actions
|
191
|
-
// -----------------------------------------------------------------------
|
192
|
-
if (message.type === 'command' && message.action === 'module_initialized') {
|
193
|
-
//
|
194
|
-
// Place handling of command|action here
|
195
|
-
//
|
196
|
-
logger.info(message.text);
|
197
|
-
}
|
198
|
-
|
199
|
-
//
|
200
|
-
// Place handling of other command|action here
|
201
|
-
//
|
202
|
-
|
203
|
-
return true;
|
204
|
-
}, // END messageHandler
|
205
|
-
|
206
|
-
// -------------------------------------------------------------------------
|
207
|
-
// setState
|
208
|
-
// Set the current (processing) state of the module
|
209
|
-
// -------------------------------------------------------------------------
|
210
|
-
setState: function (stat) {
|
211
|
-
j1.adapter.scroller.state = stat;
|
212
|
-
}, // END setState
|
213
|
-
|
214
|
-
// -------------------------------------------------------------------------
|
215
|
-
// getState
|
216
|
-
// Returns the current (processing) state of the module
|
217
|
-
// -------------------------------------------------------------------------
|
218
|
-
getState: function () {
|
219
|
-
return j1.adapter.scroller.state;
|
220
|
-
} // END state
|
221
|
-
|
222
|
-
}; // END return
|
223
|
-
})(j1, window);
|
224
|
-
|
225
|
-
{% endcapture %}
|
226
|
-
{{ cache | strip_empty_lines }}
|
227
|
-
{% assign cache = nil %}
|
@@ -1,432 +0,0 @@
|
|
1
|
-
---
|
2
|
-
regenerate: true
|
3
|
-
---
|
4
|
-
|
5
|
-
{% capture cache %}
|
6
|
-
|
7
|
-
{% comment %}
|
8
|
-
# -----------------------------------------------------------------------------
|
9
|
-
# ~/assets/themes/j1/adapter/js/mmenu.js
|
10
|
-
# Liquid template to adapt Mmenu-Light 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
|
-
# NOTE:
|
24
|
-
#
|
25
|
-
# JSON pretty print
|
26
|
-
# Example: var str = JSON.stringify(obj, null, 2); // spacing level = 2
|
27
|
-
# See: https://stackoverflow.com/questions/4810841/how-can-i-pretty-print-json-using-javascript
|
28
|
-
# -----------------------------------------------------------------------------
|
29
|
-
{% endcomment %}
|
30
|
-
|
31
|
-
{% comment %} Liquid procedures
|
32
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
33
|
-
{% capture select_color %}themes/{{site.template.name}}/procedures/global/select_color.proc{% endcapture %}
|
34
|
-
|
35
|
-
{% comment %} Set global settings
|
36
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
37
|
-
{% assign environment = site.environment %}
|
38
|
-
{% assign brand_image_height = site.brand.image_height %}
|
39
|
-
|
40
|
-
{% comment %} Process YML config data
|
41
|
-
================================================================================ {% endcomment %}
|
42
|
-
|
43
|
-
{% comment %} Set config files
|
44
|
-
{% assign auth_manager_config = site.j1_auth %}
|
45
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
46
|
-
{% assign site_config = site %}
|
47
|
-
{% assign template_config = site.data.template_settings %}
|
48
|
-
{% assign blocks = site.data.blocks %}
|
49
|
-
{% assign modules = site.data.modules %}
|
50
|
-
|
51
|
-
{% assign template_config = site.data.template_settings %}
|
52
|
-
{% assign navigator_defaults = site.data.modules.defaults.navigator.defaults %}
|
53
|
-
{% assign navigator_settings = site.data.modules.navigator.settings %}
|
54
|
-
|
55
|
-
{% comment %} Set config data
|
56
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
57
|
-
{% assign nav_mmenu_defaults = navigator_defaults.nav_mmenu %}
|
58
|
-
{% assign nav_mmenu_settings = navigator_settings.nav_mmenu %}
|
59
|
-
|
60
|
-
{% comment %} Set config options
|
61
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
62
|
-
{% assign nav_mmenu_options = nav_mmenu_defaults | merge: nav_mmenu_settings %}
|
63
|
-
{% assign nav_mmenu_id = navigator_defaults.nav_mmenu.xhr_container_id %}
|
64
|
-
{% assign nav_navbar_media_breakpoint = navigator_defaults.nav_bar.media_breakpoint %}
|
65
|
-
|
66
|
-
/*
|
67
|
-
# -----------------------------------------------------------------------------
|
68
|
-
# ~/assets/themes/j1/adapter/js/mmenu.js
|
69
|
-
# JS Adapter for J1 MobileMenu (MMenu Light)
|
70
|
-
#
|
71
|
-
# Product/Info:
|
72
|
-
# {{site.data.template_settings.theme_author_url}}
|
73
|
-
#
|
74
|
-
# Copyright (C) 2020 Juergen Adams
|
75
|
-
#
|
76
|
-
# J1 Template is licensed under the MIT License.
|
77
|
-
# For details, see {{site.data.template_settings.theme_author_url}}
|
78
|
-
# -----------------------------------------------------------------------------
|
79
|
-
# NOTE: For AJAX (XHR) loads see
|
80
|
-
# https://stackoverflow.com/questions/3709597/wait-until-all-jquery-ajax-requests-are-done
|
81
|
-
# -----------------------------------------------------------------------------
|
82
|
-
# NOTE: For getStyleValue helper see
|
83
|
-
# https://stackoverflow.com/questions/16965515/how-to-get-a-style-attribute-from-a-css-class-by-javascript-jquery
|
84
|
-
# -----------------------------------------------------------------------------
|
85
|
-
# Adapter generated: {{site.time}}
|
86
|
-
# -----------------------------------------------------------------------------
|
87
|
-
*/
|
88
|
-
'use strict';
|
89
|
-
|
90
|
-
j1.adapter['mmenu'] = (function (j1, window) {
|
91
|
-
|
92
|
-
// ---------------------------------------------------------------------------
|
93
|
-
// globals
|
94
|
-
// ---------------------------------------------------------------------------
|
95
|
-
var environment = '{{environment}}';
|
96
|
-
var dclFinished = false;
|
97
|
-
var moduleOptions = {};
|
98
|
-
var cookie_names = j1.getCookieNames();
|
99
|
-
var user_state;
|
100
|
-
var user_session;
|
101
|
-
var user_data;
|
102
|
-
var _this;
|
103
|
-
var logger;
|
104
|
-
var logText;
|
105
|
-
|
106
|
-
// ---------------------------------------------------------------------------
|
107
|
-
// helper functions
|
108
|
-
// ---------------------------------------------------------------------------
|
109
|
-
|
110
|
-
|
111
|
-
// ---------------------------------------------------------------------------
|
112
|
-
// main object
|
113
|
-
// ---------------------------------------------------------------------------
|
114
|
-
return {
|
115
|
-
|
116
|
-
// -------------------------------------------------------------------------
|
117
|
-
// module initializer
|
118
|
-
// -------------------------------------------------------------------------
|
119
|
-
init: function (options) {
|
120
|
-
// initialize state flag
|
121
|
-
j1.adapter.mmenu.state = 'pending';
|
122
|
-
|
123
|
-
// -----------------------------------------------------------------------
|
124
|
-
// defaults
|
125
|
-
// -----------------------------------------------------------------------
|
126
|
-
var settings = $.extend({
|
127
|
-
module_name: 'j1.adapter.mmenu',
|
128
|
-
generated: '{{site.time}}'
|
129
|
-
}, options);
|
130
|
-
|
131
|
-
// -----------------------------------------------------------------------
|
132
|
-
// globals
|
133
|
-
// -----------------------------------------------------------------------
|
134
|
-
_this = j1.adapter.mmenu;
|
135
|
-
logger = log4javascript.getLogger('j1.adapter.mmenu');
|
136
|
-
|
137
|
-
// -----------------------------------------------------------------------
|
138
|
-
// options loader
|
139
|
-
// -----------------------------------------------------------------------
|
140
|
-
var navMenuOptions = $.extend({}, {{nav_mmenu_options | replace: '=>', ':' }});
|
141
|
-
var xhr_data_path;
|
142
|
-
var menu_id;
|
143
|
-
|
144
|
-
// save config settings into the mmenu object for global access
|
145
|
-
//
|
146
|
-
j1.adapter.mmenu['navMenuOptions'] = navMenuOptions;
|
147
|
-
|
148
|
-
// Load (individual) frontmatter options (currently NOT used)
|
149
|
-
//
|
150
|
-
if (options != null) { var frontmatterOptions = $.extend({}, options) }
|
151
|
-
|
152
|
-
_this.setState('started');
|
153
|
-
logger.info('state: ' + _this.getState());
|
154
|
-
logger.info('module is being initialized');
|
155
|
-
|
156
|
-
// jadams, 2020-06-24: Set max_count to 100 what cause to wait 2.5s
|
157
|
-
// for J1 Navigator to finish (init)
|
158
|
-
//
|
159
|
-
var interval_count = 0;
|
160
|
-
var max_count = 100;
|
161
|
-
|
162
|
-
var dependencies_met_navigator = setInterval(function() {
|
163
|
-
interval_count += 1;
|
164
|
-
if ( j1.adapter.navigator.getState() == 'finished' ) {
|
165
|
-
logger.info('dependencies of module navigator met for: mmenu');
|
166
|
-
logger.info('dependencies of module navigator met after: ' + interval_count * 25 + ' ms');
|
167
|
-
j1.adapter.mmenu.mmenuLoader(navMenuOptions);
|
168
|
-
clearInterval(dependencies_met_navigator);
|
169
|
-
}
|
170
|
-
if (interval_count > max_count) {
|
171
|
-
logger.warn('dependency check failed for module: navigator');
|
172
|
-
logger.warn('dependencies of module navigator met after: ' + interval_count * 25 + ' ms');
|
173
|
-
clearInterval(dependencies_met_navigator);
|
174
|
-
j1.adapter.mmenu.mmenuLoader(navMenuOptions);
|
175
|
-
}
|
176
|
-
}, 25);
|
177
|
-
|
178
|
-
}, // END init
|
179
|
-
|
180
|
-
// -------------------------------------------------------------------------
|
181
|
-
// MMenu Loader
|
182
|
-
// -------------------------------------------------------------------------
|
183
|
-
mmenuLoader: function (mmOptions) {
|
184
|
-
var menu_id;
|
185
|
-
var xhr_data_path;
|
186
|
-
|
187
|
-
_this.setState('loading');
|
188
|
-
logger.info('status: ' + _this.getState());
|
189
|
-
logger.info('load HTML data for navs and drawers');
|
190
|
-
|
191
|
-
{% assign id_list = "" %}
|
192
|
-
|
193
|
-
// -----------------------------------------------------------------------
|
194
|
-
// Load HTML data (AJAX)
|
195
|
-
// -----------------------------------------------------------------------
|
196
|
-
// jadams, 202-06-24: Promise (chain) if $.when seems NOT to work correctly.
|
197
|
-
// It semms a chain using .then will be a better solution to make it sure
|
198
|
-
// that the last Deferred set the state to 'data_loaded'.
|
199
|
-
// Found the final state randomly set to 'null' what prevent the module
|
200
|
-
// to run mmenuInitializer.
|
201
|
-
// Workaround: Set 'data_loaded' to be returned by all Deferred in
|
202
|
-
// the chain.
|
203
|
-
// See: https://stackoverflow.com/questions/5436327/jquery-deferreds-and-promises-then-vs-done
|
204
|
-
//
|
205
|
-
{% comment %} Modify chain
|
206
|
-
--------------------------------------------------------------------------
|
207
|
-
{% if forloop.last %}'data_loaded'{% else %}'null'{% endif %}){% if forloop.last %}{% else %},{% endif %}
|
208
|
-
to
|
209
|
-
{% if forloop.last %}'data_loaded'{% else %}'data_loaded'{% endif %}){% if forloop.last %}{% else %},{% endif %}
|
210
|
-
-------------------------------------------------------------------------- {% endcomment %}
|
211
|
-
$.when (
|
212
|
-
{% for item in nav_mmenu_options.menus %} {% if item.menu.enabled %}
|
213
|
-
{% assign menu_id = item.menu.xhr_container_id %}
|
214
|
-
{% assign xhr_data_path = item.menu.xhr_data_path %}
|
215
|
-
|
216
|
-
j1.xhrData (
|
217
|
-
'j1.adapter.mmenu', {
|
218
|
-
xhr_container_id: "{{menu_id}}",
|
219
|
-
xhr_data_path: "{{xhr_data_path}}" },
|
220
|
-
{% if forloop.last %}'data_loaded'{% else %}'data_loaded'{% endif %}){% if forloop.last %}{% else %},{% endif %}
|
221
|
-
|
222
|
-
{% endif %}
|
223
|
-
{% capture id_list %}{{id_list}}{{menu_id}}{% if forloop.last %}{% else %},{% endif %} {% endcapture %}
|
224
|
-
{% endfor %} // ENDFOR menus
|
225
|
-
).done (function ({{id_list}}) {
|
226
|
-
// ---------------------------------------------------------------------
|
227
|
-
// Initialize MMenu Navs and Drawers
|
228
|
-
// ---------------------------------------------------------------------
|
229
|
-
var dependencies_met_mmenu_initialized = setInterval (function () {
|
230
|
-
if (_this.getState() === 'data_loaded') {
|
231
|
-
logger.info('load HTML data (AJAX): finished');
|
232
|
-
_this.setState('processing');
|
233
|
-
logger.info('status: ' + _this.getState());
|
234
|
-
logger.info('initialize navs and drawers');
|
235
|
-
j1.adapter.mmenu.mmenuInitializer(mmOptions);
|
236
|
-
clearInterval(dependencies_met_mmenu_initialized);
|
237
|
-
}
|
238
|
-
}); // END dependencies_met_mmenu_loaded
|
239
|
-
}); // END done
|
240
|
-
}, // END dataLoader
|
241
|
-
|
242
|
-
// -------------------------------------------------------------------------
|
243
|
-
// MMenu Initializer
|
244
|
-
// -------------------------------------------------------------------------
|
245
|
-
mmenuInitializer: function (mmOptions) {
|
246
|
-
var menu_id;
|
247
|
-
var xhr_data_path;
|
248
|
-
|
249
|
-
{% for item in nav_mmenu_options.menus %} {% if item.menu.enabled %}
|
250
|
-
|
251
|
-
{% assign menu_id = item.menu.xhr_container_id %}
|
252
|
-
menu_id = "{{menu_id}}";
|
253
|
-
xhr_data_path = "{{item.menu.xhr_data_path}}";
|
254
|
-
|
255
|
-
// Create an mmenu instance if id exists: {{menu_id}}
|
256
|
-
if ($('#{{menu_id}}').length) {
|
257
|
-
|
258
|
-
logger.info('mmenu is being initialized on id: {{menu_id}}');
|
259
|
-
|
260
|
-
{% if item.menu.content.type == "navigation" %}
|
261
|
-
// Create an mmenu instance of type NAVIGATION
|
262
|
-
logger.info('found content type: NAVIGATION');
|
263
|
-
// ---------------------------------------------------------------------
|
264
|
-
// menu initializer (NAVIGATION)
|
265
|
-
// ---------------------------------------------------------------------
|
266
|
-
logger.info('initialize mmenu on id: #{{menu_id}}');
|
267
|
-
var dependencies_met_{{menu_id}}_loaded = setInterval (function () {
|
268
|
-
if ({{menu_id}}) {
|
269
|
-
const menu_selector = document.querySelector('#{{menu_id}}');
|
270
|
-
const mmenu_{{menu_id}} = new MmenuLight (
|
271
|
-
menu_selector,
|
272
|
-
'(max-width: ' + mmOptions.mmenu_plugin.max_width +'px)', {
|
273
|
-
// plugin options
|
274
|
-
node: mmOptions.mmenu_plugin.node,
|
275
|
-
mediaQuery: mmOptions.mmenu_plugin.mediaQuery
|
276
|
-
});
|
277
|
-
|
278
|
-
const drawer_{{menu_id}} = mmenu_{{menu_id}}.offcanvas ({
|
279
|
-
// drawer options
|
280
|
-
position: mmOptions.mmenu_drawer.position
|
281
|
-
});
|
282
|
-
|
283
|
-
const navigator_{{menu_id}} = mmenu_{{menu_id}}.navigation ({
|
284
|
-
// navigator options
|
285
|
-
selected: mmOptions.mmenu_navigator.selected,
|
286
|
-
slidingSubmenus: mmOptions.mmenu_navigator.slidingSubmenus,
|
287
|
-
title: mmOptions.mmenu_navigator.title,
|
288
|
-
theme: mmOptions.mmenu_navigator.theme
|
289
|
-
});
|
290
|
-
|
291
|
-
// Button|Toggler for the NavBar to open|close
|
292
|
-
// the mmenu drawer
|
293
|
-
$('{{item.menu.content.button_selector}}').each(function(e) {
|
294
|
-
var $this = $(this);
|
295
|
-
|
296
|
-
$this.on('click', function(e){
|
297
|
-
const toggler_{{menu_id}} = this;
|
298
|
-
|
299
|
-
// TODO: Animated toggle button
|
300
|
-
//
|
301
|
-
$('{{item.menu.content.button_selector}}').toggleClass('fadeIn');
|
302
|
-
$('{{item.menu.content.button_selector}}').toggleClass('rotateIn')
|
303
|
-
|
304
|
-
$('.mdi', this).toggleClass('mdi-menu');
|
305
|
-
$('.mdi', this).toggleClass('mdi-close');
|
306
|
-
e.preventDefault();
|
307
|
-
(toggler_{{menu_id}}.t = !toggler_{{menu_id}}.t)
|
308
|
-
? drawer_{{menu_id}}.open()
|
309
|
-
: drawer_{{menu_id}}.close();
|
310
|
-
});
|
311
|
-
});
|
312
|
-
clearInterval(dependencies_met_{{menu_id}}_loaded);
|
313
|
-
logger.info('initializing mmenu finished on id: #{{menu_id}}');
|
314
|
-
}; // END mmenu_loaded
|
315
|
-
}); // END dependencies_met_mmenu_loaded
|
316
|
-
{% endif %} // ENDIF content_type: NAVIGATION
|
317
|
-
|
318
|
-
{% if item.menu.content.type == "drawer" %}
|
319
|
-
// Create an mmenu instance of type HTML
|
320
|
-
logger.info('found content type: DRAWER');
|
321
|
-
// -------------------------------------------------------------------
|
322
|
-
// menu initializer (DRAWER)
|
323
|
-
// -------------------------------------------------------------------
|
324
|
-
logger.info('initialize mmenu on id: #{{menu_id}}');
|
325
|
-
var dependencies_met_{{menu_id}}_loaded = setInterval (function () {
|
326
|
-
if ({{menu_id}}) {
|
327
|
-
const menu_selector = document.querySelector('#{{menu_id}}');
|
328
|
-
|
329
|
-
const mmenu_{{menu_id}} = new MmenuLight (
|
330
|
-
menu_selector,
|
331
|
-
'(max-width: ' + mmOptions.mmenu_plugin.max_width +'px)', {
|
332
|
-
// plugin options
|
333
|
-
node: mmOptions.mmenu_plugin.node,
|
334
|
-
mediaQuery: mmOptions.mmenu_plugin.mediaQuery
|
335
|
-
});
|
336
|
-
|
337
|
-
const drawer_{{menu_id}} = mmenu_{{menu_id}}.offcanvas ({
|
338
|
-
// drawer options
|
339
|
-
position: "{{item.menu.drawer.position}}"
|
340
|
-
});
|
341
|
-
|
342
|
-
// Button|Toggler for the MMenu tocbar to open|close the toc drawer
|
343
|
-
$('{{item.menu.content.button_selector}}').each(function(e) {
|
344
|
-
var $this = $(this);
|
345
|
-
|
346
|
-
$this.on('click', function(e) {
|
347
|
-
var toggler_{{menu_id}} = this;
|
348
|
-
var hasClass;
|
349
|
-
|
350
|
-
// check if the toggler should be activated
|
351
|
-
// e.g for TOC only if clas js-toc-content is found
|
352
|
-
//
|
353
|
-
if ('{{item.menu.content.toggler_activated}}' != 'always') {
|
354
|
-
hasClass = $('main').hasClass('{{item.menu.content.toggler_activated}}');
|
355
|
-
} else {
|
356
|
-
hasClass = true;
|
357
|
-
}
|
358
|
-
if (hasClass) {
|
359
|
-
// Toggle button animation
|
360
|
-
$('{{item.menu.content.button_selector}}').toggleClass('{{item.menu.content.toggler_animation}}')
|
361
|
-
|
362
|
-
e.preventDefault();
|
363
|
-
(toggler_{{menu_id}}.t = !toggler_{{menu_id}}.t)
|
364
|
-
? drawer_{{menu_id}}.open()
|
365
|
-
: drawer_{{menu_id}}.close();
|
366
|
-
} // END if hasclass
|
367
|
-
});
|
368
|
-
});
|
369
|
-
clearInterval(dependencies_met_{{menu_id}}_loaded);
|
370
|
-
}; // END if menu_loaded
|
371
|
-
}); // END dependencies_met_mmenu_loaded
|
372
|
-
logger.info('initializing mmenu finished on id: #{{menu_id}}');
|
373
|
-
{% endif %} // ENDIF content_type: DRAWER
|
374
|
-
} // END menus|drawers
|
375
|
-
|
376
|
-
{% endif %} // ENDIF menu enabled
|
377
|
-
{% endfor %} // ENDFOR menus
|
378
|
-
}, // END mmenuInitializer
|
379
|
-
|
380
|
-
// -------------------------------------------------------------------------
|
381
|
-
// messageHandler
|
382
|
-
// Manage messages (paylods) send from other J1 modules
|
383
|
-
// -------------------------------------------------------------------------
|
384
|
-
messageHandler: function (sender, message) {
|
385
|
-
// var json_message = JSON.stringify(message, undefined, 2); // multiline
|
386
|
-
var json_message = JSON.stringify(message);
|
387
|
-
|
388
|
-
logText = 'received message from ' + sender + ': ' + json_message;
|
389
|
-
logger.debug(logText);
|
390
|
-
|
391
|
-
// -----------------------------------------------------------------------
|
392
|
-
// Process commands|actions
|
393
|
-
// -----------------------------------------------------------------------
|
394
|
-
if (message.type === 'command' && message.action === 'module_initialized') {
|
395
|
-
//
|
396
|
-
// Place handling of command|action here
|
397
|
-
//
|
398
|
-
logger.info(message.text);
|
399
|
-
}
|
400
|
-
if (message.type === 'command' && message.action === 'status') {
|
401
|
-
logger.info('messageHandler: received - ' + message.action);
|
402
|
-
}
|
403
|
-
|
404
|
-
//
|
405
|
-
// Place handling of other command|action here
|
406
|
-
//
|
407
|
-
|
408
|
-
return true;
|
409
|
-
}, // END messageHandler
|
410
|
-
|
411
|
-
// -------------------------------------------------------------------------
|
412
|
-
// setState
|
413
|
-
// Set the current (processing) state of the module
|
414
|
-
// -------------------------------------------------------------------------
|
415
|
-
setState: function (stat) {
|
416
|
-
j1.adapter.mmenu.state = stat;
|
417
|
-
}, // END setState
|
418
|
-
|
419
|
-
// -------------------------------------------------------------------------
|
420
|
-
// getState
|
421
|
-
// Returns the current (processing) state of the module
|
422
|
-
// -------------------------------------------------------------------------
|
423
|
-
getState: function () {
|
424
|
-
return j1.adapter.mmenu.state;
|
425
|
-
} // END state
|
426
|
-
|
427
|
-
}; // END return
|
428
|
-
})(j1, window);
|
429
|
-
|
430
|
-
{% endcapture %}
|
431
|
-
{{ cache | strip_empty_lines }}
|
432
|
-
{% assign cache = nil %}
|