notes.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. clear: left;
  15. }
  16. #wrap-current-slide {
  17. width: 640px;
  18. height: 512px;
  19. float: left;
  20. overflow: hidden;
  21. }
  22. #current-slide {
  23. width: 1280px;
  24. height: 1024px;
  25. border: none;
  26. -webkit-transform-origin: 0 0;
  27. -moz-transform-origin: 0 0;
  28. -ms-transform-origin: 0 0;
  29. -o-transform-origin: 0 0;
  30. transform-origin: 0 0;
  31. -webkit-transform: scale(0.5);
  32. -moz-transform: scale(0.5);
  33. -ms-transform: scale(0.5);
  34. -o-transform: scale(0.5);
  35. transform: scale(0.5);
  36. }
  37. #wrap-next-slide {
  38. width: 448px;
  39. height: 358px;
  40. float: left;
  41. margin: 0 0 0 10px;
  42. overflow: hidden;
  43. }
  44. #next-slide {
  45. width: 1280px;
  46. height: 1024px;
  47. border: none;
  48. -webkit-transform-origin: 0 0;
  49. -moz-transform-origin: 0 0;
  50. -ms-transform-origin: 0 0;
  51. -o-transform-origin: 0 0;
  52. transform-origin: 0 0;
  53. -webkit-transform: scale(0.35);
  54. -moz-transform: scale(0.35);
  55. -ms-transform: scale(0.35);
  56. -o-transform: scale(0.35);
  57. transform: scale(0.35);
  58. }
  59. .slides {
  60. position: relative;
  61. margin-bottom: 10px;
  62. border: 1px solid black;
  63. border-radius: 2px;
  64. background: rgb(28, 30, 32);
  65. }
  66. .slides span {
  67. position: absolute;
  68. top: 3px;
  69. left: 3px;
  70. font-weight: bold;
  71. font-size: 14px;
  72. color: rgba( 255, 255, 255, 0.9 );
  73. }
  74. </style>
  75. </head>
  76. <body>
  77. <div id="wrap-current-slide" class="slides">
  78. <iframe src="/?receiver" width="1280" height="1024" id="current-slide"></iframe>
  79. </div>
  80. <div id="wrap-next-slide" class="slides">
  81. <iframe src="/?receiver" width="640" height="512" id="next-slide"></iframe>
  82. <span>UPCOMING:</span>
  83. </div>
  84. <div id="notes"></div>
  85. <script src="/socket.io/socket.io.js"></script>
  86. <script src="/plugin/markdown/marked.js"></script>
  87. <script>
  88. var socketId = '{{socketId}}';
  89. var socket = io.connect(window.location.origin);
  90. var notes = document.getElementById('notes');
  91. var currentSlide = document.getElementById('current-slide');
  92. var nextSlide = document.getElementById('next-slide');
  93. socket.on('slidedata', function(data) {
  94. // ignore data from sockets that aren't ours
  95. if (data.socketId !== socketId) { return; }
  96. if (data.markdown) {
  97. notes.innerHTML = marked(data.notes);
  98. }
  99. else {
  100. notes.innerHTML = data.notes;
  101. }
  102. currentSlide.contentWindow.Reveal.slide(data.indexh, data.indexv);
  103. nextSlide.contentWindow.Reveal.slide(data.nextindexh, data.nextindexv);
  104. });
  105. socket.on('fragmentdata', function(data) {
  106. // ignore data from sockets that aren't ours
  107. if (data.socketId !== socketId) { return; }
  108. if (data.fragment === 'next') {
  109. currentSlide.contentWindow.Reveal.nextFragment();
  110. }
  111. else if (data.fragment === 'previous') {
  112. currentSlide.contentWindow.Reveal.prevFragment();
  113. }
  114. });
  115. </script>
  116. </body>
  117. </html>