asciidoctor-revealjs 1.0.4 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +40 -9
  3. data/Gemfile +4 -0
  4. data/HACKING.adoc +104 -39
  5. data/LICENSE.adoc +1 -1
  6. data/README.adoc +57 -27
  7. data/Rakefile +114 -0
  8. data/asciidoctor-revealjs.gemspec +13 -4
  9. data/examples/README.adoc +17 -0
  10. data/examples/admonitions-icons.adoc +37 -0
  11. data/examples/admonitions.adoc +38 -0
  12. data/examples/concealed-slide-titles.adoc +20 -0
  13. data/examples/customcss.adoc +9 -0
  14. data/examples/customcss.css +8 -0
  15. data/examples/data-background-newstyle.adoc +63 -0
  16. data/examples/data-background-oldstyle.adoc +44 -0
  17. data/examples/history-regression-tests.adoc +34 -0
  18. data/examples/history.adoc +19 -0
  19. data/examples/images.adoc +19 -0
  20. data/examples/images/70s.jpg +0 -0
  21. data/examples/images/bio.jpg +0 -0
  22. data/examples/images/cover.jpg +0 -0
  23. data/examples/images/meme-2.jpg +0 -0
  24. data/examples/images/meme-7.png +0 -0
  25. data/examples/images/web_surfing_time.gif +0 -0
  26. data/examples/keyboard-shortcuts.adoc +24 -0
  27. data/examples/level-sections.adoc +44 -0
  28. data/examples/multi-destination-content.adoc +66 -0
  29. data/examples/revealjs-stretch.adoc +22 -0
  30. data/examples/slide-state.adoc +18 -0
  31. data/examples/slide-state.css +6 -0
  32. data/examples/source-callouts.adoc +20 -0
  33. data/examples/speaker-notes.adoc +21 -0
  34. data/examples/theme-custom.adoc +33 -0
  35. data/examples/theme-custom.css +33 -0
  36. data/examples/title-preamble.adoc +10 -0
  37. data/examples/title-slide-color.adoc +10 -0
  38. data/examples/title-slide-image.adoc +13 -0
  39. data/examples/title-slide-video.adoc +13 -0
  40. data/examples/title-subtitle-partitioning.adoc +7 -0
  41. data/examples/transitions.adoc +20 -0
  42. data/examples/vertical-slides.adoc +24 -0
  43. data/examples/video.adoc +32 -0
  44. data/lib/asciidoctor-revealjs.rb +1 -1
  45. data/lib/asciidoctor-revealjs/version.rb +1 -1
  46. data/lib/asciidoctor-templates-compiler.rb +11 -0
  47. data/templates/{slim/block_admonition.html.slim → admonition.html.slim} +2 -2
  48. data/templates/{slim/block_audio.html.slim → audio.html.slim} +0 -0
  49. data/templates/{slim/block_colist.html.slim → colist.html.slim} +0 -0
  50. data/templates/{slim/block_dlist.html.slim → dlist.html.slim} +0 -0
  51. data/templates/{slim/document.html.slim → document.html.slim} +25 -5
  52. data/templates/{slim/embedded.html.slim → embedded.html.slim} +0 -0
  53. data/templates/{slim/block_example.html.slim → example.html.slim} +0 -0
  54. data/templates/floating_title.html.slim +2 -0
  55. data/templates/helpers.rb +99 -0
  56. data/templates/{slim/block_image.html.slim → image.html.slim} +1 -1
  57. data/templates/{slim/inline_anchor.html.slim → inline_anchor.html.slim} +0 -0
  58. data/templates/{slim/inline_break.html.slim → inline_break.html.slim} +0 -0
  59. data/templates/{slim/inline_button.html.slim → inline_button.html.slim} +0 -0
  60. data/templates/{slim/inline_callout.html.slim → inline_callout.html.slim} +0 -0
  61. data/templates/{slim/inline_footnote.html.slim → inline_footnote.html.slim} +0 -0
  62. data/templates/{slim/inline_image.html.slim → inline_image.html.slim} +0 -0
  63. data/templates/{slim/inline_indexterm.html.slim → inline_indexterm.html.slim} +0 -0
  64. data/templates/{slim/inline_kbd.html.slim → inline_kbd.html.slim} +0 -0
  65. data/templates/{slim/inline_menu.html.slim → inline_menu.html.slim} +0 -0
  66. data/templates/{slim/inline_quoted.html.slim → inline_quoted.html.slim} +0 -0
  67. data/templates/{slim/block_listing.html.slim → listing.html.slim} +1 -1
  68. data/templates/{slim/block_literal.html.slim → literal.html.slim} +0 -0
  69. data/templates/{slim/block_olist.html.slim → olist.html.slim} +0 -0
  70. data/templates/{slim/block_open.html.slim → open.html.slim} +0 -0
  71. data/templates/outline.html.slim +9 -0
  72. data/templates/{slim/block_page_break.html.slim → page_break.html.slim} +0 -0
  73. data/templates/{slim/block_paragraph.html.slim → paragraph.html.slim} +0 -0
  74. data/templates/{slim/block_pass.html.slim → pass.html.slim} +0 -0
  75. data/templates/{slim/block_preamble.html.slim → preamble.html.slim} +0 -0
  76. data/templates/{slim/block_quote.html.slim → quote.html.slim} +0 -0
  77. data/templates/{jade/ruler.jade → ruler.html.slim} +0 -0
  78. data/templates/{slim/section.html.slim → section.html.slim} +8 -5
  79. data/templates/{slim/block_sidebar.html.slim → sidebar.html.slim} +0 -0
  80. data/templates/{slim/block_stem.html.slim → stem.html.slim} +0 -0
  81. data/templates/{slim/block_table.html.slim → table.html.slim} +5 -3
  82. data/templates/{jade/thematic_break.jade → thematic_break.html.slim} +0 -0
  83. data/templates/toc.html.slim +17 -0
  84. data/templates/{slim/block_ulist.html.slim → ulist.html.slim} +0 -0
  85. data/templates/{slim/block_verse.html.slim → verse.html.slim} +0 -0
  86. data/templates/{slim/block_video.html.slim → video.html.slim} +0 -0
  87. metadata +179 -89
  88. data/lib/asciidoctor-revealjs/converter.rb +0 -38
  89. data/templates/jade/admonition.jade +0 -17
  90. data/templates/jade/audio.jade +0 -6
  91. data/templates/jade/colist.jade +0 -22
  92. data/templates/jade/dlist.jade +0 -60
  93. data/templates/jade/document.jade +0 -103
  94. data/templates/jade/embedded.jade +0 -11
  95. data/templates/jade/example.jade +0 -4
  96. data/templates/jade/floating_title.jade +0 -2
  97. data/templates/jade/image.jade +0 -12
  98. data/templates/jade/inline_anchor.jade +0 -9
  99. data/templates/jade/inline_break.jade +0 -2
  100. data/templates/jade/inline_button.jade +0 -1
  101. data/templates/jade/inline_callout.jade +0 -9
  102. data/templates/jade/inline_image.jade +0 -24
  103. data/templates/jade/inline_indexterm.jade +0 -2
  104. data/templates/jade/inline_kbd.jade +0 -9
  105. data/templates/jade/inline_quoted.jade +0 -26
  106. data/templates/jade/listing.jade +0 -29
  107. data/templates/jade/literal.jade +0 -5
  108. data/templates/jade/olist.jade +0 -9
  109. data/templates/jade/page_break.jade +0 -1
  110. data/templates/jade/paragraph.jade +0 -7
  111. data/templates/jade/pass.jade +0 -1
  112. data/templates/jade/quote.jade +0 -11
  113. data/templates/jade/section.jade +0 -15
  114. data/templates/jade/sidebar.jade +0 -5
  115. data/templates/jade/table.jade +0 -45
  116. data/templates/jade/ulist.jade +0 -25
  117. data/templates/jade/verse.jade +0 -14
  118. data/templates/jade/video.jade +0 -30
  119. data/templates/slim/block_floating_title.html.slim +0 -1
  120. data/templates/slim/block_ruler.html.slim +0 -1
  121. data/templates/slim/block_thematic_break.html.slim +0 -1
  122. data/templates/slim/block_toc.html.slim +0 -12
  123. data/templates/slim/helpers.rb +0 -38
@@ -1,38 +0,0 @@
1
- unless RUBY_ENGINE == 'opal'
2
- require 'asciidoctor/converter/html5'
3
- require 'asciidoctor/converter/composite'
4
- require 'asciidoctor/converter/template'
5
- end
6
-
7
- module Asciidoctor; module Revealjs
8
-
9
- class Converter < ::Asciidoctor::Converter::CompositeConverter
10
- ProvidedTemplatesDir = RUBY_ENGINE == 'opal' ? 'node_modules/asciidoctor-reveal.js/templates' : (::File.expand_path '../../../templates', __FILE__)
11
- register_for 'revealjs'
12
-
13
- def initialize backend, opts = {}
14
- # merge user templates with provided templates (user wins)
15
- template_dirs = [ProvidedTemplatesDir]
16
- if (user_template_dirs = opts[:template_dirs])
17
- template_dirs += user_template_dirs.map {|d| ::File.expand_path d }
18
- end
19
- # Engine Opal means we need to use the Javascript based templates
20
- if RUBY_ENGINE == 'opal'
21
- template_engine = 'jade'
22
- else
23
- template_engine = 'slim'
24
- end
25
- # create the main converter
26
- template_converter = ::Asciidoctor::Converter::TemplateConverter.new backend,
27
- template_dirs,
28
- (opts.merge htmlsyntax: 'html', template_engine: template_engine)
29
- # create the delegate / fallback converter
30
- html5_converter = ::Asciidoctor::Converter::Html5Converter.new backend, opts
31
- # fuse the converters together
32
- super backend, template_converter, html5_converter
33
- basebackend 'html'
34
- htmlsyntax 'html'
35
- end
36
- end
37
-
38
- end; end
@@ -1,17 +0,0 @@
1
- if node['$has_role?']('aside') || node['$has_role?']('speaker')
2
- aside.notes !{node.$content()}
3
- else
4
- div.admonitionblock(id=node.$id(),class=[node.$attr('name'), node.$role()])
5
- table
6
- tr
7
- td.icon
8
- if node.document.$attr('icons') == 'font'
9
- i(class="icon-#{node.$attr('name')}",title=node.$caption())
10
- else if node.document.$attr('icons', false)
11
- img(src=node.$icon_uri(node.$attr('name')),alt=node.$caption())
12
- else
13
- div.title
14
- | !{node.$caption()}
15
- if node.$title() != false
16
- div.title !{node.$title()}
17
- | !{node.$content()}
@@ -1,6 +0,0 @@
1
- div.audioblock(id=node.$id(),class=[node.$style(), node.$role()])
2
- if node.$title() != false
3
- div.title !{node.$captioned_title()}
4
- div.content
5
- audio(src=node.$media_uri(node.$attr('target')),autoplay=node.$option('autoplay', ""),controls=node.$option('nocontrols', ""),loop=node.$option('loop', ""))
6
- | "Your browser does not support the audio tag."
@@ -1,22 +0,0 @@
1
- div.colist(id=node.$id(),class=[node.$style(), node.$role()])
2
- if node.$title() != false
3
- div.title !{node.$title()}
4
- if node.document.$attr("icons", false)
5
- - font_icons = node.document.$attr("icons") == "font"
6
- table
7
- each item,i in node.$items()
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=node.$icon_uri("callouts/#{num}"),alt=num)
16
- td !{item.$text()}
17
- else
18
- ol
19
- each item in node.$items()
20
- li
21
- p
22
- | !{item.$text()}
@@ -1,60 +0,0 @@
1
- if node.$style() == 'qanda'
2
- div.qlist(id=node.$id(),class=['qanda', node.$role()])
3
- if node['$title?']()
4
- .title= node.$title()
5
- ol
6
- each item, i in node.$items()
7
- - questions = item[0]
8
- - answer = item[1]
9
- li
10
- each question in [].concat(questions)
11
- p
12
- em= question.$text()
13
- unless answer['$nil?']()
14
- if answer['$text?']()
15
- p= answer.$text()
16
- if answer['$blocks?']()
17
- | !{answer.$content()}
18
- else if node.$style() == 'horizontal'
19
- .hdlist(id=node.$id(),class=node.$role())
20
- if node['$title?']()
21
- .title= node.$title()
22
- table
23
- if node['$attr?']('labelwidth') || node['$attr?']('itemwidth')
24
- colgroup
25
- col(width=node.$attr('labelwidth'))
26
- col(width=node.$attr('itemwidth'))
27
- each item in node.$items()
28
- - var terms = item[0]
29
- - var dd = item[1]
30
- tr
31
- td(class=['hdlist1', node['$option?']('strong') ? 'strong' : ''])
32
- - terms = [].concat(terms)
33
- - last_term = terms.$last()
34
- each dt in terms
35
- | !{dt.$text()}
36
- if dt != last_term
37
- br
38
- td.hdlist2
39
- unless dd['$nil?']()
40
- if dd['$text?']()
41
- p= dd.$text()
42
- if dd['$blocks?']()
43
- | !{dd.$content()}
44
- else
45
- .dlist(id=node.$id(),class=[node.$style(), node.$role()])
46
- if node['$title?']()
47
- .title= node.$title()
48
- dl
49
- each item in node.$items()
50
- - terms = item[0]
51
- - dd = item[1]
52
- each dt in [].concat(terms)
53
- dt(class=node.$style() == false ? 'hdlist1' : '')
54
- | !{dt.$text()}
55
- unless dd['$nil?']()
56
- dd
57
- if dd['$text?']()
58
- p= dd.$text()
59
- if dd['$blocks?']()
60
- | !{dd.$content()}
@@ -1,103 +0,0 @@
1
- doctype html
2
- html(lang=node.document.$attr("lang", "en") )
3
- head
4
- meta(charset="UTF-8")
5
- - revealjsdir = node.$attr('revealjsdir', 'reveal.js')
6
- each key in ["description","keywords","author","copyright"]
7
- if node.$attr(key, false)
8
- meta(name=key,content=node.$attr(key))
9
- title= node.$doctitle()
10
- meta(content="yes",name="apple-mobile-web-app-capable")
11
- meta(content="black-translucent",name="apple-mobile-web-app-status-bar-style")
12
- meta(content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui",name="viewport")
13
- link(href="//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css",rel="stylesheet")
14
- link(href="#{revealjsdir}/css/reveal.css",rel="stylesheet")
15
- if node.$attr("revealjs_customtheme", false)
16
- link(rel='stylesheet',href="#{node.$attr('revealjs_customtheme')}",id='theme')
17
- else
18
- link(rel='stylesheet',href='#{revealjsdir}/css/theme/#{node.$attr("revealjs_theme", "black")}.css',id='theme')
19
- link(href="#{revealjsdir}/lib/css/zenburn.css",rel="stylesheet")
20
- script(src = "http://getfirebug.com/firebug-lite.js#startOpened=false")
21
- script(type='text/javascript').
22
- document.write('<link rel="stylesheet" href="#{revealjsdir}/css/print/' + ( window.location.search.match(/print-pdf/gi) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">');
23
- body
24
- .reveal
25
- .slides !{node.$content()}
26
- script(src = "#{revealjsdir}/lib/js/head.min.js")
27
- script(src = "#{revealjsdir}/js/reveal.js")
28
- script(type='text/javascript').
29
- function initializeReveal() {
30
- // See https://github.com/hakimel/reveal.js#configuration for a full list of configuration options
31
- Reveal.initialize({
32
- // Display controls in the bottom right corner
33
- controls: #{node.$attr('revealjs_controls', true)},
34
- // Display a presentation progress bar
35
- progress: #{node.$attr('revealjs_progress', true) },
36
- // Display the page number of the current slide
37
- slideNumber: #{node.$attr('revealjs_slidenumber', true) },
38
- // Push each slide change to the browser history
39
- history: #{node.$attr('revealjs_history', true) },
40
- // Enable keyboard shortcuts for navigation
41
- keyboard: #{node.$attr('revealjs_keyboard', true) },
42
- // Enable the slide overview mode
43
- overview: #{node.$attr('revealjs_overview', true) },
44
- // Vertical centering of slides
45
- center: #{node.$attr('revealjs_center', true) },
46
- // Enables touch navigation on devices with touch input
47
- touch: #{node.$attr('revealjs_touch', true) },
48
- // Loop the presentation
49
- loop: #{node.$attr('revealjs_loop', false) },
50
- // Change the presentation direction to be RTL
51
- rtl: #{node.$attr('revealjs_rtl', false) },
52
- // Turns fragments on and off globally
53
- fragments: #{node.$attr('revealjs_fragments', true) },
54
- // Flags if the presentation is running in an embedded mode,
55
- // i.e. contained within a limited portion of the screen
56
- embedded: #{node.$attr('revealjs_embedded', false) },
57
- // Number of milliseconds between automatically proceeding to the
58
- // next slide, disabled when set to 0, this value can be overwritten
59
- // by using a data-autoslide attribute on your slides
60
- autoSlide: #{node.$attr('revealjs_autoslide', 0) },
61
- // Stop auto-sliding after user input
62
- autoSlideStoppable: #{node.$attr('revealjs_autoslidestoppable', true) },
63
- // Enable slide navigation via mouse wheel
64
- mouseWheel: #{node.$attr('revealjs_mousewheel', true) },
65
- // Hides the address bar on mobile devices
66
- hideAddressBar: #{node.$attr('revealjs_hideaddressbar', true) },
67
- // Opens links in an iframe preview overlay
68
- previewLinks: #{node.$attr('revealjs_previewlinks', false) },
69
- // Theme (e.g., beige, blond, default, moon, night, serif, simple, sky, solarized)
70
- theme: Reveal.getQueryHash().theme || '#{node.$attr('revealjs_theme', 'serif') }',
71
- // Transition style (e.g., default, cube, page, concave, zoom, linear, fade, none)
72
- transition: Reveal.getQueryHash().transition || '#{node.$attr('revealjs_transition', 'default') }',
73
- // Transition speed (e.g., default, fast, slow)
74
- transitionSpeed: '#{node.$attr('revealjs_transitionspeed', 'default') }',
75
- // Transition style for full page slide backgrounds (e.g., default, none, slide, concave, convex, zoom)
76
- backgroundTransition: '#{node.$attr('revealjs_backgroundtransition', 'default') }',
77
- // Number of slides away from the current that are visible
78
- viewDistance: #{node.$attr('revealjs_viewdistance', 3)},
79
- // Parallax background image (e.g., "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'")
80
- parallaxBackgroundImage: '#{node.$attr('revealjs_parallaxbackgroundimage', '') }',
81
- // Parallax background size in CSS syntax (e.g., "2100px 900px")
82
- parallaxBackgroundSize: '#{node.$attr('revealjs_parallaxbackgroundsize', '') }',
83
- // Optional libraries used to extend on reveal.js
84
- dependencies: [
85
- {
86
- src: '#{revealjsdir}/lib/js/classList.js',
87
- condition: function () { return !document.body.classList; }
88
- },
89
- #{(node.$attr('source-highlighter') == 'highlight.js') ? "{ src: '#{revealjsdir}/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }," : ""}
90
- {
91
- src: '#{revealjsdir}/plugin/zoom-js/zoom.js',
92
- async: true,
93
- condition: function () { return !!document.body.classList; }
94
- },
95
- {
96
- src: '#{revealjsdir}/plugin/notes/notes.js',
97
- async: true,
98
- condition: function () { return !!document.body.classList; }
99
- }
100
- ]
101
- });
102
- }
103
- initializeReveal();
@@ -1,11 +0,0 @@
1
- unless node.$notitle() || !node['$has_header?']()
2
- h1(id=node.$id()) !{node.$header().$title()}
3
- | !{node.$content()}
4
- unless !node['$footnotes?']() || node['$attr?']('nofootnotes')
5
- div(id='footnotes')
6
- hr
7
- each fn in node.$footnotes()
8
- div.footnote(id='_footnote_' + fn.$index())
9
- a(href='#_footnoteref_' + fn.$index())
10
- | !{fn.$index()}
11
- | !{fn.$text()}
@@ -1,4 +0,0 @@
1
- div.exampleblock(id=node.$id(),class=node.$role())
2
- if node.$title() != false
3
- div.title !{node.$captioned_title()}
4
- div.content !{node.$content()}
@@ -1,2 +0,0 @@
1
- - levelPlusOne = level + 1
2
- #{"h#{levelPlusOne}"}(id=node.$id(),class=[node.$style(), node.$role()]) !{node.$title()}
@@ -1,12 +0,0 @@
1
- div.imageblock(id=node.$id(),class=["#{node.$style()}", "#{node.$role()}"],style={
2
- "text-align": node.$attr('align'),
3
- float: node.$attr('float') ? "float: #{node.$attr('float')}" : ''
4
- })
5
- .content
6
- if node.$attr('link', false)
7
- a.image(href=node.$attr('link'))
8
- img(src=node.$image_uri(node.$attr('target')),alt=node.$attr('alt'),width=node.$attr('width'),height=node.$attr('height'),style=[node.$attr('background') ? "background: #{node.$attr('background')}" : ""])
9
- else
10
- img(src=node.$image_uri(node.$attr('target')),alt=node.$attr('alt'),width=node.$attr('width'),height=node.$attr('height'),style=[node.$attr('background') ? "background: #{node.$attr('background')}" : ""])
11
- if node.$title() != false
12
- .title !{node.$captioned_title()}
@@ -1,9 +0,0 @@
1
- case node.$type()
2
- when "xref"
3
- a(href=node.$target()) !{node.$text()}
4
- when "ref"
5
- a(id=node.$target())
6
- when "bibref"
7
- a(id=node.$target())
8
- default
9
- a(href=node.$target(),class=node.$role(),target=node.$attr('window')) !{node.$text()}
@@ -1,2 +0,0 @@
1
- | !{node.$text()}
2
- br
@@ -1 +0,0 @@
1
- b.button !{node.$text()}
@@ -1,9 +0,0 @@
1
- if node.document.$attr("icons") == "font"
2
- - num = "(" + node.$text() + ")"
3
- i.conum(data-value=node.$text())
4
- b !{num}
5
- else if node.document.$attr("icons", false)
6
- img(src=node.$icon_uri("callouts/#{node.$text()}"),alt=node.$text())
7
- else
8
- - num = "(" + node.$text() + ")"
9
- b !{num}
@@ -1,24 +0,0 @@
1
- span(class=[node.$type(), node.$role()],style=node.$attr('float', ''))
2
- if node.$type() == 'icon' && node.document.$attr('icons') == 'font'
3
- - style_class = ["fa fa-" + node.$target()]
4
- - style_class.push(node['$attr?']('size') ? 'fa-' + node.$attr('size'): '');
5
- - style_class.push(node['$attr?']('rotate') ? 'fa-rotate-' + node.$attr('rotate'): '');
6
- - style_class.push(node['$attr?']('flip') ? 'fa-flip-' + node.$attr('flip'): '');
7
- if node['$attr?']('link')
8
- a.image(href=node.$attr('link'),target=node.$attr('window'))
9
- i(class=[style_class],title=node.$attr('title'))
10
- else
11
- i(class=[style_class],title=node.$attr('title'))
12
- else if node.$type() == 'icon' && !node.document['$attr?']('icons')
13
- if node['$attr?']('link')
14
- a.image(href=node.$attr('link'),target=node.$attr('window'))
15
- | [#{node.$attr('alt')}]
16
- else
17
- | [#{node.$attr('alt')}]
18
- else
19
- - src = node.$type() == 'icon' ? node.$icon_uri(node.$target()) : node.$image_uri(node.$target())
20
- if node['$attr?']('link')
21
- a.image(href=node.$attr('link'),target=node.$attr('window'))
22
- img(src=src,alt=node.$attr('link'),width=node.$attr('width'),height=node.$attr('height'),title=node.$attr('title'))
23
- else
24
- img(src=src,alt=node.$attr('link'),width=node.$attr('width'),height=node.$attr('height'),title=node.$attr('title'))
@@ -1,2 +0,0 @@
1
- if node.$type() == "visible"
2
- = !{node.$text()}
@@ -1,9 +0,0 @@
1
- - var keys = node.$attr('keys')
2
- if keys.length == 1
3
- kbd !{keys.$first()}
4
- else
5
- kbd.keyseq
6
- each key,idx in keys
7
- if !idx['$zero?']()
8
- | +
9
- kbd !{key}
@@ -1,26 +0,0 @@
1
- case node.$type()
2
- when "emphasis"
3
- em(class=node.$role()) !{node.$text()}
4
- when "strong"
5
- strong(class=node.$role()) !{node.$text()}
6
- when "monospaced"
7
- code(class=node.$role()) !{node.$text()}
8
- when "superscript"
9
- sup(class=node.$role()) !{node.$text()}
10
- when "subscript"
11
- sub(class=node.$role()) !{node.$text()}
12
- when "double"
13
- if node.$role() != false
14
- span(class=node.$role()) &#8220;!{node.$text()}&#8221;
15
- else
16
- | &#8220;!{node.$text()}&#8221;
17
- when "single"
18
- if node.$role() != false
19
- span(class=node.$role()) &#8216;!{node.$text()}&#8217;
20
- else
21
- | &#8216;!{node.$text()}&#8217;
22
- default
23
- if node.$role() != false
24
- span(class=node.$role()) !{node.$text()}
25
- else
26
- | !{node.$text()}
@@ -1,29 +0,0 @@
1
- div.listingblock(id=node.$id(),class=node.$role())
2
- if node.$title() != false
3
- div.title !{node.$captioned_title()}
4
- div.content
5
- - var nowrap = !(node.document.$attr("prewrap",false)) || node['$option?']('nowrap')
6
- if node.$style() == "source" || (node.$style() == 'listing' && node.$attr(1, 'listing'))
7
- - language = node.$attr('language',false)
8
- - var code_class = language ? [language, "language-#{language}"] : ""
9
- - var pre_class = ['highlight']
10
- - var pre_lang = ""
11
- case node.$attr("source-highlighter")
12
- when "coderay"
13
- - pre_class = ['CodeRay']
14
- when 'pygments'
15
- - pre_class = ['pygments','highlight']
16
- when 'prettify'
17
- - pre_class = ['prettyprint']
18
- - pre_class.push(node.$attr("linenums",''));
19
- - pre_class.push(language ? language : '');
20
- - pre_class.push(language ? "language-#{language}" : '');
21
- when 'html-pipeline'
22
- - pre_lang = language
23
- - pre_class = code_class = ''
24
- - nowrap = false
25
- - pre_class.push(nowrap ? nowrap : '')
26
- pre(class=pre_class,lang=pre_lang)
27
- code(class=[code_class]) !{node.$content()}
28
- else
29
- pre(class=nowrap ? "nowrap" : "") !{node.$content()}
@@ -1,5 +0,0 @@
1
- div.literalblock(id=node.$id(),class=node.$role())
2
- if node.$title() != false
3
- div.title !{node.$title()}
4
- div.content
5
- | !{node.$content()}
@@ -1,9 +0,0 @@
1
- div.olist(id=node.$id(),class=[node.$style(), node.$role()])
2
- if node['$title?']()
3
- div.title !{node.$title()}
4
- ol(class=node.$style(),start=node.$attr('start', ""),type=node.$list_marker_keyword())
5
- each item in node.$items()
6
- li(class=[(node['$option?']('step') || node['$has_role?']('step')) ? "fragment" : ""])
7
- p !{item.$text()}
8
- if item['$blocks?']()
9
- | !{item.$content()}
@@ -1 +0,0 @@
1
- div(style="page-break-after: always;")