From 9eb56f8146e9d4d57e579fcc1a40ae370b036e5b Mon Sep 17 00:00:00 2001
From: Benjamin Tan
Date: Sun, 6 Mar 2016 16:52:02 +0800
Subject: Remove unused dependencies.
---
plugin/notes-server/index.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
(limited to 'plugin/notes-server')
diff --git a/plugin/notes-server/index.js b/plugin/notes-server/index.js
index 683f064..fc66a26 100644
--- a/plugin/notes-server/index.js
+++ b/plugin/notes-server/index.js
@@ -2,7 +2,6 @@ var http = require('http');
var express = require('express');
var fs = require('fs');
var io = require('socket.io');
-var _ = require('underscore');
var Mustache = require('mustache');
var app = express();
@@ -64,5 +63,5 @@ var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : ''
console.log( brown + 'reveal.js - Speaker Notes' + reset );
console.log( '1. Open the slides at ' + green + slidesLocation + reset );
-console.log( '2. Click on the link your JS console to go to the notes page' );
+console.log( '2. Click on the link in your JS console to go to the notes page' );
console.log( '3. Advance through your slides and your notes will advance automatically' );
--
cgit v1.2.3
From ef137fd01f228c50027c356084a2e69e938e2511 Mon Sep 17 00:00:00 2001
From: Hakim El Hattab
Date: Wed, 9 Mar 2016 10:02:25 +0100
Subject: server notes plugin no longer syncs overview mode #1446
---
plugin/notes-server/index.js | 2 ++
1 file changed, 2 insertions(+)
(limited to 'plugin/notes-server')
diff --git a/plugin/notes-server/index.js b/plugin/notes-server/index.js
index fc66a26..b95f071 100644
--- a/plugin/notes-server/index.js
+++ b/plugin/notes-server/index.js
@@ -22,10 +22,12 @@ io.on( 'connection', function( socket ) {
});
socket.on( 'statechanged', function( data ) {
+ delete data.state.overview;
socket.broadcast.emit( 'statechanged', data );
});
socket.on( 'statechanged-speaker', function( data ) {
+ delete data.state.overview;
socket.broadcast.emit( 'statechanged-speaker', data );
});
--
cgit v1.2.3
From ec76f4790ce5a9c1248bfab9e0d26eb56eccef79 Mon Sep 17 00:00:00 2001
From: Hakim El Hattab
Date: Wed, 21 Sep 2016 14:10:14 +0200
Subject: speaker layouts in server side notes plugin
---
plugin/notes-server/notes.html | 218 +++++++++++++++++++++++++++++++++++++----
plugin/notes/notes.html | 4 +
2 files changed, 202 insertions(+), 20 deletions(-)
(limited to 'plugin/notes-server')
diff --git a/plugin/notes-server/notes.html b/plugin/notes-server/notes.html
index ad8c719..ab8c5b1 100644
--- a/plugin/notes-server/notes.html
+++ b/plugin/notes-server/notes.html
@@ -8,6 +8,7 @@
@@ -152,7 +247,7 @@
- UPCOMING:
+ Upcoming
Time Click to Reset
@@ -170,6 +265,10 @@
+
+
+
+
@@ -182,11 +281,20 @@
currentState,
currentSlide,
upcomingSlide,
+ layoutLabel,
+ layoutDropdown,
connected = false;
var socket = io.connect( window.location.origin ),
socketId = '{{socketId}}';
+ var SPEAKER_LAYOUTS = {
+ 'default': 'Default',
+ 'wide': 'Wide',
+ 'tall': 'Tall',
+ 'notes-only': 'Notes only'
+ };
+
socket.on( 'statechanged', function( data ) {
// ignore data from sockets that aren't ours
@@ -205,6 +313,8 @@
} );
+ setupLayout();
+
// Load our presentation iframes
setupIframes();
@@ -362,6 +472,74 @@
}
+ /**
+ * Sets up the speaker view layout and layout selector.
+ */
+ function setupLayout() {
+
+ layoutDropdown = document.querySelector( '.speaker-layout-dropdown' );
+ layoutLabel = document.querySelector( '.speaker-layout-label' );
+
+ // Render the list of available layouts
+ for( var id in SPEAKER_LAYOUTS ) {
+ var option = document.createElement( 'option' );
+ option.setAttribute( 'value', id );
+ option.textContent = SPEAKER_LAYOUTS[ id ];
+ layoutDropdown.appendChild( option );
+ }
+
+ // Monitor the dropdown for changes
+ layoutDropdown.addEventListener( 'change', function( event ) {
+
+ setLayout( layoutDropdown.value );
+
+ }, false );
+
+ // Restore any currently persisted layout
+ setLayout( getLayout() );
+
+ }
+
+ /**
+ * Sets a new speaker view layout. The layout is persisted
+ * in local storage.
+ */
+ function setLayout( value ) {
+
+ var title = SPEAKER_LAYOUTS[ value ];
+
+ layoutLabel.innerHTML = 'Layout' + ( title ? ( ': ' + title ) : '' );
+ layoutDropdown.value = value;
+
+ document.body.setAttribute( 'data-speaker-layout', value );
+
+ // Persist locally
+ if( window.localStorage ) {
+ window.localStorage.setItem( 'reveal-speaker-layout', value );
+ }
+
+ }
+
+ /**
+ * Returns the ID of the most recently set speaker layout
+ * or our default layout if none has been set.
+ */
+ function getLayout() {
+
+ if( window.localStorage ) {
+ var layout = window.localStorage.getItem( 'reveal-speaker-layout' );
+ if( layout ) {
+ return layout;
+ }
+ }
+
+ // Default to the first record in the layouts hash
+ for( var id in SPEAKER_LAYOUTS ) {
+ return id;
+ }
+
+ }
+
function zeroPadInteger( num ) {
var str = '00' + parseInt( num );
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 145490a..4fda869 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -544,6 +544,10 @@
}
+ /**
+ * Returns the ID of the most recently set speaker layout
+ * or our default layout if none has been set.
+ */
function getLayout() {
if( window.localStorage ) {
--
cgit v1.2.3