From f1a416d07cddb395b49af8b029d1c054b051f793 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 28 Nov 2013 11:31:16 -0500 Subject: [PATCH 1/2] tests for initial section classes --- test/test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/test.js b/test/test.js index 36983c8..f620b5b 100644 --- a/test/test.js +++ b/test/test.js @@ -11,6 +11,22 @@ Reveal.addEventListener( 'ready', function() { + // --------------------------------------------------------------- + // DOM TESTS + + QUnit.module( 'DOM' ); + + test( 'Initial slides classes', function() { + var horizontalSlides = document.querySelectorAll( '.reveal .slides>section' ) + + strictEqual( document.querySelectorAll( '.reveal .slides section.past' ).length, 0, 'no .past slides' ); + strictEqual( document.querySelectorAll( '.reveal .slides section.present' ).length, 1, 'one .present slide' ); + strictEqual( document.querySelectorAll( '.reveal .slides>section.future' ).length, horizontalSlides.length - 1, 'remaining horizontal slides are .future' ); + + strictEqual( document.querySelectorAll( '.reveal .slides section.stack' ).length, 2, 'two .stacks' ); + + ok( document.querySelectorAll( '.reveal .slides section.stack' )[0].querySelectorAll( '.future' ).length > 0, 'vertical slides are given .future' ); + }); // --------------------------------------------------------------- // API TESTS From 3d2549d4f461cd2cb21bde6ef8a482f1f27a51ae Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 28 Nov 2013 16:48:36 -0500 Subject: [PATCH 2/2] documentation for slide numbers --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 7cac95c..f224e5e 100644 --- a/README.md +++ b/README.md @@ -499,6 +499,13 @@ By default, Reveal is configured with [highlight.js](http://softwaremaniacs.org/ ``` +### Slide number +If you would like to display the page number of the current slide you can do so using the ```slideNumber``` configuration value. + +```javascript +Reveal.configure({ slideNumber: true }); +``` + ### Overview mode