From f0fa6fb226f918cac15e6c53bd68f2dc5c02d7c8 Mon Sep 17 00:00:00 2001 From: Benjamin Tan Date: Mon, 22 Jan 2018 22:34:15 +0800 Subject: Update `grunt-contrib-uglify`. --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index b6ef63b..ff7da2d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -26,7 +26,7 @@ module.exports = function(grunt) { uglify: { options: { banner: '<%= meta.banner %>\n', - screwIE8: false + ie8: true }, build: { src: 'js/reveal.js', -- cgit v1.2.3 From 8ff5fe4986a8f83a660c0f28a14e3542d986c884 Mon Sep 17 00:00:00 2001 From: craigsdennis Date: Fri, 16 Mar 2018 22:41:16 -0700 Subject: Updates copyright to 2018 --- Gruntfile.js | 4 ++-- LICENSE | 2 +- README.md | 2 +- css/reveal.css | 2 +- css/reveal.scss | 2 +- js/reveal.js | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index ff7da2d..fc38abb 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,7 +15,7 @@ module.exports = function(grunt) { ' * http://revealjs.com\n' + ' * MIT licensed\n' + ' *\n' + - ' * Copyright (C) 2017 Hakim El Hattab, http://hakim.se\n' + + ' * Copyright (C) 2018 Hakim El Hattab, http://hakim.se\n' + ' */' }, @@ -164,7 +164,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks( 'grunt-retire' ); grunt.loadNpmTasks( 'grunt-sass' ); grunt.loadNpmTasks( 'grunt-zip' ); - + // Default task grunt.registerTask( 'default', [ 'css', 'js' ] ); diff --git a/LICENSE b/LICENSE index c3e6e5f..1b8b5a7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2017 Hakim El Hattab, http://hakim.se, and reveal.js contributors +Copyright (C) 2018 Hakim El Hattab, http://hakim.se, and reveal.js contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index ad7d539..b7bbafc 100644 --- a/README.md +++ b/README.md @@ -1280,4 +1280,4 @@ Some reveal.js features, like external Markdown and speaker notes, require that MIT licensed -Copyright (C) 2017 Hakim El Hattab, http://hakim.se +Copyright (C) 2018 Hakim El Hattab, http://hakim.se diff --git a/css/reveal.css b/css/reveal.css index 3392753..d79024c 100644 --- a/css/reveal.css +++ b/css/reveal.css @@ -3,7 +3,7 @@ * http://revealjs.com * MIT licensed * - * Copyright (C) 2017 Hakim El Hattab, http://hakim.se + * Copyright (C) 2018 Hakim El Hattab, http://hakim.se */ /********************************************* * RESET STYLES diff --git a/css/reveal.scss b/css/reveal.scss index 1a87624..6fb5419 100644 --- a/css/reveal.scss +++ b/css/reveal.scss @@ -3,7 +3,7 @@ * http://revealjs.com * MIT licensed * - * Copyright (C) 2017 Hakim El Hattab, http://hakim.se + * Copyright (C) 2018 Hakim El Hattab, http://hakim.se */ diff --git a/js/reveal.js b/js/reveal.js index dcd09c7..e246db7 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3,7 +3,7 @@ * http://revealjs.com * MIT licensed * - * Copyright (C) 2017 Hakim El Hattab, http://hakim.se + * Copyright (C) 2018 Hakim El Hattab, http://hakim.se */ (function( root, factory ) { if( typeof define === 'function' && define.amd ) { @@ -300,7 +300,7 @@ 'F': 'Fullscreen', 'ESC, O': 'Slide overview' }, - + // Holds custom key code mappings registeredKeyBindings = {}; -- cgit v1.2.3 From 3680f1ad10d1cbb4a48eb98673fa7018d1ab36e5 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 11 Jun 2018 12:35:11 +0200 Subject: merge #1955 with minor changes --- Gruntfile.js | 1 + README.md | 5 +++++ js/reveal.js | 27 +++++++++++++++++++-------- 3 files changed, 25 insertions(+), 8 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index fc38abb..8d8300b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -78,6 +78,7 @@ module.exports = function(grunt) { eqnull: true, browser: true, expr: true, + loopfunc: true, globals: { head: false, module: false, diff --git a/README.md b/README.md index 9c7b3d8..7a570d5 100644 --- a/README.md +++ b/README.md @@ -947,6 +947,11 @@ Reveal.initialize({ Presentations can be exported to PDF via a special print stylesheet. This feature requires that you use [Google Chrome](http://google.com/chrome) or [Chromium](https://www.chromium.org/Home) and to be serving the presentation from a webserver. Here's an example of an exported presentation that's been uploaded to SlideShare: http://www.slideshare.net/hakimel/revealjs-300. +### Separate pages for fragments +[Fragments](#fragments) are printed on separate slides by default. Meaning if you have a slide with three fragment steps, it will generate three separate slides where the fragments appear incrementally. + +If you prefer printing all fragments in their visible states on the same slide you can set the `pdfSeparateFragments` config option to false. + ### Page size Export dimensions are inferred from the configured [presentation size](#presentation-size). Slides that are too tall to fit within a single page will expand onto multiple pages. You can limit how many pages a slide may expand onto using the `pdfMaxPagesPerSlide` config option, for example `Reveal.configure({ pdfMaxPagesPerSlide: 1 })` ensures that no slide ever grows to more than one printed page. diff --git a/js/reveal.js b/js/reveal.js index 926b1d9..921b633 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -204,6 +204,9 @@ // to PDF, unlimited by default pdfMaxPagesPerSlide: Number.POSITIVE_INFINITY, + // Prints each fragment on a separate slide + pdfSeparateFragments: true, + // Offset used to reduce the height of content within exported PDF pages. // This exists to account for environment differences based on how you // print to PDF. CLI printing options, like phantomjs and wkpdf, can end @@ -789,29 +792,38 @@ } // Copy page and show fragments one after another - if ( isPrintingPDFFragments() ) { + if( config.pdfSeparateFragments ) { var numberOfFragments = toArray( page.querySelectorAll( '.fragment' ) ).length; - for ( var currentFragment = 0; currentFragment < numberOfFragments; currentFragment++ ) { + for( var currentFragment = 0; currentFragment < numberOfFragments; currentFragment++ ) { + var clonedPage = page.cloneNode( true ); page.parentNode.insertBefore( clonedPage, page.nextSibling ); - toArray( sortFragments( clonedPage.querySelectorAll( '.fragment' ))).forEach( function ( fragment, fragmentIndex ) { - if ( fragmentIndex <= currentFragment ) { + toArray( sortFragments( clonedPage.querySelectorAll( '.fragment' ) ) ).forEach( function( fragment, fragmentIndex ) { + + if( fragmentIndex < currentFragment ) { fragment.classList.add( 'visible' ); - } else { - fragment.classList.remove( 'visible' ); + fragment.classList.remove( 'current-fragment' ); + } + else if( fragmentIndex === currentFragment ) { + fragment.classList.add( 'visible', 'current-fragment' ); } + else { + fragment.classList.remove( 'visible', 'current-fragment' ); + } + } ); page = clonedPage; + } } // Show all fragments else { - toArray( page.querySelectorAll( '.fragment' ) ).forEach( function( fragment ) { + toArray( page.querySelectorAll( '.fragment:not(.fade-out)' ) ).forEach( function( fragment ) { fragment.classList.add( 'visible' ); } ); } @@ -820,7 +832,6 @@ } ); - // Notify subscribers that the PDF layout is good to go dispatchEvent( 'pdf-ready' ); -- cgit v1.2.3