j1-template 2020.0.2 → 2020.0.7
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_blog_archive.html +22 -18
- data/_includes/themes/j1/layouts/content_generator_collection.html +15 -12
- data/_includes/themes/j1/layouts/content_generator_page.html +16 -17
- data/_includes/themes/j1/layouts/content_generator_post.html +21 -26
- data/_includes/themes/j1/modules/navigator/generator.html +62 -40
- data/{lib/starter_web/apps/public/cc → apps/public/cc/cc.yml} +0 -0
- data/apps/public/cc/index.adoc +107 -0
- data/assets/data/menu.html +6 -5
- data/assets/data/mmenu.html +455 -0
- data/assets/data/{sidebar.html → mmenu_sidebar.html} +24 -18
- data/assets/data/mmenu_toc.html +45 -0
- data/assets/data/quicklinks.html +9 -4
- data/assets/data/ssm.html +227 -0
- data/assets/error_pages/HTTP204.html +3 -3
- data/assets/themes/j1/adapter/js/algolia.js +321 -0
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/attic.js +4 -4
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/carousel.js +3 -3
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/cookie_consent.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/framer.js +3 -3
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/gallery_customizer.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/j1.js +15 -38
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/justified_gallery.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/lightbox.js +0 -0
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/logger.js +0 -0
- data/assets/themes/j1/adapter/js/mmenu.js +452 -0
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/navigator.js +50 -50
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/searcher.js +0 -0
- data/assets/themes/j1/adapter/js/ssm.js +507 -0
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/themer.js +1 -1
- data/{lib/starter_web/assets → assets}/themes/j1/adapter/js/toccer.js +42 -44
- data/assets/themes/j1/core/css/bootstrap.css +116 -93
- data/assets/themes/j1/core/css/bootstrap.min.css +4 -4
- data/assets/themes/j1/core/css/globals.css +1 -1
- data/assets/themes/j1/core/css/theme_extensions.css +690 -137
- data/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
- data/assets/themes/j1/core/css/uno.css +690 -137
- data/assets/themes/j1/core/css/uno.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.css +134 -105
- data/assets/themes/j1/core/css/vendor.min.css +4 -4
- data/assets/themes/j1/core/js/template.js +306 -24
- 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/j1_app/j1_auth_manager/auth_manager.rb +8 -0
- data/lib/starter_web/Gemfile +2 -2
- data/lib/starter_web/_config.yml +12 -139
- data/lib/starter_web/_data/modules/authentication.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/navigator.yml +25 -24
- data/lib/starter_web/_data/modules/defaults/ssm.yml +50 -0
- data/lib/starter_web/_data/modules/defaults/toccer.yml +14 -15
- data/lib/starter_web/_data/modules/navigator.yml +164 -97
- data/lib/starter_web/_data/modules/ssm.yml +133 -0
- data/lib/starter_web/_data/modules/toccer.yml +20 -62
- data/lib/starter_web/_data/resources.yml +68 -51
- data/lib/starter_web/_data/template_settings.yml +13 -13
- data/lib/starter_web/_plugins/uglify.rb +41 -0
- data/lib/starter_web/assets/images/modules/icons/j1/{j1..ico → j1.ico} +0 -0
- data/lib/starter_web/collections/posts/public/{jekyll → featured}/_posts/2018-05-01-confusion-about-base-url.adoc +0 -0
- 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/learn/floating_sidebar.adoc +199 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +3 -3
- 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 +5 -5
- 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/learn/whats_up.adoc +12 -11
- data/lib/starter_web/pages/public/legal/en/500_support.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/200_rotate.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +2 -3
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +3 -3
- data/lib/starter_web/pages/public/site_search.adoc +196 -0
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +169 -164
- 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/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/scroller.js +0 -177
@@ -120,7 +120,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
120
120
|
// clear interval checking
|
121
121
|
clearInterval(dependencies_met_attic_adapter);
|
122
122
|
}
|
123
|
-
},
|
123
|
+
}, 25); // END 'dataLoaded'
|
124
124
|
|
125
125
|
return true;
|
126
126
|
}, // END init
|
@@ -544,7 +544,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
544
544
|
// Set the current (processing) state of the module
|
545
545
|
// -------------------------------------------------------------------------
|
546
546
|
setState: function (stat) {
|
547
|
-
j1.adapter.
|
547
|
+
j1.adapter.attic.state = stat;
|
548
548
|
}, // END setState
|
549
549
|
|
550
550
|
// -------------------------------------------------------------------------
|
@@ -552,7 +552,7 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
552
552
|
// Returns the current (processing) state of the module
|
553
553
|
// -------------------------------------------------------------------------
|
554
554
|
getState: function () {
|
555
|
-
return j1.adapter.
|
555
|
+
return j1.adapter.attic.state;
|
556
556
|
} // END state
|
557
557
|
|
558
558
|
}; // END return
|
@@ -560,4 +560,4 @@ j1.adapter['attic'] = (function (j1, window) {
|
|
560
560
|
|
561
561
|
{% endcapture %}
|
562
562
|
{{ cache | strip_empty_lines }}
|
563
|
-
{% assign cache = nil %}
|
563
|
+
{% assign cache = nil %}
|
@@ -293,7 +293,7 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
293
293
|
// Set the current (processing) state of the module
|
294
294
|
// -------------------------------------------------------------------------
|
295
295
|
setState: function (stat) {
|
296
|
-
j1.adapter.
|
296
|
+
j1.adapter.carousel.state = stat;
|
297
297
|
}, // END setState
|
298
298
|
|
299
299
|
// -------------------------------------------------------------------------
|
@@ -301,7 +301,7 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
301
301
|
// Returns the current (processing) state of the module
|
302
302
|
// -------------------------------------------------------------------------
|
303
303
|
getState: function () {
|
304
|
-
return j1.adapter.
|
304
|
+
return j1.adapter.carousel.state;
|
305
305
|
} // END state
|
306
306
|
|
307
307
|
}; // END return
|
@@ -310,4 +310,4 @@ j1.adapter['carousel'] = (function (j1, window) {
|
|
310
310
|
|
311
311
|
{% endcapture %}
|
312
312
|
{{cache | strip_empty_lines}}
|
313
|
-
{% assign cache = nil %}
|
313
|
+
{% assign cache = nil %}
|
File without changes
|
@@ -189,7 +189,7 @@ j1.adapter['framer'] = (function (j1, window) {
|
|
189
189
|
// Set the current (processing) state of the module
|
190
190
|
// -------------------------------------------------------------------------
|
191
191
|
setState: function (stat) {
|
192
|
-
j1.adapter.
|
192
|
+
j1.adapter.framer.state = stat;
|
193
193
|
}, // END setState
|
194
194
|
|
195
195
|
// -------------------------------------------------------------------------
|
@@ -197,7 +197,7 @@ j1.adapter['framer'] = (function (j1, window) {
|
|
197
197
|
// Returns the current (processing) state of the module
|
198
198
|
// -------------------------------------------------------------------------
|
199
199
|
getState: function () {
|
200
|
-
return j1.adapter.
|
200
|
+
return j1.adapter.framer.state;
|
201
201
|
} // END state
|
202
202
|
|
203
203
|
}; // END return
|
@@ -205,4 +205,4 @@ j1.adapter['framer'] = (function (j1, window) {
|
|
205
205
|
|
206
206
|
{% endcapture %}
|
207
207
|
{{ cache | strip_empty_lines }}
|
208
|
-
{% assign cache = nil %}
|
208
|
+
{% assign cache = nil %}
|
File without changes
|
@@ -1064,8 +1064,6 @@ var j1 = (function () {
|
|
1064
1064
|
|
1065
1065
|
var logText = 'initializing material design finished';
|
1066
1066
|
logger.info(logText);
|
1067
|
-
|
1068
|
-
return true;
|
1069
1067
|
}, // END initMDB
|
1070
1068
|
|
1071
1069
|
// -------------------------------------------------------------------------
|
@@ -1085,7 +1083,6 @@ var j1 = (function () {
|
|
1085
1083
|
o[p] = a[i][p];
|
1086
1084
|
}
|
1087
1085
|
}
|
1088
|
-
|
1089
1086
|
return o;
|
1090
1087
|
}, // END mergeData
|
1091
1088
|
|
@@ -1103,61 +1100,41 @@ var j1 = (function () {
|
|
1103
1100
|
// -------------------------------------------------------------------------
|
1104
1101
|
getLanguage: function () {
|
1105
1102
|
var language = navigator.languages ? navigator.languages[0] : (navigator.language || navigator.userLanguage);
|
1106
|
-
|
1107
|
-
return language;
|
1108
1103
|
}, // END getLanguage
|
1109
1104
|
|
1110
1105
|
// -------------------------------------------------------------------------
|
1111
|
-
// returns the template version taken from site config (
|
1106
|
+
// returns the template version taken from site config (_config.yml)
|
1112
1107
|
// -------------------------------------------------------------------------
|
1113
1108
|
getTemplateVersion: function () {
|
1114
1109
|
return '{{template_version}}';
|
1115
1110
|
}, // END getTemplateVersion
|
1116
1111
|
|
1117
1112
|
// -------------------------------------------------------------------------
|
1118
|
-
// Scrolls smooth to any anchor referenced by an page URL
|
1119
|
-
// Values for delay|offset are taken from
|
1113
|
+
// Scrolls smooth to any anchor referenced by an page URL on
|
1114
|
+
// e.g. a page reload. Values for delay|offset are taken from
|
1115
|
+
// TOCCER module
|
1120
1116
|
// -------------------------------------------------------------------------
|
1121
1117
|
scrollTo: function () {
|
1122
|
-
|
1123
|
-
var
|
1124
|
-
var offset = {{toccer_options.smoothScrollOffset}};
|
1125
|
-
var anchor_id = window.location.href.split("#")[1];
|
1118
|
+
var anchor = window.location.href.split("#")[1];
|
1119
|
+
var anchor_id = '#' + anchor;
|
1126
1120
|
var selector;
|
1127
|
-
var heading;
|
1128
|
-
var re;
|
1129
1121
|
|
1130
1122
|
if (anchor_id) {
|
1131
|
-
selector = $('.' + anchor_id + ', #' + anchor_id +',[name='+anchor_id+']');
|
1132
|
-
heading = selector[0].nodeName;
|
1133
|
-
|
1134
1123
|
// scroll only, if an anchor is given with URL
|
1124
|
+
selector = $(anchor_id);
|
1135
1125
|
if (selector.length) {
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
function () {
|
1141
|
-
// scroll the page one pixel back and forth
|
1142
|
-
// to get the right position for the NAV Module (Tocbot)
|
1143
|
-
$(window).scrollTop($(window).scrollTop()+1);
|
1144
|
-
$(window).scrollTop($(window).scrollTop()-1);
|
1126
|
+
j1.core.scrollSmooth.scroll( anchor_id, {
|
1127
|
+
duration: {{toccer_options.scrollSmoothDuration}},
|
1128
|
+
offset: {{toccer_options.scrollSmoothOffset}},
|
1129
|
+
callback: null
|
1145
1130
|
});
|
1146
1131
|
} else {
|
1147
|
-
//
|
1148
|
-
//
|
1149
|
-
// to get the right position for the NAV Module (Tocbot)
|
1132
|
+
// scroll the page one pixel back and forth (trigger)
|
1133
|
+
// to get the right position for the Toccer
|
1150
1134
|
$(window).scrollTop($(window).scrollTop()+1);
|
1151
1135
|
$(window).scrollTop($(window).scrollTop()-1);
|
1152
|
-
} //
|
1153
|
-
}
|
1154
|
-
// scroll the page one pixel back and forth
|
1155
|
-
// to get the right position for the NAV Module (Tocbot)
|
1156
|
-
$(window).scrollTop($(window).scrollTop()+1);
|
1157
|
-
$(window).scrollTop($(window).scrollTop()-1);
|
1158
|
-
} // END if anchor_id
|
1159
|
-
|
1160
|
-
return true;
|
1136
|
+
} // END if anchor_id
|
1137
|
+
}
|
1161
1138
|
}, // END scrollTo
|
1162
1139
|
|
1163
1140
|
// -------------------------------------------------------------------------
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,452 @@
|
|
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
|
+
}, // END init
|
178
|
+
|
179
|
+
// -------------------------------------------------------------------------
|
180
|
+
// MMenu Loader
|
181
|
+
// -------------------------------------------------------------------------
|
182
|
+
mmenuLoader: function (mmOptions) {
|
183
|
+
var menu_id;
|
184
|
+
var xhr_data_path;
|
185
|
+
|
186
|
+
_this.setState('loading');
|
187
|
+
logger.info('status: ' + _this.getState());
|
188
|
+
logger.info('load HTML data for navs and drawers');
|
189
|
+
|
190
|
+
{% assign id_list = "" %}
|
191
|
+
|
192
|
+
// -----------------------------------------------------------------------
|
193
|
+
// Load HTML data (AJAX)
|
194
|
+
// -----------------------------------------------------------------------
|
195
|
+
// jadams, 202-06-24: Promise (chain) if $.when seems NOT to work correctly.
|
196
|
+
// It semms a chain using .then will be a better solution to make it sure
|
197
|
+
// that the last Deferred set the state to 'data_loaded'.
|
198
|
+
// Found the final state randomly set to 'null' what prevent the module
|
199
|
+
// to run mmenuInitializer.
|
200
|
+
// Workaround: Set 'data_loaded' to be returned by all Deferred in
|
201
|
+
// the chain.
|
202
|
+
// See: https://stackoverflow.com/questions/5436327/jquery-deferreds-and-promises-then-vs-done
|
203
|
+
//
|
204
|
+
{% comment %} Modify chain
|
205
|
+
--------------------------------------------------------------------------
|
206
|
+
{% if forloop.last %}'data_loaded'{% else %}'null'{% endif %}){% if forloop.last %}{% else %},{% endif %}
|
207
|
+
to
|
208
|
+
{% if forloop.last %}'data_loaded'{% else %}'data_loaded'{% endif %}){% if forloop.last %}{% else %},{% endif %}
|
209
|
+
-------------------------------------------------------------------------- {% endcomment %}
|
210
|
+
$.when (
|
211
|
+
{% for item in nav_mmenu_options.menus %} {% if item.menu.enabled %}
|
212
|
+
{% assign menu_id = item.menu.xhr_container_id %}
|
213
|
+
{% assign xhr_data_path = item.menu.xhr_data_path %}
|
214
|
+
|
215
|
+
j1.xhrData (
|
216
|
+
'j1.adapter.mmenu', {
|
217
|
+
xhr_container_id: "{{menu_id}}",
|
218
|
+
xhr_data_path: "{{xhr_data_path}}" },
|
219
|
+
{% if forloop.last %}'null'{% else %}'null'{% endif %}){% if forloop.last %}{% else %},{% endif %}
|
220
|
+
|
221
|
+
{% endif %}
|
222
|
+
{% capture id_list %}{{id_list}}{{menu_id}}{% if forloop.last %}{% else %},{% endif %} {% endcapture %}
|
223
|
+
{% endfor %} // ENDFOR menus
|
224
|
+
).done (function ({{id_list}}) {
|
225
|
+
// ---------------------------------------------------------------------
|
226
|
+
// Initialize MMenu Navs and Drawers
|
227
|
+
// ---------------------------------------------------------------------
|
228
|
+
// Make sure that Load HTML data (AJAX) is finished
|
229
|
+
setTimeout (function() {
|
230
|
+
_this.setState('data_loaded');
|
231
|
+
}, 300);
|
232
|
+
|
233
|
+
var dependencies_met_mmenu_initialized = setInterval (function () {
|
234
|
+
if (_this.getState() === 'data_loaded') {
|
235
|
+
logger.info('load HTML data (AJAX): finished');
|
236
|
+
_this.setState('processing');
|
237
|
+
logger.info('status: ' + _this.getState());
|
238
|
+
logger.info('initialize navs and drawers');
|
239
|
+
j1.adapter.mmenu.mmenuInitializer(mmOptions);
|
240
|
+
clearInterval(dependencies_met_mmenu_initialized);
|
241
|
+
}
|
242
|
+
}, 25); // END dependencies_met_mmenu_loaded
|
243
|
+
|
244
|
+
var dependencies_met_all_menu_loaded = setInterval (function () {
|
245
|
+
if ( $('#menu_mmenu').length && $('#sidebar_mmenu').length && $('#toc_mmenu').length ) {
|
246
|
+
_this.setState('finished');
|
247
|
+
logger.info('status: ' + _this.getState());
|
248
|
+
clearInterval(dependencies_met_all_menu_loaded);
|
249
|
+
}
|
250
|
+
}, 25); // END dependencies_met_all_menu_loaded
|
251
|
+
}); // END done
|
252
|
+
}, // END dataLoader
|
253
|
+
|
254
|
+
// -------------------------------------------------------------------------
|
255
|
+
// MMenu Initializer
|
256
|
+
// -------------------------------------------------------------------------
|
257
|
+
mmenuInitializer: function (mmOptions) {
|
258
|
+
var menu_id;
|
259
|
+
var xhr_data_path;
|
260
|
+
|
261
|
+
{% for item in nav_mmenu_options.menus %} {% if item.menu.enabled %}
|
262
|
+
|
263
|
+
{% assign menu_id = item.menu.xhr_container_id %}
|
264
|
+
menu_id = "{{menu_id}}";
|
265
|
+
xhr_data_path = "{{item.menu.xhr_data_path}}";
|
266
|
+
|
267
|
+
// Create an mmenu instance if id exists: {{menu_id}}
|
268
|
+
if ($('#{{menu_id}}').length) {
|
269
|
+
|
270
|
+
logger.info('mmenu is being initialized on id: {{menu_id}}');
|
271
|
+
|
272
|
+
{% if item.menu.content.type == "navigation" %}
|
273
|
+
// Create an mmenu instance of type NAVIGATION
|
274
|
+
logger.info('found content type: NAVIGATION');
|
275
|
+
// ---------------------------------------------------------------------
|
276
|
+
// menu initializer (NAVIGATION)
|
277
|
+
// ---------------------------------------------------------------------
|
278
|
+
logger.info('initialize mmenu on id: #{{menu_id}}');
|
279
|
+
var dependencies_met_{{menu_id}}_loaded = setInterval (function () {
|
280
|
+
if ({{menu_id}}) {
|
281
|
+
const menu_selector = document.querySelector('#{{menu_id}}');
|
282
|
+
const mmenu_{{menu_id}} = new MmenuLight (
|
283
|
+
menu_selector,
|
284
|
+
'(max-width: ' + mmOptions.mmenu_plugin.max_width +'px)', {
|
285
|
+
// plugin options
|
286
|
+
node: mmOptions.mmenu_plugin.node,
|
287
|
+
mediaQuery: mmOptions.mmenu_plugin.mediaQuery
|
288
|
+
});
|
289
|
+
|
290
|
+
const drawer_{{menu_id}} = mmenu_{{menu_id}}.offcanvas ({
|
291
|
+
// drawer options
|
292
|
+
position: mmOptions.mmenu_drawer.position
|
293
|
+
});
|
294
|
+
|
295
|
+
const navigator_{{menu_id}} = mmenu_{{menu_id}}.navigation ({
|
296
|
+
// navigator options
|
297
|
+
selected: mmOptions.mmenu_navigator.selected,
|
298
|
+
slidingSubmenus: mmOptions.mmenu_navigator.slidingSubmenus,
|
299
|
+
title: mmOptions.mmenu_navigator.title,
|
300
|
+
theme: mmOptions.mmenu_navigator.theme
|
301
|
+
});
|
302
|
+
|
303
|
+
// Toggle Bars (Hamburger) for the NavBar to open|close
|
304
|
+
// the mmenu drawer
|
305
|
+
$('{{item.menu.content.button}}').each(function(e) {
|
306
|
+
var $this = $(this);
|
307
|
+
|
308
|
+
$this.on('click', function(e){
|
309
|
+
const button_{{menu_id}} = this;
|
310
|
+
|
311
|
+
// TODO: Animated toggle button
|
312
|
+
//
|
313
|
+
// $('{{item.menu.content.toggler}}').toggleClass('fadeIn');
|
314
|
+
// $('{{item.menu.content.toggler}}').toggleClass('rotateIn')
|
315
|
+
|
316
|
+
// $('.mdi', this).toggleClass('mdi-menu');
|
317
|
+
// $('.mdi', this).toggleClass('mdi-close');
|
318
|
+
|
319
|
+
e.preventDefault();
|
320
|
+
|
321
|
+
// (toggler_{{menu_id}}.t = !toggler_{{menu_id}}.t)
|
322
|
+
// ? drawer_{{menu_id}}.open()
|
323
|
+
// : drawer_{{menu_id}}.close();
|
324
|
+
|
325
|
+
drawer_{{menu_id}}.open()
|
326
|
+
});
|
327
|
+
});
|
328
|
+
clearInterval(dependencies_met_{{menu_id}}_loaded);
|
329
|
+
$('#{{item.menu.content.id}}').show();
|
330
|
+
logger.info('initializing mmenu finished on id: #{{menu_id}}');
|
331
|
+
}; // END mmenu_loaded
|
332
|
+
}, 25); // END dependencies_met_mmenu_loaded
|
333
|
+
{% endif %} // ENDIF content_type: NAVIGATION
|
334
|
+
|
335
|
+
{% if item.menu.content.type == "drawer" %}
|
336
|
+
// Create an mmenu instance of type HTML
|
337
|
+
logger.info('found content type: DRAWER');
|
338
|
+
// -------------------------------------------------------------------
|
339
|
+
// menu initializer (DRAWER)
|
340
|
+
// -------------------------------------------------------------------
|
341
|
+
logger.info('initialize mmenu on id: #{{menu_id}}');
|
342
|
+
var dependencies_met_{{menu_id}}_loaded = setInterval (function () {
|
343
|
+
if ({{menu_id}}) {
|
344
|
+
const menu_selector = document.querySelector('#{{menu_id}}');
|
345
|
+
|
346
|
+
const mmenu_{{menu_id}} = new MmenuLight (
|
347
|
+
menu_selector,
|
348
|
+
'(max-width: ' + mmOptions.mmenu_plugin.max_width +'px)', {
|
349
|
+
// plugin options
|
350
|
+
node: mmOptions.mmenu_plugin.node,
|
351
|
+
mediaQuery: mmOptions.mmenu_plugin.mediaQuery
|
352
|
+
});
|
353
|
+
|
354
|
+
const drawer_{{menu_id}} = mmenu_{{menu_id}}.offcanvas ({
|
355
|
+
// drawer options
|
356
|
+
position: "{{item.menu.drawer.position}}"
|
357
|
+
});
|
358
|
+
|
359
|
+
// button for the MMenu tocbar to open|close the toc drawer
|
360
|
+
$('{{item.menu.content.button}}').each(function(e) {
|
361
|
+
var $this = $(this);
|
362
|
+
|
363
|
+
$this.on('click', function(e) {
|
364
|
+
var button_{{menu_id}} = this;
|
365
|
+
var hasClass;
|
366
|
+
|
367
|
+
// check if the button should be activated
|
368
|
+
// e.g for TOC only if clas js-toc-content is found
|
369
|
+
//
|
370
|
+
if ('{{item.menu.content.button_activated}}' != 'always') {
|
371
|
+
hasClass = $('main').hasClass('{{item.menu.content.button_activated}}');
|
372
|
+
} else {
|
373
|
+
hasClass = true;
|
374
|
+
}
|
375
|
+
if (hasClass) {
|
376
|
+
// Toggle button animation
|
377
|
+
//$('{{item.menu.content.toggler}}').toggleClass('{{item.menu.content.toggler_animation}}')
|
378
|
+
|
379
|
+
e.preventDefault();
|
380
|
+
|
381
|
+
// (toggler_{{menu_id}}.t = !toggler_{{menu_id}}.t)
|
382
|
+
// ? drawer_{{menu_id}}.open()
|
383
|
+
// : drawer_{{menu_id}}.close();
|
384
|
+
|
385
|
+
drawer_{{menu_id}}.open()
|
386
|
+
} // END if hasclass
|
387
|
+
});
|
388
|
+
});
|
389
|
+
clearInterval(dependencies_met_{{menu_id}}_loaded);
|
390
|
+
$('#{{item.menu.content.id}}').show();
|
391
|
+
}; // END if menu_loaded
|
392
|
+
}, 25); // END dependencies_met_mmenu_loaded
|
393
|
+
logger.info('initializing mmenu finished on id: #{{menu_id}}');
|
394
|
+
{% endif %} // ENDIF content_type: DRAWER
|
395
|
+
} // END menus|drawers
|
396
|
+
{% endif %} // ENDIF menu enabled
|
397
|
+
{% endfor %} // ENDFOR menus
|
398
|
+
}, // END mmenuInitializer
|
399
|
+
|
400
|
+
// -------------------------------------------------------------------------
|
401
|
+
// messageHandler
|
402
|
+
// Manage messages (paylods) send from other J1 modules
|
403
|
+
// -------------------------------------------------------------------------
|
404
|
+
messageHandler: function (sender, message) {
|
405
|
+
// var json_message = JSON.stringify(message, undefined, 2); // multiline
|
406
|
+
var json_message = JSON.stringify(message);
|
407
|
+
|
408
|
+
logText = 'received message from ' + sender + ': ' + json_message;
|
409
|
+
logger.debug(logText);
|
410
|
+
|
411
|
+
// -----------------------------------------------------------------------
|
412
|
+
// Process commands|actions
|
413
|
+
// -----------------------------------------------------------------------
|
414
|
+
if (message.type === 'command' && message.action === 'module_initialized') {
|
415
|
+
//
|
416
|
+
// Place handling of command|action here
|
417
|
+
//
|
418
|
+
logger.info(message.text);
|
419
|
+
}
|
420
|
+
if (message.type === 'command' && message.action === 'status') {
|
421
|
+
logger.info('messageHandler: received - ' + message.action);
|
422
|
+
}
|
423
|
+
|
424
|
+
//
|
425
|
+
// Place handling of other command|action here
|
426
|
+
//
|
427
|
+
|
428
|
+
return true;
|
429
|
+
}, // END messageHandler
|
430
|
+
|
431
|
+
// -------------------------------------------------------------------------
|
432
|
+
// setState
|
433
|
+
// Set the current (processing) state of the module
|
434
|
+
// -------------------------------------------------------------------------
|
435
|
+
setState: function (stat) {
|
436
|
+
j1.adapter.mmenu.state = stat;
|
437
|
+
}, // END setState
|
438
|
+
|
439
|
+
// -------------------------------------------------------------------------
|
440
|
+
// getState
|
441
|
+
// Returns the current (processing) state of the module
|
442
|
+
// -------------------------------------------------------------------------
|
443
|
+
getState: function () {
|
444
|
+
return j1.adapter.mmenu.state;
|
445
|
+
} // END state
|
446
|
+
|
447
|
+
}; // END return
|
448
|
+
})(j1, window);
|
449
|
+
|
450
|
+
{% endcapture %}
|
451
|
+
{{ cache | strip_empty_lines }}
|
452
|
+
{% assign cache = nil %}
|