From edfa131c9c7e4337766623a1413f2e6c46f343e0 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 29 Oct 2015 16:44:47 +0100 Subject: [PATCH] tweak how speaker notes look in pdf exports --- css/print/pdf.css | 3 --- css/reveal.css | 2 +- css/reveal.scss | 2 +- js/reveal.js | 7 +++++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/css/print/pdf.css b/css/print/pdf.css index 5922067..9ed90d6 100644 --- a/css/print/pdf.css +++ b/css/print/pdf.css @@ -152,9 +152,6 @@ ul, ol, div, p { } /* Display slide numbers when 'slideNumber' is enabled */ -.reveal .slide-number { - display: none; -} .reveal .slide-number-pdf { display: block; position: absolute; diff --git a/css/reveal.css b/css/reveal.css index e489712..0cca324 100644 --- a/css/reveal.css +++ b/css/reveal.css @@ -284,7 +284,7 @@ html:-moz-full-screen-ancestor { padding: 5px; } .reveal .slide-number-delimiter { - margin: 0 4px; } + margin: 0 3px; } /********************************************* * SLIDES diff --git a/css/reveal.scss b/css/reveal.scss index 0557980..45f416f 100644 --- a/css/reveal.scss +++ b/css/reveal.scss @@ -341,7 +341,7 @@ html:-moz-full-screen-ancestor { } .reveal .slide-number-delimiter { - margin: 0 4px; + margin: 0 3px; } /********************************************* diff --git a/js/reveal.js b/js/reveal.js index 2d49d2e..d2b2970 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -592,11 +592,14 @@ if( config.showNotes ) { var notes = getSlideNotes( slide ); if( notes ) { + var notesSpacing = 8; var notesElement = document.createElement( 'div' ); notesElement.classList.add( 'speaker-notes' ); notesElement.classList.add( 'speaker-notes-pdf' ); notesElement.innerHTML = notes; - notesElement.style.bottom = ( 40 - top ) + 'px'; + notesElement.style.left = ( notesSpacing - left ) + 'px'; + notesElement.style.bottom = ( notesSpacing - top ) + 'px'; + notesElement.style.width = ( pageWidth - notesSpacing*2 ) + 'px'; slide.appendChild( notesElement ); } } @@ -881,7 +884,7 @@ dom.controls.style.display = config.controls ? 'block' : 'none'; dom.progress.style.display = config.progress ? 'block' : 'none'; - dom.slideNumber.style.display = config.slideNumber ? 'block' : 'none'; + dom.slideNumber.style.display = config.slideNumber && !isPrintingPDF() ? 'block' : 'none'; if( config.rtl ) { dom.wrapper.classList.add( 'rtl' );