Skip to content

Commit 31438c8

Browse files
committed
Merge branch 'dev' of github.com:hakimel/reveal.js
2 parents 599bef5 + 3d2549d commit 31438c8

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,13 @@ By default, Reveal is configured with [highlight.js](http://softwaremaniacs.org/
499499
</section>
500500
```
501501

502+
### Slide number
503+
If you would like to display the page number of the current slide you can do so using the ```slideNumber``` configuration value.
504+
505+
```javascript
506+
Reveal.configure({ slideNumber: true });
507+
```
508+
502509

503510
### Overview mode
504511

test/test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@
1111

1212
Reveal.addEventListener( 'ready', function() {
1313

14+
// ---------------------------------------------------------------
15+
// DOM TESTS
16+
17+
QUnit.module( 'DOM' );
18+
19+
test( 'Initial slides classes', function() {
20+
var horizontalSlides = document.querySelectorAll( '.reveal .slides>section' )
21+
22+
strictEqual( document.querySelectorAll( '.reveal .slides section.past' ).length, 0, 'no .past slides' );
23+
strictEqual( document.querySelectorAll( '.reveal .slides section.present' ).length, 1, 'one .present slide' );
24+
strictEqual( document.querySelectorAll( '.reveal .slides>section.future' ).length, horizontalSlides.length - 1, 'remaining horizontal slides are .future' );
25+
26+
strictEqual( document.querySelectorAll( '.reveal .slides section.stack' ).length, 2, 'two .stacks' );
27+
28+
ok( document.querySelectorAll( '.reveal .slides section.stack' )[0].querySelectorAll( '.future' ).length > 0, 'vertical slides are given .future' );
29+
});
1430

1531
// ---------------------------------------------------------------
1632
// API TESTS

0 commit comments

Comments
 (0)