hyla 1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile.lock +35 -7
- data/README.adoc +10 -2
- data/bin/hyla +16 -13
- data/hyla.gemspec +6 -3
- data/lib/hyla.rb +5 -1
- data/lib/hyla/command.rb +12 -10
- data/lib/hyla/commands/create.rb +21 -12
- data/lib/hyla/commands/generate.rb +168 -59
- data/lib/hyla/commands/new.rb +36 -15
- data/lib/hyla/commands/watch.rb +6 -2
- data/lib/hyla/configuration.rb +169 -27
- data/lib/hyla/core_ext.rb +24 -0
- data/lib/hyla/project.rb +1 -1
- data/lib/resources/backends/haml/deckjs/block_admonition.html.haml +14 -0
- data/lib/resources/backends/haml/deckjs/block_audio.html.haml +7 -0
- data/lib/resources/backends/haml/deckjs/block_colist.html.haml +21 -0
- data/lib/resources/backends/haml/deckjs/block_dlist.html.haml +54 -0
- data/lib/resources/backends/haml/deckjs/block_example.haml.haml +5 -0
- data/lib/resources/backends/haml/deckjs/block_floating_title.html.haml +1 -0
- data/lib/resources/backends/haml/deckjs/block_image.html.haml +11 -0
- data/lib/resources/backends/haml/deckjs/block_listing.html.haml +32 -0
- data/lib/resources/backends/haml/deckjs/block_literal.html.haml +5 -0
- data/lib/resources/backends/haml/deckjs/block_olist.html.haml +11 -0
- data/lib/resources/backends/haml/deckjs/block_open.html.haml +5 -0
- data/lib/resources/backends/haml/deckjs/block_page_break.html.haml +1 -0
- data/lib/resources/backends/haml/deckjs/block_paragraph.html.haml +4 -0
- data/lib/resources/backends/haml/deckjs/block_pass.html.haml +1 -0
- data/lib/resources/backends/haml/deckjs/block_preamble.html.haml +3 -0
- data/lib/resources/backends/haml/deckjs/block_quote.html.haml +12 -0
- data/lib/resources/backends/haml/deckjs/block_ruler.html.haml +1 -0
- data/lib/resources/backends/haml/deckjs/block_sidebar.html.haml +5 -0
- data/lib/resources/backends/haml/deckjs/block_table.html.haml +48 -0
- data/lib/resources/backends/haml/deckjs/block_ulist.html.haml +25 -0
- data/lib/resources/backends/haml/deckjs/block_verse.html.haml +13 -0
- data/lib/resources/backends/haml/deckjs/block_video.html.haml +24 -0
- data/lib/resources/backends/haml/deckjs/document.html.haml +182 -0
- data/lib/resources/backends/haml/deckjs/embedded.html.haml +10 -0
- data/lib/resources/backends/haml/deckjs/inline_anchor.html.haml +12 -0
- data/lib/resources/backends/haml/deckjs/inline_break.html.haml +2 -0
- data/lib/resources/backends/haml/deckjs/inline_callout.html.haml +7 -0
- data/lib/resources/backends/haml/deckjs/inline_footnote.html.haml +8 -0
- data/lib/resources/backends/haml/deckjs/inline_image.html.haml +24 -0
- data/lib/resources/backends/haml/deckjs/inline_indexterm.html.haml +2 -0
- data/lib/resources/backends/haml/deckjs/inline_quoted.html.haml +19 -0
- data/lib/resources/backends/haml/deckjs/section.html.haml +7 -0
- data/lib/resources/backends/haml/docbook45/block_admonition.xml.haml +7 -0
- data/lib/resources/backends/haml/docbook45/block_colist.xml.haml +8 -0
- data/lib/resources/backends/haml/docbook45/block_dlist.xml.haml +61 -0
- data/lib/resources/backends/haml/docbook45/block_example.xml.haml +14 -0
- data/lib/resources/backends/haml/docbook45/block_floating_title.xml.haml +1 -0
- data/lib/resources/backends/haml/docbook45/block_image.xml.haml +8 -0
- data/lib/resources/backends/haml/docbook45/block_listing.xml.haml +14 -0
- data/lib/resources/backends/haml/docbook45/block_literal.xml.haml +7 -0
- data/lib/resources/backends/haml/docbook45/block_olist.xml.haml +8 -0
- data/lib/resources/backends/haml/docbook45/block_open.xml.haml +25 -0
- data/lib/resources/backends/haml/docbook45/block_page_break.xml.haml +1 -0
- data/lib/resources/backends/haml/docbook45/block_paragraph.xml.haml +6 -0
- data/lib/resources/backends/haml/docbook45/block_pass.xml.haml +1 -0
- data/lib/resources/backends/haml/docbook45/block_preamble.xml.haml +7 -0
- data/lib/resources/backends/haml/docbook45/block_quote.xml.haml +13 -0
- data/lib/resources/backends/haml/docbook45/block_ruler.xml.haml +2 -0
- data/lib/resources/backends/haml/docbook45/block_sidebar.xml.haml +7 -0
- data/lib/resources/backends/haml/docbook45/block_table.xml.haml +37 -0
- data/lib/resources/backends/haml/docbook45/block_ulist.xml.haml +18 -0
- data/lib/resources/backends/haml/docbook45/block_verse.xml.haml +10 -0
- data/lib/resources/backends/haml/docbook45/document.xml.haml +63 -0
- data/lib/resources/backends/haml/docbook45/embedded.xml.haml +1 -0
- data/lib/resources/backends/haml/docbook45/helpers.rb +7 -0
- data/lib/resources/backends/haml/docbook45/inline_anchor.xml.haml +13 -0
- data/lib/resources/backends/haml/docbook45/inline_break.xml.haml +2 -0
- data/lib/resources/backends/haml/docbook45/inline_callout.xml.haml +1 -0
- data/lib/resources/backends/haml/docbook45/inline_footnote.xml.haml +5 -0
- data/lib/resources/backends/haml/docbook45/inline_image.xml.haml +5 -0
- data/lib/resources/backends/haml/docbook45/inline_indexterm.xml.haml +18 -0
- data/lib/resources/backends/haml/docbook45/inline_quoted.xml.haml +21 -0
- data/lib/resources/backends/haml/docbook45/section.xml.haml +5 -0
- data/lib/resources/backends/haml/html5/block_admonition.html.haml +14 -0
- data/lib/resources/backends/haml/html5/block_audio.html.haml +7 -0
- data/lib/resources/backends/haml/html5/block_colist.html.haml +21 -0
- data/lib/resources/backends/haml/html5/block_dlist.html.haml +54 -0
- data/lib/resources/backends/haml/html5/block_example.haml.haml +5 -0
- data/lib/resources/backends/haml/html5/block_floating_title.html.haml +1 -0
- data/lib/resources/backends/haml/html5/block_image.html.haml +11 -0
- data/lib/resources/backends/haml/html5/block_listing.html.haml +31 -0
- data/lib/resources/backends/haml/html5/block_literal.html.haml +5 -0
- data/lib/resources/backends/haml/html5/block_math.html.haml +10 -0
- data/lib/resources/backends/haml/html5/block_olist.html.haml +9 -0
- data/lib/resources/backends/haml/html5/block_open.html.haml +15 -0
- data/lib/resources/backends/haml/html5/block_page_break.html.haml +1 -0
- data/lib/resources/backends/haml/html5/block_paragraph.html.haml +4 -0
- data/lib/resources/backends/haml/html5/block_pass.html.haml +1 -0
- data/lib/resources/backends/haml/html5/block_preamble.html.haml +6 -0
- data/lib/resources/backends/haml/html5/block_quote.html.haml +12 -0
- data/lib/resources/backends/haml/html5/block_ruler.html.haml +1 -0
- data/lib/resources/backends/haml/html5/block_sidebar.html.haml +5 -0
- data/lib/resources/backends/haml/html5/block_table.html.haml +47 -0
- data/lib/resources/backends/haml/html5/block_toc.html.haml +11 -0
- data/lib/resources/backends/haml/html5/block_ulist.html.haml +25 -0
- data/lib/resources/backends/haml/html5/block_verse.html.haml +13 -0
- data/lib/resources/backends/haml/html5/block_video.html.haml +27 -0
- data/lib/resources/backends/haml/html5/document.html.haml +114 -0
- data/lib/resources/backends/haml/html5/embedded.html.haml +10 -0
- data/lib/resources/backends/haml/html5/helpers.rb +7 -0
- data/lib/resources/backends/haml/html5/inline_anchor.html.haml +11 -0
- data/lib/resources/backends/haml/html5/inline_break.html.haml +2 -0
- data/lib/resources/backends/haml/html5/inline_button.html.haml +1 -0
- data/lib/resources/backends/haml/html5/inline_callout.html.haml +7 -0
- data/lib/resources/backends/haml/html5/inline_footnote.html.haml +8 -0
- data/lib/resources/backends/haml/html5/inline_image.html.haml +24 -0
- data/lib/resources/backends/haml/html5/inline_indexterm.html.haml +2 -0
- data/lib/resources/backends/haml/html5/inline_kbd.html.haml +8 -0
- data/lib/resources/backends/haml/html5/inline_menu.html.haml +15 -0
- data/lib/resources/backends/haml/html5/inline_quoted.html.haml +22 -0
- data/lib/resources/backends/haml/html5/section.html.haml +21 -0
- data/lib/resources/backends/haml/revealjs/block_image.html.haml +11 -0
- data/lib/resources/backends/haml/revealjs/block_olist.html.haml +8 -0
- data/lib/resources/backends/haml/revealjs/block_ulist.html.haml +8 -0
- data/lib/resources/backends/haml/revealjs/document.html.haml +61 -0
- data/lib/resources/backends/haml/revealjs/section.html.haml +10 -0
- data/lib/resources/backends/slim/docbook45/block_admonition.xml.slim +7 -0
- data/lib/resources/backends/slim/docbook45/block_colist.xml.slim +8 -0
- data/lib/resources/backends/slim/docbook45/block_dlist.xml.slim +61 -0
- data/lib/resources/backends/slim/docbook45/block_example.xml.slim +13 -0
- data/lib/resources/backends/slim/docbook45/block_floating_title.xml.slim +1 -0
- data/lib/resources/backends/slim/docbook45/block_image.xml.slim +7 -0
- data/lib/resources/backends/slim/docbook45/block_listing.xml.slim +14 -0
- data/lib/resources/backends/slim/docbook45/block_literal.xml.slim +7 -0
- data/lib/resources/backends/slim/docbook45/block_olist.xml.slim +8 -0
- data/lib/resources/backends/slim/docbook45/block_open.xml.slim +25 -0
- data/lib/resources/backends/slim/docbook45/block_page_break.xml.slim +1 -0
- data/lib/resources/backends/slim/docbook45/block_paragraph.xml.slim +6 -0
- data/lib/resources/backends/slim/docbook45/block_pass.xml.slim +1 -0
- data/lib/resources/backends/slim/docbook45/block_preamble.xml.slim +7 -0
- data/lib/resources/backends/slim/docbook45/block_quote.xml.slim +13 -0
- data/lib/resources/backends/slim/docbook45/block_ruler.xml.slim +2 -0
- data/lib/resources/backends/slim/docbook45/block_sidebar.xml.slim +7 -0
- data/lib/resources/backends/slim/docbook45/block_table.xml.slim +36 -0
- data/lib/resources/backends/slim/docbook45/block_ulist.xml.slim +18 -0
- data/lib/resources/backends/slim/docbook45/block_verse.xml.slim +10 -0
- data/lib/resources/backends/slim/docbook45/document.xml.slim +63 -0
- data/lib/resources/backends/slim/docbook45/embedded.xml.slim +1 -0
- data/lib/resources/backends/slim/docbook45/helpers.rb +9 -0
- data/lib/resources/backends/slim/docbook45/inline_anchor.xml.slim +13 -0
- data/lib/resources/backends/slim/docbook45/inline_break.xml.slim +2 -0
- data/lib/resources/backends/slim/docbook45/inline_callout.xml.slim +1 -0
- data/lib/resources/backends/slim/docbook45/inline_footnote.xml.slim +4 -0
- data/lib/resources/backends/slim/docbook45/inline_image.xml.slim +4 -0
- data/lib/resources/backends/slim/docbook45/inline_indexterm.xml.slim +16 -0
- data/lib/resources/backends/slim/docbook45/inline_quoted.xml.slim +21 -0
- data/lib/resources/backends/slim/docbook45/section.xml.slim +5 -0
- data/lib/resources/backends/slim/document.html.bk.slim +335 -0
- data/lib/resources/backends/slim/dzslides/block_admonition.html.slim +19 -0
- data/lib/resources/backends/slim/dzslides/block_colist.html.slim +20 -0
- data/lib/resources/backends/slim/dzslides/block_dlist.html.slim +10 -0
- data/lib/resources/backends/slim/dzslides/block_example.html.slim +4 -0
- data/lib/resources/backends/slim/dzslides/block_floating_title.html.slim +1 -0
- data/lib/resources/backends/slim/dzslides/block_image.html.slim +14 -0
- data/lib/resources/backends/slim/dzslides/block_listing.html.slim +8 -0
- data/lib/resources/backends/slim/dzslides/block_literal.html.slim +11 -0
- data/lib/resources/backends/slim/dzslides/block_olist.html.slim +6 -0
- data/lib/resources/backends/slim/dzslides/block_open.html.slim +4 -0
- data/lib/resources/backends/slim/dzslides/block_paragraph.html.slim +1 -0
- data/lib/resources/backends/slim/dzslides/block_pass.html.slim +1 -0
- data/lib/resources/backends/slim/dzslides/block_quote.html.slim +11 -0
- data/lib/resources/backends/slim/dzslides/block_ruler.html.slim +1 -0
- data/lib/resources/backends/slim/dzslides/block_table.html.slim +45 -0
- data/lib/resources/backends/slim/dzslides/block_ulist.html.slim +6 -0
- data/lib/resources/backends/slim/dzslides/block_verse.html.slim +12 -0
- data/lib/resources/backends/slim/dzslides/block_video.html.slim +6 -0
- data/lib/resources/backends/slim/dzslides/document.html.slim +67 -0
- data/lib/resources/backends/slim/dzslides/embedded.html.slim +1 -0
- data/lib/resources/backends/slim/dzslides/helpers.rb +9 -0
- data/lib/resources/backends/slim/dzslides/inline_anchor.html.slim +11 -0
- data/lib/resources/backends/slim/dzslides/inline_break.html.slim +2 -0
- data/lib/resources/backends/slim/dzslides/inline_callout.html.slim +7 -0
- data/lib/resources/backends/slim/dzslides/inline_footnote.html.slim +6 -0
- data/lib/resources/backends/slim/dzslides/inline_image.html.slim +24 -0
- data/lib/resources/backends/slim/dzslides/inline_indexterm.html.slim +2 -0
- data/lib/resources/backends/slim/dzslides/inline_kbd.html.slim +8 -0
- data/lib/resources/backends/slim/dzslides/inline_quoted.html.slim +23 -0
- data/lib/resources/backends/slim/dzslides/section.html.slim +4 -0
- data/lib/resources/backends/slim/html5/block_admonition.html.slim +13 -0
- data/lib/resources/backends/slim/html5/block_audio.html.slim +6 -0
- data/lib/resources/backends/slim/html5/block_colist.html.slim +20 -0
- data/lib/resources/backends/slim/html5/block_dlist.html.slim +53 -0
- data/lib/resources/backends/slim/html5/block_example.html.slim +4 -0
- data/lib/resources/backends/slim/html5/block_floating_title.html.slim +1 -0
- data/lib/resources/backends/slim/html5/block_image.html.slim +10 -0
- data/lib/resources/backends/slim/html5/block_listing.html.slim +31 -0
- data/lib/resources/backends/slim/html5/block_literal.html.slim +4 -0
- data/lib/resources/backends/slim/html5/block_math.html.slim +10 -0
- data/lib/resources/backends/slim/html5/block_olist.html.slim +9 -0
- data/lib/resources/backends/slim/html5/block_open.html.slim +15 -0
- data/lib/resources/backends/slim/html5/block_page_break.html.slim +1 -0
- data/lib/resources/backends/slim/html5/block_paragraph.html.slim +4 -0
- data/lib/resources/backends/slim/html5/block_pass.html.slim +1 -0
- data/lib/resources/backends/slim/html5/block_preamble.html.slim +6 -0
- data/lib/resources/backends/slim/html5/block_quote.html.slim +14 -0
- data/lib/resources/backends/slim/html5/block_ruler.html.slim +1 -0
- data/lib/resources/backends/slim/html5/block_sidebar.html.slim +5 -0
- data/lib/resources/backends/slim/html5/block_table.html.slim +45 -0
- data/lib/resources/backends/slim/html5/block_toc.html.slim +12 -0
- data/lib/resources/backends/slim/html5/block_ulist.html.slim +25 -0
- data/lib/resources/backends/slim/html5/block_verse.html.slim +14 -0
- data/lib/resources/backends/slim/html5/block_video.html.slim +27 -0
- data/lib/resources/backends/slim/html5/document.html.slim +112 -0
- data/lib/resources/backends/slim/html5/embedded.html.slim +9 -0
- data/lib/resources/backends/slim/html5/helpers.rb +8 -0
- data/lib/resources/backends/slim/html5/inline_anchor.html.slim +11 -0
- data/lib/resources/backends/slim/html5/inline_break.html.slim +2 -0
- data/lib/resources/backends/slim/html5/inline_button.html.slim +1 -0
- data/lib/resources/backends/slim/html5/inline_callout.html.slim +7 -0
- data/lib/resources/backends/slim/html5/inline_footnote.html.slim +6 -0
- data/lib/resources/backends/slim/html5/inline_image.html.slim +24 -0
- data/lib/resources/backends/slim/html5/inline_indexterm.html.slim +2 -0
- data/lib/resources/backends/slim/html5/inline_kbd.html.slim +8 -0
- data/lib/resources/backends/slim/html5/inline_menu.html.slim +15 -0
- data/lib/resources/backends/slim/html5/inline_quoted.html.slim +22 -0
- data/lib/resources/backends/slim/html5/section.html.slim +20 -0
- data/lib/resources/backends/slim/revealjs/block_admonition.html.slim +13 -0
- data/lib/resources/backends/slim/revealjs/block_audio.html.slim +6 -0
- data/lib/resources/backends/slim/revealjs/block_colist.html.slim +20 -0
- data/lib/resources/backends/slim/revealjs/block_dlist.html.slim +53 -0
- data/lib/resources/backends/slim/revealjs/block_example.html.slim +4 -0
- data/lib/resources/backends/slim/revealjs/block_floating_title.html.slim +1 -0
- data/lib/resources/backends/slim/revealjs/block_image.html.slim +10 -0
- data/lib/resources/backends/slim/revealjs/block_listing.html.slim +31 -0
- data/lib/resources/backends/slim/revealjs/block_literal.html.slim +4 -0
- data/lib/resources/backends/slim/revealjs/block_math.html.slim +10 -0
- data/lib/resources/backends/slim/revealjs/block_olist.html.slim +9 -0
- data/lib/resources/backends/slim/revealjs/block_open.html.slim +15 -0
- data/lib/resources/backends/slim/revealjs/block_page_break.html.slim +1 -0
- data/lib/resources/backends/slim/revealjs/block_paragraph.html.slim +4 -0
- data/lib/resources/backends/slim/revealjs/block_pass.html.slim +1 -0
- data/lib/resources/backends/slim/revealjs/block_preamble.html.slim +6 -0
- data/lib/resources/backends/slim/revealjs/block_quote.html.slim +14 -0
- data/lib/resources/backends/slim/revealjs/block_ruler.html.slim +1 -0
- data/lib/resources/backends/slim/revealjs/block_sidebar.html.slim +5 -0
- data/lib/resources/backends/slim/revealjs/block_table.html.slim +45 -0
- data/lib/resources/backends/slim/revealjs/block_toc.html.slim +12 -0
- data/lib/resources/backends/slim/revealjs/block_ulist.html.slim +25 -0
- data/lib/resources/backends/slim/revealjs/block_verse.html.slim +14 -0
- data/lib/resources/backends/slim/revealjs/block_video.html.slim +27 -0
- data/lib/resources/backends/slim/revealjs/document.html.slim +87 -0
- data/lib/resources/backends/slim/revealjs/embedded.html.slim +9 -0
- data/lib/resources/backends/slim/revealjs/helpers.rb +8 -0
- data/lib/resources/backends/slim/revealjs/inline_anchor.html.slim +11 -0
- data/lib/resources/backends/slim/revealjs/inline_break.html.slim +2 -0
- data/lib/resources/backends/slim/revealjs/inline_button.html.slim +1 -0
- data/lib/resources/backends/slim/revealjs/inline_callout.html.slim +7 -0
- data/lib/resources/backends/slim/revealjs/inline_footnote.html.slim +6 -0
- data/lib/resources/backends/slim/revealjs/inline_image.html.slim +24 -0
- data/lib/resources/backends/slim/revealjs/inline_indexterm.html.slim +2 -0
- data/lib/resources/backends/slim/revealjs/inline_kbd.html.slim +8 -0
- data/lib/resources/backends/slim/revealjs/inline_menu.html.slim +15 -0
- data/lib/resources/backends/slim/revealjs/inline_quoted.html.slim +22 -0
- data/lib/resources/backends/slim/revealjs/section.html.slim +3 -0
- data/lib/resources/deck.js/core/deck.core.css +407 -0
- data/lib/resources/deck.js/core/deck.core.js +498 -0
- data/lib/resources/deck.js/extensions/deck.js-blank/README.md +10 -0
- data/lib/resources/deck.js/extensions/deck.js-blank/deck.blank.js +33 -0
- data/lib/resources/deck.js/extensions/goto/deck.goto.css +41 -0
- data/lib/resources/deck.js/extensions/goto/deck.goto.html +7 -0
- data/lib/resources/deck.js/extensions/goto/deck.goto.js +170 -0
- data/lib/resources/deck.js/extensions/hash/deck.hash.css +13 -0
- data/lib/resources/deck.js/extensions/hash/deck.hash.html +2 -0
- data/lib/resources/deck.js/extensions/hash/deck.hash.js +142 -0
- data/lib/resources/deck.js/extensions/menu/deck.menu.css +47 -0
- data/lib/resources/deck.js/extensions/menu/deck.menu.js +187 -0
- data/lib/resources/deck.js/extensions/navigation/deck.navigation.css +43 -0
- data/lib/resources/deck.js/extensions/navigation/deck.navigation.html +3 -0
- data/lib/resources/deck.js/extensions/navigation/deck.navigation.js +92 -0
- data/lib/resources/deck.js/extensions/scale/deck.scale.css +28 -0
- data/lib/resources/deck.js/extensions/scale/deck.scale.js +170 -0
- data/lib/resources/deck.js/extensions/split/README.md +30 -0
- data/lib/resources/deck.js/extensions/split/deck.split.js +59 -0
- data/lib/resources/deck.js/extensions/status/deck.status.css +18 -0
- data/lib/resources/deck.js/extensions/status/deck.status.html +6 -0
- data/lib/resources/deck.js/extensions/status/deck.status.js +95 -0
- data/lib/resources/deck.js/extensions/toc/deck.toc.css +40 -0
- data/lib/resources/deck.js/extensions/toc/deck.toc.html +12 -0
- data/lib/resources/deck.js/extensions/toc/deck.toc.js +271 -0
- data/lib/resources/deck.js/jquery-1.7.2.min.js +4 -0
- data/lib/resources/deck.js/jquery.min.js +4 -0
- data/lib/resources/deck.js/modernizr.custom.js +4 -0
- data/lib/resources/deck.js/themes/style/beamer.css +286 -0
- data/lib/resources/deck.js/themes/style/neon.css +123 -0
- data/lib/resources/deck.js/themes/style/swiss.css +84 -0
- data/lib/resources/deck.js/themes/style/web-2.0.css +214 -0
- data/lib/resources/deck.js/themes/transition/beamer.css +66 -0
- data/lib/resources/deck.js/themes/transition/fade.css +43 -0
- data/lib/resources/deck.js/themes/transition/horizontal-slide.css +76 -0
- data/lib/resources/deck.js/themes/transition/vertical-slide.css +94 -0
- data/lib/resources/revealjs/LICENSE +19 -0
- data/lib/resources/revealjs/css/print/paper.css +176 -0
- data/lib/resources/revealjs/css/print/pdf.css +190 -0
- data/lib/resources/revealjs/css/reveal.css +1880 -0
- data/lib/resources/revealjs/css/reveal.min.css +7 -0
- data/lib/resources/revealjs/css/theme/README.md +25 -0
- data/lib/resources/revealjs/css/theme/beige.css +148 -0
- data/lib/resources/revealjs/css/theme/blood.css +175 -0
- data/lib/resources/revealjs/css/theme/default.css +148 -0
- data/lib/resources/revealjs/css/theme/moon.css +148 -0
- data/lib/resources/revealjs/css/theme/night.css +136 -0
- data/lib/resources/revealjs/css/theme/serif.css +138 -0
- data/lib/resources/revealjs/css/theme/simple.css +138 -0
- data/lib/resources/revealjs/css/theme/sky.css +145 -0
- data/lib/resources/revealjs/css/theme/solarized.css +148 -0
- data/lib/resources/revealjs/css/theme/source/beige.scss +50 -0
- data/lib/resources/revealjs/css/theme/source/blood.scss +91 -0
- data/lib/resources/revealjs/css/theme/source/default.scss +42 -0
- data/lib/resources/revealjs/css/theme/source/moon.scss +68 -0
- data/lib/resources/revealjs/css/theme/source/night.scss +35 -0
- data/lib/resources/revealjs/css/theme/source/serif.scss +35 -0
- data/lib/resources/revealjs/css/theme/source/simple.scss +38 -0
- data/lib/resources/revealjs/css/theme/source/sky.scss +46 -0
- data/lib/resources/revealjs/css/theme/source/solarized.scss +74 -0
- data/lib/resources/revealjs/css/theme/template/mixins.scss +29 -0
- data/lib/resources/revealjs/css/theme/template/settings.scss +34 -0
- data/lib/resources/revealjs/css/theme/template/theme.scss +170 -0
- data/lib/resources/revealjs/js/reveal.js +3382 -0
- data/lib/resources/revealjs/js/reveal.min.js +9 -0
- data/lib/resources/revealjs/lib/css/zenburn.css +114 -0
- data/lib/resources/revealjs/lib/font/league_gothic-webfont.eot +0 -0
- data/lib/resources/revealjs/lib/font/league_gothic-webfont.svg +230 -0
- data/lib/resources/revealjs/lib/font/league_gothic-webfont.ttf +0 -0
- data/lib/resources/revealjs/lib/font/league_gothic-webfont.woff +0 -0
- data/lib/resources/revealjs/lib/font/league_gothic_license +2 -0
- data/lib/resources/revealjs/lib/js/classList.js +2 -0
- data/lib/resources/revealjs/lib/js/head.min.js +8 -0
- data/lib/resources/revealjs/lib/js/html5shiv.js +7 -0
- data/lib/resources/revealjs/plugin/highlight/highlight.js +32 -0
- data/lib/resources/revealjs/plugin/leap/leap.js +157 -0
- data/lib/resources/revealjs/plugin/markdown/example.html +129 -0
- data/lib/resources/revealjs/plugin/markdown/example.md +31 -0
- data/lib/resources/revealjs/plugin/markdown/markdown.js +392 -0
- data/lib/resources/revealjs/plugin/markdown/marked.js +37 -0
- data/lib/resources/revealjs/plugin/math/math.js +64 -0
- data/lib/resources/revealjs/plugin/multiplex/client.js +13 -0
- data/lib/resources/revealjs/plugin/multiplex/index.js +56 -0
- data/lib/resources/revealjs/plugin/multiplex/master.js +51 -0
- data/lib/resources/revealjs/plugin/notes-server/client.js +57 -0
- data/lib/resources/revealjs/plugin/notes-server/index.js +59 -0
- data/lib/resources/revealjs/plugin/notes-server/notes.html +142 -0
- data/lib/resources/revealjs/plugin/notes/notes.html +267 -0
- data/lib/resources/revealjs/plugin/notes/notes.js +78 -0
- data/lib/resources/revealjs/plugin/postmessage/example.html +39 -0
- data/lib/resources/revealjs/plugin/postmessage/postmessage.js +42 -0
- data/lib/resources/revealjs/plugin/print-pdf/print-pdf.js +44 -0
- data/lib/resources/revealjs/plugin/remotes/remotes.js +39 -0
- data/lib/resources/revealjs/plugin/search/search.js +196 -0
- data/lib/resources/revealjs/plugin/zoom-js/zoom.js +258 -0
- data/lib/resources/styles/asciidoctor.css +652 -0
- data/lib/resources/styles/colony.css +660 -0
- data/lib/resources/styles/foundation-lime.css +657 -0
- data/lib/resources/styles/foundation-potion.css +657 -0
- data/lib/resources/styles/foundation.css +648 -0
- data/lib/resources/styles/github.css +669 -0
- data/lib/resources/styles/golo.css +669 -0
- data/lib/resources/styles/iconic.css +692 -0
- data/lib/resources/styles/maker.css +668 -0
- data/lib/resources/styles/readthedocs.css +669 -0
- data/lib/resources/styles/redhat.css +654 -0
- data/lib/resources/styles/riak.css +689 -0
- data/lib/resources/styles/rocket-panda.css +662 -0
- data/lib/resources/styles/rubygems.css +650 -0
- data/lib/templates/_config.yml +27 -0
- data/lib/templates/{training → book}/GemFile +2 -1
- data/lib/templates/{training → book}/development/audio/ocean_waves.mp3 +0 -0
- data/lib/templates/book/development/book.adoc +121 -0
- data/lib/templates/{training → book}/development/image/hyla_frog.jpg +0 -0
- data/lib/templates/{training → book}/development/video/small.ogv +0 -0
- data/lib/templates/{training → book}/introduction/audio/ocean_waves.mp3 +0 -0
- data/lib/templates/book/introduction/book.adoc +121 -0
- data/lib/templates/{training → book}/introduction/image/hyla_frog.jpg +0 -0
- data/lib/templates/{training → book}/introduction/video/small.ogv +0 -0
- data/lib/templates/book/readme.adoc +10 -0
- data/lib/templates/sample/asciidoc_article.adoc +101 -10
- data/lib/templates/sample/asciidoc_audio.adoc +1 -1
- data/lib/templates/sample/asciidoc_book.adoc +125 -0
- data/lib/templates/sample/asciidoc_image.adoc +26 -0
- data/lib/templates/sample/asciidoc_report.adoc +66 -0
- data/lib/templates/sample/asciidoc_source.adoc +53 -0
- data/lib/templates/sample/asciidoc_table.adoc +36 -0
- data/lib/templates/sample/asciidoc_video.adoc +9 -1
- data/lib/templates/sample/slideshow_revealjs.adoc +26 -0
- data/lib/templates/training-exercises/_config.yml +3 -0
- data/lib/templates/training/{introduction → module-1}/article.adoc +7 -2
- data/lib/templates/training/module-1/audio/ocean_waves.mp3 +0 -0
- data/lib/templates/training/module-1/image/hyla_arborea.jpg +0 -0
- data/lib/templates/training/module-1/video/small.ogv +0 -0
- data/lib/templates/training/{development → module-2}/article.adoc +7 -2
- data/lib/templates/training/module-2/audio/ocean_waves.mp3 +0 -0
- data/lib/templates/training/module-2/image/hyla_arborea.jpg +0 -0
- data/lib/templates/training/module-2/video/small.ogv +0 -0
- data/lib/templates/training/readme.adoc +10 -1
- data/scenario.adoc +113 -20
- data/test/reports/test-1.0.x-11-12-2013.txt +123 -0
- data/todo.adoc +39 -0
- metadata +473 -51
- data/lib/hyla/training.rb +0 -25
- data/lib/templates/sample/asciidoc_source_highlight.adoc +0 -37
- data/lib/templates/training-exercises/Gemfile +0 -4
@@ -0,0 +1,187 @@
|
|
1
|
+
/*!
|
2
|
+
Deck JS - deck.menu
|
3
|
+
Copyright (c) 2011 Caleb Troughton
|
4
|
+
Dual licensed under the MIT license and GPL license.
|
5
|
+
https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
|
6
|
+
https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
|
7
|
+
*/
|
8
|
+
|
9
|
+
/*
|
10
|
+
This module adds the methods and key binding to show and hide a menu of all
|
11
|
+
slides in the deck. The deck menu state is indicated by the presence of a class
|
12
|
+
on the deck container.
|
13
|
+
*/
|
14
|
+
(function($, deck, undefined) {
|
15
|
+
var $d = $(document),
|
16
|
+
rootSlides; // Array of top level slides
|
17
|
+
|
18
|
+
/*
|
19
|
+
Extends defaults/options.
|
20
|
+
|
21
|
+
options.classes.menu
|
22
|
+
This class is added to the deck container when showing the slide menu.
|
23
|
+
|
24
|
+
options.keys.menu
|
25
|
+
The numeric keycode used to toggle between showing and hiding the slide
|
26
|
+
menu.
|
27
|
+
|
28
|
+
options.touch.doubletapWindow
|
29
|
+
Two consecutive touch events within this number of milliseconds will
|
30
|
+
be considered a double tap, and will toggle the menu on touch devices.
|
31
|
+
*/
|
32
|
+
$.extend(true, $[deck].defaults, {
|
33
|
+
classes: {
|
34
|
+
menu: 'deck-menu'
|
35
|
+
},
|
36
|
+
|
37
|
+
keys: {
|
38
|
+
menu: 77 // m
|
39
|
+
},
|
40
|
+
|
41
|
+
touch: {
|
42
|
+
doubletapWindow: 400
|
43
|
+
}
|
44
|
+
});
|
45
|
+
|
46
|
+
/*
|
47
|
+
jQuery.deck('showMenu')
|
48
|
+
|
49
|
+
Shows the slide menu by adding the class specified by the menu class option
|
50
|
+
to the deck container.
|
51
|
+
*/
|
52
|
+
$[deck]('extend', 'showMenu', function() {
|
53
|
+
var $c = $[deck]('getContainer'),
|
54
|
+
opts = $[deck]('getOptions');
|
55
|
+
|
56
|
+
if ($c.hasClass(opts.classes.menu)) return;
|
57
|
+
|
58
|
+
// Hide through loading class to short-circuit transitions (perf)
|
59
|
+
$c.addClass([opts.classes.loading, opts.classes.menu].join(' '));
|
60
|
+
|
61
|
+
/* Forced to do this in JS until CSS learns second-grade math. Save old
|
62
|
+
style value for restoration when menu is hidden. */
|
63
|
+
if (Modernizr.csstransforms) {
|
64
|
+
$.each(rootSlides, function(i, $slide) {
|
65
|
+
$slide.data('oldStyle', $slide.attr('style'));
|
66
|
+
$slide.css({
|
67
|
+
'position': 'absolute',
|
68
|
+
'left': ((i % 4) * 25) + '%',
|
69
|
+
'top': (Math.floor(i / 4) * 25) + '%'
|
70
|
+
});
|
71
|
+
});
|
72
|
+
}
|
73
|
+
|
74
|
+
// Need to ensure the loading class renders first, then remove
|
75
|
+
window.setTimeout(function() {
|
76
|
+
$c.removeClass(opts.classes.loading)
|
77
|
+
.scrollTop($[deck]('getSlide').offset().top);
|
78
|
+
}, 0);
|
79
|
+
});
|
80
|
+
|
81
|
+
/*
|
82
|
+
jQuery.deck('hideMenu')
|
83
|
+
|
84
|
+
Hides the slide menu by removing the class specified by the menu class
|
85
|
+
option from the deck container.
|
86
|
+
*/
|
87
|
+
$[deck]('extend', 'hideMenu', function() {
|
88
|
+
var $c = $[deck]('getContainer'),
|
89
|
+
opts = $[deck]('getOptions');
|
90
|
+
|
91
|
+
if (!$c.hasClass(opts.classes.menu)) return;
|
92
|
+
|
93
|
+
$c.removeClass(opts.classes.menu);
|
94
|
+
$c.addClass(opts.classes.loading);
|
95
|
+
|
96
|
+
/* Restore old style value */
|
97
|
+
if (Modernizr.csstransforms) {
|
98
|
+
$.each(rootSlides, function(i, $slide) {
|
99
|
+
var oldStyle = $slide.data('oldStyle');
|
100
|
+
|
101
|
+
$slide.attr('style', oldStyle ? oldStyle : '');
|
102
|
+
});
|
103
|
+
}
|
104
|
+
|
105
|
+
window.setTimeout(function() {
|
106
|
+
$c.removeClass(opts.classes.loading).scrollTop(0);
|
107
|
+
}, 0);
|
108
|
+
});
|
109
|
+
|
110
|
+
/*
|
111
|
+
jQuery.deck('toggleMenu')
|
112
|
+
|
113
|
+
Toggles between showing and hiding the slide menu.
|
114
|
+
*/
|
115
|
+
$[deck]('extend', 'toggleMenu', function() {
|
116
|
+
$[deck]('getContainer').hasClass($[deck]('getOptions').classes.menu) ?
|
117
|
+
$[deck]('hideMenu') : $[deck]('showMenu');
|
118
|
+
});
|
119
|
+
|
120
|
+
$d.bind('deck.init', function() {
|
121
|
+
var opts = $[deck]('getOptions'),
|
122
|
+
touchEndTime = 0,
|
123
|
+
currentSlide,
|
124
|
+
slideTest = $.map([
|
125
|
+
opts.classes.before,
|
126
|
+
opts.classes.previous,
|
127
|
+
opts.classes.current,
|
128
|
+
opts.classes.next,
|
129
|
+
opts.classes.after
|
130
|
+
], function(el, i) {
|
131
|
+
return '.' + el;
|
132
|
+
}).join(', ');
|
133
|
+
|
134
|
+
// Build top level slides array
|
135
|
+
rootSlides = [];
|
136
|
+
$.each($[deck]('getSlides'), function(i, $el) {
|
137
|
+
if (!$el.parentsUntil(opts.selectors.container, slideTest).length) {
|
138
|
+
rootSlides.push($el);
|
139
|
+
}
|
140
|
+
});
|
141
|
+
|
142
|
+
// Bind key events
|
143
|
+
$d.unbind('keydown.deckmenu').bind('keydown.deckmenu', function(e) {
|
144
|
+
if (e.which === opts.keys.menu || $.inArray(e.which, opts.keys.menu) > -1) {
|
145
|
+
$[deck]('toggleMenu');
|
146
|
+
e.preventDefault();
|
147
|
+
}
|
148
|
+
});
|
149
|
+
|
150
|
+
// Double tap to toggle slide menu for touch devices
|
151
|
+
$[deck]('getContainer').unbind('touchstart.deckmenu').bind('touchstart.deckmenu', function(e) {
|
152
|
+
currentSlide = $[deck]('getSlide');
|
153
|
+
})
|
154
|
+
.unbind('touchend.deckmenu').bind('touchend.deckmenu', function(e) {
|
155
|
+
var now = Date.now();
|
156
|
+
|
157
|
+
// Ignore this touch event if it caused a nav change (swipe)
|
158
|
+
if (currentSlide !== $[deck]('getSlide')) return;
|
159
|
+
|
160
|
+
if (now - touchEndTime < opts.touch.doubletapWindow) {
|
161
|
+
$[deck]('toggleMenu');
|
162
|
+
e.preventDefault();
|
163
|
+
}
|
164
|
+
touchEndTime = now;
|
165
|
+
});
|
166
|
+
|
167
|
+
// Selecting slides from the menu
|
168
|
+
$.each($[deck]('getSlides'), function(i, $s) {
|
169
|
+
$s.unbind('click.deckmenu').bind('click.deckmenu', function(e) {
|
170
|
+
if (!$[deck]('getContainer').hasClass(opts.classes.menu)) return;
|
171
|
+
|
172
|
+
$[deck]('go', i);
|
173
|
+
$[deck]('hideMenu');
|
174
|
+
e.stopPropagation();
|
175
|
+
e.preventDefault();
|
176
|
+
});
|
177
|
+
});
|
178
|
+
})
|
179
|
+
.bind('deck.change', function(e, from, to) {
|
180
|
+
var container = $[deck]('getContainer');
|
181
|
+
|
182
|
+
if (container.hasClass($[deck]('getOptions').classes.menu)) {
|
183
|
+
container.scrollTop($[deck]('getSlide', to).offset().top);
|
184
|
+
}
|
185
|
+
});
|
186
|
+
})(jQuery, 'deck');
|
187
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
.deck-container .deck-prev-link, .deck-container .deck-next-link {
|
2
|
+
display: none;
|
3
|
+
position: absolute;
|
4
|
+
z-index: 3;
|
5
|
+
top: 50%;
|
6
|
+
width: 32px;
|
7
|
+
height: 32px;
|
8
|
+
margin-top: -16px;
|
9
|
+
font-size: 20px;
|
10
|
+
font-weight: bold;
|
11
|
+
line-height: 32px;
|
12
|
+
vertical-align: middle;
|
13
|
+
text-align: center;
|
14
|
+
text-decoration: none;
|
15
|
+
color: #fff;
|
16
|
+
background: #888;
|
17
|
+
}
|
18
|
+
.borderradius .deck-container .deck-prev-link, .borderradius .deck-container .deck-next-link {
|
19
|
+
-webkit-border-radius: 16px;
|
20
|
+
-moz-border-radius: 16px;
|
21
|
+
border-radius: 16px;
|
22
|
+
}
|
23
|
+
.deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-prev-link:active, .deck-container .deck-prev-link:visited, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus, .deck-container .deck-next-link:active, .deck-container .deck-next-link:visited {
|
24
|
+
color: #fff;
|
25
|
+
}
|
26
|
+
.deck-container .deck-prev-link {
|
27
|
+
left: 8px;
|
28
|
+
}
|
29
|
+
.deck-container .deck-next-link {
|
30
|
+
right: 8px;
|
31
|
+
}
|
32
|
+
.deck-container:hover .deck-prev-link, .deck-container:hover .deck-next-link {
|
33
|
+
display: block;
|
34
|
+
}
|
35
|
+
.deck-container:hover .deck-prev-link.deck-nav-disabled, .touch .deck-container:hover .deck-prev-link, .deck-container:hover .deck-next-link.deck-nav-disabled, .touch .deck-container:hover .deck-next-link {
|
36
|
+
display: none;
|
37
|
+
}
|
38
|
+
|
39
|
+
@media print {
|
40
|
+
.deck-prev-link, .deck-next-link {
|
41
|
+
display: none !important;
|
42
|
+
}
|
43
|
+
}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
/*!
|
2
|
+
Deck JS - deck.navigation
|
3
|
+
Copyright (c) 2011 Caleb Troughton
|
4
|
+
Dual licensed under the MIT license and GPL license.
|
5
|
+
https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
|
6
|
+
https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
|
7
|
+
*/
|
8
|
+
|
9
|
+
/*
|
10
|
+
This module adds clickable previous and next links to the deck.
|
11
|
+
*/
|
12
|
+
(function($, deck, undefined) {
|
13
|
+
var $d = $(document),
|
14
|
+
|
15
|
+
/* Updates link hrefs, and disabled states if last/first slide */
|
16
|
+
updateButtons = function(e, from, to) {
|
17
|
+
var opts = $[deck]('getOptions'),
|
18
|
+
last = $[deck]('getSlides').length - 1,
|
19
|
+
prevSlide = $[deck]('getSlide', to - 1),
|
20
|
+
nextSlide = $[deck]('getSlide', to + 1),
|
21
|
+
hrefBase = window.location.href.replace(/#.*/, ''),
|
22
|
+
prevId = prevSlide ? prevSlide.attr('id') : undefined,
|
23
|
+
nextId = nextSlide ? nextSlide.attr('id') : undefined;
|
24
|
+
|
25
|
+
$(opts.selectors.previousLink)
|
26
|
+
.toggleClass(opts.classes.navDisabled, !to)
|
27
|
+
.attr('href', hrefBase + '#' + (prevId ? prevId : ''));
|
28
|
+
$(opts.selectors.nextLink)
|
29
|
+
.toggleClass(opts.classes.navDisabled, to === last)
|
30
|
+
.attr('href', hrefBase + '#' + (nextId ? nextId : ''));
|
31
|
+
};
|
32
|
+
|
33
|
+
/*
|
34
|
+
Extends defaults/options.
|
35
|
+
|
36
|
+
options.classes.navDisabled
|
37
|
+
This class is added to a navigation link when that action is disabled.
|
38
|
+
It is added to the previous link when on the first slide, and to the
|
39
|
+
next link when on the last slide.
|
40
|
+
|
41
|
+
options.selectors.nextLink
|
42
|
+
The elements that match this selector will move the deck to the next
|
43
|
+
slide when clicked.
|
44
|
+
|
45
|
+
options.selectors.previousLink
|
46
|
+
The elements that match this selector will move to deck to the previous
|
47
|
+
slide when clicked.
|
48
|
+
*/
|
49
|
+
$.extend(true, $[deck].defaults, {
|
50
|
+
classes: {
|
51
|
+
navDisabled: 'deck-nav-disabled'
|
52
|
+
},
|
53
|
+
|
54
|
+
selectors: {
|
55
|
+
nextLink: '.deck-next-link',
|
56
|
+
previousLink: '.deck-prev-link'
|
57
|
+
}
|
58
|
+
});
|
59
|
+
|
60
|
+
$d.bind('deck.init', function() {
|
61
|
+
var opts = $[deck]('getOptions'),
|
62
|
+
slides = $[deck]('getSlides'),
|
63
|
+
$current = $[deck]('getSlide'),
|
64
|
+
ndx;
|
65
|
+
|
66
|
+
// Setup prev/next link events
|
67
|
+
$(opts.selectors.previousLink)
|
68
|
+
.unbind('click.decknavigation')
|
69
|
+
.bind('click.decknavigation', function(e) {
|
70
|
+
$[deck]('prev');
|
71
|
+
e.preventDefault();
|
72
|
+
});
|
73
|
+
|
74
|
+
$(opts.selectors.nextLink)
|
75
|
+
.unbind('click.decknavigation')
|
76
|
+
.bind('click.decknavigation', function(e) {
|
77
|
+
$[deck]('next');
|
78
|
+
e.preventDefault();
|
79
|
+
});
|
80
|
+
|
81
|
+
// Find where we started in the deck and set initial states
|
82
|
+
$.each(slides, function(i, $slide) {
|
83
|
+
if ($slide === $current) {
|
84
|
+
ndx = i;
|
85
|
+
return false;
|
86
|
+
}
|
87
|
+
});
|
88
|
+
updateButtons(null, ndx, ndx);
|
89
|
+
})
|
90
|
+
.bind('deck.change', updateButtons);
|
91
|
+
})(jQuery, 'deck');
|
92
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/* Remove this line if you are embedding deck.js in a page and
|
2
|
+
using the scale extension. */
|
3
|
+
.csstransforms {
|
4
|
+
overflow: hidden;
|
5
|
+
}
|
6
|
+
|
7
|
+
.csstransforms .deck-container.deck-scale:not(.deck-menu) > .slide {
|
8
|
+
-webkit-box-sizing: padding-box;
|
9
|
+
-moz-box-sizing: padding-box;
|
10
|
+
box-sizing: padding-box;
|
11
|
+
width: 100%;
|
12
|
+
padding-bottom: 20px;
|
13
|
+
}
|
14
|
+
.csstransforms .deck-container.deck-scale:not(.deck-menu) > .slide > .deck-slide-scaler {
|
15
|
+
-webkit-transform-origin: 50% 0;
|
16
|
+
-moz-transform-origin: 50% 0;
|
17
|
+
-o-transform-origin: 50% 0;
|
18
|
+
-ms-transform-origin: 50% 0;
|
19
|
+
transform-origin: 50% 0;
|
20
|
+
}
|
21
|
+
|
22
|
+
.csstransforms .deck-container.deck-menu .deck-slide-scaler {
|
23
|
+
-webkit-transform: none !important;
|
24
|
+
-moz-transform: none !important;
|
25
|
+
-o-transform: none !important;
|
26
|
+
-ms-transform: none !important;
|
27
|
+
transform: none !important;
|
28
|
+
}
|
@@ -0,0 +1,170 @@
|
|
1
|
+
/*!
|
2
|
+
Deck JS - deck.scale
|
3
|
+
Copyright (c) 2011-2012 Caleb Troughton
|
4
|
+
Dual licensed under the MIT license and GPL license.
|
5
|
+
https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
|
6
|
+
https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
|
7
|
+
*/
|
8
|
+
|
9
|
+
/*
|
10
|
+
This module adds automatic scaling to the deck. Slides are scaled down
|
11
|
+
using CSS transforms to fit within the deck container. If the container is
|
12
|
+
big enough to hold the slides without scaling, no scaling occurs. The user
|
13
|
+
can disable and enable scaling with a keyboard shortcut.
|
14
|
+
|
15
|
+
Note: CSS transforms may make Flash videos render incorrectly. Presenters
|
16
|
+
that need to use video may want to disable scaling to play them. HTML5 video
|
17
|
+
works fine.
|
18
|
+
*/
|
19
|
+
(function($, deck, window, undefined) {
|
20
|
+
var $d = $(document),
|
21
|
+
$w = $(window),
|
22
|
+
baseHeight, // Value to scale against
|
23
|
+
timer, // Timeout id for debouncing
|
24
|
+
rootSlides,
|
25
|
+
|
26
|
+
/*
|
27
|
+
Internal function to do all the dirty work of scaling the slides.
|
28
|
+
*/
|
29
|
+
scaleDeck = function() {
|
30
|
+
var opts = $[deck]('getOptions'),
|
31
|
+
obh = opts.baseHeight,
|
32
|
+
$container = $[deck]('getContainer'),
|
33
|
+
baseHeight = obh ? obh : $container.height();
|
34
|
+
|
35
|
+
// Scale each slide down if necessary (but don't scale up)
|
36
|
+
$.each(rootSlides, function(i, $slide) {
|
37
|
+
var slideHeight = $slide.innerHeight(),
|
38
|
+
$scaler = $slide.find('.' + opts.classes.scaleSlideWrapper),
|
39
|
+
scale = $container.hasClass(opts.classes.scale) ?
|
40
|
+
baseHeight / slideHeight :
|
41
|
+
1;
|
42
|
+
|
43
|
+
$.each('Webkit Moz O ms Khtml'.split(' '), function(i, prefix) {
|
44
|
+
if (scale === 1) {
|
45
|
+
$scaler.css(prefix + 'Transform', '');
|
46
|
+
}
|
47
|
+
else {
|
48
|
+
$scaler.css(prefix + 'Transform', 'scale(' + scale + ')');
|
49
|
+
}
|
50
|
+
});
|
51
|
+
});
|
52
|
+
}
|
53
|
+
|
54
|
+
/*
|
55
|
+
Extends defaults/options.
|
56
|
+
|
57
|
+
options.classes.scale
|
58
|
+
This class is added to the deck container when scaling is enabled.
|
59
|
+
It is enabled by default when the module is included.
|
60
|
+
|
61
|
+
options.classes.scaleSlideWrapper
|
62
|
+
Scaling is done using a wrapper around the contents of each slide. This
|
63
|
+
class is applied to that wrapper.
|
64
|
+
|
65
|
+
options.keys.scale
|
66
|
+
The numeric keycode used to toggle enabling and disabling scaling.
|
67
|
+
|
68
|
+
options.baseHeight
|
69
|
+
When baseHeight is falsy, as it is by default, the deck is scaled in
|
70
|
+
proportion to the height of the deck container. You may instead specify
|
71
|
+
a height as a number of px, and slides will be scaled against this
|
72
|
+
height regardless of the container size.
|
73
|
+
|
74
|
+
options.scaleDebounce
|
75
|
+
Scaling on the browser resize event is debounced. This number is the
|
76
|
+
threshold in milliseconds. You can learn more about debouncing here:
|
77
|
+
http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
|
78
|
+
|
79
|
+
*/
|
80
|
+
$.extend(true, $[deck].defaults, {
|
81
|
+
classes: {
|
82
|
+
scale: 'deck-scale',
|
83
|
+
scaleSlideWrapper: 'deck-slide-scaler'
|
84
|
+
},
|
85
|
+
|
86
|
+
keys: {
|
87
|
+
scale: 83 // s
|
88
|
+
},
|
89
|
+
|
90
|
+
baseHeight: null,
|
91
|
+
scaleDebounce: 200
|
92
|
+
});
|
93
|
+
|
94
|
+
/*
|
95
|
+
jQuery.deck('disableScale')
|
96
|
+
|
97
|
+
Disables scaling and removes the scale class from the deck container.
|
98
|
+
*/
|
99
|
+
$[deck]('extend', 'disableScale', function() {
|
100
|
+
$[deck]('getContainer').removeClass($[deck]('getOptions').classes.scale);
|
101
|
+
scaleDeck();
|
102
|
+
});
|
103
|
+
|
104
|
+
/*
|
105
|
+
jQuery.deck('enableScale')
|
106
|
+
|
107
|
+
Enables scaling and adds the scale class to the deck container.
|
108
|
+
*/
|
109
|
+
$[deck]('extend', 'enableScale', function() {
|
110
|
+
$[deck]('getContainer').addClass($[deck]('getOptions').classes.scale);
|
111
|
+
scaleDeck();
|
112
|
+
});
|
113
|
+
|
114
|
+
/*
|
115
|
+
jQuery.deck('toggleScale')
|
116
|
+
|
117
|
+
Toggles between enabling and disabling scaling.
|
118
|
+
*/
|
119
|
+
$[deck]('extend', 'toggleScale', function() {
|
120
|
+
var $c = $[deck]('getContainer');
|
121
|
+
$[deck]($c.hasClass($[deck]('getOptions').classes.scale) ?
|
122
|
+
'disableScale' : 'enableScale');
|
123
|
+
});
|
124
|
+
|
125
|
+
$d.bind('deck.init', function() {
|
126
|
+
var opts = $[deck]('getOptions'),
|
127
|
+
slideTest = $.map([
|
128
|
+
opts.classes.before,
|
129
|
+
opts.classes.previous,
|
130
|
+
opts.classes.current,
|
131
|
+
opts.classes.next,
|
132
|
+
opts.classes.after
|
133
|
+
], function(el, i) {
|
134
|
+
return '.' + el;
|
135
|
+
}).join(', ');
|
136
|
+
|
137
|
+
// Build top level slides array
|
138
|
+
rootSlides = [];
|
139
|
+
$.each($[deck]('getSlides'), function(i, $el) {
|
140
|
+
if (!$el.parentsUntil(opts.selectors.container, slideTest).length) {
|
141
|
+
rootSlides.push($el);
|
142
|
+
}
|
143
|
+
});
|
144
|
+
|
145
|
+
// Use a wrapper on each slide to handle content scaling
|
146
|
+
$.each(rootSlides, function(i, $slide) {
|
147
|
+
$slide.children().wrapAll('<div class="' + opts.classes.scaleSlideWrapper + '"/>');
|
148
|
+
});
|
149
|
+
|
150
|
+
// Debounce the resize scaling
|
151
|
+
$w.unbind('resize.deckscale').bind('resize.deckscale', function() {
|
152
|
+
window.clearTimeout(timer);
|
153
|
+
timer = window.setTimeout(scaleDeck, opts.scaleDebounce);
|
154
|
+
})
|
155
|
+
// Scale once on load, in case images or something change layout
|
156
|
+
.unbind('load.deckscale').bind('load.deckscale', scaleDeck);
|
157
|
+
|
158
|
+
// Bind key events
|
159
|
+
$d.unbind('keydown.deckscale').bind('keydown.deckscale', function(e) {
|
160
|
+
if (e.which === opts.keys.scale || $.inArray(e.which, opts.keys.scale) > -1) {
|
161
|
+
$[deck]('toggleScale');
|
162
|
+
e.preventDefault();
|
163
|
+
}
|
164
|
+
});
|
165
|
+
|
166
|
+
// Enable scale on init
|
167
|
+
$[deck]('enableScale');
|
168
|
+
});
|
169
|
+
})(jQuery, 'deck', this);
|
170
|
+
|