notes.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Slide Notes</title>
  6. <style>
  7. #notes {
  8. font-family: Helvetica;
  9. font-size: 24px;
  10. width: 640px;
  11. }
  12. #wrap-slides {
  13. width: 640px;
  14. height: 512px;
  15. float: left;
  16. }
  17. #slides {
  18. width: 1280px;
  19. height: 1024px;
  20. border: 1px solid black;
  21. -moz-transform: scale(0.5);
  22. -moz-transform-origin: 0 0;
  23. -o-transform: scale(0.5);
  24. -o-transform-origin: 0 0;
  25. -webkit-transform: scale(0.5);
  26. -webkit-transform-origin: 0 0;
  27. }
  28. #wrap-next-slide {
  29. width: 320px;
  30. height: 256px;
  31. float: left;
  32. margin: 0 0 0 50px;
  33. }
  34. #next-slide {
  35. width: 1280px;
  36. height: 1024px;
  37. border: 1px solid black;
  38. -moz-transform: scale(0.25);
  39. -moz-transform-origin: 0 0;
  40. -o-transform: scale(0.25);
  41. -o-transform-origin: 0 0;
  42. -webkit-transform: scale(0.25);
  43. -webkit-transform-origin: 0 0;
  44. }
  45. </style>
  46. </head>
  47. <body>
  48. <div id="wrap-slides">
  49. <iframe src="/?receiver" width="1280" height="1024" id="slides"></iframe>
  50. </div>
  51. <div id="wrap-next-slide">
  52. <iframe src="/?receiver" width="640" height="512" id="next-slide"></iframe>
  53. </div>
  54. <div id="notes"></div>
  55. <script src="/socket.io/socket.io.js"></script>
  56. <script>
  57. var socketId = '{{socketId}}';
  58. var socket = io.connect(window.location.origin);
  59. var notes = document.getElementById('notes');
  60. var slides = document.getElementById('slides');
  61. var nextSlide = document.getElementById('next-slide');
  62. socket.on('slidedata', function(data) {
  63. // ignore data from sockets that aren't ours
  64. if (data.socketId !== socketId) { return; }
  65. notes.innerHTML = data.notes;
  66. slides.contentWindow.Reveal.navigateTo(data.indexh, data.indexv);
  67. nextSlide.contentWindow.Reveal.navigateTo(data.nextindexh, data.nextindexv);
  68. });
  69. </script>
  70. </body>
  71. </html>