8d1d23053433ed770660621c1910767faf95e555.svn-base 3.2 KB

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