reveal.rb 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +5 -5
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +2 -1
  4. data/Dockerfile +4 -0
  5. data/Gemfile +1 -1
  6. data/Gemfile.lock +7 -1
  7. data/README.md +1 -1
  8. data/lib/reveal/command.rb +9 -3
  9. data/lib/reveal/templates/revealjs/css/print/paper.css +4 -3
  10. data/lib/reveal/templates/revealjs/css/print/pdf.css +59 -38
  11. data/lib/reveal/templates/revealjs/css/reveal.css +654 -274
  12. data/lib/reveal/templates/revealjs/css/theme/beige.css +65 -68
  13. data/lib/reveal/templates/revealjs/css/theme/black.css +58 -61
  14. data/lib/reveal/templates/revealjs/css/theme/blood.css +64 -62
  15. data/lib/reveal/templates/revealjs/css/theme/league.css +59 -62
  16. data/lib/reveal/templates/revealjs/css/theme/moon.css +59 -62
  17. data/lib/reveal/templates/revealjs/css/theme/night.css +58 -61
  18. data/lib/reveal/templates/revealjs/css/theme/serif.css +56 -59
  19. data/lib/reveal/templates/revealjs/css/theme/simple.css +60 -60
  20. data/lib/reveal/templates/revealjs/css/theme/sky.css +59 -62
  21. data/lib/reveal/templates/revealjs/css/theme/solarized.css +59 -62
  22. data/lib/reveal/templates/revealjs/css/theme/white.css +59 -62
  23. data/lib/reveal/templates/revealjs/index.html +14 -376
  24. data/lib/reveal/templates/revealjs/js/reveal.js +1073 -342
  25. data/lib/reveal/templates/revealjs/lib/css/zenburn.css +41 -78
  26. data/lib/reveal/templates/revealjs/lib/js/head.min.js +9 -8
  27. data/lib/reveal/templates/revealjs/plugin/highlight/highlight.js +51 -4
  28. data/lib/reveal/templates/revealjs/plugin/markdown/markdown.js +38 -19
  29. data/lib/reveal/templates/revealjs/plugin/markdown/marked.js +1 -1
  30. data/lib/reveal/templates/revealjs/plugin/math/math.js +5 -2
  31. data/lib/reveal/templates/revealjs/plugin/multiplex/client.js +1 -1
  32. data/lib/reveal/templates/revealjs/plugin/multiplex/index.js +24 -16
  33. data/lib/reveal/templates/revealjs/plugin/multiplex/master.js +26 -43
  34. data/lib/reveal/templates/revealjs/plugin/multiplex/package.json +19 -0
  35. data/lib/reveal/templates/revealjs/plugin/notes/notes.html +385 -32
  36. data/lib/reveal/templates/revealjs/plugin/notes/notes.js +39 -6
  37. data/lib/reveal/templates/revealjs/plugin/notes-server/client.js +6 -1
  38. data/lib/reveal/templates/revealjs/plugin/notes-server/index.js +17 -14
  39. data/lib/reveal/templates/revealjs/plugin/notes-server/notes.html +215 -26
  40. data/lib/reveal/templates/revealjs/plugin/print-pdf/print-pdf.js +48 -27
  41. data/lib/reveal/templates/revealjs/plugin/search/search.js +41 -31
  42. data/lib/reveal/templates/revealjs/plugin/zoom-js/zoom.js +17 -23
  43. data/lib/reveal/templates/template.html +12 -41
  44. data/lib/reveal/version.rb +1 -1
  45. data/spec/lib/reveal/command_spec.rb +37 -0
  46. metadata +14 -16
  47. data/lib/reveal/templates/revealjs/lib/font/league-gothic/LICENSE +0 -2
  48. data/lib/reveal/templates/revealjs/lib/font/source-sans-pro/LICENSE +0 -45
  49. data/lib/reveal/templates/revealjs/plugin/leap/leap.js +0 -159
  50. data/lib/reveal/templates/revealjs/plugin/remotes/remotes.js +0 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: aeddfdafa8a8712ac291c0450ae335e32b21e895
4
- data.tar.gz: 618130631940cf2a6aaa464045eb93cac66f18b7
2
+ SHA256:
3
+ metadata.gz: f7921d1fb3b79d3a3c6e0bc199e852771aad9fdc8fa1fca52a5ffe57818a5287
4
+ data.tar.gz: 3336b6893c710f92cb3286c42bc717f71969fe67f76cff4500d3089d1672c420
5
5
  SHA512:
6
- metadata.gz: c43a12a10adc8869ee97bacc1be19539d9449084e3daa28b2845d5648dcb13b25db6ed7bfe673235cee911a4ab43283eb54bdef1e12b15c4b3488e11c6260672
7
- data.tar.gz: a0d3306ccd4bcf3dfe94e3846aabaf6501b7b7531a83a3e9d752e91a30e93621cc49cb7966dcfb92a77ec6330bc0e8117fa7027fc55f4dffb9f2e2c7e2067194
6
+ metadata.gz: 4abcbedc07d7ef7acb63a5fdf17e278f1e9e238e76ac8f9e81eb572e559422aa4842c2c839f0ab41ccefae8f9e08e771080c84948958403f8002b5710d501c37
7
+ data.tar.gz: c7e8916291214a6c1b950a9956efeac5877f4b042e26d7f8b8d212ffff5efa350d867acf20ab61f847c4c0e045eb05188ed28275a0fa378ccaa33b4c661f7a91
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.0.0-p353
1
+ ruby-2.5.1
data/.travis.yml CHANGED
@@ -1,3 +1,4 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  rvm:
3
- - 2.0.0
4
+ - 2.5.1
data/Dockerfile ADDED
@@ -0,0 +1,4 @@
1
+ FROM ruby:2.5-alpine
2
+ MAINTAINER Guilherme Garnier <guilherme.garnier@gmail.com>
3
+
4
+ RUN apk update && apk add git make gcc libc-dev
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
- ruby '2.0.0'
2
+ ruby '2.5.1'
3
3
 
4
4
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- reveal.rb (0.4.0)
4
+ reveal.rb (0.5.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -26,3 +26,9 @@ DEPENDENCIES
26
26
  byebug
27
27
  m
28
28
  reveal.rb!
29
+
30
+ RUBY VERSION
31
+ ruby 2.5.1p57
32
+
33
+ BUNDLED WITH
34
+ 1.16.2
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  [reveal.js](https://github.com/hakimel/reveal.js) presentation generator.
9
9
 
10
- Current version uses reveal.js 3.1.0
10
+ Current version uses reveal.js 3.6.0
11
11
 
12
12
  ## Installation
13
13
 
@@ -8,6 +8,7 @@ module Reveal
8
8
  TEMPLATE_FILENAME = 'template.html'
9
9
  CONFIG_FILENAME = 'reveal.yml'
10
10
  SLIDES_TAG = '<slides>'
11
+ MARKDOWN_EXTENSION = 'md'
11
12
 
12
13
  class Command
13
14
  def initialize(logger = ::Logger.new(STDOUT))
@@ -37,7 +38,7 @@ module Reveal
37
38
  config['slides'] ||= []
38
39
 
39
40
  Array(args).each do |slide_name|
40
- filepath = File.join(SOURCE_DIR, "#{slide_name}.md")
41
+ filepath = File.join(SOURCE_DIR, slide_filename(slide_name))
41
42
  FileUtils.touch(filepath)
42
43
  config['slides'] << slide_name
43
44
  @logger.info("Slide '#{filepath}' created.")
@@ -82,6 +83,7 @@ module Reveal
82
83
  def templates_path
83
84
  @templates_path ||= begin
84
85
  [
86
+ File.join(File.dirname(File.expand_path(__FILE__)), 'templates'),
85
87
  File.join(File.dirname(File.expand_path($0)), '..', 'lib', 'reveal', 'templates'),
86
88
  File.join(Gem.dir, 'gems', "reveal.rb-#{Reveal::VERSION}", 'lib', 'reveal', 'templates')
87
89
  ].select { |item| File.readable?(item) }.first
@@ -91,10 +93,10 @@ module Reveal
91
93
  def ordered_slide_names
92
94
  if config && config['order'] == 'manual' && config['slides']
93
95
  config['slides'].
94
- map { |slide_name| File.join(SOURCE_DIR, "#{slide_name}.md") }.
96
+ map { |slide_name| File.join(SOURCE_DIR, slide_filename(slide_name)) }.
95
97
  select { |filepath| File.readable?(filepath) }
96
98
  else
97
- Dir.glob(File.join(SOURCE_DIR, '*.md'))
99
+ Dir.glob(File.join(SOURCE_DIR, "*.#{MARKDOWN_EXTENSION}"))
98
100
  end
99
101
  end
100
102
 
@@ -105,5 +107,9 @@ module Reveal
105
107
  def write_config
106
108
  File.write(CONFIG_FILENAME, config.to_yaml)
107
109
  end
110
+
111
+ def slide_filename(slide_name)
112
+ slide_name =~ /\.#{MARKDOWN_EXTENSION}$/ ? slide_name : "#{slide_name}.#{MARKDOWN_EXTENSION}"
113
+ end
108
114
  end
109
115
  end
@@ -38,7 +38,8 @@
38
38
  .share-reveal,
39
39
  .state-background,
40
40
  .reveal .progress,
41
- .reveal .backgrounds {
41
+ .reveal .backgrounds,
42
+ .reveal .slide-number {
42
43
  display: none !important;
43
44
  }
44
45
 
@@ -141,7 +142,7 @@
141
142
  .reveal .slides section {
142
143
  visibility: visible !important;
143
144
  position: static !important;
144
- width: 100% !important;
145
+ width: auto !important;
145
146
  height: auto !important;
146
147
  display: block !important;
147
148
  overflow: visible !important;
@@ -199,4 +200,4 @@
199
200
  font-size: 0.8em;
200
201
  }
201
202
 
202
- }
203
+ }
@@ -1,15 +1,9 @@
1
- /* Default Print Stylesheet Template
2
- by Rob Glazebrook of CSSnewbie.com
3
- Last Updated: June 4, 2008
4
-
5
- Feel free (nay, compelled) to edit, append, and
6
- manipulate this file as you see fit. */
7
-
8
-
9
- /* SECTION 1: Set default width, margin, float, and
10
- background. This prevents elements from extending
11
- beyond the edge of the printed page, and prevents
12
- unnecessary background images from printing */
1
+ /**
2
+ * This stylesheet is used to print reveal.js
3
+ * presentations to PDF.
4
+ *
5
+ * https://github.com/hakimel/reveal.js#pdf-export
6
+ */
13
7
 
14
8
  * {
15
9
  -webkit-print-color-adjust: exact;
@@ -29,12 +23,10 @@ html {
29
23
  overflow: visible;
30
24
  }
31
25
 
32
- /* SECTION 2: Remove any elements not needed in print.
33
- This would include navigation, ads, sidebars, etc. */
26
+ /* Remove any elements not needed in print. */
34
27
  .nestedarrow,
35
28
  .reveal .controls,
36
29
  .reveal .progress,
37
- .reveal .slide-number,
38
30
  .reveal .playback,
39
31
  .reveal.overview,
40
32
  .fork-reveal,
@@ -43,16 +35,7 @@ html {
43
35
  display: none !important;
44
36
  }
45
37
 
46
- /* SECTION 3: Set body font face, size, and color.
47
- Consider using a serif font for readability. */
48
- body, p, td, li, div {
49
-
50
- }
51
-
52
- /* SECTION 4: Set heading font face, sizes, and color.
53
- Differentiate your headings from your body text.
54
- Perhaps use a large sans-serif for distinction. */
55
- h1,h2,h3,h4,h5,h6 {
38
+ h1, h2, h3, h4, h5, h6 {
56
39
  text-shadow: 0 0 0 #000 !important;
57
40
  }
58
41
 
@@ -61,8 +44,6 @@ h1,h2,h3,h4,h5,h6 {
61
44
  font-family: Courier, 'Courier New', monospace !important;
62
45
  }
63
46
 
64
-
65
- /* SECTION 5: more reveal.js specific additions by @skypanther */
66
47
  ul, ol, div, p {
67
48
  visibility: visible;
68
49
  position: static;
@@ -79,8 +60,9 @@ ul, ol, div, p {
79
60
  }
80
61
  .reveal .slides {
81
62
  position: static;
82
- width: 100%;
83
- height: auto;
63
+ width: 100% !important;
64
+ height: auto !important;
65
+ zoom: 1 !important;
84
66
 
85
67
  left: auto;
86
68
  top: auto;
@@ -100,13 +82,19 @@ ul, ol, div, p {
100
82
  -ms-perspective-origin: 50% 50%;
101
83
  perspective-origin: 50% 50%;
102
84
  }
103
- .reveal .slides section {
104
- page-break-after: always !important;
105
85
 
86
+ .reveal .slides .pdf-page {
87
+ position: relative;
88
+ overflow: hidden;
89
+ z-index: 1;
90
+
91
+ page-break-after: always;
92
+ }
93
+
94
+ .reveal .slides section {
106
95
  visibility: visible !important;
107
- position: relative !important;
108
96
  display: block !important;
109
- position: relative !important;
97
+ position: absolute !important;
110
98
 
111
99
  margin: 0 !important;
112
100
  padding: 0 !important;
@@ -125,33 +113,66 @@ ul, ol, div, p {
125
113
  -ms-transform: none !important;
126
114
  transform: none !important;
127
115
  }
116
+
128
117
  .reveal section.stack {
118
+ position: relative !important;
129
119
  margin: 0 !important;
130
120
  padding: 0 !important;
131
121
  page-break-after: avoid !important;
132
122
  height: auto !important;
133
123
  min-height: auto !important;
134
124
  }
125
+
135
126
  .reveal img {
136
127
  box-shadow: none;
137
128
  }
129
+
138
130
  .reveal .roll {
139
131
  overflow: visible;
140
132
  line-height: 1em;
141
133
  }
142
134
 
143
135
  /* Slide backgrounds are placed inside of their slide when exporting to PDF */
144
- .reveal section .slide-background {
136
+ .reveal .slide-background {
145
137
  display: block !important;
146
138
  position: absolute;
147
139
  top: 0;
148
140
  left: 0;
149
141
  width: 100%;
150
- z-index: -1;
142
+ height: 100%;
143
+ z-index: auto !important;
151
144
  }
152
- /* All elements should be above the slide-background */
153
- .reveal section>* {
145
+
146
+ /* Display slide speaker notes when 'showNotes' is enabled */
147
+ .reveal.show-notes {
148
+ max-width: none;
149
+ max-height: none;
150
+ }
151
+ .reveal .speaker-notes-pdf {
152
+ display: block;
153
+ width: 100%;
154
+ height: auto;
155
+ max-height: none;
156
+ top: auto;
157
+ right: auto;
158
+ bottom: auto;
159
+ left: auto;
160
+ z-index: 100;
161
+ }
162
+
163
+ /* Layout option which makes notes appear on a separate page */
164
+ .reveal .speaker-notes-pdf[data-layout="separate-page"] {
154
165
  position: relative;
155
- z-index: 1;
166
+ color: inherit;
167
+ background-color: transparent;
168
+ padding: 20px;
169
+ page-break-after: always;
170
+ border: 0;
156
171
  }
157
172
 
173
+ /* Display slide numbers when 'slideNumber' is enabled */
174
+ .reveal .slide-number-pdf {
175
+ display: block;
176
+ position: absolute;
177
+ font-size: 14px;
178
+ }