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
@@ -0,0 +1,19 @@
1
+ // .images
2
+ // Demonstration of revealjs images embedding with some options.
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Images tests
6
+ :imagesdir: images
7
+
8
+ == Normal
9
+
10
+ image::web_surfing_time.gif[]
11
+
12
+ == Stretched
13
+
14
+ [.stretch]
15
+ image::web_surfing_time.gif[]
16
+
17
+ == Hardcoded
18
+
19
+ image::web_surfing_time.gif[width="1200"]
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,24 @@
1
+ // .keyboard-shortcuts
2
+ // Demonstration of keyboard shortcuts extension.
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Keyboard shortcuts
6
+ :experimental:
7
+
8
+ == Some shortcuts
9
+
10
+ |===
11
+ |Shortcut |Purpose
12
+
13
+ |kbd:[F11]
14
+ |Toggle fullscreen
15
+
16
+ |kbd:[Ctrl+T]
17
+ |Open a new tab
18
+
19
+ |kbd:[Ctrl+Shift+N]
20
+ |New incognito window
21
+
22
+ |kbd:[Ctrl + +]
23
+ |Increase zoom
24
+ |===
@@ -0,0 +1,44 @@
1
+ // .sections
2
+ // Demonstration of section levels and their specific reveal.js integration.
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Levels
6
+ :backend: revealjs
7
+
8
+ == First level
9
+
10
+ First content
11
+
12
+ == Vertical
13
+
14
+ Vertical slides are using level 2 sections (`===`)
15
+
16
+ Press down arrow.
17
+
18
+ === Level 3
19
+
20
+ Level 3 (`====`), rendered as `<h3>` is now supported.
21
+
22
+ ==== Like this
23
+
24
+ === Deeper
25
+
26
+ ==== l3
27
+
28
+ ===== l4
29
+
30
+ ====== l5
31
+
32
+ == Horizontal slide
33
+
34
+ ==== Also supports levels
35
+
36
+ But they issue warnings during render
37
+
38
+ == Horizontal sections
39
+
40
+ ==== l3
41
+
42
+ ===== l4
43
+
44
+ ====== l5
@@ -0,0 +1,66 @@
1
+ // .multiple-backend-destination
2
+ // Demonstration of having the same AsciiDoc source generate different files based on usage context.
3
+ // This test will only test the revealjs render.
4
+ // :include: //div[@class="slides"]
5
+ // :header_footer:
6
+ = My Doc
7
+ John Doe <John@example.net>
8
+ :revdate: 2016-04-26
9
+
10
+ == Main section
11
+
12
+ === Sub Section lvl 2
13
+
14
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sapien ex, elementum nec scelerisque id, condimentum nec nulla. Integer dignissim faucibus ullamcorper. Morbi eget mauris molestie, facilisis augue nec, vulputate metus. Ut volutpat risus lorem, id tempus ex egestas vel. Sed quis accumsan tellus. Suspendisse interdum augue vel augue rhoncus sodales. Ut at ultrices nulla. Sed id iaculis tellus. Pellentesque efficitur diam sit amet diam lobortis, in bibendum lectus ornare.
15
+
16
+ === Sub Section lvl 3
17
+
18
+ Small +
19
+ Multiline +
20
+ intro
21
+
22
+ . very
23
+ . long
24
+ . list
25
+ . of
26
+ . items
27
+
28
+ ifdef::backend-revealjs[=== !]
29
+
30
+ Some overview
31
+
32
+ ----
33
+ +-------------------------------------------------+
34
+ | Big Picture |
35
+ | +-------------+ +-----------+ +-------------+ |
36
+ | | | | | | | |
37
+ | | | | | | | |
38
+ | | | | | | | |
39
+ | | | | | | | |
40
+ | +-------------+ +-----------+ +-------------+ |
41
+ | |
42
+ | +-------------+ +-----------+ +-------------+ |
43
+ | | | | | | | |
44
+ | | | | Focus | | | |
45
+ | | | | Here | | | |
46
+ | | | | | | | |
47
+ | +-------------+ +-----------+ +-------------+ |
48
+ | |
49
+ +-------------------------------------------------+
50
+ ----
51
+
52
+ ifdef::backend-revealjs[=== !]
53
+
54
+ Detailed view
55
+
56
+ ----
57
+ +---------------------------------------------------+
58
+ | +---------------------------------------------+ |
59
+ | | | | | | |
60
+ | | | | | | |
61
+ | +---------------------------------------------+ |
62
+ | | | | IMPORTANT | | |
63
+ | | | | DATA | | |
64
+ | +---------------------------------------------+ |
65
+ +---------------------------------------------------+
66
+ ----
@@ -0,0 +1,22 @@
1
+ // .stretch_class
2
+ // This example shows the impact of using the reveal.js special stretch CSS class
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Stretch class
6
+
7
+ == First slide
8
+
9
+ Some content
10
+
11
+ Nothing stretched
12
+
13
+ See?
14
+
15
+ == Second slide
16
+
17
+ Some content
18
+
19
+ [.stretch]
20
+ Stretched
21
+
22
+ See?
@@ -0,0 +1,18 @@
1
+ // .revealjs-slide-state
2
+ // Demonstration of adding state to a slide and that it can be used by CSS.
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Title
6
+ :topic: state=title,background-color=white
7
+ :customcss: slide-state.css
8
+
9
+ == First slide
10
+
11
+ Content
12
+
13
+ [{topic}]
14
+ == Topic slide
15
+
16
+ == Second slide
17
+
18
+ Content
@@ -0,0 +1,6 @@
1
+ @import 'https://fonts.googleapis.com/css?family=Baloo+Bhai';
2
+
3
+ section[data-state="title"] h2 {
4
+ font-family: 'Baloo Bhai', cursive;
5
+ font-size: 4em;
6
+ }
@@ -0,0 +1,20 @@
1
+ // .source-callouts
2
+ // Demonstration of source callouts
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Presentation
6
+ Me
7
+ :icons: font
8
+ :source-highlighter: highlightjs
9
+ // FIXME coderay, pygments and rouge should also be tested
10
+
11
+ == Callout
12
+
13
+ // FIXME source callouts are broken right now
14
+ [source, rust]
15
+ ----
16
+ fn main() {
17
+ println!("Hello World!"); // <1>
18
+ }
19
+ ----
20
+ <1> `println!` is a macro.
@@ -0,0 +1,21 @@
1
+ // .speaker-notes
2
+ // Demonstration of speaker notes
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Title Slide
6
+ :backend: revealjs
7
+
8
+ == Slide One
9
+
10
+ * Foo
11
+ * Bar
12
+ * World
13
+
14
+ == Slide Two
15
+
16
+ Hello World - Good Bye Cruel World
17
+
18
+ [NOTE.speaker]
19
+ --
20
+ Actually things aren't that bad
21
+ --
@@ -0,0 +1,33 @@
1
+ // .theme-custom
2
+ // Use of the revealjs_theme attribute to load a different revealjs theme
3
+ // :include: //link[@rel="stylesheet"] | //body/script | //div[@class="slides"]
4
+ // :header_footer:
5
+ = OWASP Theme
6
+ :customcss: theme-custom.css
7
+ // reveal.js config
8
+ :backend: revealjs
9
+ // To use the custom theme, you'll have to add my owasp scss file to a local reveal.js copy then build
10
+ // custom theme from: https://github.com/GoSecure/reveal.js/tree/theme-owasp
11
+ // follow build instructions here: https://github.com/hakimel/reveal.js/blob/master/css/theme/README.md
12
+ :revealjs_theme: owasp
13
+ :revealjs_controls: false
14
+ :revealjs_center: false
15
+ // achieving 16:9
16
+ :revealjs_width: 1280
17
+ :revealjs_height: 720
18
+ // shorthands
19
+ :topic: .topic,background-color="#da291c"
20
+ :key: .topic,background-color="black"
21
+
22
+ [{topic}]
23
+ == A CTF, WTF is that?
24
+
25
+ [{key}]
26
+ == CTF => Capture The Flags
27
+
28
+ == Actually, they are...
29
+
30
+ * hacking games
31
+ * hacking puzzles
32
+ * computer science puzzle
33
+ * nerd puzzles
@@ -0,0 +1,33 @@
1
+ .reveal section.title h1 {
2
+ margin-top: 1em;
3
+ font-size: 4em;
4
+ }
5
+
6
+ .reveal section.title small {
7
+ margin-top: 9em;
8
+ font-weight: bold;
9
+ color: grey;
10
+ }
11
+
12
+ .reveal section.topic h2 {
13
+ margin-top: 2.5em;
14
+ font-size: 3em;
15
+ }
16
+
17
+ .reveal div.center {
18
+ margin-top: 20%;
19
+ }
20
+
21
+ .reveal section.has-dark-background h2,
22
+ .reveal section.has-dark-background h3 {
23
+ color: white !important;
24
+ border-bottom: none !important;
25
+ }
26
+
27
+ .reveal section.has-dark-background p {
28
+ color: darkgrey;
29
+ }
30
+
31
+ .reveal section span.right {
32
+ margin: 0px 0px;
33
+ }
@@ -0,0 +1,10 @@
1
+ // .preamble
2
+ // Demonstration of the presence of a preamble
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Presentation Title
6
+ Author Name
7
+
8
+ Preamble
9
+
10
+ == Slide 2
@@ -0,0 +1,10 @@
1
+ // .color
2
+ // Use of the title-slide-background-color feature of reveal.js
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = EPIC TITLE
6
+ :title-slide-background-color: red
7
+
8
+ == Next slide
9
+
10
+ Content
@@ -0,0 +1,13 @@
1
+ // .image
2
+ // Use of the title-slide-background-image feature of reveal.js
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = EPIC TITLE
6
+ :imagesdir: images
7
+ :title-slide-background-image: 70s.jpg
8
+ :title-slide-transition: zoom
9
+ :title-slide-transition-speed: fast
10
+
11
+ == Next slide
12
+
13
+ Content
@@ -0,0 +1,13 @@
1
+ // .video
2
+ // Use of the title-slide-background-video feature of reveal.js
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = EPIC TITLE
6
+ :revealjs_theme: white
7
+ :title-slide-background-video: https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4
8
+ :title-slide-background-video-loop: true
9
+ :title-slide-background-video-muted: true
10
+
11
+ == Next slide
12
+
13
+ Content
@@ -0,0 +1,7 @@
1
+ // .subtitle
2
+ // Use of the AsciiDoc automatic subtitle partitionning.
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Catch phrase: Longer more explicit title introducing the real concept
6
+
7
+ == Slide 2
@@ -0,0 +1,20 @@
1
+ // .transitions
2
+ // Demonstration of various styles of reveal.js transitions applied on a per-slide bassis.
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Slide Transitions
6
+ :backend: revealjs
7
+
8
+ == !
9
+
10
+ This
11
+
12
+ [%notitle, transition="zoom"]
13
+ == Zoom zoom
14
+
15
+ This slide will override the presentation transition and zoom!
16
+
17
+ [%notitle, transition-speed="fast"]
18
+ == Speed
19
+
20
+ Choose from three transition speeds: default, fast or slow!
@@ -0,0 +1,24 @@
1
+ // .vertical-slides
2
+ // Demonstration of reveal.js vertical slides.
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Vertical Slides
6
+ :backend: revealjs
7
+
8
+ == First slide
9
+
10
+ First content
11
+
12
+ === Vertical 1
13
+
14
+ Content
15
+
16
+ === Vertical 2
17
+
18
+ More content
19
+
20
+ ==== Another level
21
+
22
+ == Second horizontal slide
23
+
24
+ And that is all folks