slide_hero 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile +1 -1
- data/README.md +2 -2
- data/lib/slide_hero/blockquote.rb +10 -0
- data/lib/slide_hero/pluggable.rb +4 -4
- data/lib/slide_hero/plugins.rb +0 -1
- data/lib/slide_hero/presentation.rb +3 -3
- data/lib/slide_hero/slide.rb +2 -2
- data/lib/slide_hero/version.rb +1 -1
- data/lib/slide_hero/views/blockquote.html.erb +3 -0
- data/lib/slide_hero.rb +1 -0
- data/test/slide_hero/blockquote_spec.rb +13 -0
- data/test/slide_hero/plugins_spec.rb +0 -1
- data/test/slide_hero/presentation_spec.rb +2 -1
- data/test/slide_hero/slide_spec.rb +14 -3
- data/test/slide_hero_spec.rb +1 -0
- data/vendor/reveal.js/.gitignore +6 -1
- data/vendor/reveal.js/.travis.yml +1 -1
- data/vendor/reveal.js/CONTRIBUTING.md +4 -0
- data/vendor/reveal.js/Gruntfile.js +26 -24
- data/vendor/reveal.js/LICENSE +1 -1
- data/vendor/reveal.js/README.md +215 -124
- data/vendor/reveal.js/bower.json +27 -0
- data/vendor/reveal.js/css/print/paper.css +1 -1
- data/vendor/reveal.js/css/print/pdf.css +30 -27
- data/vendor/reveal.js/css/reveal.css +381 -191
- data/vendor/reveal.js/css/reveal.scss +259 -164
- data/vendor/reveal.js/css/theme/README.md +2 -6
- data/vendor/reveal.js/css/theme/beige.css +75 -49
- data/vendor/reveal.js/css/theme/black.css +64 -38
- data/vendor/reveal.js/css/theme/blood.css +75 -56
- data/vendor/reveal.js/css/theme/league.css +69 -43
- data/vendor/reveal.js/css/theme/moon.css +69 -43
- data/vendor/reveal.js/css/theme/night.css +64 -38
- data/vendor/reveal.js/css/theme/serif.css +66 -40
- data/vendor/reveal.js/css/theme/simple.css +63 -37
- data/vendor/reveal.js/css/theme/sky.css +69 -43
- data/vendor/reveal.js/css/theme/solarized.css +69 -43
- data/vendor/reveal.js/css/theme/source/black.scss +1 -1
- data/vendor/reveal.js/css/theme/source/blood.scss +3 -15
- data/vendor/reveal.js/css/theme/source/white.scss +1 -1
- data/vendor/reveal.js/css/theme/template/theme.scss +30 -23
- data/vendor/reveal.js/css/theme/white.css +69 -43
- data/vendor/reveal.js/demo.html +410 -0
- data/vendor/reveal.js/index.html +13 -371
- data/vendor/reveal.js/js/reveal.js +643 -175
- data/vendor/reveal.js/lib/css/zenburn.css +41 -78
- data/vendor/reveal.js/lib/js/head.min.js +9 -8
- data/vendor/reveal.js/package.json +20 -24
- data/vendor/reveal.js/plugin/highlight/highlight.js +4 -3
- data/vendor/reveal.js/plugin/markdown/example.html +1 -1
- data/vendor/reveal.js/plugin/markdown/markdown.js +19 -7
- data/vendor/reveal.js/plugin/markdown/marked.js +2 -33
- data/vendor/reveal.js/plugin/math/math.js +5 -2
- data/vendor/reveal.js/plugin/multiplex/client.js +1 -1
- data/vendor/reveal.js/plugin/multiplex/index.js +24 -16
- data/vendor/reveal.js/plugin/multiplex/master.js +22 -42
- data/vendor/reveal.js/plugin/multiplex/package.json +19 -0
- data/vendor/reveal.js/plugin/notes/notes.html +11 -3
- data/vendor/reveal.js/plugin/notes/notes.js +19 -5
- data/vendor/reveal.js/plugin/notes-server/client.js +6 -1
- data/vendor/reveal.js/plugin/notes-server/index.js +17 -14
- data/vendor/reveal.js/plugin/notes-server/notes.html +17 -6
- data/vendor/reveal.js/plugin/print-pdf/print-pdf.js +1 -1
- data/vendor/reveal.js/plugin/zoom-js/zoom.js +1 -1
- data/vendor/reveal.js/test/examples/slide-backgrounds.html +1 -1
- data/vendor/reveal.js/test/examples/slide-transitions.html +101 -0
- data/vendor/reveal.js/test/test-markdown-element-attributes.html +3 -3
- data/vendor/reveal.js/test/test-markdown-element-attributes.js +1 -1
- data/vendor/reveal.js/test/test.html +5 -1
- data/vendor/reveal.js/test/test.js +26 -1
- metadata +11 -5
- data/vendor/reveal.js/plugin/leap/leap.js +0 -159
- data/vendor/reveal.js/plugin/remotes/remotes.js +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 549d560ee3a562e77ada4b1d2ec9a780e0b678e9
|
4
|
+
data.tar.gz: 2a64285cb01ac43a1450aba8076965cab776e146
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dfdcbcf2471ca854baf94511105839b30febdef84f6cb96bddd46969331c7bbc8bbdaa0147c9955e2bc014b13c2ac391a42fcd8ecea27fa0ecc673b3378a004
|
7
|
+
data.tar.gz: e061029f499c6eb716b04cb3b7dc03cecb0dfca0fcc15ba558586ea5e174c9a462098520080096165ecac23ab449984b8bdb463334c797b84580205ac540d7b3
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -286,11 +286,11 @@ end
|
|
286
286
|
|
287
287
|
presentation "My Presentation" do
|
288
288
|
slide "A slide with video" do
|
289
|
-
media "video.mp4", type: video
|
289
|
+
media "video.mp4", type: :video
|
290
290
|
end
|
291
291
|
|
292
292
|
slide "A slide with video" do
|
293
|
-
media "audio.mp3", type: audio
|
293
|
+
media "audio.mp3", type: :audio
|
294
294
|
end
|
295
295
|
end
|
296
296
|
|
data/lib/slide_hero/pluggable.rb
CHANGED
@@ -20,12 +20,12 @@ module SlideHero
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def initialization_fields_from_class(klass)
|
23
|
-
fields =
|
23
|
+
fields = []
|
24
24
|
arguments = klass.instance_method(:initialize).parameters.to_h
|
25
25
|
fields << "*args" if arguments.has_key?(:req) || arguments.has_key?(:opt)
|
26
|
-
fields << "
|
27
|
-
fields << "
|
28
|
-
fields
|
26
|
+
fields << "**kwargs" if arguments.has_key?(:key)
|
27
|
+
fields << "&block" if arguments.has_key?(:block)
|
28
|
+
fields.join(",")
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
data/lib/slide_hero/plugins.rb
CHANGED
@@ -8,7 +8,6 @@ module SlideHero
|
|
8
8
|
highlight: "{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }",
|
9
9
|
zoom: "{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }",
|
10
10
|
notes: "{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }",
|
11
|
-
remote: "{ src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }",
|
12
11
|
leap: "{ src: 'plugin/leap/leap.js', async: true }"
|
13
12
|
}
|
14
13
|
end
|
@@ -11,7 +11,7 @@ module SlideHero
|
|
11
11
|
|
12
12
|
def set_plugins(*plugin_list)
|
13
13
|
if plugin_list.empty?
|
14
|
-
defaults = %i{class_list highlight notes
|
14
|
+
defaults = %i{class_list highlight notes}
|
15
15
|
plugin_list = defaults
|
16
16
|
end
|
17
17
|
|
@@ -30,9 +30,9 @@ module SlideHero
|
|
30
30
|
|
31
31
|
def compile
|
32
32
|
set_plugins if plugins.empty?
|
33
|
-
Tilt::ERBTemplate.new(File.join(SlideHero.template_path,
|
33
|
+
Tilt::ERBTemplate.new(File.join(SlideHero.template_path,
|
34
34
|
'lib/slide_hero/views/layout.html.erb')).
|
35
|
-
render(self) do
|
35
|
+
render(self) do
|
36
36
|
collected_slides
|
37
37
|
end
|
38
38
|
end
|
data/lib/slide_hero/slide.rb
CHANGED
@@ -13,7 +13,7 @@ module SlideHero
|
|
13
13
|
instance_eval(&point_block) if block_given?
|
14
14
|
end
|
15
15
|
|
16
|
-
create_plugs_for Note, Point, List, Code, Image, RemoteImage, Media
|
16
|
+
create_plugs_for Note, Point, List, Code, Image, RemoteImage, Media, Blockquote
|
17
17
|
|
18
18
|
def points
|
19
19
|
@points ||= []
|
@@ -30,7 +30,7 @@ module SlideHero
|
|
30
30
|
|
31
31
|
def data_attributes
|
32
32
|
"data-transition=\"#{transition}\"".tap do |attr|
|
33
|
-
case
|
33
|
+
case
|
34
34
|
when String(background).start_with?('http')
|
35
35
|
attr << " data-background=\"#{background}\""
|
36
36
|
when String(background).include?('.')
|
data/lib/slide_hero/version.rb
CHANGED
data/lib/slide_hero.rb
CHANGED
@@ -12,6 +12,7 @@ require_relative "slide_hero/note"
|
|
12
12
|
require_relative "slide_hero/image"
|
13
13
|
require_relative "slide_hero/remote_image"
|
14
14
|
require_relative "slide_hero/media"
|
15
|
+
require_relative "slide_hero/blockquote"
|
15
16
|
require_relative "slide_hero/slide"
|
16
17
|
require_relative "slide_hero/dsl"
|
17
18
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
module SlideHero
|
3
|
+
describe Blockquote do
|
4
|
+
it "compiles to a beautiful blockquote" do
|
5
|
+
quote = Blockquote.new(cite:"http://hostiledeveloper.com", quote: "You can't take a picture of a chess board from the top.")
|
6
|
+
quote.compile.must_equal(<<-QUOTE.strip)
|
7
|
+
<blockquote cite="http://hostiledeveloper.com">
|
8
|
+
You can't take a picture of a chess board from the top.
|
9
|
+
</blockquote>
|
10
|
+
QUOTE
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -8,7 +8,6 @@ module SlideHero
|
|
8
8
|
Plugins.reveal[:highlight].must_equal "{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }"
|
9
9
|
Plugins.reveal[:zoom].must_equal "{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }"
|
10
10
|
Plugins.reveal[:notes].must_equal "{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }"
|
11
|
-
Plugins.reveal[:remote].must_equal "{ src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }"
|
12
11
|
Plugins.reveal[:leap].must_equal "{ src: 'plugin/leap/leap.js', async: true }"
|
13
12
|
end
|
14
13
|
end
|
@@ -100,7 +100,7 @@ module SlideHero
|
|
100
100
|
|
101
101
|
it "sets default plugins if not provided" do
|
102
102
|
pres = Presentation.new("New stuff") {}
|
103
|
-
assert pres.compile.include?("{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
|
103
|
+
assert pres.compile.include?("{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }"), pres.compile
|
104
104
|
end
|
105
105
|
|
106
106
|
it "ignores invalid plugins" do
|
@@ -111,5 +111,6 @@ module SlideHero
|
|
111
111
|
assert pres.compile.include?("{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
112
112
|
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }"), pres.compile
|
113
113
|
end
|
114
|
+
|
114
115
|
end
|
115
116
|
end
|
@@ -105,7 +105,7 @@ module SlideHero
|
|
105
105
|
end
|
106
106
|
|
107
107
|
assert_dom_match slide.compile, "<section data-transition=\"default\">" +
|
108
|
-
"<h2>Embedding</h2>" +
|
108
|
+
"<h2>Embedding</h2>" +
|
109
109
|
"<p><small>I'm embedded!</small></p>" +
|
110
110
|
"</section>"
|
111
111
|
end
|
@@ -117,7 +117,7 @@ module SlideHero
|
|
117
117
|
end
|
118
118
|
|
119
119
|
assert_dom_match slide.compile, "<section data-transition=\"default\">" +
|
120
|
-
"<h2>Embedding</h2>" +
|
120
|
+
"<h2>Embedding</h2>" +
|
121
121
|
"<p>I'm embedded!</p>" +
|
122
122
|
"<p>Me too!</p>" +
|
123
123
|
"</section>"
|
@@ -129,7 +129,7 @@ module SlideHero
|
|
129
129
|
end
|
130
130
|
|
131
131
|
assert_dom_match slide.compile, "<section data-transition=\"default\">"+
|
132
|
-
"<h2>Animation</h2>" +
|
132
|
+
"<h2>Animation</h2>" +
|
133
133
|
"<p class=\"fragment \">I'm animated!</p>" +
|
134
134
|
"</section>"
|
135
135
|
|
@@ -241,5 +241,16 @@ end
|
|
241
241
|
slide.compile.must_include %{<video data-autoplay src="video/video.mp4"></video>}
|
242
242
|
end
|
243
243
|
end
|
244
|
+
describe "#blockquote" do
|
245
|
+
it "allows for blockquotes" do
|
246
|
+
slide = Slide.new("Quotes!") do
|
247
|
+
blockquote cite: "http://hostiledeveloper.com", quote: <<-QUOTE
|
248
|
+
Sup
|
249
|
+
QUOTE
|
250
|
+
end
|
251
|
+
slide.compile.include?("blockquote")
|
252
|
+
slide.compile.include?("Sup")
|
253
|
+
end
|
254
|
+
end
|
244
255
|
end
|
245
256
|
end
|
data/test/slide_hero_spec.rb
CHANGED
@@ -12,6 +12,7 @@ require_relative 'slide_hero/image_spec'
|
|
12
12
|
require_relative 'slide_hero/remote_image_spec'
|
13
13
|
require_relative 'slide_hero/media_spec'
|
14
14
|
require_relative 'slide_hero/plugins_spec'
|
15
|
+
require_relative 'slide_hero/blockquote_spec'
|
15
16
|
|
16
17
|
describe ::SlideHero do
|
17
18
|
it "has a version" do
|
data/vendor/reveal.js/.gitignore
CHANGED
@@ -17,3 +17,7 @@ When reporting a bug make sure to include information about which browser and op
|
|
17
17
|
- Single-quoted strings
|
18
18
|
- Should be made towards the **dev branch**
|
19
19
|
- Should be submitted from a feature/topic branch (not your master)
|
20
|
+
|
21
|
+
|
22
|
+
### Plugins
|
23
|
+
Please do not submit plugins as pull requests. They should be maintained in their own separate repository. More information here: https://github.com/hakimel/reveal.js/wiki/Plugin-Guidelines
|
@@ -1,6 +1,8 @@
|
|
1
1
|
/* global module:false */
|
2
2
|
module.exports = function(grunt) {
|
3
3
|
var port = grunt.option('port') || 8000;
|
4
|
+
var base = grunt.option('base') || '.';
|
5
|
+
|
4
6
|
// Project configuration
|
5
7
|
grunt.initConfig({
|
6
8
|
pkg: grunt.file.readJSON('package.json'),
|
@@ -11,7 +13,7 @@ module.exports = function(grunt) {
|
|
11
13
|
' * http://lab.hakim.se/reveal-js\n' +
|
12
14
|
' * MIT licensed\n' +
|
13
15
|
' *\n' +
|
14
|
-
' * Copyright (C)
|
16
|
+
' * Copyright (C) 2016 Hakim El Hattab, http://hakim.se\n' +
|
15
17
|
' */'
|
16
18
|
},
|
17
19
|
|
@@ -36,19 +38,15 @@ module.exports = function(grunt) {
|
|
36
38
|
}
|
37
39
|
},
|
38
40
|
themes: {
|
39
|
-
files:
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
'css/theme/moon.css': 'css/theme/source/moon.scss',
|
49
|
-
'css/theme/solarized.css': 'css/theme/source/solarized.scss',
|
50
|
-
'css/theme/blood.css': 'css/theme/source/blood.scss'
|
51
|
-
}
|
41
|
+
files: [
|
42
|
+
{
|
43
|
+
expand: true,
|
44
|
+
cwd: 'css/theme/source',
|
45
|
+
src: ['*.scss'],
|
46
|
+
dest: 'css/theme',
|
47
|
+
ext: '.css'
|
48
|
+
}
|
49
|
+
]
|
52
50
|
}
|
53
51
|
},
|
54
52
|
|
@@ -95,9 +93,9 @@ module.exports = function(grunt) {
|
|
95
93
|
server: {
|
96
94
|
options: {
|
97
95
|
port: port,
|
98
|
-
base:
|
99
|
-
|
100
|
-
|
96
|
+
base: base,
|
97
|
+
livereload: true,
|
98
|
+
open: true
|
101
99
|
}
|
102
100
|
}
|
103
101
|
},
|
@@ -109,14 +107,12 @@ module.exports = function(grunt) {
|
|
109
107
|
'js/**',
|
110
108
|
'lib/**',
|
111
109
|
'images/**',
|
112
|
-
'plugin/**'
|
110
|
+
'plugin/**',
|
111
|
+
'**.md'
|
113
112
|
]
|
114
113
|
},
|
115
114
|
|
116
115
|
watch: {
|
117
|
-
options: {
|
118
|
-
livereload: true
|
119
|
-
},
|
120
116
|
js: {
|
121
117
|
files: [ 'Gruntfile.js', 'js/reveal.js' ],
|
122
118
|
tasks: 'js'
|
@@ -129,9 +125,15 @@ module.exports = function(grunt) {
|
|
129
125
|
files: [ 'css/reveal.scss' ],
|
130
126
|
tasks: 'css-core'
|
131
127
|
},
|
132
|
-
|
133
|
-
|
134
|
-
|
128
|
+
html: {
|
129
|
+
files: [ '*.html']
|
130
|
+
},
|
131
|
+
markdown: {
|
132
|
+
files: [ '*.md' ]
|
133
|
+
},
|
134
|
+
options: {
|
135
|
+
livereload: true
|
136
|
+
}
|
135
137
|
}
|
136
138
|
|
137
139
|
});
|
data/vendor/reveal.js/LICENSE
CHANGED