j1-template 2022.5.2 → 2022.6.0
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_news_panel_posts.html +61 -40
- data/_includes/themes/j1/layouts/content_generator_page.html +22 -22
- data/_includes/themes/j1/layouts/content_generator_post.html +1 -1
- data/_includes/themes/j1/layouts/layout_metadata_generator.html +13 -79
- data/_includes/themes/j1/{blocks → procedures/blocks}/footer/boxes/about_box.proc +0 -0
- data/_includes/themes/j1/{blocks → procedures/blocks}/footer/boxes/contacts_box.proc +0 -0
- data/_includes/themes/j1/{blocks → procedures/blocks}/footer/boxes/issue.proc +0 -0
- data/_includes/themes/j1/{blocks → procedures/blocks}/footer/boxes/legal_statements.proc +0 -0
- data/_includes/themes/j1/{blocks → procedures/blocks}/footer/boxes/links_box.proc +0 -0
- data/_includes/themes/j1/{blocks → procedures/blocks}/footer/boxes/news_box.proc +0 -0
- data/_includes/themes/j1/{blocks → procedures/blocks}/footer/boxes/social_media_icons.proc +0 -0
- data/_includes/themes/j1/procedures/blocks/get_wave.proc +211 -0
- data/_includes/themes/j1/procedures/collections/create_collection_article_preview.proc +1 -1
- data/_includes/themes/j1/procedures/global/create_word_cloud.proc +1 -1
- data/_includes/themes/j1/procedures/posts/collate_timeline.proc +2 -2
- data/_includes/themes/j1/procedures/posts/pager.proc +9 -10
- data/_layouts/default.html +5 -1
- data/apps/private/README.txt +1 -0
- data/apps/protected/README.txt +1 -0
- data/apps/public/README.txt +1 -0
- data/assets/data/banner.html +38 -8
- data/assets/data/footer.html +31 -11
- data/assets/data/panel.html +118 -27
- data/assets/themes/j1/adapter/js/attic.js +4 -4
- data/assets/themes/j1/adapter/js/comments.js +18 -7
- data/assets/themes/j1/adapter/js/waves.js +227 -0
- data/assets/themes/j1/core/css/icon-fonts/fontawesome.min.css +1 -1
- data/assets/themes/j1/core/css/icon-fonts/mdi.min.css +1 -1
- data/assets/themes/j1/core/css/icon-fonts/mdil.min.css +1 -1
- data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.css +92 -74
- data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.min.css +5 -3
- data/assets/themes/j1/core/css/themes/theme_vapor/bootstrap.css +92 -74
- data/assets/themes/j1/core/css/themes/theme_vapor/bootstrap.min.css +5 -3
- data/assets/themes/j1/core/css/themes/unodark/bootstrap.css +105 -138
- data/assets/themes/j1/core/css/themes/unodark/bootstrap.min.css +5 -3
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +457 -262
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +26 -15
- data/assets/themes/j1/core/css/vendor.css +11 -8
- data/assets/themes/j1/core/css/vendor.min.css +1 -1
- data/assets/themes/j1/core/fonts/fontawesome_5/LICENSE.txt +34 -0
- data/assets/themes/j1/core/fonts/material_design_icons/LICENSE.txt +97 -0
- data/assets/themes/j1/core/fonts/material_design_icons_light/LICENSE.txt +92 -0
- data/assets/themes/j1/core/fonts/roboto/LICENSE.txt +11 -0
- data/assets/themes/j1/core/js/template.js +419 -746
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/backstretch/js/backstretch.js +1 -1
- data/assets/themes/j1/modules/backstretch/js/backstretch.min.js +1 -1
- data/assets/themes/j1/modules/bokeh/LICENSE.txt +28 -0
- data/assets/themes/j1/modules/jquery/js/extensions/hasClass.js +17 -0
- data/assets/themes/j1/modules/jquery/js/extensions/hasClass.min.js +17 -0
- data/assets/themes/j1/modules/jquery/js/extensions/removeClass.js +18 -0
- data/assets/themes/j1/modules/jquery/js/extensions/removeClass.min.js +17 -0
- data/assets/themes/j1/modules/later/LICENSE.txt +21 -0
- data/assets/themes/j1/modules/log4javascript/license.txt +201 -0
- data/assets/themes/j1/modules/lunr/stopwords/de.txt +229 -0
- data/assets/themes/j1/modules/lunr/stopwords/en.txt +119 -0
- data/assets/themes/j1/modules/masterslider/LICENSE.txt +621 -0
- data/assets/themes/j1/modules/masterslider/README.txt +531 -0
- data/assets/themes/j1/modules/msDropdown/LICENSE.txt +20 -0
- data/assets/themes/j1/modules/nbinteract-core/LICENSE.txt +60 -0
- data/assets/themes/j1/modules/rouge/css/themes.txt +46 -0
- data/assets/themes/j1/modules/vega/LICENSE.txt +27 -0
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +11 -7
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +199 -135
- data/lib/starter_web/_data/blocks/banner.yml +18 -2
- data/lib/starter_web/_data/blocks/defaults/footer.yml +3 -1
- data/lib/starter_web/_data/blocks/defaults/panel.yml +4 -0
- data/lib/starter_web/_data/blocks/footer.yml +12 -1
- data/lib/starter_web/_data/blocks/panel.yml +88 -19
- data/lib/starter_web/_data/j1_config.yml +2 -2
- data/lib/starter_web/_data/layouts/collection.yml +0 -9
- data/lib/starter_web/_data/layouts/home.yml +21 -30
- data/lib/starter_web/_data/layouts/news_panel_posts.yml +0 -9
- data/lib/starter_web/_data/layouts/page.yml +0 -9
- data/lib/starter_web/_data/layouts/post.yml +0 -9
- data/lib/starter_web/_data/modules/blog_navigator.yml +6 -0
- data/lib/starter_web/_data/modules/defaults/blog_navigator.yml +15 -8
- data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +5 -4
- data/lib/starter_web/_data/modules/defaults/navigator.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/waves.yml +32 -0
- data/lib/starter_web/_data/modules/navigator_menu.yml +48 -120
- data/lib/starter_web/_data/modules/waves.yml +32 -0
- data/lib/starter_web/_data/plugins/defaults/feed.yml +82 -0
- data/lib/starter_web/_data/plugins/defaults/seo-tags.yml +65 -0
- data/lib/starter_web/_data/plugins/defaults/sitemap.yml +66 -0
- data/lib/starter_web/_data/plugins/feed.yml +35 -0
- data/lib/starter_web/_data/plugins/seo-tags.yml +30 -0
- data/lib/starter_web/_data/plugins/sitemap.yml +30 -0
- data/lib/starter_web/_data/resources.yml +22 -0
- data/lib/starter_web/_data/templates/feed.xml +191 -0
- data/lib/starter_web/_data/templates/robots.txt +1 -0
- data/lib/starter_web/_data/templates/seo-tags.html +140 -0
- data/lib/starter_web/_data/templates/sitemap.xml +36 -0
- data/lib/starter_web/_includes/attributes.asciidoc +49 -47
- data/lib/starter_web/_includes/custom/static/bs5_accordion.html +84 -0
- data/lib/starter_web/_includes/custom/templates/bs5_accordion.html +103 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/admonition-block-answer.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/admonition-block-question.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/banner.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/callout.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/carousel-block.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/conum.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/fab-icon-inline.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/fas-icon-inline.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/flag-icon-inline.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/gallery-block.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/gist-block.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/iconify-icon-inline.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/lightbox-block.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/lorem_inline.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/masterslider-block.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/mdi-icon-inline.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/panel.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/range-slider-block.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/shout-block.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/textbook-block.rb +0 -0
- data/lib/starter_web/_plugins/{asciidoctor-extensions → asciidoctor}/twitter-emoji-inline.rb +0 -0
- data/lib/starter_web/_plugins/{debug.rb → filter/debug.rb} +0 -0
- data/lib/starter_web/_plugins/{encodeBase64.rb → filter/encodeBase64.rb} +0 -0
- data/lib/starter_web/_plugins/{encryptAES.rb → filter/encryptAES.rb} +0 -0
- data/lib/starter_web/_plugins/{filters.rb → filter/filters.rb} +11 -0
- data/lib/starter_web/_plugins/{minifyJS.rb → filter/minifyJS.rb} +0 -0
- data/lib/starter_web/_plugins/{minifyJSON.rb → filter/minifyJSON.rb} +0 -0
- data/lib/starter_web/_plugins/{prettify.rb → filter/prettify.rb} +0 -0
- data/lib/starter_web/_plugins/filter/xml_prettify.rb +36 -0
- data/lib/starter_web/_plugins/{symlink_watcher.rb → helper/symlink_watcher.rb} +0 -0
- data/lib/starter_web/_plugins/{date-i18n.rb → i18n/date.rb} +1 -1
- data/lib/starter_web/_plugins/{lunr_index.rb → index/lunr.rb} +38 -35
- data/lib/starter_web/_plugins/seo/j1-feed.rb +268 -0
- data/lib/starter_web/_plugins/seo/j1-seo-tags.rb +717 -0
- data/lib/starter_web/_plugins/seo/j1-sitemap.rb +140 -0
- data/lib/starter_web/assets/images/banner/scalable/wave.svg +13 -0
- data/lib/starter_web/assets/images/blocks/waves/scalable/1280x100/wave-1.svg +63 -0
- data/lib/starter_web/assets/images/blocks/waves/scalable/1280x100/wave-2.svg +60 -0
- data/lib/starter_web/assets/images/blocks/waves/scalable/1280x100/wave-3.svg +64 -0
- data/lib/starter_web/assets/images/blocks/waves/scalable/1280x100/wave-4.svg +62 -0
- data/lib/starter_web/assets/images/blocks/waves/scalable/1920x100/wave-1.svg +64 -0
- data/lib/starter_web/assets/images/blocks/waves/scalable/1920x100/wave-2.svg +60 -0
- data/lib/starter_web/assets/images/blocks/waves/scalable/1920x100/wave-3.svg +65 -0
- data/lib/starter_web/assets/images/blocks/waves/scalable/1920x100/wave-4.svg +62 -0
- data/lib/starter_web/assets/images/collections/blog/featured/dynamic-web-access.png +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/jamstack-generators.png +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/static-web-access.png +0 -0
- data/lib/starter_web/assets/images/icons/jekyll/logo-2x.png +0 -0
- data/lib/starter_web/assets/images/icons/jekyll/octojekyll.png +0 -0
- data/lib/starter_web/assets/images/modules/attics/1280x800/j1-template.png +0 -0
- data/lib/starter_web/assets/images/modules/attics/1280x800/jekyll-generator.png +0 -0
- data/lib/starter_web/assets/images/modules/attics/1280x800jekyll-generator.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/_ben-kolde.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/_moritz-kindler.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/alina-grubnyak.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/andrea-badino.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/brad-neathery.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/bruno-figueiredo.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/fly-d.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/guillaume-bolduc.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/melanie-deziel.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/milad-fakurian.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/quino-al-2.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/lunr-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/no-time-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/author.txt +75 -0
- data/lib/starter_web/assets/images/pages/egrid/bg.png +0 -0
- data/lib/starter_web/assets/images/pages/egrid/black_denim.png +0 -0
- data/lib/starter_web/assets/images/pages/egrid/explanation.png +0 -0
- data/lib/starter_web/assets/images/pages/egrid/html_markup.png +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/1.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/10.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/11.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/12.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/13.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/14.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/15.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/16.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/17.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/18.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/19.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/2.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/20.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/3.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/4.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/5.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/6.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/7.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/8.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/large/9.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/loading.gif +0 -0
- data/lib/starter_web/assets/images/pages/egrid/loading_dark.gif +0 -0
- data/lib/starter_web/assets/images/pages/egrid/nav-icon.png +0 -0
- data/lib/starter_web/assets/images/pages/egrid/nav.png +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/1.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/10.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/11.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/12.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/13.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/14.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/15.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/16.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/17.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/18.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/19.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/1a.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/2.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/20.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/3.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/4.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/5.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/6.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/7.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/8.jpg +0 -0
- data/lib/starter_web/assets/images/pages/egrid/small/9.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/500_themes/themes-menu-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/promo/home/screenshot.jpg +0 -0
- data/lib/starter_web/assets/images/promo/jekyll/jekyll-generator.png +0 -0
- data/lib/starter_web/assets/images/promo/jekyll/jekyll-og.png +0 -0
- data/lib/starter_web/collections/asciidoc_skeletons/simple-post/_posts/yyyy-mm-dd-your-post-name.asciidoc +13 -10
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +8 -3
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-01-01-about-cookies.adoc +11 -6
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-02-01-site-generators.adoc +13 -10
- data/lib/starter_web/collections/posts/public/featured/_posts/2022-02-01-about-j1.adoc +12 -9
- data/lib/starter_web/collections/posts/public/featured/_posts/_includes/attributes.asciidoc +2 -2
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-wiki-series.adoc +13 -5
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-wiki-series.adoc +13 -6
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-wiki-series.adoc +13 -6
- data/lib/starter_web/index.html +85 -60
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/about/features.adoc +15 -7
- data/lib/starter_web/pages/public/about/reporting_issues.adoc +13 -5
- data/lib/starter_web/pages/public/about/site.adoc +2 -6
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/000_intro.adoc +14 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/100_converter.adoc +15 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/200_themes.adoc +14 -6
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/111_about_the_converter.asciidoc +15 -10
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +9 -8
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +9 -8
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +9 -8
- data/lib/starter_web/pages/public/blog/navigator/{archive.html → archive/allview.html} +53 -26
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +45 -20
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +49 -19
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +57 -53
- data/lib/starter_web/pages/public/blog/navigator/index.html +212 -35
- data/lib/starter_web/pages/public/features/general.adoc +12 -30
- data/lib/starter_web/pages/public/features/template.adoc +9 -33
- data/lib/starter_web/pages/public/learn/quickstart.adoc +10 -8
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +0 -7
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/410_table_bs_modal_examples.asciidoc +2 -2
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/themes_bootstrap.asciidoc +51 -0
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/themes_rouge.asciidoc +110 -0
- data/lib/starter_web/pages/public/learn/roundtrip/asciidoc_extensions.adoc +11 -9
- data/lib/starter_web/pages/public/learn/roundtrip/bootstrap_themes.adoc +80 -0
- data/lib/starter_web/pages/public/learn/roundtrip/icon_fonts.adoc +9 -7
- data/lib/starter_web/pages/public/learn/roundtrip/{quicksearch.adoc → lunr_search.adoc} +23 -18
- data/lib/starter_web/pages/public/learn/roundtrip/{bs_modals_extentions.adoc → modal_extentions.adoc} +23 -24
- data/lib/starter_web/pages/public/learn/roundtrip/present_images.adoc +12 -11
- data/lib/starter_web/pages/public/learn/roundtrip/present_videos.adoc +14 -10
- data/lib/starter_web/pages/public/learn/roundtrip/{responsive_tables_extensions.adoc → responsive_tables.adoc} +16 -13
- data/lib/starter_web/pages/public/learn/roundtrip/{typography.adoc → template_typography.adoc} +8 -7
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +12 -29
- data/lib/starter_web/pages/public/legal/de/100_copyright.adoc +1 -1
- data/lib/starter_web/pages/public/legal/de/100_impress.adoc +1 -1
- data/lib/starter_web/pages/public/legal/de/300_privacy.adoc +1 -1
- data/lib/starter_web/pages/public/legal/de/400_comment_policy.adoc +3 -1
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +7 -5
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +7 -5
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +7 -5
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +9 -5
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +11 -10
- data/lib/starter_web/pages/public/plans/plans.adoc +8 -5
- data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +15 -38
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +170 -128
- data/_includes/themes/j1/blocks/footer/generator.html +0 -151
- data/_includes/themes/j1/layouts/content_generator_app.html +0 -32
- data/_includes/themes/j1/layouts/content_generator_article_navigator.html +0 -176
- data/_includes/themes/j1/layouts/content_generator_blog_archive.html +0 -251
- data/_layouts/app.html +0 -65
- data/_layouts/article_navigator.html +0 -66
- data/_layouts/blog_archive.html +0 -64
- data/assets/data/article_navigator/index.html +0 -51
- data/lib/starter_web/_data/layouts/app.yml +0 -172
- data/lib/starter_web/_data/layouts/article_navigator.yml +0 -173
- data/lib/starter_web/_data/layouts/blog_archive.yml +0 -191
- data/lib/starter_web/_includes/custom/static/custom_teaser.html +0 -64
- data/lib/starter_web/assets/images/banner/scalable/readme +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/dynamic-web-access.jpg +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/jamstack-generators-2.jpg +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/markus-spiske-2.jpg +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/static-web-access.jpg +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/welcome-to-j1-template.jpg +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/what-is-a-baseurl.jpg +0 -0
- data/lib/starter_web/assets/images/collections/blog/series/j1_using_docker/j1_docker_banner.1280x500.png +0 -0
- data/lib/starter_web/assets/images/collections/blog/series/j1_using_docker/kinematic_alpha.1280x600.png +0 -0
- data/lib/starter_web/assets/images/collections/blog/series/j1_using_docker/kinematic_j1.1280x300.png +0 -0
- data/lib/starter_web/assets/images/collections/blog/series/j1_using_docker/windows_docker_banner.1280x500.png +0 -0
- data/lib/starter_web/assets/images/modules/attics/1920x1280/moritz-kindler.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/dailymotion/meditation.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/dailymotion/pilates.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/html5/video1.mp4 +0 -0
- data/lib/starter_web/assets/videos/gallery/html5/video2.mp4 +0 -0
- data/lib/starter_web/assets/videos/gallery/kick-it-old-school-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/nye-party-shop-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/stay-colorful-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video1-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video1-thumb.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video2-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video2-thumb.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_adele-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_gaga-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_gwen-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_michelle-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/vk/hai.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/vk/otter.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/voice_kids_de_2021/battle.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/voice_kids_de_2021/ben.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/voice_kids_de_2021/constance.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/voice_kids_de_2021/elisa.jpg +0 -0
- data/lib/starter_web/assets/videos/headers/present_videos/still/underground-broadway.jpg +0 -0
- data/lib/starter_web/assets/videos/headers/present_videos/underground-broadway.mp4 +0 -0
- data/lib/starter_web/assets/videos/tiktok/einhorn.jpg +0 -0
- data/lib/starter_web/assets/videos/tiktok/waluschka.jpg +0 -0
- data/lib/starter_web/pages/public/jupyter/examples/distributed/j1-circular-times-table.adoc +0 -142
- data/lib/starter_web/pages/public/jupyter/examples/distributed/j1-common-used-widgets.adoc +0 -232
- data/lib/starter_web/pages/public/jupyter/examples/distributed/j1-odes-in-python.adoc +0 -115
- data/lib/starter_web/pages/public/jupyter/examples/localized/j1_climate-change-forecast.adoc +0 -109
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_circular_times_table.ipynb +0 -12382
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_climate_change_forecast.ipynb +0 -1058
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_docs_example_dynamic.ipynb +0 -14478
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_interactive_widgets.ipynb +0 -442
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_nbi_widgets.ipynb +0 -523
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_nbi_widgets_bar_chart.ipynb +0 -89
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_nbi_widgets_hist_chart.ipynb +0 -87
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_nbi_widgets_line_chart.ipynb +0 -90
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_nbi_widgets_question_multiple_choice.ipynb +0 -64
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_nbi_widgets_question_short_answer.ipynb +0 -122
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_nbi_widgets_scatter_chart.ipynb +0 -89
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_nbi_widgets_scatter_drag_chart.ipynb +0 -87
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_odes_in_python.ipynb +0 -15227
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_circular_times_table.html +0 -747
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_climate_change_forecast.html +0 -1250
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_docs_example_dynamic.html +0 -186
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_interactive_widgets.html +0 -512
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets.html +0 -629
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_bar_chart.html +0 -95
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_hist_chart.html +0 -93
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_line_chart.html +0 -96
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_question_multiple_choice.html +0 -70
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_question_short_answer.html +0 -156
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_chart.html +0 -95
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_nbi_widgets_scatter_drag_chart.html +0 -93
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_odes_in_python.html +0 -955
- data/lib/starter_web/pages/public/jupyter/where_to_go.adoc +0 -232
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/google-ad.js +0 -130
- data/lib/starter_web/pages/public/learn/roundtrip/themes.adoc +0 -253
- data/lib/starter_web/pages/public/se/se-fake.adoc +0 -48
@@ -1,523 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"cells": [
|
3
|
-
{
|
4
|
-
"cell_type": "markdown",
|
5
|
-
"metadata": {},
|
6
|
-
"source": [
|
7
|
-
"## Widgets from j1-nbinteract\n",
|
8
|
-
"\n",
|
9
|
-
"The library *j1-nbinteract* comes with a set of functions that produce Javascript-based plots designed for interaction. The package combines the *ipywidgets* library and the *bqplot*\n",
|
10
|
-
"plotting library to implement function-driven interfaces to interactive plotting.\n",
|
11
|
-
"\n",
|
12
|
-
"The nbinteract plotting methods use **ipywidgets** to generate and display widgets, inferring the widget type as needed. When a user interacts with a widget, a Python callback updates the visualization **without** a complete rerender. This noticeably lowers visualization update time compared to using ipywidgets alone to render static images."
|
13
|
-
]
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"cell_type": "code",
|
17
|
-
"execution_count": 1,
|
18
|
-
"metadata": {},
|
19
|
-
"outputs": [],
|
20
|
-
"source": [
|
21
|
-
"import nbinteract as nbi\n",
|
22
|
-
"import numpy as np\n",
|
23
|
-
"from numpy import arange"
|
24
|
-
]
|
25
|
-
},
|
26
|
-
{
|
27
|
-
"cell_type": "markdown",
|
28
|
-
"metadata": {},
|
29
|
-
"source": [
|
30
|
-
"### Histogram\n",
|
31
|
-
"\n",
|
32
|
-
"The widget `nbinteract.nbinteract.hist` generates a histogram that allows interaction with the parameters for the response function. The widget takes in a single response function. The response function returns the array of numerical values that will be shown in the histogram. The hist function allows interaction with the response function's parameters by specifying them as keyword arguments in the same format as ipywidgets.interact. Any argument that can be used for ipywidgets.interact can be used for hist.\n"
|
33
|
-
]
|
34
|
-
},
|
35
|
-
{
|
36
|
-
"cell_type": "code",
|
37
|
-
"execution_count": 2,
|
38
|
-
"metadata": {},
|
39
|
-
"outputs": [
|
40
|
-
{
|
41
|
-
"data": {
|
42
|
-
"application/vnd.jupyter.widget-view+json": {
|
43
|
-
"model_id": "4da8fc2eb6204cafbe4502e0fadee798",
|
44
|
-
"version_major": 2,
|
45
|
-
"version_minor": 0
|
46
|
-
},
|
47
|
-
"text/plain": [
|
48
|
-
"VBox(children=(interactive(children=(IntSlider(value=5, description='mean', max=10), FloatSlider(value=1.0, de…"
|
49
|
-
]
|
50
|
-
},
|
51
|
-
"metadata": {},
|
52
|
-
"output_type": "display_data"
|
53
|
-
}
|
54
|
-
],
|
55
|
-
"source": [
|
56
|
-
"def hist_function(mean, sd, size=1000):\n",
|
57
|
-
" '''\n",
|
58
|
-
" Returns 1000 values picked at random from the normal\n",
|
59
|
-
" distribution with the Mean value and SD given.\n",
|
60
|
-
" '''\n",
|
61
|
-
" return np.random.normal(loc=mean, scale=sd, size=1000)\n",
|
62
|
-
"\n",
|
63
|
-
"\n",
|
64
|
-
"options = {\n",
|
65
|
-
" 'title': 'Histogram',\n",
|
66
|
-
" 'xlabel': 'Mean value (mean)',\n",
|
67
|
-
" 'ylabel': 'Standard Deviation (sd)',\n",
|
68
|
-
" 'bins': 10\n",
|
69
|
-
"}\n",
|
70
|
-
"\n",
|
71
|
-
"layouts = {\n",
|
72
|
-
" 'plot_height': '480px',\n",
|
73
|
-
" 'plot_width': '800px',\n",
|
74
|
-
"}\n",
|
75
|
-
"\n",
|
76
|
-
"hist_chart = nbi.hist(\n",
|
77
|
-
" hist_function,\n",
|
78
|
-
" mean=(0, 10),\n",
|
79
|
-
" sd=(0.2, 2.0, 0.2),\n",
|
80
|
-
" options=options,\n",
|
81
|
-
" layouts=layouts\n",
|
82
|
-
")\n",
|
83
|
-
"\n",
|
84
|
-
"hist_chart"
|
85
|
-
]
|
86
|
-
},
|
87
|
-
{
|
88
|
-
"cell_type": "markdown",
|
89
|
-
"metadata": {},
|
90
|
-
"source": [
|
91
|
-
"### Barchart\n",
|
92
|
-
"\n",
|
93
|
-
"The widget `nbinteract.nbinteract.bar` generates an bar plot that allows interaction with the parameters for the response functions.\n",
|
94
|
-
"\n",
|
95
|
-
"The first two arguments of bar are response functions that return the x and y-axis data arrays, respectively. Either argument can be arrays themselves. Arguments for the response functions must be passed in as keyword arguments to bar in the format expected by interact. The response function for the y-axis data will be called with the x-axis data as its first argument.\n",
|
96
|
-
"\n",
|
97
|
-
"For example, in the bar plot below categories generates the categories to plot on the x-axis and heights generates the y-axis heights. The heights function uses the parameter xs which is the array of x-axis data points."
|
98
|
-
]
|
99
|
-
},
|
100
|
-
{
|
101
|
-
"cell_type": "code",
|
102
|
-
"execution_count": 3,
|
103
|
-
"metadata": {},
|
104
|
-
"outputs": [
|
105
|
-
{
|
106
|
-
"data": {
|
107
|
-
"application/vnd.jupyter.widget-view+json": {
|
108
|
-
"model_id": "e93455f6b1514ddfba1e6472d2ccbef1",
|
109
|
-
"version_major": 2,
|
110
|
-
"version_minor": 0
|
111
|
-
},
|
112
|
-
"text/plain": [
|
113
|
-
"VBox(children=(interactive(children=(IntSlider(value=6, description='n', max=10, min=3), IntSlider(value=5, de…"
|
114
|
-
]
|
115
|
-
},
|
116
|
-
"metadata": {},
|
117
|
-
"output_type": "display_data"
|
118
|
-
}
|
119
|
-
],
|
120
|
-
"source": [
|
121
|
-
"def x_fn(n): \n",
|
122
|
-
" return np.arange(n)\n",
|
123
|
-
"\n",
|
124
|
-
"def y_fn(xs, offset):\n",
|
125
|
-
" return xs + offset\n",
|
126
|
-
"\n",
|
127
|
-
"\n",
|
128
|
-
"options = {\n",
|
129
|
-
" 'title': 'Barchart',\n",
|
130
|
-
" 'xlabel': 'Number of bars (n)',\n",
|
131
|
-
" 'ylabel': 'Offset value',\n",
|
132
|
-
" 'animation_duration': 500,\n",
|
133
|
-
" 'aspect_ratio': 1.778,\n",
|
134
|
-
" 'ylim': (0, 20)\n",
|
135
|
-
"}\n",
|
136
|
-
"\n",
|
137
|
-
"layouts = {\n",
|
138
|
-
" 'plot_height': '480px',\n",
|
139
|
-
" 'plot_width': '800px',\n",
|
140
|
-
"}\n",
|
141
|
-
"\n",
|
142
|
-
"bar_chart = nbi.bar(\n",
|
143
|
-
" x_fn,\n",
|
144
|
-
" y_fn,\n",
|
145
|
-
" n=(3, 10),\n",
|
146
|
-
" offset=(1, 10),\n",
|
147
|
-
" options=options,\n",
|
148
|
-
" layouts=layouts\n",
|
149
|
-
")\n",
|
150
|
-
"\n",
|
151
|
-
"bar_chart"
|
152
|
-
]
|
153
|
-
},
|
154
|
-
{
|
155
|
-
"cell_type": "markdown",
|
156
|
-
"metadata": {},
|
157
|
-
"source": [
|
158
|
-
"### Interactive Scatter chart\n",
|
159
|
-
"\n",
|
160
|
-
"The widget `nbinteract.scatter_drag` generates a scatter plot that allows interaction through clicking and dragging the points on the graph.\n",
|
161
|
-
"\n",
|
162
|
-
"scatter_drag takes in two lists/arrays consisting of the x-coordinates and y-coordinates of the points to plot. It generates an interactive scatter plot where the points can be dragged by the user and a best fit line is updated automatically according to the placement of the points.\n",
|
163
|
-
"\n",
|
164
|
-
"scatter_drag does not allow response functions as inputs."
|
165
|
-
]
|
166
|
-
},
|
167
|
-
{
|
168
|
-
"cell_type": "code",
|
169
|
-
"execution_count": 4,
|
170
|
-
"metadata": {},
|
171
|
-
"outputs": [
|
172
|
-
{
|
173
|
-
"data": {
|
174
|
-
"application/vnd.jupyter.widget-view+json": {
|
175
|
-
"model_id": "22cfb542535042848acc6498bbb47812",
|
176
|
-
"version_major": 2,
|
177
|
-
"version_minor": 0
|
178
|
-
},
|
179
|
-
"text/plain": [
|
180
|
-
"VBox(children=(Label(value='y = 1.08x + 0.08'), Figure(animation_duration=1000, axes=[Axis(grid_color='gray', …"
|
181
|
-
]
|
182
|
-
},
|
183
|
-
"metadata": {},
|
184
|
-
"output_type": "display_data"
|
185
|
-
}
|
186
|
-
],
|
187
|
-
"source": [
|
188
|
-
"x_points = np.arange(10)\n",
|
189
|
-
"y_points = np.arange(10) + np.random.rand(10)\n",
|
190
|
-
"\n",
|
191
|
-
"\n",
|
192
|
-
"options = {\n",
|
193
|
-
" 'title': 'Interactive Scatter Plot',\n",
|
194
|
-
" 'animation_duration': 1000,\n",
|
195
|
-
" 'xlabel': 'x-values',\n",
|
196
|
-
" 'ylabel': 'y-values',\n",
|
197
|
-
" 'xlim': (0, 10),\n",
|
198
|
-
" 'ylim': (0, 10)\n",
|
199
|
-
"}\n",
|
200
|
-
"\n",
|
201
|
-
"layouts = {\n",
|
202
|
-
" 'plot_height': '480px',\n",
|
203
|
-
" 'plot_width': '800px',\n",
|
204
|
-
"}\n",
|
205
|
-
"\n",
|
206
|
-
"show_eqn = False\n",
|
207
|
-
"\n",
|
208
|
-
"scatter_drag = nbi.scatter_drag(\n",
|
209
|
-
" x_points,\n",
|
210
|
-
" y_points,\n",
|
211
|
-
" options=options,\n",
|
212
|
-
" layouts=layouts\n",
|
213
|
-
")\n",
|
214
|
-
"\n",
|
215
|
-
"scatter_drag"
|
216
|
-
]
|
217
|
-
},
|
218
|
-
{
|
219
|
-
"cell_type": "markdown",
|
220
|
-
"metadata": {},
|
221
|
-
"source": [
|
222
|
-
"### Scatter chart\n",
|
223
|
-
"\n",
|
224
|
-
"The scatter widget `nbinteract.scatter` generates a scatter plot that allows interaction with the parameters to the response functions. This is different from scatter_drag which facilitates interaction using click and drag actions.\n",
|
225
|
-
"\n",
|
226
|
-
"The first two arguments of scatter are response functions that return the x and y-axis coordinates, respectively. Either argument can be arrays themselves. Arguments for the response functions must be passed in as keyword arguments to scatter in the format expected by interact. The response function for the y-coordinates will be called with the x-coordinates as its first argument."
|
227
|
-
]
|
228
|
-
},
|
229
|
-
{
|
230
|
-
"cell_type": "code",
|
231
|
-
"execution_count": 12,
|
232
|
-
"metadata": {},
|
233
|
-
"outputs": [
|
234
|
-
{
|
235
|
-
"data": {
|
236
|
-
"application/vnd.jupyter.widget-view+json": {
|
237
|
-
"model_id": "2619a7f9ca914353ac1b82ae5206452f",
|
238
|
-
"version_major": 2,
|
239
|
-
"version_minor": 0
|
240
|
-
},
|
241
|
-
"text/plain": [
|
242
|
-
"VBox(children=(interactive(children=(IntSlider(value=105, description='n', max=200, min=10), Output()), _dom_c…"
|
243
|
-
]
|
244
|
-
},
|
245
|
-
"metadata": {},
|
246
|
-
"output_type": "display_data"
|
247
|
-
}
|
248
|
-
],
|
249
|
-
"source": [
|
250
|
-
"def x_fn(n):\n",
|
251
|
-
" return np.random.choice(100, n)\n",
|
252
|
-
" \n",
|
253
|
-
"def y_fn(xs):\n",
|
254
|
-
" return np.random.choice(100, len(xs))\n",
|
255
|
-
"\n",
|
256
|
-
"\n",
|
257
|
-
"options = {\n",
|
258
|
-
" 'title': 'Scatter Plot',\n",
|
259
|
-
" 'marker': 'circle',\n",
|
260
|
-
" 'animation_duration': 1000, \n",
|
261
|
-
" 'xlabel': 'x-values',\n",
|
262
|
-
" 'ylabel': 'y-values',\n",
|
263
|
-
" 'xlim': (0, 100),\n",
|
264
|
-
" 'ylim': (0, 100)\n",
|
265
|
-
"}\n",
|
266
|
-
"\n",
|
267
|
-
"layouts = {\n",
|
268
|
-
" 'plot_height': '480px',\n",
|
269
|
-
" 'plot_width': '800px',\n",
|
270
|
-
"}\n",
|
271
|
-
"\n",
|
272
|
-
"scatter_chart = nbi.scatter(\n",
|
273
|
-
" x_fn,\n",
|
274
|
-
" y_fn,\n",
|
275
|
-
" n=(10,200),\n",
|
276
|
-
" options=options,\n",
|
277
|
-
" layouts=layouts\n",
|
278
|
-
")\n",
|
279
|
-
"\n",
|
280
|
-
"scatter_chart"
|
281
|
-
]
|
282
|
-
},
|
283
|
-
{
|
284
|
-
"cell_type": "markdown",
|
285
|
-
"metadata": {},
|
286
|
-
"source": [
|
287
|
-
"### Line chart\n",
|
288
|
-
"\n",
|
289
|
-
"The line widget `nbinteract.line` generates a line plot that allows interaction with the parameters to the response functions.\n",
|
290
|
-
"\n",
|
291
|
-
"The first two arguments of line are response functions that return the x and y-axis coordinates, respectively. Either argument can be arrays themselves. Arguments for the response functions must be passed in as keyword arguments to line in the format expected by interact. The response function for the y-coordinates will be called with the x-coordinates as its first argument."
|
292
|
-
]
|
293
|
-
},
|
294
|
-
{
|
295
|
-
"cell_type": "code",
|
296
|
-
"execution_count": 6,
|
297
|
-
"metadata": {},
|
298
|
-
"outputs": [
|
299
|
-
{
|
300
|
-
"data": {
|
301
|
-
"application/vnd.jupyter.widget-view+json": {
|
302
|
-
"model_id": "d560ac7181954022b534fc04445b3c81",
|
303
|
-
"version_major": 2,
|
304
|
-
"version_minor": 0
|
305
|
-
},
|
306
|
-
"text/plain": [
|
307
|
-
"VBox(children=(interactive(children=(IntSlider(value=30, description='max', max=50, min=10), IntSlider(value=5…"
|
308
|
-
]
|
309
|
-
},
|
310
|
-
"metadata": {},
|
311
|
-
"output_type": "display_data"
|
312
|
-
}
|
313
|
-
],
|
314
|
-
"source": [
|
315
|
-
"def x_fn(max):\n",
|
316
|
-
" return np.arange(0, max + 1)\n",
|
317
|
-
"\n",
|
318
|
-
"def y_fn(xs, sd):\n",
|
319
|
-
" return xs + np.random.normal(0, scale=sd, size=len(xs))\n",
|
320
|
-
"\n",
|
321
|
-
"\n",
|
322
|
-
"options = {\n",
|
323
|
-
" 'title': 'Line chart',\n",
|
324
|
-
" 'xlabel': 'x-values (max)',\n",
|
325
|
-
" 'ylabel': 'y-values (sd)', \n",
|
326
|
-
" 'xlim': (0, 50),\n",
|
327
|
-
" 'ylim': (-20, 70),\n",
|
328
|
-
" 'animation_duration': 500\n",
|
329
|
-
"}\n",
|
330
|
-
"\n",
|
331
|
-
"layouts = {\n",
|
332
|
-
" 'plot_height': '480px',\n",
|
333
|
-
" 'plot_width': '800px',\n",
|
334
|
-
"}\n",
|
335
|
-
"\n",
|
336
|
-
"line_chart = nbi.line(\n",
|
337
|
-
" x_fn,\n",
|
338
|
-
" y_fn,\n",
|
339
|
-
" max=(10, 50),\n",
|
340
|
-
" sd=(0, 10),\n",
|
341
|
-
" options=options,\n",
|
342
|
-
" layouts=layouts\n",
|
343
|
-
")\n",
|
344
|
-
"\n",
|
345
|
-
"line_chart"
|
346
|
-
]
|
347
|
-
},
|
348
|
-
{
|
349
|
-
"cell_type": "markdown",
|
350
|
-
"metadata": {},
|
351
|
-
"source": [
|
352
|
-
"## Interactive Questions\n",
|
353
|
-
"nbinteract also provides built-in methods to easily create multiple choice and short answer questions.\n"
|
354
|
-
]
|
355
|
-
},
|
356
|
-
{
|
357
|
-
"cell_type": "markdown",
|
358
|
-
"metadata": {},
|
359
|
-
"source": [
|
360
|
-
"### Multiple choice\n",
|
361
|
-
"\n",
|
362
|
-
"The widget `nbinteract.multiple_choice` takes a question, a list of possible answer choices, and the correct answer. Clicking the buttons shows whether the choice was correct."
|
363
|
-
]
|
364
|
-
},
|
365
|
-
{
|
366
|
-
"cell_type": "code",
|
367
|
-
"execution_count": 7,
|
368
|
-
"metadata": {},
|
369
|
-
"outputs": [
|
370
|
-
{
|
371
|
-
"data": {
|
372
|
-
"application/vnd.jupyter.widget-view+json": {
|
373
|
-
"model_id": "da548cad71a54248904822cbcbcd9d54",
|
374
|
-
"version_major": 2,
|
375
|
-
"version_minor": 0
|
376
|
-
},
|
377
|
-
"text/plain": [
|
378
|
-
"VBox(children=(HTML(value='<p style=\"line-height:18px;\">What is 10 + 2 * 5?</p>'), HBox(children=(Button(layou…"
|
379
|
-
]
|
380
|
-
},
|
381
|
-
"metadata": {},
|
382
|
-
"output_type": "display_data"
|
383
|
-
}
|
384
|
-
],
|
385
|
-
"source": [
|
386
|
-
"nbi.multiple_choice(question=\"What is 10 + 2 * 5?\",\n",
|
387
|
-
" choices=['12', '60', '20'],\n",
|
388
|
-
" answers=2)"
|
389
|
-
]
|
390
|
-
},
|
391
|
-
{
|
392
|
-
"cell_type": "code",
|
393
|
-
"execution_count": 8,
|
394
|
-
"metadata": {
|
395
|
-
"scrolled": true
|
396
|
-
},
|
397
|
-
"outputs": [
|
398
|
-
{
|
399
|
-
"data": {
|
400
|
-
"application/vnd.jupyter.widget-view+json": {
|
401
|
-
"model_id": "a99b8e81a8a54e0a9d73151d21229b3a",
|
402
|
-
"version_major": 2,
|
403
|
-
"version_minor": 0
|
404
|
-
},
|
405
|
-
"text/plain": [
|
406
|
-
"VBox(children=(HTML(value='<p style=\"line-height:18px;\">Select all prime numbers.</p>'), HBox(children=(Button…"
|
407
|
-
]
|
408
|
-
},
|
409
|
-
"metadata": {},
|
410
|
-
"output_type": "display_data"
|
411
|
-
}
|
412
|
-
],
|
413
|
-
"source": [
|
414
|
-
"nbi.multiple_choice(question=\"Select all prime numbers.\",\n",
|
415
|
-
" choices=['12', '3', '31'],\n",
|
416
|
-
" answers=[1, 2])"
|
417
|
-
]
|
418
|
-
},
|
419
|
-
{
|
420
|
-
"cell_type": "markdown",
|
421
|
-
"metadata": {},
|
422
|
-
"source": [
|
423
|
-
"### Short answer\n",
|
424
|
-
"\n",
|
425
|
-
"The widget `nbinteract.short_answer` takes a question and an answer. The answer can either be a string, a list of strings, or a function that returns `True` when called with the user's input. If the function errors, an error message will be displayed."
|
426
|
-
]
|
427
|
-
},
|
428
|
-
{
|
429
|
-
"cell_type": "code",
|
430
|
-
"execution_count": 9,
|
431
|
-
"metadata": {},
|
432
|
-
"outputs": [
|
433
|
-
{
|
434
|
-
"data": {
|
435
|
-
"application/vnd.jupyter.widget-view+json": {
|
436
|
-
"model_id": "4052b73f5c0e4d6b9055a6b224c10b2e",
|
437
|
-
"version_major": 2,
|
438
|
-
"version_minor": 0
|
439
|
-
},
|
440
|
-
"text/plain": [
|
441
|
-
"VBox(children=(HTML(value='<p style=\"line-height:18px;\">What is 1+1?</p>'), HBox(children=(Text(value='', plac…"
|
442
|
-
]
|
443
|
-
},
|
444
|
-
"metadata": {},
|
445
|
-
"output_type": "display_data"
|
446
|
-
}
|
447
|
-
],
|
448
|
-
"source": [
|
449
|
-
"nbi.short_answer('What is 1+1?', answers='2', explanation='1+1 is 2')"
|
450
|
-
]
|
451
|
-
},
|
452
|
-
{
|
453
|
-
"cell_type": "code",
|
454
|
-
"execution_count": 10,
|
455
|
-
"metadata": {},
|
456
|
-
"outputs": [
|
457
|
-
{
|
458
|
-
"data": {
|
459
|
-
"application/vnd.jupyter.widget-view+json": {
|
460
|
-
"model_id": "cc4351e1927f4a1089b73f2e1e8db18e",
|
461
|
-
"version_major": 2,
|
462
|
-
"version_minor": 0
|
463
|
-
},
|
464
|
-
"text/plain": [
|
465
|
-
"VBox(children=(HTML(value='<p style=\"line-height:18px;\">Enter the first name of a member of the Beatles.</p>')…"
|
466
|
-
]
|
467
|
-
},
|
468
|
-
"metadata": {},
|
469
|
-
"output_type": "display_data"
|
470
|
-
}
|
471
|
-
],
|
472
|
-
"source": [
|
473
|
-
"nbi.short_answer('Enter the first name of a member of the Beatles.',\n",
|
474
|
-
" ['John', 'Paul', 'George', 'Ringo'])"
|
475
|
-
]
|
476
|
-
},
|
477
|
-
{
|
478
|
-
"cell_type": "code",
|
479
|
-
"execution_count": 11,
|
480
|
-
"metadata": {},
|
481
|
-
"outputs": [
|
482
|
-
{
|
483
|
-
"data": {
|
484
|
-
"application/vnd.jupyter.widget-view+json": {
|
485
|
-
"model_id": "d9dadc2a821745c78cb8582bd0402ffc",
|
486
|
-
"version_major": 2,
|
487
|
-
"version_minor": 0
|
488
|
-
},
|
489
|
-
"text/plain": [
|
490
|
-
"VBox(children=(HTML(value='<p style=\"line-height:18px;\">Enter an even number.</p>'), HBox(children=(Text(value…"
|
491
|
-
]
|
492
|
-
},
|
493
|
-
"metadata": {},
|
494
|
-
"output_type": "display_data"
|
495
|
-
}
|
496
|
-
],
|
497
|
-
"source": [
|
498
|
-
"nbi.short_answer('Enter an even number.', lambda x: int(x) % 2 == 0)"
|
499
|
-
]
|
500
|
-
}
|
501
|
-
],
|
502
|
-
"metadata": {
|
503
|
-
"kernelspec": {
|
504
|
-
"display_name": "Python 3 (ipykernel)",
|
505
|
-
"language": "python",
|
506
|
-
"name": "python3"
|
507
|
-
},
|
508
|
-
"language_info": {
|
509
|
-
"codemirror_mode": {
|
510
|
-
"name": "ipython",
|
511
|
-
"version": 3
|
512
|
-
},
|
513
|
-
"file_extension": ".py",
|
514
|
-
"mimetype": "text/x-python",
|
515
|
-
"name": "python",
|
516
|
-
"nbconvert_exporter": "python",
|
517
|
-
"pygments_lexer": "ipython3",
|
518
|
-
"version": "3.7.9"
|
519
|
-
}
|
520
|
-
},
|
521
|
-
"nbformat": 4,
|
522
|
-
"nbformat_minor": 4
|
523
|
-
}
|
@@ -1,89 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"cells": [
|
3
|
-
{
|
4
|
-
"cell_type": "code",
|
5
|
-
"execution_count": 1,
|
6
|
-
"metadata": {},
|
7
|
-
"outputs": [],
|
8
|
-
"source": [
|
9
|
-
"import nbinteract as nbi\n",
|
10
|
-
"import numpy as np"
|
11
|
-
]
|
12
|
-
},
|
13
|
-
{
|
14
|
-
"cell_type": "code",
|
15
|
-
"execution_count": 2,
|
16
|
-
"metadata": {},
|
17
|
-
"outputs": [
|
18
|
-
{
|
19
|
-
"data": {
|
20
|
-
"application/vnd.jupyter.widget-view+json": {
|
21
|
-
"model_id": "f558a534305a4e2a8204f197bb1e012c",
|
22
|
-
"version_major": 2,
|
23
|
-
"version_minor": 0
|
24
|
-
},
|
25
|
-
"text/plain": [
|
26
|
-
"VBox(children=(interactive(children=(IntSlider(value=6, description='n', max=10, min=3), IntSlider(value=5, de…"
|
27
|
-
]
|
28
|
-
},
|
29
|
-
"metadata": {},
|
30
|
-
"output_type": "display_data"
|
31
|
-
}
|
32
|
-
],
|
33
|
-
"source": [
|
34
|
-
"def x_fn(n): \n",
|
35
|
-
" return np.arange(n)\n",
|
36
|
-
"\n",
|
37
|
-
"def y_fn(xs, offset):\n",
|
38
|
-
" return xs + offset\n",
|
39
|
-
"\n",
|
40
|
-
"\n",
|
41
|
-
"options = {\n",
|
42
|
-
" 'title': 'Bar chart',\n",
|
43
|
-
" 'xlabel': 'Number of bars (n)',\n",
|
44
|
-
" 'ylabel': 'Offset value',\n",
|
45
|
-
" 'animation_duration': 500,\n",
|
46
|
-
" 'aspect_ratio': 1.778,\n",
|
47
|
-
" 'ylim': (0, 20)\n",
|
48
|
-
"}\n",
|
49
|
-
"\n",
|
50
|
-
"layouts = {\n",
|
51
|
-
" 'plot_height': '480px',\n",
|
52
|
-
" 'plot_width': '800px',\n",
|
53
|
-
"}\n",
|
54
|
-
"\n",
|
55
|
-
"bar_chart = nbi.bar(\n",
|
56
|
-
" x_fn,\n",
|
57
|
-
" y_fn,\n",
|
58
|
-
" n=(3, 10),\n",
|
59
|
-
" offset=(1, 10),\n",
|
60
|
-
" options=options,\n",
|
61
|
-
" layouts=layouts\n",
|
62
|
-
")\n",
|
63
|
-
"\n",
|
64
|
-
"bar_chart"
|
65
|
-
]
|
66
|
-
}
|
67
|
-
],
|
68
|
-
"metadata": {
|
69
|
-
"kernelspec": {
|
70
|
-
"display_name": "Python 3 (ipykernel)",
|
71
|
-
"language": "python",
|
72
|
-
"name": "python3"
|
73
|
-
},
|
74
|
-
"language_info": {
|
75
|
-
"codemirror_mode": {
|
76
|
-
"name": "ipython",
|
77
|
-
"version": 3
|
78
|
-
},
|
79
|
-
"file_extension": ".py",
|
80
|
-
"mimetype": "text/x-python",
|
81
|
-
"name": "python",
|
82
|
-
"nbconvert_exporter": "python",
|
83
|
-
"pygments_lexer": "ipython3",
|
84
|
-
"version": "3.7.9"
|
85
|
-
}
|
86
|
-
},
|
87
|
-
"nbformat": 4,
|
88
|
-
"nbformat_minor": 4
|
89
|
-
}
|
@@ -1,87 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"cells": [
|
3
|
-
{
|
4
|
-
"cell_type": "code",
|
5
|
-
"execution_count": 1,
|
6
|
-
"metadata": {},
|
7
|
-
"outputs": [],
|
8
|
-
"source": [
|
9
|
-
"import nbinteract as nbi\n",
|
10
|
-
"import numpy as np"
|
11
|
-
]
|
12
|
-
},
|
13
|
-
{
|
14
|
-
"cell_type": "code",
|
15
|
-
"execution_count": 2,
|
16
|
-
"metadata": {},
|
17
|
-
"outputs": [
|
18
|
-
{
|
19
|
-
"data": {
|
20
|
-
"application/vnd.jupyter.widget-view+json": {
|
21
|
-
"model_id": "548dd8f32f5444c1b044f27eee98aca2",
|
22
|
-
"version_major": 2,
|
23
|
-
"version_minor": 0
|
24
|
-
},
|
25
|
-
"text/plain": [
|
26
|
-
"VBox(children=(interactive(children=(IntSlider(value=5, description='mean', max=10), FloatSlider(value=1.0, de…"
|
27
|
-
]
|
28
|
-
},
|
29
|
-
"metadata": {},
|
30
|
-
"output_type": "display_data"
|
31
|
-
}
|
32
|
-
],
|
33
|
-
"source": [
|
34
|
-
"def hist_function(mean, sd, size=1000):\n",
|
35
|
-
" '''\n",
|
36
|
-
" Returns 1000 values picked at random from the normal\n",
|
37
|
-
" distribution with the Mean value and SD given.\n",
|
38
|
-
" '''\n",
|
39
|
-
" return np.random.normal(loc=mean, scale=sd, size=1000)\n",
|
40
|
-
"\n",
|
41
|
-
"\n",
|
42
|
-
"options = {\n",
|
43
|
-
" 'title': 'Histogram',\n",
|
44
|
-
" 'xlabel': 'Mean value (mean)',\n",
|
45
|
-
" 'ylabel': 'Standard Deviation (sd)',\n",
|
46
|
-
" 'bins': 10\n",
|
47
|
-
"}\n",
|
48
|
-
"\n",
|
49
|
-
"layouts = {\n",
|
50
|
-
" 'plot_height': '480px',\n",
|
51
|
-
" 'plot_width': '800px',\n",
|
52
|
-
"}\n",
|
53
|
-
"\n",
|
54
|
-
"hist_chart = nbi.hist(\n",
|
55
|
-
" hist_function,\n",
|
56
|
-
" mean=(0, 10),\n",
|
57
|
-
" sd=(0.2, 2.0, 0.2),\n",
|
58
|
-
" options=options,\n",
|
59
|
-
" layouts=layouts\n",
|
60
|
-
")\n",
|
61
|
-
"\n",
|
62
|
-
"hist_chart"
|
63
|
-
]
|
64
|
-
}
|
65
|
-
],
|
66
|
-
"metadata": {
|
67
|
-
"kernelspec": {
|
68
|
-
"display_name": "Python 3 (ipykernel)",
|
69
|
-
"language": "python",
|
70
|
-
"name": "python3"
|
71
|
-
},
|
72
|
-
"language_info": {
|
73
|
-
"codemirror_mode": {
|
74
|
-
"name": "ipython",
|
75
|
-
"version": 3
|
76
|
-
},
|
77
|
-
"file_extension": ".py",
|
78
|
-
"mimetype": "text/x-python",
|
79
|
-
"name": "python",
|
80
|
-
"nbconvert_exporter": "python",
|
81
|
-
"pygments_lexer": "ipython3",
|
82
|
-
"version": "3.7.9"
|
83
|
-
}
|
84
|
-
},
|
85
|
-
"nbformat": 4,
|
86
|
-
"nbformat_minor": 4
|
87
|
-
}
|