reveal.rb 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/.travis.yml +2 -1
- data/Dockerfile +4 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +7 -1
- data/README.md +1 -1
- data/lib/reveal/command.rb +9 -3
- data/lib/reveal/templates/revealjs/css/print/paper.css +4 -3
- data/lib/reveal/templates/revealjs/css/print/pdf.css +59 -38
- data/lib/reveal/templates/revealjs/css/reveal.css +654 -274
- data/lib/reveal/templates/revealjs/css/theme/beige.css +65 -68
- data/lib/reveal/templates/revealjs/css/theme/black.css +58 -61
- data/lib/reveal/templates/revealjs/css/theme/blood.css +64 -62
- data/lib/reveal/templates/revealjs/css/theme/league.css +59 -62
- data/lib/reveal/templates/revealjs/css/theme/moon.css +59 -62
- data/lib/reveal/templates/revealjs/css/theme/night.css +58 -61
- data/lib/reveal/templates/revealjs/css/theme/serif.css +56 -59
- data/lib/reveal/templates/revealjs/css/theme/simple.css +60 -60
- data/lib/reveal/templates/revealjs/css/theme/sky.css +59 -62
- data/lib/reveal/templates/revealjs/css/theme/solarized.css +59 -62
- data/lib/reveal/templates/revealjs/css/theme/white.css +59 -62
- data/lib/reveal/templates/revealjs/index.html +14 -376
- data/lib/reveal/templates/revealjs/js/reveal.js +1073 -342
- data/lib/reveal/templates/revealjs/lib/css/zenburn.css +41 -78
- data/lib/reveal/templates/revealjs/lib/js/head.min.js +9 -8
- data/lib/reveal/templates/revealjs/plugin/highlight/highlight.js +51 -4
- data/lib/reveal/templates/revealjs/plugin/markdown/markdown.js +38 -19
- data/lib/reveal/templates/revealjs/plugin/markdown/marked.js +1 -1
- data/lib/reveal/templates/revealjs/plugin/math/math.js +5 -2
- data/lib/reveal/templates/revealjs/plugin/multiplex/client.js +1 -1
- data/lib/reveal/templates/revealjs/plugin/multiplex/index.js +24 -16
- data/lib/reveal/templates/revealjs/plugin/multiplex/master.js +26 -43
- data/lib/reveal/templates/revealjs/plugin/multiplex/package.json +19 -0
- data/lib/reveal/templates/revealjs/plugin/notes/notes.html +385 -32
- data/lib/reveal/templates/revealjs/plugin/notes/notes.js +39 -6
- data/lib/reveal/templates/revealjs/plugin/notes-server/client.js +6 -1
- data/lib/reveal/templates/revealjs/plugin/notes-server/index.js +17 -14
- data/lib/reveal/templates/revealjs/plugin/notes-server/notes.html +215 -26
- data/lib/reveal/templates/revealjs/plugin/print-pdf/print-pdf.js +48 -27
- data/lib/reveal/templates/revealjs/plugin/search/search.js +41 -31
- data/lib/reveal/templates/revealjs/plugin/zoom-js/zoom.js +17 -23
- data/lib/reveal/templates/template.html +12 -41
- data/lib/reveal/version.rb +1 -1
- data/spec/lib/reveal/command_spec.rb +37 -0
- metadata +14 -16
- data/lib/reveal/templates/revealjs/lib/font/league-gothic/LICENSE +0 -2
- data/lib/reveal/templates/revealjs/lib/font/source-sans-pro/LICENSE +0 -45
- data/lib/reveal/templates/revealjs/plugin/leap/leap.js +0 -159
- data/lib/reveal/templates/revealjs/plugin/remotes/remotes.js +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f7921d1fb3b79d3a3c6e0bc199e852771aad9fdc8fa1fca52a5ffe57818a5287
|
4
|
+
data.tar.gz: 3336b6893c710f92cb3286c42bc717f71969fe67f76cff4500d3089d1672c420
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4abcbedc07d7ef7acb63a5fdf17e278f1e9e238e76ac8f9e81eb572e559422aa4842c2c839f0ab41ccefae8f9e08e771080c84948958403f8002b5710d501c37
|
7
|
+
data.tar.gz: c7e8916291214a6c1b950a9956efeac5877f4b042e26d7f8b8d212ffff5efa350d867acf20ab61f847c4c0e045eb05188ed28275a0fa378ccaa33b4c661f7a91
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.5.1
|
data/.travis.yml
CHANGED
data/Dockerfile
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/reveal/command.rb
CHANGED
@@ -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,
|
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,
|
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,
|
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:
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
/*
|
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
|
-
|
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:
|
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
|
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
|
-
|
142
|
+
height: 100%;
|
143
|
+
z-index: auto !important;
|
151
144
|
}
|
152
|
-
|
153
|
-
|
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
|
-
|
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
|
+
}
|