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
data/lib/hyla/commands/new.rb
CHANGED
@@ -3,20 +3,18 @@ module Hyla
|
|
3
3
|
class New < Command
|
4
4
|
|
5
5
|
def self.process(args, options = {})
|
6
|
-
raise ArgumentError.new('You must specify a
|
7
|
-
|
8
|
-
@config = Hyla::Configuration.new
|
6
|
+
raise ArgumentError.new('You must specify a project name to be created.') if args.empty?
|
9
7
|
|
10
8
|
#
|
11
|
-
#
|
9
|
+
# Calculate project path (rel/absolute)
|
12
10
|
#
|
13
|
-
new_project_path = File.expand_path(args
|
11
|
+
new_project_path = File.expand_path(args[0], Dir.pwd)
|
14
12
|
|
15
13
|
if Dir.exist? new_project_path
|
16
14
|
|
17
15
|
Hyla.logger.debug("Dir exists: #{new_project_path}")
|
18
16
|
|
19
|
-
# If force is selected, then we delete & recreate it to
|
17
|
+
# If force is selected, then we delete & recreate it to clean content
|
20
18
|
if options[:force]
|
21
19
|
Hyla.logger.debug("Force option selected")
|
22
20
|
# DOES NOT WORK ON Mac OS X
|
@@ -24,7 +22,7 @@ module Hyla
|
|
24
22
|
FileUtils.rm_rf new_project_path
|
25
23
|
# Create Directory
|
26
24
|
FileUtils.mkdir_p new_project_path
|
27
|
-
Hyla.logger.debug("Dir recreated
|
25
|
+
Hyla.logger.debug("Dir recreated")
|
28
26
|
end
|
29
27
|
|
30
28
|
# Preserve content if it exists
|
@@ -34,7 +32,7 @@ module Hyla
|
|
34
32
|
end
|
35
33
|
|
36
34
|
else
|
37
|
-
# Create Directory
|
35
|
+
# Create Directory when it does not exist
|
38
36
|
FileUtils.mkdir_p new_project_path
|
39
37
|
end
|
40
38
|
|
@@ -44,31 +42,54 @@ module Hyla
|
|
44
42
|
#
|
45
43
|
if options[:blank]
|
46
44
|
create_blank_project new_project_path
|
45
|
+
|
46
|
+
# Add yaml config file
|
47
|
+
FileUtils.cp_r [Configuration::templates, Configuration::YAML_CONFIG_FILE_NAME] * '/', new_project_path
|
48
|
+
|
49
|
+
# Copy styles
|
50
|
+
FileUtils.cp_r Configuration::styles, new_project_path
|
51
|
+
|
52
|
+
Hyla.logger.info("Blank project created")
|
53
|
+
|
47
54
|
else
|
48
55
|
raise ArgumentError.new('You must specifiy a template type.') if options[:template_type].nil?
|
56
|
+
|
49
57
|
create_sample_project(new_project_path, options[:template_type])
|
58
|
+
|
59
|
+
# Copy styles
|
60
|
+
FileUtils.cp_r Configuration::styles, new_project_path
|
61
|
+
|
62
|
+
Hyla.logger.info("Sample project created using template : #{options[:template_type]}")
|
50
63
|
end
|
51
64
|
|
52
65
|
end
|
53
66
|
|
54
67
|
#
|
55
68
|
# Create Blank Project
|
56
|
-
# with just a readme.adoc file
|
69
|
+
# with just a readme.adoc file and yaml config file
|
57
70
|
def self.create_blank_project(path)
|
58
71
|
Dir.chdir(path) do
|
59
|
-
f = File.open('
|
60
|
-
f.puts "=
|
61
|
-
f.puts "This is an empty
|
72
|
+
f = File.open('readme.ad', 'w')
|
73
|
+
f.puts "= Readme Asciidoctor Project"
|
74
|
+
f.puts "This is an empty Asciidoctor readme file."
|
62
75
|
f.puts "To create **asciidoc(tor)** content, more info are available http://asciidoctor.org/docs/user-manual[here]"
|
76
|
+
f.puts "otherwise, you can add content to this newly project created using this hyla command :"
|
77
|
+
f.puts "hyla create --t asciidoc --a xxx --d pathToProjectCreated"
|
78
|
+
f.puts "where xxx can be article, book, source, audio, video, ..."
|
63
79
|
end
|
64
80
|
end
|
65
81
|
|
82
|
+
#
|
66
83
|
# Create a Sample Project
|
67
|
-
# from a Template
|
84
|
+
# from a Template (asciidoc, slideshow)
|
85
|
+
# and add styles
|
86
|
+
#
|
68
87
|
def self.create_sample_project(path, type)
|
69
|
-
|
70
|
-
source = @config.templates + '/' + type + '/.'
|
88
|
+
source = [Configuration::templates, type] * '/' + '/.'
|
71
89
|
FileUtils.cp_r source, path
|
90
|
+
|
91
|
+
# Add yaml config file
|
92
|
+
FileUtils.cp_r [Configuration::templates, Configuration::YAML_CONFIG_FILE_NAME] * '/', path
|
72
93
|
end
|
73
94
|
|
74
95
|
#
|
data/lib/hyla/commands/watch.rb
CHANGED
@@ -94,10 +94,12 @@ module Hyla
|
|
94
94
|
Hyla.logger.info "File modified : #{modify}"
|
95
95
|
call_asciidoctor(modify)
|
96
96
|
end
|
97
|
+
|
97
98
|
added.each do |add|
|
98
99
|
Hyla.logger.info "File added : #{add}"
|
99
100
|
call_asciidoctor(add)
|
100
101
|
end
|
102
|
+
|
101
103
|
end
|
102
104
|
end # callback
|
103
105
|
|
@@ -126,10 +128,12 @@ module Hyla
|
|
126
128
|
Hyla.logger.info ">> Extension of the file : #{@ext_name}"
|
127
129
|
|
128
130
|
if @ext_name != '.html'
|
129
|
-
|
131
|
+
# Generate File name
|
132
|
+
# Rename xxx.adoc, xxx.asciidoc, xxx.ad, xxx.index to xxx.html
|
133
|
+
to_file = file_to_process.to_s.gsub(/.adoc|.ad|.asciidoc|.index/, '.html')
|
130
134
|
@opts[:to_file] = to_file
|
131
135
|
|
132
|
-
# TODO Check why asciidoctor populates new attributes and
|
136
|
+
# TODO Check why asciidoctor populates new attributes and removes to_dir
|
133
137
|
# TODO when it is called a second time
|
134
138
|
# Workaround - reset list, add again :out_dir
|
135
139
|
@opts[:attributes] = {}
|
data/lib/hyla/configuration.rb
CHANGED
@@ -1,47 +1,189 @@
|
|
1
1
|
module Hyla
|
2
|
-
class Configuration
|
2
|
+
class Configuration < Hash
|
3
3
|
|
4
4
|
attr_reader :HEADER, :INDEX_SUFFIX, :HEADER_INDEX, :INCLUDE_PREFIX, :INCLUDE_SUFFIX, :LEVEL_1, :LEVEL_2, :SKIP_CHARACTERS,
|
5
|
-
:ADOC_EXT, :PREFIX_ARTEFACT, :
|
5
|
+
:ADOC_EXT, :PREFIX_ARTEFACT, :YAML_CONFIG_FILE_NAME, :DEFAULTS,
|
6
|
+
:templates, :samples, :resources, :styles, :backends
|
6
7
|
|
7
|
-
|
8
|
+
DEFAULTS = {
|
9
|
+
'source' => Dir.pwd,
|
10
|
+
'destination' => File.join(Dir.pwd, 'generated_content'),
|
8
11
|
|
9
|
-
|
10
|
-
|
12
|
+
# Asciidoctor
|
13
|
+
'watch_dir' => '.',
|
14
|
+
'watch_ext' => %w(ad adoc asciidoc txt index),
|
15
|
+
'run_on_start' => false,
|
16
|
+
'backend' => 'html5',
|
17
|
+
'eruby' => 'erb',
|
18
|
+
'doctype' => 'article',
|
19
|
+
'compact' => false,
|
20
|
+
'attributes' => {
|
21
|
+
'source-highlighter' => 'coderay',
|
22
|
+
'linkcss!' => 'true',
|
23
|
+
'data-uri' => 'true',
|
24
|
+
'stylesheet' => 'asciidoctor.css',
|
25
|
+
'stylesdir' => 'styles'
|
26
|
+
},
|
27
|
+
'always_build_all' => false,
|
28
|
+
'safe' => 'unsafe',
|
29
|
+
'header_footer' => true
|
11
30
|
|
12
|
-
|
31
|
+
}
|
13
32
|
|
14
|
-
|
15
|
-
":icons: font\n" +
|
16
|
-
":last-update-label!:\n" +
|
17
|
-
":source-highlighter: coderay\n" +
|
18
|
-
":toc: left\n" +
|
19
|
-
"\n"
|
33
|
+
INCLUDE_PREFIX = 'include::'
|
20
34
|
|
21
|
-
|
22
|
-
":navigation:\n" +
|
23
|
-
":menu:\n" +
|
24
|
-
":status:\n" +
|
25
|
-
"\n"
|
35
|
+
INCLUDE_SUFFIX = '[]'
|
26
36
|
|
27
|
-
|
37
|
+
INDEX_SUFFIX = '_AllSlides.index'
|
28
38
|
|
29
|
-
|
39
|
+
HEADER = ":data-uri:\n" +
|
40
|
+
":icons: font\n" +
|
41
|
+
":last-update-label!:\n" +
|
42
|
+
":source-highlighter: coderay\n" +
|
43
|
+
":toc: left\n" +
|
44
|
+
":notitle: true\n" +
|
45
|
+
"\n"
|
30
46
|
|
31
|
-
|
47
|
+
HEADER_INDEX = ":data-uri:\n" +
|
48
|
+
":navigation:\n" +
|
49
|
+
":menu:\n" +
|
50
|
+
":status:\n" +
|
32
51
|
|
33
|
-
|
52
|
+
"\n"
|
34
53
|
|
35
|
-
|
54
|
+
LEVEL_1 = '= '
|
36
55
|
|
37
|
-
|
56
|
+
LEVEL_2 = '== '
|
38
57
|
|
39
|
-
|
58
|
+
SKIP_CHARACTERS = '>>'
|
59
|
+
|
60
|
+
ADOC_EXT = '.adoc'
|
61
|
+
|
62
|
+
PREFIX_ARTEFACT = 'asciidoc_'
|
63
|
+
|
64
|
+
TEMPLATES = '../../lib/templates'
|
65
|
+
|
66
|
+
RESOURCES = '../../lib/resources'
|
67
|
+
|
68
|
+
SAMPLES = '../../lib/templates/sample'
|
69
|
+
|
70
|
+
STYLES = '../../lib/resources/styles'
|
71
|
+
|
72
|
+
BACKENDS = '../../lib/resources/backends'
|
40
73
|
|
74
|
+
YAML_CONFIG_FILE_NAME = '_config.yml'
|
75
|
+
|
76
|
+
#
|
41
77
|
# Templates Location
|
42
|
-
|
43
|
-
|
78
|
+
#
|
79
|
+
def self.templates
|
80
|
+
File.expand_path(TEMPLATES, File.dirname(__FILE__))
|
81
|
+
end
|
82
|
+
|
83
|
+
#
|
84
|
+
# Resources Location
|
85
|
+
#
|
86
|
+
def self.resources
|
87
|
+
File.expand_path(RESOURCES, File.dirname(__FILE__))
|
88
|
+
end
|
89
|
+
|
90
|
+
#
|
91
|
+
# Stylesheets Location
|
92
|
+
#
|
93
|
+
def self.styles
|
94
|
+
File.expand_path(STYLES, File.dirname(__FILE__))
|
95
|
+
end
|
96
|
+
|
97
|
+
#
|
98
|
+
# Backends Location
|
99
|
+
#
|
100
|
+
def self.backends
|
101
|
+
File.expand_path(BACKENDS, File.dirname(__FILE__))
|
102
|
+
end
|
103
|
+
|
104
|
+
#
|
105
|
+
# Samples Location
|
106
|
+
#
|
107
|
+
def self.samples
|
108
|
+
File.expand_path(SAMPLES, File.dirname(__FILE__))
|
109
|
+
end
|
110
|
+
|
111
|
+
# Public: Generate a Hyla configuration Hash by merging the default
|
112
|
+
# options with anything in _config.yml, and adding the given options on top.
|
113
|
+
#
|
114
|
+
# override - A Hash of options that override any options in both
|
115
|
+
# the defaults and the config file. See Hyla::Configuration::DEFAULTS for a
|
116
|
+
# list of option names and their defaults.
|
117
|
+
#
|
118
|
+
# Returns the final configuration Hash.
|
119
|
+
def self.parse(override)
|
120
|
+
config = DEFAULTS
|
121
|
+
Hyla::logger.debug("DEFAULTS Keys: #{config.inspect}")
|
122
|
+
override = Configuration[override].stringify_keys
|
123
|
+
Hyla::logger.debug("OVERRIDE Keys: #{override.inspect}")
|
124
|
+
|
125
|
+
# Read config file if it exists and merge content with DEFAULT config
|
126
|
+
new_config = read_config_file(YAML_CONFIG_FILE_NAME)
|
127
|
+
Hyla::logger.debug("OVERRIDE Keys: #{new_config.inspect}") if !new_config.nil?
|
128
|
+
config = config.deep_merge(new_config) if !new_config.nil?
|
129
|
+
|
130
|
+
# Merge DEFAULTS < _config.yml < override
|
131
|
+
config = config.deep_merge(override)
|
132
|
+
# Convert String Keys to Symbols Keys
|
133
|
+
config = Configuration[].transform_keys_to_symbols(config)
|
134
|
+
Hyla::logger.debug("Merged Keys: #{config.inspect}")
|
135
|
+
return config
|
136
|
+
end
|
137
|
+
|
138
|
+
#
|
139
|
+
# Read YAML Config file
|
140
|
+
#
|
141
|
+
def self.read_config_file(filename)
|
142
|
+
f = File.expand_path(filename)
|
143
|
+
Hyla::logger.info("Config file to be parsed : #{f}")
|
144
|
+
config = safe_load_file(f)
|
145
|
+
config
|
146
|
+
rescue SystemCallError
|
147
|
+
Hyla::logger.warn "No _config.yaml file retrieved"
|
148
|
+
end
|
149
|
+
|
150
|
+
#
|
151
|
+
# Load Safely YAML File
|
152
|
+
#
|
153
|
+
def self.safe_load_file(filename)
|
154
|
+
YAML.safe_load_file(filename)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Public: Turn all keys into string
|
158
|
+
#
|
159
|
+
# Return a copy of the hash where all its keys are strings
|
160
|
+
def stringify_keys
|
161
|
+
reduce({}) { |hsh, (k, v)| hsh.merge(k.to_s => v) }
|
162
|
+
end
|
163
|
+
|
164
|
+
#
|
165
|
+
# Take keys of hash and transform those to a symbols
|
166
|
+
#
|
167
|
+
def transform_keys_to_symbols(hash)
|
168
|
+
return hash if not hash.is_a?(Hash)
|
169
|
+
hash.inject({}) { |result, (key, value)|
|
170
|
+
new_key = case key
|
171
|
+
when String then key.to_sym
|
172
|
+
else key
|
173
|
+
end
|
174
|
+
new_value = case value
|
175
|
+
when Hash
|
176
|
+
if key.eql? 'attributes'
|
177
|
+
value
|
178
|
+
else
|
179
|
+
transform_keys_to_symbols(value)
|
180
|
+
end
|
181
|
+
else value
|
182
|
+
end
|
183
|
+
result[new_key] = new_value
|
184
|
+
result
|
185
|
+
}
|
44
186
|
end
|
45
187
|
|
46
|
-
end # Class
|
188
|
+
end # Class Configuration
|
47
189
|
end # module Hyla
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
class Hash
|
3
|
+
|
4
|
+
# Merges self with another hash, recursively.
|
5
|
+
#
|
6
|
+
# This code was lovingly stolen from some random gem:
|
7
|
+
# http://gemjack.com/gems/tartan-0.1.1/classes/Hash.html
|
8
|
+
#
|
9
|
+
# Thanks to whoever made it.
|
10
|
+
def deep_merge(hash)
|
11
|
+
target = dup
|
12
|
+
|
13
|
+
hash.keys.each do |key|
|
14
|
+
if hash[key].is_a? Hash and self[key].is_a? Hash
|
15
|
+
target[key] = target[key].deep_merge(hash[key])
|
16
|
+
next
|
17
|
+
end
|
18
|
+
|
19
|
+
target[key] = hash[key]
|
20
|
+
end
|
21
|
+
|
22
|
+
target
|
23
|
+
end
|
24
|
+
end
|
data/lib/hyla/project.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Hyla
|
2
|
-
VERSION = '1.0'
|
2
|
+
VERSION = '1.0.1'
|
3
3
|
DESCRIPTION = 'Asciidoctor Hyla - Command Line tool to create new project, watch modifications, generate content, publish or consult it live !'
|
4
4
|
SUMMARY = 'Asciidoctor Hyla - builder/generator of HTML5, slideshow. Watch modifications, generate content, publish or consult it live !'
|
5
5
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
%div{:id=>@id, :class=>['admonitionblock', (attr :name), role]}
|
2
|
+
%table
|
3
|
+
%tr
|
4
|
+
%td.icon
|
5
|
+
- if @document.attr? :icons, 'font'
|
6
|
+
%i{:class=>"icon-#{attr :name}", :title=>@caption}
|
7
|
+
- elsif @document.attr? :icons
|
8
|
+
%img{:src=>icon_uri(attr :name), :alt=>@caption}
|
9
|
+
- else
|
10
|
+
.title=@caption
|
11
|
+
%td.content
|
12
|
+
- if title?
|
13
|
+
.title=title
|
14
|
+
=content.chomp
|
@@ -0,0 +1,7 @@
|
|
1
|
+
%div{:id=>@id, :class=>['audioblock', @style, role]}
|
2
|
+
- if title?
|
3
|
+
.title=captioned_title
|
4
|
+
.content
|
5
|
+
%audio{:src=>media_uri(attr :target), :autoplay=>(option? :autoplay),
|
6
|
+
:controls=>!(option? :nocontrols), :loop=>(option? :loop)}
|
7
|
+
Your browser does not support the audio tag.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
%div{:id=>@id, :class=>['colist', @style, role]}
|
2
|
+
- if title?
|
3
|
+
.title=title
|
4
|
+
- if @document.attr? :icons
|
5
|
+
- font_icons = @document.attr? :icons, 'font'
|
6
|
+
%table
|
7
|
+
- items.each_with_index do |item, i|
|
8
|
+
- num = i + 1
|
9
|
+
%tr
|
10
|
+
%td<
|
11
|
+
- if font_icons
|
12
|
+
%i.conum{:data=>{:value=>num}}
|
13
|
+
%b=num
|
14
|
+
- else
|
15
|
+
%img{:src=>icon_uri("callouts/#{num}"), :alt=>num}
|
16
|
+
%td=item.text
|
17
|
+
- else
|
18
|
+
%ol
|
19
|
+
- items.each do |item|
|
20
|
+
%li
|
21
|
+
%p=item.text
|
@@ -0,0 +1,54 @@
|
|
1
|
+
- case @style
|
2
|
+
- when 'qanda'
|
3
|
+
%div{:id=>@id, :class=>['qlist', 'qanda', role]}
|
4
|
+
- if title?
|
5
|
+
.title=title
|
6
|
+
%ol
|
7
|
+
- items.each do |questions, answer|
|
8
|
+
%li
|
9
|
+
- [*questions].each do |question|
|
10
|
+
%p<
|
11
|
+
%em=question.text
|
12
|
+
- unless answer.nil?
|
13
|
+
- if answer.text?
|
14
|
+
%p<=answer.text
|
15
|
+
- if answer.blocks?
|
16
|
+
=answer.content.chomp
|
17
|
+
- when 'horizontal'
|
18
|
+
%div{:id=>@id, :class=>['hdlist', role]}
|
19
|
+
- if title?
|
20
|
+
.title=title
|
21
|
+
%table
|
22
|
+
- if (attr? :labelwidth) || (attr? :itemwidth)
|
23
|
+
%colgroup
|
24
|
+
%col{:style=>((attr? :labelwidth) ? %(width:#{(attr :labelwidth).chomp '%'}%;) : nil)}
|
25
|
+
%col{:style=>((attr? :itemwidth) ? %(width:#{(attr :itemwidth).chomp '%'}%;) : nil)}
|
26
|
+
- items.each do |terms, dd|
|
27
|
+
%tr
|
28
|
+
%td{:class=>['hdlist1', ('strong' if (option? 'strong'))]}
|
29
|
+
- terms = [*terms]
|
30
|
+
- last_term = terms.last
|
31
|
+
- terms.each do |dt|
|
32
|
+
=dt.text
|
33
|
+
- if dt != last_term
|
34
|
+
%br
|
35
|
+
%td.hdlist2
|
36
|
+
- unless dd.nil?
|
37
|
+
- if dd.text?
|
38
|
+
%p<=dd.text
|
39
|
+
- if dd.blocks?
|
40
|
+
=dd.content.chomp
|
41
|
+
- else
|
42
|
+
%div{:id=>@id, :class=>['dlist',@style,role]}
|
43
|
+
- if title?
|
44
|
+
.title=title
|
45
|
+
%dl
|
46
|
+
- items.each do |terms, dd|
|
47
|
+
- [*terms].each do |dt|
|
48
|
+
%dt{:class=>('hdlist1' unless @style)}=dt.text
|
49
|
+
- unless dd.nil?
|
50
|
+
%dd
|
51
|
+
- if dd.text?
|
52
|
+
%p<=dd.text
|
53
|
+
- if dd.blocks?
|
54
|
+
=dd.content.chomp
|