slide_hero 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/lib/slide_hero/code.rb +1 -1
  3. data/lib/slide_hero/grouped_slides.rb +1 -1
  4. data/lib/slide_hero/list.rb +6 -3
  5. data/lib/slide_hero/list_point.rb +1 -1
  6. data/lib/slide_hero/presentation.rb +1 -2
  7. data/lib/slide_hero/slide.rb +1 -2
  8. data/lib/slide_hero/version.rb +1 -1
  9. data/lib/slide_hero/views/ordered_list.html.erb +1 -1
  10. data/lib/slide_hero/views/unordered_list.html.erb +1 -1
  11. data/lib/slide_hero.rb +9 -0
  12. data/slide_hero.gemspec +7 -7
  13. data/test/slide_hero/list_spec.rb +31 -9
  14. data/vendor/reveal.js/.gitignore +0 -0
  15. data/vendor/reveal.js/.travis.yml +0 -0
  16. data/vendor/reveal.js/Gruntfile.js +12 -7
  17. data/vendor/reveal.js/LICENSE +0 -0
  18. data/vendor/reveal.js/README.md +168 -33
  19. data/vendor/reveal.js/css/print/paper.css +0 -0
  20. data/vendor/reveal.js/css/print/pdf.css +1 -1
  21. data/vendor/reveal.js/css/reveal.css +248 -17
  22. data/vendor/reveal.js/css/reveal.min.css +1 -1
  23. data/vendor/reveal.js/css/theme/README.md +3 -1
  24. data/vendor/reveal.js/css/theme/beige.css +7 -1
  25. data/vendor/reveal.js/css/theme/blood.css +175 -0
  26. data/vendor/reveal.js/css/theme/default.css +7 -1
  27. data/vendor/reveal.js/css/theme/moon.css +7 -1
  28. data/vendor/reveal.js/css/theme/night.css +7 -1
  29. data/vendor/reveal.js/css/theme/serif.css +7 -1
  30. data/vendor/reveal.js/css/theme/simple.css +7 -1
  31. data/vendor/reveal.js/css/theme/sky.css +7 -1
  32. data/vendor/reveal.js/css/theme/solarized.css +7 -1
  33. data/vendor/reveal.js/css/theme/source/beige.scss +0 -0
  34. data/vendor/reveal.js/css/theme/source/blood.scss +91 -0
  35. data/vendor/reveal.js/css/theme/source/default.scss +0 -0
  36. data/vendor/reveal.js/css/theme/source/moon.scss +0 -0
  37. data/vendor/reveal.js/css/theme/source/night.scss +0 -0
  38. data/vendor/reveal.js/css/theme/source/serif.scss +0 -0
  39. data/vendor/reveal.js/css/theme/source/simple.scss +0 -0
  40. data/vendor/reveal.js/css/theme/source/sky.scss +0 -0
  41. data/vendor/reveal.js/css/theme/source/solarized.scss +0 -0
  42. data/vendor/reveal.js/css/theme/template/mixins.scss +0 -0
  43. data/vendor/reveal.js/css/theme/template/settings.scss +0 -0
  44. data/vendor/reveal.js/css/theme/template/theme.scss +8 -1
  45. data/vendor/reveal.js/index.html +388 -0
  46. data/vendor/reveal.js/js/reveal.js +887 -293
  47. data/vendor/reveal.js/js/reveal.min.js +3 -2
  48. data/vendor/reveal.js/lib/css/zenburn.css +16 -17
  49. data/vendor/reveal.js/lib/font/league_gothic-webfont.svg +0 -0
  50. data/vendor/reveal.js/lib/font/league_gothic-webfont.ttf +0 -0
  51. data/vendor/reveal.js/lib/font/league_gothic-webfont.woff +0 -0
  52. data/vendor/reveal.js/lib/font/league_gothic_license +0 -0
  53. data/vendor/reveal.js/lib/js/classList.js +0 -0
  54. data/vendor/reveal.js/lib/js/head.min.js +0 -0
  55. data/vendor/reveal.js/lib/js/html5shiv.js +0 -0
  56. data/vendor/reveal.js/package.json +10 -9
  57. data/vendor/reveal.js/plugin/highlight/highlight.js +3 -2
  58. data/vendor/reveal.js/plugin/leap/leap.js +0 -0
  59. data/vendor/reveal.js/plugin/markdown/example.html +34 -3
  60. data/vendor/reveal.js/plugin/markdown/example.md +0 -0
  61. data/vendor/reveal.js/plugin/markdown/markdown.js +373 -201
  62. data/vendor/reveal.js/plugin/markdown/marked.js +0 -0
  63. data/vendor/reveal.js/plugin/multiplex/client.js +0 -0
  64. data/vendor/reveal.js/plugin/multiplex/index.js +0 -0
  65. data/vendor/reveal.js/plugin/multiplex/master.js +2 -1
  66. data/vendor/reveal.js/plugin/notes/notes.html +10 -2
  67. data/vendor/reveal.js/plugin/notes/notes.js +0 -0
  68. data/vendor/reveal.js/plugin/notes-server/client.js +0 -0
  69. data/vendor/reveal.js/plugin/notes-server/index.js +0 -0
  70. data/vendor/reveal.js/plugin/notes-server/notes.html +0 -0
  71. data/vendor/reveal.js/plugin/postmessage/example.html +0 -0
  72. data/vendor/reveal.js/plugin/postmessage/postmessage.js +0 -0
  73. data/vendor/reveal.js/plugin/print-pdf/print-pdf.js +0 -0
  74. data/vendor/reveal.js/plugin/remotes/remotes.js +4 -4
  75. data/vendor/reveal.js/plugin/search/search.js +0 -0
  76. data/vendor/reveal.js/plugin/zoom-js/zoom.js +3 -1
  77. data/vendor/reveal.js/{examples → test/examples}/assets/image1.png +0 -0
  78. data/vendor/reveal.js/{examples → test/examples}/assets/image2.png +0 -0
  79. data/vendor/reveal.js/{examples → test/examples}/barebones.html +2 -3
  80. data/vendor/reveal.js/{examples → test/examples}/embedded-media.html +4 -4
  81. data/vendor/reveal.js/{examples → test/examples}/math.html +6 -6
  82. data/vendor/reveal.js/{examples → test/examples}/slide-backgrounds.html +26 -5
  83. data/vendor/reveal.js/test/qunit-1.12.0.css +244 -0
  84. data/vendor/reveal.js/test/qunit-1.12.0.js +2212 -0
  85. data/vendor/reveal.js/test/test-markdown-element-attributes.html +134 -0
  86. data/vendor/reveal.js/test/test-markdown-element-attributes.js +46 -0
  87. data/vendor/reveal.js/test/test-markdown-slide-attributes.html +128 -0
  88. data/vendor/reveal.js/test/test-markdown-slide-attributes.js +47 -0
  89. data/vendor/reveal.js/test/test-markdown.html +52 -0
  90. data/vendor/reveal.js/test/test-markdown.js +15 -0
  91. data/vendor/reveal.js/test/test.html +81 -0
  92. data/vendor/reveal.js/test/test.js +438 -0
  93. metadata +58 -45
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7412ed3f8e771683d9a861f4873cb426323f25b0
4
- data.tar.gz: 70c8c9d3dadbfa3ebc399e18394c377948acbd00
3
+ metadata.gz: 11f150c4e85602a1f8379dd4614263956fb0ce5a
4
+ data.tar.gz: 11507fc11afd7da1ceaa79e9de62739934a64755
5
5
  SHA512:
6
- metadata.gz: a3ae4ec73cefdd4ca4154adfcc75032148f46ddcc5f7f150d6976beb48656f7f56ef7b3737fc8b9b002315cb1d6337ded401ef1878fd7c761ed2094f7434412d
7
- data.tar.gz: fcd6928a0f84a85223d3c14bc381bcf1b1c4e897e96dd9c970f13a154f5aa0728014a4cc102f7e6e0672ce2aab4c1f3c6bcf99fa1c0c5b453174bc5efcaccea3
6
+ metadata.gz: 37eac03dbdc05d82ad0a0aa9be799a55b6e0d9480e81a7ced9db6fcab832685685fae7ce5177df00d36d0458dfdd7f243df6d4ec1eb5353a0bbc77d9961c1736
7
+ data.tar.gz: a0e51f35504d3507b644ce9798d33f2b2469d28c1c38f9dcd50be5eea29920d933bd9993a78c315eff4ec5af20e015bec1974e9c1b62dc76fbd4f1e794e607bc
@@ -11,7 +11,7 @@ module SlideHero
11
11
 
12
12
  def compile
13
13
  Tilt::ERBTemplate.
14
- new(File.join(Gem.loaded_specs['slide_hero'].full_gem_path,
14
+ new(File.join(SlideHero.template_path,
15
15
  'lib/slide_hero/views/code.html.erb')).render(self)
16
16
  end
17
17
  end
@@ -7,7 +7,7 @@ module SlideHero
7
7
 
8
8
  def compile
9
9
  Tilt::ERBTemplate.
10
- new(File.join(Gem.loaded_specs['slide_hero'].full_gem_path,
10
+ new(File.join(SlideHero.template_path,
11
11
  'lib/slide_hero/views/grouped_slides.html.erb')).render(self)
12
12
  end
13
13
 
@@ -8,12 +8,11 @@ module SlideHero
8
8
  end
9
9
 
10
10
  def compile
11
- gem_path = Gem.loaded_specs['slide_hero'].full_gem_path
12
11
  if style == :unordered
13
- Tilt::ERBTemplate.new(File.join(gem_path,
12
+ Tilt::ERBTemplate.new(File.join(SlideHero.template_path,
14
13
  'lib/slide_hero/views/unordered_list.html.erb')).render(self)
15
14
  else
16
- Tilt::ERBTemplate.new(File.join(gem_path,
15
+ Tilt::ERBTemplate.new(File.join(SlideHero.template_path,
17
16
  'lib/slide_hero/views/ordered_list.html.erb')).render(self)
18
17
  end
19
18
  end
@@ -22,6 +21,10 @@ module SlideHero
22
21
  points << ListPoint.new(text, { animation: animation })
23
22
  end
24
23
 
24
+ def list(style=:unordered, &block)
25
+ points << List.new(style, &block).compile
26
+ end
27
+
25
28
  def points
26
29
  @points ||= []
27
30
  end
@@ -10,7 +10,7 @@ module SlideHero
10
10
  end
11
11
 
12
12
  def to_s
13
- text
13
+ "<li#{animation_class}>#{text}</li>"
14
14
  end
15
15
 
16
16
  def animation_class
@@ -10,8 +10,7 @@ module SlideHero
10
10
  end
11
11
 
12
12
  def compile
13
- gem_path = Gem.loaded_specs['slide_hero'].full_gem_path
14
- Tilt::ERBTemplate.new(File.join(gem_path,
13
+ Tilt::ERBTemplate.new(File.join(SlideHero.template_path,
15
14
  'lib/slide_hero/views/layout.html.erb')).
16
15
  render(self) do
17
16
  collected_slides
@@ -9,8 +9,7 @@ module SlideHero
9
9
  end
10
10
 
11
11
  def compile
12
- gem_path = Gem.loaded_specs['slide_hero'].full_gem_path
13
- Tilt::ERBTemplate.new(File.join(gem_path,
12
+ Tilt::ERBTemplate.new(File.join(SlideHero.template_path,
14
13
  'lib/slide_hero/views/slide.html.erb')).
15
14
  render(self)
16
15
  end
@@ -1,3 +1,3 @@
1
1
  module SlideHero
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  <ol>
2
2
  <% points.each do |point| %>
3
- <li<%= point.animation_class %>><%= point %></li>
3
+ <%= point %>
4
4
  <% end %>
5
5
  </ol>
@@ -1,5 +1,5 @@
1
1
  <ul>
2
2
  <% points.each do |point| %>
3
- <li<%= point.animation_class %>><%= point %></li>
3
+ <%= point %>
4
4
  <% end %>
5
5
  </ul>
data/lib/slide_hero.rb CHANGED
@@ -15,4 +15,13 @@ module SlideHero
15
15
  def self.get_binding
16
16
  binding
17
17
  end
18
+
19
+ def self.template_path
20
+ gem = Gem.loaded_specs['slide_hero']
21
+ if gem
22
+ gem.full_gem_path
23
+ else
24
+ '.'
25
+ end
26
+ end
18
27
  end
data/slide_hero.gemspec CHANGED
@@ -18,12 +18,12 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "tilt", "~> 1.4.1"
22
- spec.add_dependency "thor", "~> 0.18.1"
23
- spec.add_dependency "rack", "~> 1.5.2"
21
+ spec.add_dependency "tilt", "~> 1.4"
22
+ spec.add_dependency "thor", "~> 0.18"
23
+ spec.add_dependency "rack", "~> 1.5"
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
25
- spec.add_development_dependency "rake"
26
- spec.add_development_dependency "minitest"
27
- spec.add_development_dependency "guard"
28
- spec.add_development_dependency "guard-minitest"
25
+ spec.add_development_dependency "rake", "~> 10.1"
26
+ spec.add_development_dependency "minitest", "~> 5.2"
27
+ spec.add_development_dependency "guard", "~> 2.4"
28
+ spec.add_development_dependency "guard-minitest", "~> 2.2"
29
29
  end
@@ -25,10 +25,10 @@ module SlideHero
25
25
  point "animated!", animation: true
26
26
  end
27
27
  assert_dom_match(list.compile, '<ul>' +
28
- '<li class="fragment ">' +
29
- 'animated!' +
30
- '</li>' +
31
- '</ul>')
28
+ '<li class="fragment ">' +
29
+ 'animated!' +
30
+ '</li>' +
31
+ '</ul>')
32
32
  end
33
33
 
34
34
  it "supports specific animations" do
@@ -38,12 +38,34 @@ module SlideHero
38
38
  list = List.new do
39
39
  point "all the animations!", animation: animation
40
40
  end
41
- assert_dom_match list.compile, '<ul>' +
42
- "<li class=\"fragment #{animation}\">" +
43
- 'all the animations!' +
44
- '</li>' +
45
- '</ul>'
41
+ assert_dom_match list.compile, '<ul>' +
42
+ "<li class=\"fragment #{animation}\">" +
43
+ 'all the animations!' +
44
+ '</li>' +
45
+ '</ul>'
46
46
  end
47
47
  end
48
+
49
+ it "allows lists to be nested in lists - unordered" do
50
+ list = List.new do
51
+ point "Regular point"
52
+ list do
53
+ point "I'm a point in a point"
54
+ end
55
+ point "Another regular point"
56
+ end
57
+ assert_dom_match(list.compile, %{<ul><li>Regular point</li><ul><li>I'm a point in a point</li></ul><li>Another regular point</li></ul>})
58
+ end
59
+
60
+ it "allows lists to be nested in lists - ordered" do
61
+ list = List.new(:ordered) do
62
+ point "Regular point"
63
+ list do
64
+ point "I'm a point in a point"
65
+ end
66
+ point "Another regular point"
67
+ end
68
+ assert_dom_match(list.compile, %{<ol><li>Regular point</li><ul><li>I'm a point in a point</li></ul><li>Another regular point</li></ol>})
69
+ end
48
70
  end
49
71
  end
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  /* global module:false */
2
2
  module.exports = function(grunt) {
3
-
3
+ var port = grunt.option('port') || 8000;
4
4
  // Project configuration
5
5
  grunt.initConfig({
6
6
  pkg: grunt.file.readJSON('package.json'),
@@ -15,9 +15,8 @@ module.exports = function(grunt) {
15
15
  ' */'
16
16
  },
17
17
 
18
- // Tests will be added soon
19
18
  qunit: {
20
- files: [ 'test/**/*.html' ]
19
+ files: [ 'test/*.html' ]
21
20
  },
22
21
 
23
22
  uglify: {
@@ -48,7 +47,8 @@ module.exports = function(grunt) {
48
47
  'css/theme/simple.css': 'css/theme/source/simple.scss',
49
48
  'css/theme/sky.css': 'css/theme/source/sky.scss',
50
49
  'css/theme/moon.css': 'css/theme/source/moon.scss',
51
- 'css/theme/solarized.css': 'css/theme/source/solarized.scss'
50
+ 'css/theme/solarized.css': 'css/theme/source/solarized.scss',
51
+ 'css/theme/blood.css': 'css/theme/source/blood.scss'
52
52
  }
53
53
  }
54
54
  },
@@ -69,7 +69,8 @@ module.exports = function(grunt) {
69
69
  globals: {
70
70
  head: false,
71
71
  module: false,
72
- console: false
72
+ console: false,
73
+ unescape: false
73
74
  }
74
75
  },
75
76
  files: [ 'Gruntfile.js', 'js/reveal.js' ]
@@ -78,7 +79,7 @@ module.exports = function(grunt) {
78
79
  connect: {
79
80
  server: {
80
81
  options: {
81
- port: 8000,
82
+ port: port,
82
83
  base: '.'
83
84
  }
84
85
  }
@@ -109,6 +110,7 @@ module.exports = function(grunt) {
109
110
  });
110
111
 
111
112
  // Dependencies
113
+ grunt.loadNpmTasks( 'grunt-contrib-qunit' );
112
114
  grunt.loadNpmTasks( 'grunt-contrib-jshint' );
113
115
  grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
114
116
  grunt.loadNpmTasks( 'grunt-contrib-uglify' );
@@ -118,7 +120,7 @@ module.exports = function(grunt) {
118
120
  grunt.loadNpmTasks( 'grunt-zip' );
119
121
 
120
122
  // Default task
121
- grunt.registerTask( 'default', [ 'jshint', 'cssmin', 'uglify' ] );
123
+ grunt.registerTask( 'default', [ 'jshint', 'cssmin', 'uglify', 'qunit' ] );
122
124
 
123
125
  // Theme task
124
126
  grunt.registerTask( 'themes', [ 'sass' ] );
@@ -129,4 +131,7 @@ module.exports = function(grunt) {
129
131
  // Serve presentation locally
130
132
  grunt.registerTask( 'serve', [ 'connect', 'watch' ] );
131
133
 
134
+ // Run tests
135
+ grunt.registerTask( 'test', [ 'jshint', 'qunit' ] );
136
+
132
137
  };
File without changes
@@ -11,7 +11,7 @@ reveal.js comes with a broad range of features including [nested slides](https:/
11
11
  - [Examples](https://github.com/hakimel/reveal.js/wiki/Example-Presentations): Presentations created with reveal.js, add your own!
12
12
  - [Browser Support](https://github.com/hakimel/reveal.js/wiki/Browser-Support): Explanation of browser support and fallbacks.
13
13
 
14
- ## Slides
14
+ ## Online Editor
15
15
 
16
16
  Presentations are written using HTML or markdown but there's also an online editor for those of you who prefer a graphical interface. Give it a try at [http://slid.es](http://slid.es).
17
17
 
@@ -54,10 +54,44 @@ This is based on [data-markdown](https://gist.github.com/1343518) from [Paul Iri
54
54
 
55
55
  You can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file. The ```data-charset``` attribute is optional and specifies which charset to use when loading the external file.
56
56
 
57
+ When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup).
58
+
59
+ ```html
60
+ <section data-markdown="example.md"
61
+ data-separator="^\n\n\n"
62
+ data-vertical="^\n\n"
63
+ data-notes="^Note:"
64
+ data-charset="iso-8859-15">
65
+ </section>
66
+ ```
67
+
68
+ #### Element Attributes
69
+
70
+ Special syntax (in html comment) is available for adding attributes to Markdown elements. This is useful for fragments, amongst other things.
71
+
72
+ ```html
73
+ <section data-markdown>
74
+ <script type="text/template">
75
+ - Item 1 <!-- .element: class="fragment" data-fragment-index="2" -->
76
+ - Item 2 <!-- .element: class="fragment" data-fragment-index="1" -->
77
+ </script>
78
+ </section>
79
+ ```
80
+
81
+ #### Slide Attributes
82
+
83
+ Special syntax (in html comment) is available for adding attributes to the slide `<section>` elements generated by your Markdown.
84
+
57
85
  ```html
58
- <section data-markdown="example.md" data-separator="^\n\n\n" data-vertical="^\n\n" data-notes="^Note:" data-charset="iso-8859-15"></section>
86
+ <section data-markdown>
87
+ <script type="text/template">
88
+ <!-- .slide: data-background="#ff0000" -->
89
+ Mardown content
90
+ </script>
91
+ </section>
59
92
  ```
60
93
 
94
+
61
95
  ### Configuration
62
96
 
63
97
  At the end of your page you need to initialize reveal by running the following code. Note that all config values are optional and will default as specified below.
@@ -71,43 +105,72 @@ Reveal.initialize({
71
105
  // Display a presentation progress bar
72
106
  progress: true,
73
107
 
108
+ // Display the page number of the current slide
109
+ slideNumber: false,
110
+
74
111
  // Push each slide change to the browser history
75
112
  history: false,
76
113
 
77
114
  // Enable keyboard shortcuts for navigation
78
115
  keyboard: true,
79
116
 
80
- // Enable touch events for navigation
81
- touch: true,
82
-
83
117
  // Enable the slide overview mode
84
118
  overview: true,
85
119
 
86
120
  // Vertical centering of slides
87
121
  center: true,
88
122
 
123
+ // Enables touch navigation on devices with touch input
124
+ touch: true,
125
+
89
126
  // Loop the presentation
90
127
  loop: false,
91
128
 
92
129
  // Change the presentation direction to be RTL
93
130
  rtl: false,
94
131
 
132
+ // Turns fragments on and off globally
133
+ fragments: true,
134
+
135
+ // Flags if the presentation is running in an embedded mode,
136
+ // i.e. contained within a limited portion of the screen
137
+ embedded: false,
138
+
95
139
  // Number of milliseconds between automatically proceeding to the
96
140
  // next slide, disabled when set to 0, this value can be overwritten
97
141
  // by using a data-autoslide attribute on your slides
98
142
  autoSlide: 0,
99
143
 
144
+ // Stop auto-sliding after user input
145
+ autoSlideStoppable: true,
146
+
100
147
  // Enable slide navigation via mouse wheel
101
148
  mouseWheel: false,
102
149
 
150
+ // Hides the address bar on mobile devices
151
+ hideAddressBar: true,
152
+
153
+ // Opens links in an iframe preview overlay
154
+ previewLinks: false,
155
+
103
156
  // Transition style
104
157
  transition: 'default', // default/cube/page/concave/zoom/linear/fade/none
105
158
 
106
159
  // Transition speed
107
160
  transitionSpeed: 'default', // default/fast/slow
108
161
 
109
- // Transition style for full page backgrounds
110
- backgroundTransition: 'default' // default/linear/none
162
+ // Transition style for full page slide backgrounds
163
+ backgroundTransition: 'default', // default/none/slide/concave/convex/zoom
164
+
165
+ // Number of slides away from the current that are visible
166
+ viewDistance: 3,
167
+
168
+ // Parallax background image
169
+ parallaxBackgroundImage: '', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
170
+
171
+ // Parallax background size
172
+ parallaxBackgroundSize: '' // CSS syntax, e.g. "2100px 900px"
173
+
111
174
 
112
175
  });
113
176
  ```
@@ -192,6 +255,27 @@ Reveal.initialize({
192
255
  });
193
256
  ```
194
257
 
258
+
259
+ ### Auto-sliding
260
+
261
+ Presentations can be configure to progress through slides automatically, without any user input. To enable this you will need to tell the framework how many milliseconds it should wait between slides:
262
+
263
+ ```javascript
264
+ // Slide every five seconds
265
+ Reveal.configure({
266
+ autoSlide: 5000
267
+ });
268
+ ```
269
+
270
+ When this is turned on a control element will appear that enables users to pause and resume auto-sliding. Sliding is also paused automatically as soon as the user starts navigating. You can disable these controls by specifying ```autoSlideStoppable: false``` in your reveal.js config.
271
+
272
+ You can also override the slide duration for individual slides by using the ```data-autoslide``` attribute on individual sections:
273
+
274
+ ```html
275
+ <section data-autoslide="10000">This will remain on screen for 10 seconds</section>
276
+ ```
277
+
278
+
195
279
  ### Keyboard Bindings
196
280
 
197
281
  If you're unhappy with any of the default keyboard bindings you can override them using the ```keyboard``` config option:
@@ -292,6 +376,29 @@ Slides are contained within a limited portion of the screen by default to allow
292
376
  Backgrounds transition using a fade animation by default. This can be changed to a linear sliding transition by passing ```backgroundTransition: 'slide'``` to the ```Reveal.initialize()``` call. Alternatively you can set ```data-background-transition``` on any section with a background to override that specific transition.
293
377
 
294
378
 
379
+ ### Parallax Background
380
+
381
+ If you want to use a parallax scrolling background, set the two following config properties when initializing reveal.js (the third one is optional).
382
+
383
+ ```javascript
384
+ Reveal.initialize({
385
+
386
+ // Parallax background image
387
+ parallaxBackgroundImage: '', // e.g. "https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg"
388
+
389
+ // Parallax background size
390
+ parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px" - currently only pixels are supported (don't use % or auto)
391
+
392
+ // This slide transition gives best results:
393
+ transition: linear
394
+
395
+ });
396
+ ```
397
+
398
+ Make sure that the background size is much bigger than screen size to allow for some scrolling. [View example](http://lab.hakim.se/reveal-js/?parallaxBackgroundImage=https%3A%2F%2Fs3.amazonaws.com%2Fhakim-static%2Freveal-js%2Freveal-parallax-1.jpg&parallaxBackgroundSize=2100px%20900px).
399
+
400
+
401
+
295
402
  ### Slide Transitions
296
403
  The global presentation transition is set using the ```transition``` config value. You can override the global transition for a specific slide by using the ```data-transition``` attribute:
297
404
 
@@ -330,7 +437,7 @@ You can also add relative navigation links, similar to the built in reveal.js co
330
437
 
331
438
 
332
439
  ### Fragments
333
- Fragments are used to highlight individual elements on a slide. Every element with the class ```fragment``` will be stepped through before moving on to the next slide. Here's an example: http://lab.hakim.se/reveal-js/#/16
440
+ Fragments are used to highlight individual elements on a slide. Every element with the class ```fragment``` will be stepped through before moving on to the next slide. Here's an example: http://lab.hakim.se/reveal-js/#/fragments
334
441
 
335
442
  The default fragment style is to start out invisible and fade in. This style can be changed by appending a different class to the fragment:
336
443
 
@@ -340,6 +447,8 @@ The default fragment style is to start out invisible and fade in. This style can
340
447
  <p class="fragment shrink">shrink</p>
341
448
  <p class="fragment roll-in">roll-in</p>
342
449
  <p class="fragment fade-out">fade-out</p>
450
+ <p class="fragment current-visible">visible only once</p>
451
+ <p class="fragment highlight-current-blue">blue only once</p>
343
452
  <p class="fragment highlight-red">highlight-red</p>
344
453
  <p class="fragment highlight-green">highlight-green</p>
345
454
  <p class="fragment highlight-blue">highlight-blue</p>
@@ -397,6 +506,13 @@ By default, Reveal is configured with [highlight.js](http://softwaremaniacs.org/
397
506
  </section>
398
507
  ```
399
508
 
509
+ ### Slide number
510
+ If you would like to display the page number of the current slide you can do so using the ```slideNumber``` configuration value.
511
+
512
+ ```javascript
513
+ Reveal.configure({ slideNumber: true });
514
+ ```
515
+
400
516
 
401
517
  ### Overview mode
402
518
 
@@ -424,6 +540,8 @@ Add `data-autoplay` to your media element if you want it to automatically start
424
540
  <video data-autoplay src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></video>
425
541
  ```
426
542
 
543
+ Additionally the framework automatically pushes two [post messages](https://developer.mozilla.org/en-US/docs/Web/API/Window.postMessage) to all iframes, ```slide:start``` when the slide containing the iframe is made visible and ```slide:stop``` when it is hidden.
544
+
427
545
 
428
546
  ### Stretching elements
429
547
  Sometimes it's desirable to have an element, like an image or video, stretch to consume as much space as possible within a given slide. This can be done by adding the ```.stretch``` class to an element as seen below:
@@ -464,6 +582,7 @@ The framework comes with a few different themes included:
464
582
  - night: Black background, thick white text, orange links
465
583
  - serif: Cappuccino background, gray text, brown links
466
584
  - simple: White background, black text, blue links
585
+ - solarized: Cream-colored background, dark green text, blue links
467
586
 
468
587
  Each theme is available as a separate stylesheet. To change theme you will need to replace **default** below with your desired theme name in index.html:
469
588
 
@@ -480,6 +599,8 @@ reveal.js comes with a speaker notes plugin which can be used to present per-sli
480
599
 
481
600
  Notes are defined by appending an ```<aside>``` element to a slide as seen below. You can add the ```data-markdown``` attribute to the aside element if you prefer writing notes using Markdown.
482
601
 
602
+ When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup).
603
+
483
604
  ```html
484
605
  <section>
485
606
  <h2>Some Slide</h2>
@@ -664,31 +785,27 @@ Reveal.initialize({
664
785
  The Leap Motion plugin lets you utilize your [Leap Motion](https://www.leapmotion.com/) device to control basic navigation of your presentation. The gestures currently supported are:
665
786
 
666
787
  ##### 1 to 2 fingers
667
- * Pointer &mdash; Point to anything on screen. Move your finger past the device to expand the pointer.
668
-
669
- ##### 1 hand + 3 or more fingers
670
-
671
- * Left
672
- * Right
673
- * Up
674
- * down
788
+ Pointer &mdash; Point to anything on screen. Move your finger past the device to expand the pointer.
675
789
 
790
+ ##### 1 hand + 3 or more fingers (left/right/up/down)
676
791
  Navigate through your slides. See config options to invert movements.
677
792
 
678
- ##### 2 hands
679
- * Up
680
-
793
+ ##### 2 hands upwards
681
794
  Toggle the overview mode. Do it a second time to exit the overview.
682
795
 
683
796
  #### Config Options
684
797
  You can edit the following options:
685
- * autoCenter: Defaults to true. Center the pointer based on where you put your finger into the leap motions detection field.
686
- * gestureDelay: Defaults to 500. How long to delay between gestures in milliseconds.
687
- * naturalSwipe: Defaults to true. Swipe as though you were touching a touch screen. Set to false to invert.
688
- * pointerColor: Defaults to #00aaff. The color of the pointer.
689
- * pointerOpacity: Defaults to 0.7. The opacity of the pointer.
690
- * pointerSize: Defaults to 15. The minimum height and width of the pointer.
691
- * pointerTolerance: Defaults to 120. Bigger = slower pointer.
798
+
799
+ | Property | Default | Description
800
+ | ----------------- |:-----------------:| :-------------
801
+ | autoCenter | true | Center the pointer based on where you put your finger into the leap motions detection field.
802
+ | gestureDelay | 500 | How long to delay between gestures in milliseconds.
803
+ | naturalSwipe | true | Swipe as though you were touching a touch screen. Set to false to invert.
804
+ | pointerColor | #00aaff | The color of the pointer.
805
+ | pointerOpacity | 0.7 | The opacity of the pointer.
806
+ | pointerSize | 15 | The minimum height and width of the pointer.
807
+ | pointerTolerance | 120 | Bigger = slower pointer.
808
+
692
809
 
693
810
  Example configuration:
694
811
  ```js
@@ -734,7 +851,7 @@ Reveal.initialize({
734
851
  });
735
852
  ```
736
853
 
737
- Read MathJax's documentation if you want [secure delivery](http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn) or serve [specific versons](http://docs.mathjax.org/en/latest/configuration.html#loading-mathjax-from-the-cdn) for stabilty.
854
+ Read MathJax's documentation if you need [HTTPS delivery](http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn) or serving of [specific versions](http://docs.mathjax.org/en/latest/configuration.html#loading-mathjax-from-the-cdn) for stability.
738
855
 
739
856
 
740
857
  ## Installation
@@ -754,34 +871,36 @@ The core of reveal.js is very easy to install. You'll simply need to download a
754
871
 
755
872
  ### Full setup
756
873
 
757
- Some reveal.js features, like external markdown, require that presentations run from a local web server. The following instructions will set up such a server as well as all of the development tasks needed to make edits to the reveal.js source code.
874
+ Some reveal.js features, like external markdown and speaker notes, require that presentations run from a local web server. The following instructions will set up such a server as well as all of the development tasks needed to make edits to the reveal.js source code.
758
875
 
759
876
  1. Install [Node.js](http://nodejs.org/)
760
877
 
761
878
  2. Install [Grunt](http://gruntjs.com/getting-started#installing-the-cli)
762
879
 
763
880
  4. Clone the reveal.js repository
764
- ```
765
- $ git clone git@github.com:hakimel/reveal.js.git
881
+ ```sh
882
+ $ git clone https://github.com/hakimel/reveal.js.git
766
883
  ```
767
884
 
768
885
  5. Navigate to the reveal.js folder
769
- ```
886
+ ```sh
770
887
  $ cd reveal.js
771
888
  ```
772
889
 
773
890
  6. Install dependencies
774
- ```
891
+ ```sh
775
892
  $ npm install
776
893
  ```
777
894
 
778
895
  7. Serve the presentation and monitor source files for changes
779
- ```
896
+ ```sh
780
897
  $ grunt serve
781
898
  ```
782
899
 
783
900
  8. Open <http://localhost:8000> to view your presentation
784
901
 
902
+ You can change the port by using `grunt serve --port 8001`.
903
+
785
904
 
786
905
  ### Folder Structure
787
906
  - **css/** Core styles without which the project does not function
@@ -790,6 +909,22 @@ $ grunt serve
790
909
  - **lib/** All other third party assets (JavaScript, CSS, fonts)
791
910
 
792
911
 
912
+ ### Contributing
913
+
914
+ Please keep the [issue tracker](http://github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**. If you are reporting a bug make sure to include information about which browser and operating system you are using as well as the necessary steps to reproduce the issue.
915
+
916
+ If you have personal support questions use [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js).
917
+
918
+
919
+ #### Pull requests
920
+
921
+ - Should follow the coding style of the file you work in, most importantly:
922
+ - Tabs to indent
923
+ - Single-quoted strings
924
+ - Should be made towards the **dev branch**
925
+ - Should be submitted from a feature/topic branch (not your master)
926
+ - Should not include the minified **reveal.min.js** file
927
+
793
928
 
794
929
  ## License
795
930
 
File without changes
@@ -67,7 +67,7 @@ h1,h2,h3,h4,h5,h6 {
67
67
  the URL to the end of the link for usability. */
68
68
  a:link,
69
69
  a:visited {
70
- font-weight: bold;
70
+ font-weight: normal;
71
71
  text-decoration: underline;
72
72
  }
73
73