notes.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>reveal.js - Slide Notes</title>
  6. <style>
  7. body {
  8. font-family: Helvetica;
  9. }
  10. #notes {
  11. font-size: 24px;
  12. width: 640px;
  13. margin-top: 5px;
  14. }
  15. #wrap-current-slide {
  16. width: 640px;
  17. height: 512px;
  18. float: left;
  19. overflow: hidden;
  20. }
  21. #current-slide {
  22. width: 1280px;
  23. height: 1024px;
  24. border: none;
  25. -moz-transform: scale(0.5);
  26. -moz-transform-origin: 0 0;
  27. -o-transform: scale(0.5);
  28. -o-transform-origin: 0 0;
  29. -webkit-transform: scale(0.5);
  30. -webkit-transform-origin: 0 0;
  31. }
  32. #wrap-next-slide {
  33. width: 320px;
  34. height: 256px;
  35. float: left;
  36. margin: 0 0 0 10px;
  37. overflow: hidden;
  38. }
  39. #next-slide {
  40. width: 1280px;
  41. height: 1024px;
  42. border: none;
  43. -moz-transform: scale(0.25);
  44. -moz-transform-origin: 0 0;
  45. -o-transform: scale(0.25);
  46. -o-transform-origin: 0 0;
  47. -webkit-transform: scale(0.25);
  48. -webkit-transform-origin: 0 0;
  49. }
  50. .slides {
  51. position: relative;
  52. margin-bottom: 10px;
  53. border: 1px solid black;
  54. border-radius: 2px;
  55. background: rgb(28, 30, 32);
  56. }
  57. .slides span {
  58. position: absolute;
  59. top: 3px;
  60. left: 3px;
  61. font-weight: bold;
  62. font-size: 14px;
  63. color: rgba( 255, 255, 255, 0.9 );
  64. }
  65. </style>
  66. </head>
  67. <body>
  68. <div id="wrap-current-slide" class="slides">
  69. <iframe src="/?receiver" width="1280" height="1024" id="current-slide"></iframe>
  70. </div>
  71. <div id="wrap-next-slide" class="slides">
  72. <iframe src="/?receiver" width="640" height="512" id="next-slide"></iframe>
  73. <span>UPCOMING:</span>
  74. </div>
  75. <div id="notes"></div>
  76. <script src="/socket.io/socket.io.js"></script>
  77. <script>
  78. var socketId = '{{socketId}}';
  79. var socket = io.connect(window.location.origin);
  80. var notes = document.getElementById('notes');
  81. var currentSlide = document.getElementById('current-slide');
  82. var nextSlide = document.getElementById('next-slide');
  83. socket.on('slidedata', function(data) {
  84. // ignore data from sockets that aren't ours
  85. if (data.socketId !== socketId) { return; }
  86. notes.innerHTML = data.notes;
  87. currentSlide.contentWindow.Reveal.navigateTo(data.indexh, data.indexv);
  88. nextSlide.contentWindow.Reveal.navigateTo(data.nextindexh, data.nextindexv);
  89. });
  90. </script>
  91. </body>
  92. </html>