Skip to content

Commit 13892fb

Browse files
committed
Add hidden speacker notes
1 parent 21bbb9b commit 13892fb

File tree

6 files changed

+505
-13
lines changed

6 files changed

+505
-13
lines changed

deck-remote-client/index.html

+11-12
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
float: left;
2121
}
2222

23+
div#notes {
24+
width: 20%;
25+
position: absolute;
26+
left: 0;
27+
top: 300px;
28+
}
29+
2330
p#cur_frame_label {
2431
width: 50%;
2532
text-align: center;
@@ -36,14 +43,6 @@
3643
left: 25%;
3744
}
3845

39-
p#prev_frame_label {
40-
width: 20%;
41-
text-align: center;
42-
position: absolute;
43-
left: 0;
44-
bottom: 300px;
45-
}
46-
4746
iframe#prev_frame {
4847
position: absolute;
4948
left: 0;
@@ -55,7 +54,7 @@
5554
text-align: center;
5655
position: absolute;
5756
right: 0;
58-
bottom: 300px;
57+
top: 270px;
5958
}
6059

6160
iframe#next_frame {
@@ -82,10 +81,10 @@
8281
var data = jQuery.parseJSON(evt.data);
8382
if (data.type == 'status') {
8483
$('#current-slide').text(data.data.currentSlide + 1);
84+
$('#notes').text(data.data.notes);
8585
}
8686
if (data.type == 'url') {
8787
$this.url = data.data;
88-
$('#prev_frame').attr('src', $this.url + '#mirror-1');
8988
$('#cur_frame').attr('src', $this.url + '#mirror+0');
9089
$('#next_frame').attr('src', $this.url + '#mirror+1');
9190
}
@@ -148,8 +147,8 @@
148147
<a href="#" id="next">&gt;&gt;</a><br />
149148
<span id="clock"></span><br />
150149
<a href="#" id="start-stop-clock">Start Timer</a><br />
151-
<p id="prev_frame_label">Previous Slide</p>
152-
<iframe id="prev_frame"></iframe>
150+
<div id="notes">
151+
</div>
153152
<p id="cur_frame_label">Current Slide</p>
154153
<iframe id="cur_frame"></iframe>
155154
<p id="next_frame_label">Next Slide</p>

deck-remote/deck.remote.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.hidden-notes {
2+
display: none;
3+
}

deck-remote/deck.remote.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script type="text/javascript" src="json2.js"></script>

deck-remote/deck.remote.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ the deck container.
6969
this.sendStatus = function() {};
7070
},
7171
sendStatus: function() {
72-
this.myWebSocket.send('{"type":"status", "data": { "currentSlide": ' + this.currentSlide + ' } }');
72+
var notes = $('.hidden-notes', $[deck]('getSlide', this.currentSlide)).text();
73+
this.myWebSocket.send(JSON.stringify({"type":"status", "data": { "currentSlide": this.currentSlide, "notes": notes } }));
7374
}
7475
};
7576
$[deck]('extend', 'remoteInit', function() {

0 commit comments

Comments
 (0)