hyla 1.0.7.pre.2 → 1.0.7.pre.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +2 -0
  3. data/README.adoc +2 -2
  4. data/Rakefile +93 -24
  5. data/config.yaml +49 -0
  6. data/documentation/developer.adoc +6 -6
  7. data/documentation/imgkit.adoc +44 -0
  8. data/documentation/index.txt +3 -0
  9. data/documentation/introduction.adoc +8 -335
  10. data/documentation/prerequisites.adoc +1 -1
  11. data/documentation/scenario.adoc +320 -0
  12. data/lib/hyla/commands/generate.rb +11 -2
  13. data/lib/hyla/configuration.rb +10 -1
  14. data/lib/hyla/project.rb +1 -1
  15. data/lib/resources/assets/cover/cover.html +62 -0
  16. data/lib/resources/assets/cover/cover.png +0 -0
  17. data/lib/resources/{cover.slim → assets/cover/cover.slim} +0 -0
  18. data/lib/resources/assets/cover/image/1153872-redhat-backroung.png +0 -0
  19. data/lib/resources/assets/cover/image/1156515-Logo_RH_RGB_Reverse.png +0 -0
  20. data/lib/resources/assets/cover/image/1156524-bg_redhat.png +0 -0
  21. data/lib/resources/assets/cover/new_cover.slim +95 -0
  22. data/lib/resources/assets/revealjs-redhat/image/1156515-Logo_RH_RGB_Reverse.png +0 -0
  23. data/lib/resources/assets/revealjs-redhat/image/1156524-bg_redhat.png +0 -0
  24. data/lib/resources/assets/revealjs-redhat/lib/css/font-awesome-4.3.0.css +2893 -0
  25. data/lib/resources/assets/revealjs-redhat/lib/css/gpe.css +705 -0
  26. data/lib/resources/assets/revealjs-redhat/lib/css/offline-v2.css +3646 -0
  27. data/lib/resources/assets/revealjs-redhat/lib/css/print/paper.css +176 -0
  28. data/lib/resources/assets/revealjs-redhat/lib/css/print/pdf.css +190 -0
  29. data/lib/resources/assets/revealjs-redhat/lib/css/theme-output.css +1358 -0
  30. data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/FontAwesome.otf +0 -0
  31. data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/fontawesome-webfont.eot +0 -0
  32. data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/fontawesome-webfont.svg +565 -0
  33. data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/fontawesome-webfont.ttf +0 -0
  34. data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/fontawesome-webfont.woff +0 -0
  35. data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/fontawesome-webfont.woff2 +0 -0
  36. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-bold.eot +0 -0
  37. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-bold.svg +637 -0
  38. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-bold.ttf +0 -0
  39. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-bold.woff +0 -0
  40. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-light.eot +0 -0
  41. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-light.svg +2121 -0
  42. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-light.ttf +0 -0
  43. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-light.woff +0 -0
  44. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-regular.eot +0 -0
  45. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-regular.svg +637 -0
  46. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-regular.ttf +0 -0
  47. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-regular.woff +0 -0
  48. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass.css +32 -0
  49. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass.css-TODO +12 -0
  50. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_bold-web.eot +0 -0
  51. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_bold-web.svg +454 -0
  52. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_bold-web.ttf +0 -0
  53. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_bold-web.woff +0 -0
  54. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_regular-web.eot +0 -0
  55. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_regular-web.svg +454 -0
  56. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_regular-web.ttf +0 -0
  57. data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_regular-web.woff +0 -0
  58. data/lib/resources/assets/revealjs-redhat/lib/js/head.min.js +131 -0
  59. data/lib/resources/assets/revealjs-redhat/lib/js/reveal.min.js +1279 -0
  60. data/lib/resources/assets/revealjs-redhat/lib/plugin/highlight/highlight.js +25 -0
  61. data/lib/resources/assets/revealjs-redhat/lib/plugin/markdown/markdown.js +320 -0
  62. data/lib/resources/assets/revealjs-redhat/lib/plugin/markdown/marked.js +37 -0
  63. data/lib/resources/assets/revealjs-redhat/lib/plugin/notes/notes.html +387 -0
  64. data/lib/resources/assets/revealjs-redhat/lib/plugin/notes/notes.js +117 -0
  65. data/lib/resources/assets/revealjs-redhat/lib/plugin/zoom-js/zoom.js +258 -0
  66. data/lib/resources/assets/revealjs/css/theme/default.css +121 -0
  67. data/lib/resources/assets/revealjs/css/theme/gpe.css +85 -86
  68. data/lib/resources/assets/sass/gpe.scss +15 -14
  69. data/lib/resources/assets/sass/gpe2.scss +598 -0
  70. data/lib/resources/assets/sass/{_overpass.scss → overpass.scss} +0 -0
  71. data/lib/resources/backends/slim/revealjs-redhat/block_admonition.html.slim +13 -0
  72. data/lib/resources/backends/slim/revealjs-redhat/block_audio.html.slim +6 -0
  73. data/lib/resources/backends/slim/revealjs-redhat/block_colist.html.slim +20 -0
  74. data/lib/resources/backends/slim/revealjs-redhat/block_dlist.html.slim +53 -0
  75. data/lib/resources/backends/slim/revealjs-redhat/block_example.html.slim +4 -0
  76. data/lib/resources/backends/slim/revealjs-redhat/block_floating_title.html.slim +1 -0
  77. data/lib/resources/backends/slim/revealjs-redhat/block_image.html.slim +15 -0
  78. data/lib/resources/backends/slim/revealjs-redhat/block_listing.html.slim +31 -0
  79. data/lib/resources/backends/slim/revealjs-redhat/block_literal.html.slim +4 -0
  80. data/lib/resources/backends/slim/revealjs-redhat/block_math.html.slim +10 -0
  81. data/lib/resources/backends/slim/revealjs-redhat/block_olist.html.slim +9 -0
  82. data/lib/resources/backends/slim/revealjs-redhat/block_open.html.slim +15 -0
  83. data/lib/resources/backends/slim/revealjs-redhat/block_page_break.html.slim +1 -0
  84. data/lib/resources/backends/slim/revealjs-redhat/block_paragraph.html.slim +16 -0
  85. data/lib/resources/backends/slim/revealjs-redhat/block_pass.html.slim +1 -0
  86. data/lib/resources/backends/slim/revealjs-redhat/block_preamble.html.slim +6 -0
  87. data/lib/resources/backends/slim/revealjs-redhat/block_quote.html.slim +14 -0
  88. data/lib/resources/backends/slim/revealjs-redhat/block_ruler.html.slim +1 -0
  89. data/lib/resources/backends/slim/revealjs-redhat/block_sidebar.html.slim +5 -0
  90. data/lib/resources/backends/slim/revealjs-redhat/block_table.html.slim +45 -0
  91. data/lib/resources/backends/slim/revealjs-redhat/block_toc.html.slim +12 -0
  92. data/lib/resources/backends/slim/revealjs-redhat/block_ulist.html.slim +25 -0
  93. data/lib/resources/backends/slim/revealjs-redhat/block_verse.html.slim +14 -0
  94. data/lib/resources/backends/slim/revealjs-redhat/block_video.html.slim +27 -0
  95. data/lib/resources/backends/slim/revealjs-redhat/document.html.slim +162 -0
  96. data/lib/resources/backends/slim/revealjs-redhat/embedded.html.slim +9 -0
  97. data/lib/resources/backends/slim/revealjs-redhat/helpers.rb +8 -0
  98. data/lib/resources/backends/slim/revealjs-redhat/inline_anchor.html.slim +11 -0
  99. data/lib/resources/backends/slim/revealjs-redhat/inline_break.html.slim +2 -0
  100. data/lib/resources/backends/slim/revealjs-redhat/inline_button.html.slim +1 -0
  101. data/lib/resources/backends/slim/revealjs-redhat/inline_callout.html.slim +7 -0
  102. data/lib/resources/backends/slim/revealjs-redhat/inline_footnote.html.slim +6 -0
  103. data/lib/resources/backends/slim/revealjs-redhat/inline_image.html.slim +24 -0
  104. data/lib/resources/backends/slim/revealjs-redhat/inline_indexterm.html.slim +2 -0
  105. data/lib/resources/backends/slim/revealjs-redhat/inline_kbd.html.slim +8 -0
  106. data/lib/resources/backends/slim/revealjs-redhat/inline_menu.html.slim +15 -0
  107. data/lib/resources/backends/slim/revealjs-redhat/inline_quoted.html.slim +22 -0
  108. data/lib/resources/backends/slim/revealjs-redhat/section.html.slim +23 -0
  109. data/lib/resources/backends/slim/revealjs/section.html.slim +2 -2
  110. data/lib/templates/_config.yaml +28 -8
  111. data/lib/templates/sample/slideshow_revealjs.adoc +21 -0
  112. metadata +97 -6
  113. data/.rakeTasks +0 -7
  114. data/.travis.yml +0 -10
@@ -0,0 +1,13 @@
1
+ .admonitionblock id=@id class=[(attr :name),role]
2
+ table: tr
3
+ td.icon
4
+ - if @document.attr? :icons, 'font'
5
+ i class=%(icon-#{attr :name}) title=@caption
6
+ - elsif @document.attr? :icons
7
+ img src=icon_uri(attr :name) alt=@caption
8
+ - else
9
+ .title=@caption
10
+ td.content
11
+ - if title?
12
+ .title=title
13
+ =content
@@ -0,0 +1,6 @@
1
+ .audioblock id=@id class=[@style,role]
2
+ - if title?
3
+ .title=captioned_title
4
+ .content
5
+ audio src=media_uri(attr :target) autoplay=(option? 'autoplay') controls=!(option? 'nocontrols') loop=(option? 'loop')
6
+ |Your browser does not support the audio tag.
@@ -0,0 +1,20 @@
1
+ .colist id=@id class=[@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: p=item.text
@@ -0,0 +1,53 @@
1
+ - case @style
2
+ - when 'qanda'
3
+ .qlist id=@id class=['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: em=question.text
11
+ - unless answer.nil?
12
+ - if answer.text?
13
+ p=answer.text
14
+ - if answer.blocks?
15
+ =answer.content
16
+ - when 'horizontal'
17
+ .hdlist id=@id class=role
18
+ - if title?
19
+ .title=title
20
+ table
21
+ - if (attr? :labelwidth) || (attr? :itemwidth)
22
+ colgroup
23
+ col style=((attr? :labelwidth) ? %(width:#{(attr :labelwidth).chomp '%'}%;) : nil)
24
+ col style=((attr? :itemwidth) ? %(width:#{(attr :itemwidth).chomp '%'}%;) : nil)
25
+ - items.each do |terms, dd|
26
+ tr
27
+ td class=['hdlist1',('strong' if option? 'strong')]
28
+ - terms = [*terms]
29
+ - last_term = terms.last
30
+ - terms.each do |dt|
31
+ =dt.text
32
+ - if dt != last_term
33
+ br
34
+ td.hdlist2
35
+ - unless dd.nil?
36
+ - if dd.text?
37
+ p=dd.text
38
+ - if dd.blocks?
39
+ =dd.content
40
+ - else
41
+ .dlist id=@id class=[@style,role]
42
+ - if title?
43
+ .title=title
44
+ dl
45
+ - items.each do |terms, dd|
46
+ - [*terms].each do |dt|
47
+ dt class=('hdlist1' unless @style) =dt.text
48
+ - unless dd.nil?
49
+ dd
50
+ - if dd.text?
51
+ p=dd.text
52
+ - if dd.blocks?
53
+ =dd.content
@@ -0,0 +1,4 @@
1
+ .exampleblock id=@id class=role
2
+ - if title?
3
+ .title=captioned_title
4
+ .content=content
@@ -0,0 +1 @@
1
+ *{:tag=>"h#{@level + 1}", :id=>@id, :class=>[@style,role].compact} =title
@@ -0,0 +1,15 @@
1
+ - if @id == "cover-logo"
2
+ .sl-block data-block-type="image" style="min-width: 30px; min-height: 30px; width: 211.706666666667px; height: 68px; left: 80px; top: -150px;" class=role
3
+ .sl-block-content class=role style="z-index: 13;"
4
+ img data-src=image_uri(attr :target)
5
+ - else
6
+ .imageblock(id=@id class=[@style,role]
7
+ style=[("text-align: #{attr :align}" if attr? :align),("float: #{attr :float}" if attr? :float)].compact.join('; '))
8
+ .content
9
+ - if attr? :link
10
+ a.image href=(attr :link)
11
+ img src=image_uri(attr :target) alt=(attr :alt) width=(attr :width) height=(attr :height)
12
+ - else
13
+ img src=image_uri(attr :target) alt=(attr :alt) width=(attr :width) height=(attr :height)
14
+ - if title?
15
+ .title=captioned_title
@@ -0,0 +1,31 @@
1
+ .listingblock id=@id class=role
2
+ - if title?
3
+ .title=captioned_title
4
+ .content
5
+ - nowrap = !(@document.attr? :prewrap) || (option? 'nowrap')
6
+ - if @style == 'source'
7
+ - language = attr :language
8
+ - code_class = language ? [language, "language-#{language}"] : nil
9
+ - pre_class = ['highlight']
10
+ - pre_lang = nil
11
+ - case 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 << 'linenums' if attr? :linenums
19
+ - pre_class << language if language
20
+ - pre_class << "language-#{language}" if language
21
+ - code_class = nil
22
+ - when 'html-pipeline'
23
+ - pre_lang = language
24
+ - pre_class = code_class = nil
25
+ - nowrap = false
26
+ /- when 'highlightjs', 'highlight.js'
27
+ - pre_class << 'nowrap' if nowrap
28
+ pre class=pre_class lang=pre_lang
29
+ code class=code_class =content
30
+ - else
31
+ pre class=(nowrap ? 'nowrap' : nil) =content
@@ -0,0 +1,4 @@
1
+ .literalblock id=@id class=role
2
+ - if title?
3
+ .title=title
4
+ .content: pre class=(!(@document.attr? :prewrap) || (option? 'nowrap') ? 'nowrap' : nil) =content
@@ -0,0 +1,10 @@
1
+ - open, close = ::Asciidoctor::BLOCK_MATH_DELIMITERS[@style.to_sym]
2
+ - equation = content.strip
3
+ - if (@subs.nil? || @subs.empty?) && !(attr? 'subs')
4
+ - equation = sub_specialcharacters equation
5
+ - unless (equation.start_with? open) && (equation.end_with? close)
6
+ - equation = %(#{open}#{equation}#{close})
7
+ .mathblock id=@id class=role
8
+ - if title?
9
+ .title=title
10
+ .content=equation
@@ -0,0 +1,9 @@
1
+ .olist id=@id class=[@style,role]
2
+ - if title?
3
+ .title=title
4
+ ol class=@style start=(attr :start) type=list_marker_keyword
5
+ - items.each do |item|
6
+ li
7
+ p=item.text
8
+ - if item.blocks?
9
+ =item.content
@@ -0,0 +1,15 @@
1
+ - if @style == 'abstract'
2
+ - if @parent == @document && @document.doctype == 'book'
3
+ - puts 'asciidoctor: WARNING: abstract block cannot be used in a document without a title when doctype is book. Excluding block content.'
4
+ - else
5
+ .quoteblock.abstract id=@id class=role
6
+ - if title?
7
+ .title=title
8
+ blockquote=content
9
+ - elsif @style == 'partintro' && (@level != 0 || @parent.context != :section || @document.doctype != 'book')
10
+ - puts 'asciidoctor: ERROR: partintro block can only be used when doctype is book and it\'s a child of a book part. Excluding block content.'
11
+ - else
12
+ .openblock id=@id class=[(@style != 'open' ? @style : nil),role]
13
+ - if title?
14
+ .title=title
15
+ .content=content
@@ -0,0 +1 @@
1
+ div style='page-break-after: always;'
@@ -0,0 +1,16 @@
1
+ - level = "#{@id}"[-1,1]
2
+ //- level_tag = "h#{level}"
3
+ - if "#{@id}".start_with?("cover")
4
+ - if level == "1"
5
+ .sl-block data-block-type="text" style="width: 832px; left: 80px; top: -15px; height: auto;" class=role
6
+ .sl-block-content class=role
7
+ h1 =content
8
+ - else
9
+ .sl-block data-block-type="text" style="height: auto; min-width: 30px; min-height: 30px; width: 776px; left: 80px; top: 290px;" class=role
10
+ .sl-block-content class=role
11
+ h2 =content
12
+ - else
13
+ .paragraph id=@id class=role
14
+ - if title?
15
+ .title=title
16
+ p=content
@@ -0,0 +1,6 @@
1
+ #preamble
2
+ .sectionbody=content
3
+ - if (attr? :toc) && (attr? 'toc-placement', 'preamble')
4
+ #toc class=(attr 'toc-class', 'toc')
5
+ #toctitle=(attr 'toc-title')
6
+ =Asciidoctor::HTML5::DocumentTemplate.outline(@document, (attr :toclevels, 2).to_i)
@@ -0,0 +1,14 @@
1
+ .quoteblock id=@id class=role
2
+ - if title?
3
+ .title=title
4
+ blockquote=content
5
+ - attribution = (attr? :attribution) ? (attr :attribution) : nil
6
+ - citetitle = (attr? :citetitle) ? (attr :citetitle) : nil
7
+ - if attribution || citetitle
8
+ .attribution
9
+ - if citetitle
10
+ cite=citetitle
11
+ - if attribution
12
+ - if citetitle
13
+ br
14
+ | &#8212; #{attribution}
@@ -0,0 +1,5 @@
1
+ aside id=@id class=role
2
+ - if title?
3
+ .title=title
4
+ =content
5
+
@@ -0,0 +1,45 @@
1
+ table(id=@id class=['tableblock',"frame-#{attr :frame, 'all'}","grid-#{attr :grid, 'all'}",role]
2
+ style=[("width:#{attr :tablepcwidth}%" unless option? 'autowidth'),("float:#{attr :float}" if attr? :float)].compact.join('; '))
3
+ - if title?
4
+ caption.title=captioned_title
5
+ - unless (attr :rowcount).zero?
6
+ colgroup
7
+ - if option? 'autowidth'
8
+ - @columns.each do
9
+ col
10
+ - else
11
+ - @columns.each do |col|
12
+ col style="width:#{col.attr :colpcwidth}%"
13
+ - [:head, :foot, :body].select {|tblsec| !@rows[tblsec].empty? }.each do |tblsec|
14
+ *{:tag=>"t#{tblsec}"}
15
+ - @rows[tblsec].each do |row|
16
+ tr
17
+ - row.each do |cell|
18
+ / store reference of content in advance to resolve attribute assignments in cells
19
+ - if tblsec == :head
20
+ - cell_content = cell.text
21
+ - else
22
+ - case cell.style
23
+ - when :verse, :literal
24
+ - cell_content = cell.text
25
+ - else
26
+ - cell_content = cell.content
27
+ *{:tag=>(tblsec == :head ? 'th' : 'td'), :class=>['tableblock',"halign-#{cell.attr :halign}","valign-#{cell.attr :valign}"],
28
+ :colspan=>cell.colspan, :rowspan=>cell.rowspan,
29
+ :style=>((@document.attr? :cellbgcolor) ? %(background-color:#{@document.attr :cellbgcolor};) : nil)}
30
+ - if tblsec == :head
31
+ =cell_content
32
+ - else
33
+ - case cell.style
34
+ - when :asciidoc
35
+ div=cell_content
36
+ - when :verse
37
+ .verse=cell_content
38
+ - when :literal
39
+ .literal: pre=cell_content
40
+ - when :header
41
+ - cell_content.each do |text|
42
+ p.tableblock.header=text
43
+ - else
44
+ - cell_content.each do |text|
45
+ p.tableblock=text
@@ -0,0 +1,12 @@
1
+ - if @document.attr? :toc
2
+ - toc_id = @id
3
+ - toc_role = (attr 'role', (@document.attr 'toc-class', 'toc'))
4
+ - toc_title_id = nil
5
+ - toc_title = title? ? title : (@document.attr 'toc-title')
6
+ - toc_levels = (attr? :levels) ? (attr :levels).to_i : (@document.attr :toclevels, 2).to_i
7
+ - if !toc_id && (@document.embedded? || !(@document.attr? 'toc-placement'))
8
+ - toc_id = 'toc'
9
+ - toc_title_id = 'toctitle'
10
+ div id=toc_id class=toc_role
11
+ .title id=toc_title_id =toc_title
12
+ =Asciidoctor::HTML5::DocumentTemplate.outline(@document, toc_levels)
@@ -0,0 +1,25 @@
1
+ - if (checklist = (option? 'checklist') ? 'checklist' : nil)
2
+ - if option? 'interactive'
3
+ - marker_checked = '<input type="checkbox" data-item-complete="1" checked>'
4
+ - marker_unchecked = '<input type="checkbox" data-item-complete="0">'
5
+ - else
6
+ - if @document.attr? :icons, 'font'
7
+ - marker_checked = '<i class="icon-check"></i>'
8
+ - marker_unchecked = '<i class="icon-check-empty"></i>'
9
+ - else
10
+ / could use &#9745 (checked ballot) and &#9744 (ballot) w/o font instead
11
+ - marker_checked = '<input type="checkbox" data-item-complete="1" checked disabled>'
12
+ - marker_unchecked = '<input type="checkbox" data-item-complete="0" disabled>'
13
+ .ulist id=@id class=[checklist,@style,role]
14
+ - if title?
15
+ .title=title
16
+ ul class=(checklist || @style)
17
+ - items.each do |item|
18
+ li
19
+ p
20
+ - if checklist && (item.attr? :checkbox)
21
+ =%(#{(item.attr? :checked) ? marker_checked : marker_unchecked}#{item.text})
22
+ - else
23
+ =item.text
24
+ - if item.blocks?
25
+ =item.content
@@ -0,0 +1,14 @@
1
+ .verseblock id=@id class=role
2
+ - if title?
3
+ .title=title
4
+ pre.content=content
5
+ - attribution = (attr? :attribution) ? (attr :attribution) : nil
6
+ - citetitle = (attr? :citetitle) ? (attr :citetitle) : nil
7
+ - if attribution || citetitle
8
+ .attribution
9
+ - if citetitle
10
+ cite=citetitle
11
+ - if attribution
12
+ - if citetitle
13
+ br
14
+ | &#8212; #{attribution}
@@ -0,0 +1,27 @@
1
+ .videoblock id=@id class=[@style,role]
2
+ - if title?
3
+ .title=captioned_title
4
+ .content
5
+ - case attr :poster
6
+ - when 'vimeo'
7
+ - start_anchor = (attr? :start) ? "#at=#{attr :start}" : nil
8
+ - delimiter = '?'
9
+ - autoplay_param = (option? 'autoplay') ? "#{delimiter}autoplay=1" : nil
10
+ - delimiter = '&amp;' if autoplay_param
11
+ - loop_param = (option? 'loop') ? "#{delimiter}loop=1" : nil
12
+ - src = %(//player.vimeo.com/video/#{attr :target}#{start_anchor}#{autoplay_param}#{loop_param})
13
+ iframe width=(attr :width) height=(attr :height) src=src frameborder=0 webkitAllowFullScreen=true mozallowfullscreen=true allowFullScreen=true
14
+ - when 'youtube'
15
+ - params = ['rel=0']
16
+ - params << "start=#{attr :start}" if attr? :start
17
+ - params << "end=#{attr :end}" if attr? :end
18
+ - params << "autoplay=1" if option? 'autoplay'
19
+ - params << "loop=1" if option? 'loop'
20
+ - params << "controls=0" if option? 'nocontrols'
21
+ - src = %(//www.youtube.com/embed/#{attr :target}?#{params * '&amp;'})
22
+ iframe width=(attr :width) height=(attr :height) src=src frameborder=0 allowfullscreen=!(option? 'nofullscreen')
23
+ - else
24
+ video(src=media_uri(attr :target) width=(attr :width) height=(attr :height)
25
+ poster=((attr :poster) ? media_uri(attr :poster) : nil) autoplay=(option? 'autoplay')
26
+ controls=!(option? 'nocontrols') loop=(option? 'loop'))
27
+ |Your browser does not support the video tag.
@@ -0,0 +1,162 @@
1
+ - revealjsdir = (attr :revealjsdir, 'revealjs-redhat')
2
+ doctype 5
3
+ html lang=(attr :lang, 'en' unless attr? :nolang)
4
+ head
5
+ meta charset="utf-8"
6
+ - [:description, :keywords, :author, :copyright].each do |key|
7
+ - if attr? key
8
+ meta name=key content=(attr key)
9
+
10
+ title=((doctitle :sanitize => true) || (attr 'untitled-label'))
11
+ meta name="apple-mobile-web-app-capable" content="yes"
12
+ meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"
13
+ meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
14
+
15
+ link href="#{revealjsdir}/lib/css/offline-v2.css" rel="stylesheet"
16
+ link href="#{revealjsdir}/lib/css/theme-output.css" rel="stylesheet"
17
+ - if attr? :icons, 'font'
18
+ - if attr? 'iconfont-remote'
19
+ link rel='stylesheet' href=(attr 'iconfont-cdn', 'http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css')
20
+ - else
21
+ link rel='stylesheet' href=(attr :revealjs_vendor_stylesdir, "#{revealjsdir}/lib/css/#{attr 'iconfont-name', 'font-awesome'}.css")
22
+ - if attr? :revealjs_customtheme
23
+ link rel='stylesheet' href=(attr :revealjs_customtheme) id='theme'
24
+ - else
25
+ link rel='stylesheet' href='#{revealjsdir}/lib/css/#{attr 'revealjs_theme', 'gpe'}.css' id='theme'
26
+
27
+ // For syntax highlighting
28
+ // link href="revealjs/lib/css/zenburn.css" rel="stylesheet"
29
+
30
+ - case attr 'source-highlighter'
31
+ - when 'coderay'
32
+ - if (attr 'coderay-css', 'class') == 'class'
33
+ - if @safe >= Asciidoctor::SafeMode::SECURE || (attr? :linkcss)
34
+ link rel='stylesheet' href=normalize_web_path('asciidoctor-coderay.css', (attr :stylesdir, ''))
35
+ - else
36
+ style=Asciidoctor::HTML5.default_coderay_stylesheet
37
+ - when 'pygments'
38
+ - if (attr 'pygments-css', 'class') == 'class'
39
+ - if @safe >= Asciidoctor::SafeMode::SECURE || (attr? :linkcss)
40
+ link rel='stylesheet' href=normalize_web_path('asciidoctor-pygments.css', (attr :stylesdir, ''))
41
+ - else
42
+ style=Asciidoctor::HTML5.pygments_stylesheet(attr 'pygments-style')
43
+ - when 'highlightjs'
44
+ link rel='stylesheet' href="#{attr :highlightjsdir, 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4'}/styles/#{attr 'highlightjs-theme', 'default'}.min.css"
45
+ script src="#{attr :highlightjsdir, 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4'}/highlight.min.js"
46
+ script hljs.initHighlightingOnLoad()
47
+ - when 'prettify'
48
+ link rel='stylesheet' href="#{attr :prettifydir, 'http://cdnjs.cloudflare.com/ajax/libs/prettify/r298'}/#{attr 'prettify-theme', 'prettify'}.min.css"
49
+ script src="#{attr :prettifydir, 'http://cdnjs.cloudflare.com/ajax/libs/prettify/r298'}/prettify.min.js"
50
+ script document.addEventListener('DOMContentLoaded', prettyPrint)
51
+
52
+ // If the query includes 'print-pdf', use the PDF print sheet
53
+ javascript:
54
+ document.write( '<link rel="stylesheet" href="#{revealjsdir}/lib/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
55
+ body class="theme-font-overpass"
56
+ .reveal
57
+ // - if attr? :header_image_path
58
+ // .header
59
+ // img src=image_uri(attr :header_image_path)
60
+ // Any section element inside of this container is displayed as a slide
61
+ .slides
62
+ =content
63
+ script src="#{revealjsdir}/lib/js/head.min.js"
64
+ script src="#{revealjsdir}/lib/js/reveal.min.js"
65
+ javascript:
66
+ // Full list of configuration options available here:
67
+ // https://github.com/hakimel/reveal.js#configuration
68
+ Reveal.initialize({
69
+
70
+ controls: #{attr 'revealjs_controls', 'true'},
71
+ // Display a presentation progress bar
72
+ progress: #{attr 'revealjs_progress', 'true'},
73
+ // Display the page number of the current slide
74
+ slideNumber: #{attr 'revealjs_slidenumber', 'true'},
75
+ // Push each slide change to the browser history
76
+ history: #{attr 'revealjs_history', 'true'},
77
+ // Enable keyboard shortcuts for navigation
78
+ keyboard: #{attr 'revealjs_keyboard', 'true'},
79
+ // Enable the slide overview mode
80
+ overview: #{attr 'revealjs_overview', 'true'},
81
+ // Vertical centering of slides
82
+ center: #{attr 'revealjs_center', 'false'},
83
+ // Enables touch navigation on devices with touch input
84
+ touch: #{attr 'revealjs_touch', 'true'},
85
+ // Loop the presentation
86
+ loop: #{attr 'revealjs_loop', 'false'},
87
+ // Change the presentation direction to be RTL
88
+ rtl: #{attr 'revealjs_rtl', 'false'},
89
+ // Turns fragments on and off globally
90
+ fragments: #{attr 'revealjs_fragments', 'true'},
91
+ // Flags if the presentation is running in an embedded mode,
92
+ // i.e. contained within a limited portion of the screen
93
+ embedded: #{attr 'revealjs_embedded', 'false'},
94
+ // Number of milliseconds between automatically proceeding to the
95
+ // next slide, disabled when set to 0, this value can be overwritten
96
+ // by using a data-autoslide attribute on your slides
97
+ autoSlide: #{attr 'revealjs_autoslide', 0},
98
+ // Stop auto-sliding after user input
99
+ autoSlideStoppable: #{attr 'revealjs_autoslidestoppable', 'true'},
100
+ // Enable slide navigation via mouse wheel
101
+ mouseWheel: #{attr 'revealjs_mousewheel', 'false'},
102
+ // Hides the address bar on mobile devices
103
+ hideAddressBar: #{attr 'revealjs_hideaddressbar', 'true'},
104
+ // Opens links in an iframe preview overlay
105
+ previewLinks: #{attr 'revealjs_previewlinks', 'false'},
106
+ // Transition style (e.g., none, fade, slide, convex, concave, zoom)
107
+ transition: Reveal.getQueryHash().transition || '#{attr 'revealjs_transition', 'none'}',
108
+ // Transition speed (e.g., default, fast, slow)
109
+ transitionSpeed: '#{attr 'revealjs_transitionspeed', 'default'}',
110
+ // Transition style for full page slide backgrounds (e.g., none, fade, slide, convex, concave, zoom)
111
+ backgroundTransition: '#{attr 'revealjs_backgroundtransition', 'fade'}',
112
+ // Number of slides away from the current that are visible
113
+ viewDistance: #{attr 'revealjs_viewdistance', 3},
114
+ // Parallax background image (e.g., "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'")
115
+ parallaxBackgroundImage: '#{attr 'revealjs_parallaxbackgroundimage', ''}',
116
+ // Parallax background size in CSS syntax (e.g., "2100px 900px")
117
+ parallaxBackgroundSize: '#{attr 'revealjs_parallaxbackgroundsize', ''}',
118
+ // Optional libraries used to extend on reveal.js
119
+
120
+ margin: 0.2, // NOT_USED (slides.com)
121
+
122
+ // Theme (e.g., beige, black, blood, league, moon, night, serif, simple, sky, solarized, white)
123
+ // NOTE setting the theme in the config no longer works in reveal.js 3.x
124
+ theme: Reveal.getQueryHash().theme || '#{attr 'revealjs_theme', 'gpe2'}',
125
+
126
+ notes: {},
127
+
128
+ // Optional libraries used to extend on reveal.js
129
+ dependencies: [
130
+ {
131
+ src: '#{revealjsdir}/lib/plugin/markdown/marked.js', condition: function () {
132
+ return !!document.querySelector('[data-markdown]');
133
+ }
134
+ },
135
+ {
136
+ src: '#{revealjsdir}/lib/plugin/markdown/markdown.js', condition: function () {
137
+ return !!document.querySelector('[data-markdown]');
138
+ }
139
+ },
140
+ {
141
+ src: '#{revealjsdir}/lib/plugin/highlight/highlight.js', async: true, condition: function () {
142
+ return !!document.querySelector('pre code');
143
+ },
144
+ callback: function () {
145
+ hljs.initHighlightingOnLoad();
146
+ }
147
+ },
148
+ { // DOES NOT WORK ANYMORE
149
+ src: '#{revealjsdir}/lib/plugin/zoom-js/zoom.js', async: true, condition: function () {
150
+ return !!document.body.classList;
151
+ }
152
+ },
153
+ {
154
+ src: '#{revealjsdir}/lib/plugin/notes/notes.js', async: true, condition: function () {
155
+ return !!document.body.classList;
156
+ }
157
+ }
158
+ ]
159
+ // TODO : Add a parameter to enable/disable REMOTE
160
+ // { src: 'revealjs/plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } },
161
+ });
162
+