starterlog-theme 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +52 -8
  3. data/_layouts/slide.html +105 -0
  4. data/_pages/profile/index.html +1 -1
  5. data/_pages/start/index.html +7 -2
  6. data/assets/modules/reveal.js/.gitignore +13 -0
  7. data/assets/modules/reveal.js/.travis.yml +5 -0
  8. data/assets/modules/reveal.js/CONTRIBUTING.md +23 -0
  9. data/assets/modules/reveal.js/Gruntfile.js +187 -0
  10. data/assets/modules/reveal.js/LICENSE +19 -0
  11. data/assets/modules/reveal.js/README.md +1185 -0
  12. data/assets/modules/reveal.js/bower.json +27 -0
  13. data/assets/modules/reveal.js/css/print/paper.css +203 -0
  14. data/assets/modules/reveal.js/css/print/pdf.css +171 -0
  15. data/assets/modules/reveal.js/css/reveal.css +1365 -0
  16. data/assets/modules/reveal.js/css/reveal.scss +1446 -0
  17. data/assets/modules/reveal.js/css/theme/README.md +21 -0
  18. data/assets/modules/reveal.js/css/theme/beige.css +296 -0
  19. data/assets/modules/reveal.js/css/theme/black.css +292 -0
  20. data/assets/modules/reveal.js/css/theme/blood.css +315 -0
  21. data/assets/modules/reveal.js/css/theme/league.css +298 -0
  22. data/assets/modules/reveal.js/css/theme/moon.css +296 -0
  23. data/assets/modules/reveal.js/css/theme/night.css +290 -0
  24. data/assets/modules/reveal.js/css/theme/serif.css +292 -0
  25. data/assets/modules/reveal.js/css/theme/simple.css +295 -0
  26. data/assets/modules/reveal.js/css/theme/sky.css +299 -0
  27. data/assets/modules/reveal.js/css/theme/solarized.css +296 -0
  28. data/assets/modules/reveal.js/css/theme/source/beige.scss +39 -0
  29. data/assets/modules/reveal.js/css/theme/source/black.scss +49 -0
  30. data/assets/modules/reveal.js/css/theme/source/blood.scss +78 -0
  31. data/assets/modules/reveal.js/css/theme/source/league.scss +34 -0
  32. data/assets/modules/reveal.js/css/theme/source/moon.scss +57 -0
  33. data/assets/modules/reveal.js/css/theme/source/night.scss +34 -0
  34. data/assets/modules/reveal.js/css/theme/source/serif.scss +35 -0
  35. data/assets/modules/reveal.js/css/theme/source/simple.scss +43 -0
  36. data/assets/modules/reveal.js/css/theme/source/sky.scss +46 -0
  37. data/assets/modules/reveal.js/css/theme/source/solarized.scss +63 -0
  38. data/assets/modules/reveal.js/css/theme/source/white.scss +49 -0
  39. data/assets/modules/reveal.js/css/theme/template/mixins.scss +29 -0
  40. data/assets/modules/reveal.js/css/theme/template/settings.scss +43 -0
  41. data/assets/modules/reveal.js/css/theme/template/theme.scss +352 -0
  42. data/assets/modules/reveal.js/css/theme/white.css +292 -0
  43. data/assets/modules/reveal.js/demo.html +410 -0
  44. data/assets/modules/reveal.js/index.html +50 -0
  45. data/assets/modules/reveal.js/js/reveal.js +4961 -0
  46. data/assets/modules/reveal.js/lib/css/zenburn.css +80 -0
  47. data/assets/modules/reveal.js/lib/font/league-gothic/LICENSE +2 -0
  48. data/assets/modules/reveal.js/lib/font/league-gothic/league-gothic.css +10 -0
  49. data/assets/modules/reveal.js/lib/font/league-gothic/league-gothic.eot +0 -0
  50. data/assets/modules/reveal.js/lib/font/league-gothic/league-gothic.ttf +0 -0
  51. data/assets/modules/reveal.js/lib/font/league-gothic/league-gothic.woff +0 -0
  52. data/assets/modules/reveal.js/lib/font/source-sans-pro/LICENSE +45 -0
  53. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
  54. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
  55. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
  56. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
  57. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
  58. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
  59. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
  60. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
  61. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
  62. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
  63. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
  64. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
  65. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro.css +39 -0
  66. data/assets/modules/reveal.js/lib/js/classList.js +2 -0
  67. data/assets/modules/reveal.js/lib/js/head.min.js +9 -0
  68. data/assets/modules/reveal.js/lib/js/html5shiv.js +7 -0
  69. data/assets/modules/reveal.js/package.json +45 -0
  70. data/assets/modules/reveal.js/plugin/highlight/highlight.js +78 -0
  71. data/assets/modules/reveal.js/plugin/markdown/example.html +129 -0
  72. data/assets/modules/reveal.js/plugin/markdown/example.md +31 -0
  73. data/assets/modules/reveal.js/plugin/markdown/markdown.js +411 -0
  74. data/assets/modules/reveal.js/plugin/markdown/marked.js +6 -0
  75. data/assets/modules/reveal.js/plugin/math/math.js +67 -0
  76. data/assets/modules/reveal.js/plugin/multiplex/client.js +13 -0
  77. data/assets/modules/reveal.js/plugin/multiplex/index.js +64 -0
  78. data/assets/modules/reveal.js/plugin/multiplex/master.js +31 -0
  79. data/assets/modules/reveal.js/plugin/multiplex/package.json +19 -0
  80. data/assets/modules/reveal.js/plugin/notes-server/client.js +65 -0
  81. data/assets/modules/reveal.js/plugin/notes-server/index.js +69 -0
  82. data/assets/modules/reveal.js/plugin/notes-server/notes.html +585 -0
  83. data/assets/modules/reveal.js/plugin/notes/notes.html +609 -0
  84. data/assets/modules/reveal.js/plugin/notes/notes.js +145 -0
  85. data/assets/modules/reveal.js/plugin/print-pdf/print-pdf.js +51 -0
  86. data/assets/modules/reveal.js/plugin/search/search.js +196 -0
  87. data/assets/modules/reveal.js/plugin/zoom-js/zoom.js +288 -0
  88. data/assets/modules/reveal.js/test/examples/assets/image1.png +0 -0
  89. data/assets/modules/reveal.js/test/examples/assets/image2.png +0 -0
  90. data/assets/modules/reveal.js/test/examples/barebones.html +41 -0
  91. data/assets/modules/reveal.js/test/examples/embedded-media.html +49 -0
  92. data/assets/modules/reveal.js/test/examples/math.html +185 -0
  93. data/assets/modules/reveal.js/test/examples/slide-backgrounds.html +144 -0
  94. data/assets/modules/reveal.js/test/examples/slide-transitions.html +101 -0
  95. data/assets/modules/reveal.js/test/qunit-1.12.0.css +244 -0
  96. data/assets/modules/reveal.js/test/qunit-1.12.0.js +2212 -0
  97. data/assets/modules/reveal.js/test/simple.md +12 -0
  98. data/assets/modules/reveal.js/test/test-markdown-element-attributes.html +134 -0
  99. data/assets/modules/reveal.js/test/test-markdown-element-attributes.js +46 -0
  100. data/assets/modules/reveal.js/test/test-markdown-external.html +36 -0
  101. data/assets/modules/reveal.js/test/test-markdown-external.js +24 -0
  102. data/assets/modules/reveal.js/test/test-markdown-options.html +41 -0
  103. data/assets/modules/reveal.js/test/test-markdown-options.js +26 -0
  104. data/assets/modules/reveal.js/test/test-markdown-slide-attributes.html +128 -0
  105. data/assets/modules/reveal.js/test/test-markdown-slide-attributes.js +47 -0
  106. data/assets/modules/reveal.js/test/test-markdown.html +52 -0
  107. data/assets/modules/reveal.js/test/test-markdown.js +15 -0
  108. data/assets/modules/reveal.js/test/test-pdf.html +83 -0
  109. data/assets/modules/reveal.js/test/test-pdf.js +15 -0
  110. data/assets/modules/reveal.js/test/test.html +86 -0
  111. data/assets/modules/reveal.js/test/test.js +597 -0
  112. metadata +117 -10
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Handles opening of and synchronization with the reveal.js
3
+ * notes window.
4
+ *
5
+ * Handshake process:
6
+ * 1. This window posts 'connect' to notes window
7
+ * - Includes URL of presentation to show
8
+ * 2. Notes window responds with 'connected' when it is available
9
+ * 3. This window proceeds to send the current presentation state
10
+ * to the notes window
11
+ */
12
+ var RevealNotes = (function() {
13
+
14
+ function openNotes( notesFilePath ) {
15
+
16
+ if( !notesFilePath ) {
17
+ var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
18
+ jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
19
+ notesFilePath = jsFileLocation + 'notes.html';
20
+ }
21
+
22
+ var notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
23
+
24
+ /**
25
+ * Connect to the notes window through a postmessage handshake.
26
+ * Using postmessage enables us to work in situations where the
27
+ * origins differ, such as a presentation being opened from the
28
+ * file system.
29
+ */
30
+ function connect() {
31
+ // Keep trying to connect until we get a 'connected' message back
32
+ var connectInterval = setInterval( function() {
33
+ notesPopup.postMessage( JSON.stringify( {
34
+ namespace: 'reveal-notes',
35
+ type: 'connect',
36
+ url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search,
37
+ state: Reveal.getState()
38
+ } ), '*' );
39
+ }, 500 );
40
+
41
+ window.addEventListener( 'message', function( event ) {
42
+ var data = JSON.parse( event.data );
43
+ if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) {
44
+ clearInterval( connectInterval );
45
+ onConnected();
46
+ }
47
+ } );
48
+ }
49
+
50
+ /**
51
+ * Posts the current slide data to the notes window
52
+ */
53
+ function post(event) {
54
+
55
+ var slideElement = Reveal.getCurrentSlide(),
56
+ notesElement = slideElement.querySelector( 'aside.notes' );
57
+
58
+ var messageData = {
59
+ namespace: 'reveal-notes',
60
+ type: 'state',
61
+ notes: '',
62
+ markdown: false,
63
+ whitespace: 'normal',
64
+ state: Reveal.getState()
65
+ };
66
+
67
+ // Look for notes defined in a fragment, if it is a fragmentshown event
68
+ if (event && event.hasOwnProperty('fragment')) {
69
+ var innerNotes = event.fragment.querySelector( 'aside.notes' );
70
+
71
+ if ( innerNotes) {
72
+ notesElement = innerNotes;
73
+ }
74
+ }
75
+
76
+ // Look for notes defined in a slide attribute
77
+ if( slideElement.hasAttribute( 'data-notes' ) ) {
78
+ messageData.notes = slideElement.getAttribute( 'data-notes' );
79
+ messageData.whitespace = 'pre-wrap';
80
+ }
81
+
82
+ // Look for notes defined in an aside element
83
+ if( notesElement ) {
84
+ messageData.notes = notesElement.innerHTML;
85
+ messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string';
86
+ }
87
+
88
+ notesPopup.postMessage( JSON.stringify( messageData ), '*' );
89
+
90
+ }
91
+
92
+ /**
93
+ * Called once we have established a connection to the notes
94
+ * window.
95
+ */
96
+ function onConnected() {
97
+
98
+ // Monitor events that trigger a change in state
99
+ Reveal.addEventListener( 'slidechanged', post );
100
+ Reveal.addEventListener( 'fragmentshown', post );
101
+ Reveal.addEventListener( 'fragmenthidden', post );
102
+ Reveal.addEventListener( 'overviewhidden', post );
103
+ Reveal.addEventListener( 'overviewshown', post );
104
+ Reveal.addEventListener( 'paused', post );
105
+ Reveal.addEventListener( 'resumed', post );
106
+
107
+ // Post the initial state
108
+ post();
109
+
110
+ }
111
+
112
+ connect();
113
+
114
+ }
115
+
116
+ if( !/receiver/i.test( window.location.search ) ) {
117
+
118
+ // If the there's a 'notes' query set, open directly
119
+ if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) {
120
+ openNotes();
121
+ }
122
+
123
+ // Open the notes when the 's' key is hit
124
+ document.addEventListener( 'keydown', function( event ) {
125
+ // Disregard the event if the target is editable or a
126
+ // modifier is present
127
+ if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
128
+
129
+ // Disregard the event if keyboard is disabled
130
+ if ( Reveal.getConfig().keyboard === false ) return;
131
+
132
+ if( event.keyCode === 83 ) {
133
+ event.preventDefault();
134
+ openNotes();
135
+ }
136
+ }, false );
137
+
138
+ // Show our keyboard shortcut in the reveal.js help overlay
139
+ if( window.Reveal ) Reveal.registerKeyboardShortcut( 'S', 'Speaker notes view' );
140
+
141
+ }
142
+
143
+ return { open: openNotes };
144
+
145
+ })();
@@ -0,0 +1,51 @@
1
+ /**
2
+ * phantomjs script for printing presentations to PDF.
3
+ *
4
+ * Example:
5
+ * phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf
6
+ *
7
+ * @author Manuel Bieh (https://github.com/manuelbieh)
8
+ * @author Hakim El Hattab (https://github.com/hakimel)
9
+ */
10
+
11
+ // html2pdf.js
12
+ var system = require( 'system' );
13
+
14
+ var probePage = new WebPage();
15
+ var printPage = new WebPage();
16
+
17
+ var inputFile = system.args[1] || 'index.html?print-pdf';
18
+ var outputFile = system.args[2] || 'slides.pdf';
19
+
20
+ if( outputFile.match( /\.pdf$/gi ) === null ) {
21
+ outputFile += '.pdf';
22
+ }
23
+
24
+ console.log( 'Export PDF: Reading reveal.js config [1/3]' );
25
+
26
+ probePage.open( inputFile, function( status ) {
27
+
28
+ console.log( 'Export PDF: Preparing print layout [2/3]' );
29
+
30
+ var config = probePage.evaluate( function() {
31
+ return Reveal.getConfig();
32
+ } );
33
+
34
+ printPage.paperSize = {
35
+ width: config.width * ( 1 + config.margin ),
36
+ height: config.height * ( 1 + config.margin ),
37
+ border: 0
38
+ };
39
+
40
+ printPage.open( inputFile, function( status ) {
41
+ window.setTimeout( function() {
42
+ console.log( 'Export PDF: Writing file [3/3]' );
43
+ printPage.render( outputFile );
44
+ console.log( 'Export PDF: Finished successfully!' );
45
+ phantom.exit();
46
+ }, 1000 );
47
+ } );
48
+
49
+ } );
50
+
51
+
@@ -0,0 +1,196 @@
1
+ /*
2
+ * Handles finding a text string anywhere in the slides and showing the next occurrence to the user
3
+ * by navigatating to that slide and highlighting it.
4
+ *
5
+ * By Jon Snyder <snyder.jon@gmail.com>, February 2013
6
+ */
7
+
8
+ var RevealSearch = (function() {
9
+
10
+ var matchedSlides;
11
+ var currentMatchedIndex;
12
+ var searchboxDirty;
13
+ var myHilitor;
14
+
15
+ // Original JavaScript code by Chirp Internet: www.chirp.com.au
16
+ // Please acknowledge use of this code by including this header.
17
+ // 2/2013 jon: modified regex to display any match, not restricted to word boundaries.
18
+
19
+ function Hilitor(id, tag)
20
+ {
21
+
22
+ var targetNode = document.getElementById(id) || document.body;
23
+ var hiliteTag = tag || "EM";
24
+ var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM|SPAN)$");
25
+ var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"];
26
+ var wordColor = [];
27
+ var colorIdx = 0;
28
+ var matchRegex = "";
29
+ var matchingSlides = [];
30
+
31
+ this.setRegex = function(input)
32
+ {
33
+ input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|");
34
+ matchRegex = new RegExp("(" + input + ")","i");
35
+ }
36
+
37
+ this.getRegex = function()
38
+ {
39
+ return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " ");
40
+ }
41
+
42
+ // recursively apply word highlighting
43
+ this.hiliteWords = function(node)
44
+ {
45
+ if(node == undefined || !node) return;
46
+ if(!matchRegex) return;
47
+ if(skipTags.test(node.nodeName)) return;
48
+
49
+ if(node.hasChildNodes()) {
50
+ for(var i=0; i < node.childNodes.length; i++)
51
+ this.hiliteWords(node.childNodes[i]);
52
+ }
53
+ if(node.nodeType == 3) { // NODE_TEXT
54
+ if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) {
55
+ //find the slide's section element and save it in our list of matching slides
56
+ var secnode = node.parentNode;
57
+ while (secnode.nodeName != 'SECTION') {
58
+ secnode = secnode.parentNode;
59
+ }
60
+
61
+ var slideIndex = Reveal.getIndices(secnode);
62
+ var slidelen = matchingSlides.length;
63
+ var alreadyAdded = false;
64
+ for (var i=0; i < slidelen; i++) {
65
+ if ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) {
66
+ alreadyAdded = true;
67
+ }
68
+ }
69
+ if (! alreadyAdded) {
70
+ matchingSlides.push(slideIndex);
71
+ }
72
+
73
+ if(!wordColor[regs[0].toLowerCase()]) {
74
+ wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length];
75
+ }
76
+
77
+ var match = document.createElement(hiliteTag);
78
+ match.appendChild(document.createTextNode(regs[0]));
79
+ match.style.backgroundColor = wordColor[regs[0].toLowerCase()];
80
+ match.style.fontStyle = "inherit";
81
+ match.style.color = "#000";
82
+
83
+ var after = node.splitText(regs.index);
84
+ after.nodeValue = after.nodeValue.substring(regs[0].length);
85
+ node.parentNode.insertBefore(match, after);
86
+ }
87
+ }
88
+ };
89
+
90
+ // remove highlighting
91
+ this.remove = function()
92
+ {
93
+ var arr = document.getElementsByTagName(hiliteTag);
94
+ while(arr.length && (el = arr[0])) {
95
+ el.parentNode.replaceChild(el.firstChild, el);
96
+ }
97
+ };
98
+
99
+ // start highlighting at target node
100
+ this.apply = function(input)
101
+ {
102
+ if(input == undefined || !input) return;
103
+ this.remove();
104
+ this.setRegex(input);
105
+ this.hiliteWords(targetNode);
106
+ return matchingSlides;
107
+ };
108
+
109
+ }
110
+
111
+ function openSearch() {
112
+ //ensure the search term input dialog is visible and has focus:
113
+ var inputbox = document.getElementById("searchinput");
114
+ inputbox.style.display = "inline";
115
+ inputbox.focus();
116
+ inputbox.select();
117
+ }
118
+
119
+ function toggleSearch() {
120
+ var inputbox = document.getElementById("searchinput");
121
+ if (inputbox.style.display !== "inline") {
122
+ openSearch();
123
+ }
124
+ else {
125
+ inputbox.style.display = "none";
126
+ myHilitor.remove();
127
+ }
128
+ }
129
+
130
+ function doSearch() {
131
+ //if there's been a change in the search term, perform a new search:
132
+ if (searchboxDirty) {
133
+ var searchstring = document.getElementById("searchinput").value;
134
+
135
+ //find the keyword amongst the slides
136
+ myHilitor = new Hilitor("slidecontent");
137
+ matchedSlides = myHilitor.apply(searchstring);
138
+ currentMatchedIndex = 0;
139
+ }
140
+
141
+ //navigate to the next slide that has the keyword, wrapping to the first if necessary
142
+ if (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) {
143
+ currentMatchedIndex = 0;
144
+ }
145
+ if (matchedSlides.length > currentMatchedIndex) {
146
+ Reveal.slide(matchedSlides[currentMatchedIndex].h, matchedSlides[currentMatchedIndex].v);
147
+ currentMatchedIndex++;
148
+ }
149
+ }
150
+
151
+ var dom = {};
152
+ dom.wrapper = document.querySelector( '.reveal' );
153
+
154
+ if( !dom.wrapper.querySelector( '.searchbox' ) ) {
155
+ var searchElement = document.createElement( 'div' );
156
+ searchElement.id = "searchinputdiv";
157
+ searchElement.classList.add( 'searchdiv' );
158
+ searchElement.style.position = 'absolute';
159
+ searchElement.style.top = '10px';
160
+ searchElement.style.left = '10px';
161
+ //embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/:
162
+ searchElement.innerHTML = '<span><input type="search" id="searchinput" class="searchinput" style="vertical-align: top;"/><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJiSURBVHjatFZNaxNBGH5md+Mmu92NVdKDRipSAyqCghgQD4L4cRe86UUtAQ+eFCxoa4/25EXBFi8eBE+eRPoDhB6KgiiixdAPCEkx2pjvTXadd9yNsflwuyUDD/O+u8PzzDPvzOwyx3EwyCZhwG3gAkp7MnpjgbopjsltcD4gjuXZZKeAR348MYLYTm3LzOs/y3j3JTfZxgXWXmTuwPHIc4VmoOmv5IrI53+AO2DdHLjkDWQ3GoEEVFXtXQOvkSnPWcyUceviLhwbDYv8/XIVj97kse7TodLvZXxYxrPUHkQ1ufXs3FEdybEIxucySOesoNvUgWU1cP3MkCBfTFdw9fGaAMVmRELq7LBw2Q3/FaAxxWIRpw+ZIr/7IouPqzUBiqmdHAv7EuhRAwf1er2Vy4x1jW3b2d5Jfvu5IPp7l2LYbcgCFFNb+FoJ7oBqEAqFMPNqFcmEgVMJDfMT+1tvN0pNjERlMS6QA5pFOKxiKVPFhakPeL3It+WGJUDxt2wFR+JhzI7v5ctkd8DXOZAkCYYxhO+lKm4+Xfqz/rIixBuNBl7eOYzkQQNzqX249mRl6zUgEcYkaJrGhUwBinVdh6IouPzwE6/DL5w4oLkH8y981aDf+uq6hlKpJESiUdNfDZi7/ehG9K6KfiA3pml0PLcsq+cSMTj2NL9ukc4UOmz7AZ3+crkC4mHujFvXNaMFB3bEr8xPS6p5O+jXxq4VZtaen7/PwzrntjcLUE0iHPS1Ud1cdiEJl/8WivZk0wXd7zWOMkeF8s0CcAmkNrC2nvXZDbbbN73ccYnZoH9bfgswAFzAe9/h3dbKAAAAAElFTkSuQmCC" id="searchbutton" class="searchicon" style="vertical-align: top; margin-top: -1px;"/></span>';
163
+ dom.wrapper.appendChild( searchElement );
164
+ }
165
+
166
+ document.getElementById("searchbutton").addEventListener( 'click', function(event) {
167
+ doSearch();
168
+ }, false );
169
+
170
+ document.getElementById("searchinput").addEventListener( 'keyup', function( event ) {
171
+ switch (event.keyCode) {
172
+ case 13:
173
+ event.preventDefault();
174
+ doSearch();
175
+ searchboxDirty = false;
176
+ break;
177
+ default:
178
+ searchboxDirty = true;
179
+ }
180
+ }, false );
181
+
182
+ // Open the search when the 's' key is hit (yes, this conflicts with the notes plugin, disabling for now)
183
+ /*
184
+ document.addEventListener( 'keydown', function( event ) {
185
+ // Disregard the event if the target is editable or a
186
+ // modifier is present
187
+ if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
188
+
189
+ if( event.keyCode === 83 ) {
190
+ event.preventDefault();
191
+ openSearch();
192
+ }
193
+ }, false );
194
+ */
195
+ return { open: openSearch };
196
+ })();
@@ -0,0 +1,288 @@
1
+ // Custom reveal.js integration
2
+ (function(){
3
+ var isEnabled = true;
4
+
5
+ document.querySelector( '.reveal .slides' ).addEventListener( 'mousedown', function( event ) {
6
+ var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : 'alt' ) + 'Key';
7
+
8
+ var zoomPadding = 20;
9
+ var revealScale = Reveal.getScale();
10
+
11
+ if( event[ modifier ] && isEnabled ) {
12
+ event.preventDefault();
13
+
14
+ var bounds;
15
+ var originalDisplay = event.target.style.display;
16
+
17
+ // Get the bounding rect of the contents, not the containing box
18
+ if( window.getComputedStyle( event.target ).display === 'block' ) {
19
+ event.target.style.display = 'inline-block';
20
+ bounds = event.target.getBoundingClientRect();
21
+ event.target.style.display = originalDisplay;
22
+ } else {
23
+ bounds = event.target.getBoundingClientRect();
24
+ }
25
+
26
+ zoom.to({
27
+ x: ( bounds.left * revealScale ) - zoomPadding,
28
+ y: ( bounds.top * revealScale ) - zoomPadding,
29
+ width: ( bounds.width * revealScale ) + ( zoomPadding * 2 ),
30
+ height: ( bounds.height * revealScale ) + ( zoomPadding * 2 ),
31
+ pan: false
32
+ });
33
+ }
34
+ } );
35
+
36
+ Reveal.addEventListener( 'overviewshown', function() { isEnabled = false; } );
37
+ Reveal.addEventListener( 'overviewhidden', function() { isEnabled = true; } );
38
+ })();
39
+
40
+ /*!
41
+ * zoom.js 0.3 (modified for use with reveal.js)
42
+ * http://lab.hakim.se/zoom-js
43
+ * MIT licensed
44
+ *
45
+ * Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se
46
+ */
47
+ var zoom = (function(){
48
+
49
+ // The current zoom level (scale)
50
+ var level = 1;
51
+
52
+ // The current mouse position, used for panning
53
+ var mouseX = 0,
54
+ mouseY = 0;
55
+
56
+ // Timeout before pan is activated
57
+ var panEngageTimeout = -1,
58
+ panUpdateInterval = -1;
59
+
60
+ // Check for transform support so that we can fallback otherwise
61
+ var supportsTransforms = 'WebkitTransform' in document.body.style ||
62
+ 'MozTransform' in document.body.style ||
63
+ 'msTransform' in document.body.style ||
64
+ 'OTransform' in document.body.style ||
65
+ 'transform' in document.body.style;
66
+
67
+ if( supportsTransforms ) {
68
+ // The easing that will be applied when we zoom in/out
69
+ document.body.style.transition = 'transform 0.8s ease';
70
+ document.body.style.OTransition = '-o-transform 0.8s ease';
71
+ document.body.style.msTransition = '-ms-transform 0.8s ease';
72
+ document.body.style.MozTransition = '-moz-transform 0.8s ease';
73
+ document.body.style.WebkitTransition = '-webkit-transform 0.8s ease';
74
+ }
75
+
76
+ // Zoom out if the user hits escape
77
+ document.addEventListener( 'keyup', function( event ) {
78
+ if( level !== 1 && event.keyCode === 27 ) {
79
+ zoom.out();
80
+ }
81
+ } );
82
+
83
+ // Monitor mouse movement for panning
84
+ document.addEventListener( 'mousemove', function( event ) {
85
+ if( level !== 1 ) {
86
+ mouseX = event.clientX;
87
+ mouseY = event.clientY;
88
+ }
89
+ } );
90
+
91
+ /**
92
+ * Applies the CSS required to zoom in, prefers the use of CSS3
93
+ * transforms but falls back on zoom for IE.
94
+ *
95
+ * @param {Object} rect
96
+ * @param {Number} scale
97
+ */
98
+ function magnify( rect, scale ) {
99
+
100
+ var scrollOffset = getScrollOffset();
101
+
102
+ // Ensure a width/height is set
103
+ rect.width = rect.width || 1;
104
+ rect.height = rect.height || 1;
105
+
106
+ // Center the rect within the zoomed viewport
107
+ rect.x -= ( window.innerWidth - ( rect.width * scale ) ) / 2;
108
+ rect.y -= ( window.innerHeight - ( rect.height * scale ) ) / 2;
109
+
110
+ if( supportsTransforms ) {
111
+ // Reset
112
+ if( scale === 1 ) {
113
+ document.body.style.transform = '';
114
+ document.body.style.OTransform = '';
115
+ document.body.style.msTransform = '';
116
+ document.body.style.MozTransform = '';
117
+ document.body.style.WebkitTransform = '';
118
+ }
119
+ // Scale
120
+ else {
121
+ var origin = scrollOffset.x +'px '+ scrollOffset.y +'px',
122
+ transform = 'translate('+ -rect.x +'px,'+ -rect.y +'px) scale('+ scale +')';
123
+
124
+ document.body.style.transformOrigin = origin;
125
+ document.body.style.OTransformOrigin = origin;
126
+ document.body.style.msTransformOrigin = origin;
127
+ document.body.style.MozTransformOrigin = origin;
128
+ document.body.style.WebkitTransformOrigin = origin;
129
+
130
+ document.body.style.transform = transform;
131
+ document.body.style.OTransform = transform;
132
+ document.body.style.msTransform = transform;
133
+ document.body.style.MozTransform = transform;
134
+ document.body.style.WebkitTransform = transform;
135
+ }
136
+ }
137
+ else {
138
+ // Reset
139
+ if( scale === 1 ) {
140
+ document.body.style.position = '';
141
+ document.body.style.left = '';
142
+ document.body.style.top = '';
143
+ document.body.style.width = '';
144
+ document.body.style.height = '';
145
+ document.body.style.zoom = '';
146
+ }
147
+ // Scale
148
+ else {
149
+ document.body.style.position = 'relative';
150
+ document.body.style.left = ( - ( scrollOffset.x + rect.x ) / scale ) + 'px';
151
+ document.body.style.top = ( - ( scrollOffset.y + rect.y ) / scale ) + 'px';
152
+ document.body.style.width = ( scale * 100 ) + '%';
153
+ document.body.style.height = ( scale * 100 ) + '%';
154
+ document.body.style.zoom = scale;
155
+ }
156
+ }
157
+
158
+ level = scale;
159
+
160
+ if( document.documentElement.classList ) {
161
+ if( level !== 1 ) {
162
+ document.documentElement.classList.add( 'zoomed' );
163
+ }
164
+ else {
165
+ document.documentElement.classList.remove( 'zoomed' );
166
+ }
167
+ }
168
+ }
169
+
170
+ /**
171
+ * Pan the document when the mosue cursor approaches the edges
172
+ * of the window.
173
+ */
174
+ function pan() {
175
+ var range = 0.12,
176
+ rangeX = window.innerWidth * range,
177
+ rangeY = window.innerHeight * range,
178
+ scrollOffset = getScrollOffset();
179
+
180
+ // Up
181
+ if( mouseY < rangeY ) {
182
+ window.scroll( scrollOffset.x, scrollOffset.y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) );
183
+ }
184
+ // Down
185
+ else if( mouseY > window.innerHeight - rangeY ) {
186
+ window.scroll( scrollOffset.x, scrollOffset.y + ( 1 - ( window.innerHeight - mouseY ) / rangeY ) * ( 14 / level ) );
187
+ }
188
+
189
+ // Left
190
+ if( mouseX < rangeX ) {
191
+ window.scroll( scrollOffset.x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ), scrollOffset.y );
192
+ }
193
+ // Right
194
+ else if( mouseX > window.innerWidth - rangeX ) {
195
+ window.scroll( scrollOffset.x + ( 1 - ( window.innerWidth - mouseX ) / rangeX ) * ( 14 / level ), scrollOffset.y );
196
+ }
197
+ }
198
+
199
+ function getScrollOffset() {
200
+ return {
201
+ x: window.scrollX !== undefined ? window.scrollX : window.pageXOffset,
202
+ y: window.scrollY !== undefined ? window.scrollY : window.pageYOffset
203
+ }
204
+ }
205
+
206
+ return {
207
+ /**
208
+ * Zooms in on either a rectangle or HTML element.
209
+ *
210
+ * @param {Object} options
211
+ * - element: HTML element to zoom in on
212
+ * OR
213
+ * - x/y: coordinates in non-transformed space to zoom in on
214
+ * - width/height: the portion of the screen to zoom in on
215
+ * - scale: can be used instead of width/height to explicitly set scale
216
+ */
217
+ to: function( options ) {
218
+
219
+ // Due to an implementation limitation we can't zoom in
220
+ // to another element without zooming out first
221
+ if( level !== 1 ) {
222
+ zoom.out();
223
+ }
224
+ else {
225
+ options.x = options.x || 0;
226
+ options.y = options.y || 0;
227
+
228
+ // If an element is set, that takes precedence
229
+ if( !!options.element ) {
230
+ // Space around the zoomed in element to leave on screen
231
+ var padding = 20;
232
+ var bounds = options.element.getBoundingClientRect();
233
+
234
+ options.x = bounds.left - padding;
235
+ options.y = bounds.top - padding;
236
+ options.width = bounds.width + ( padding * 2 );
237
+ options.height = bounds.height + ( padding * 2 );
238
+ }
239
+
240
+ // If width/height values are set, calculate scale from those values
241
+ if( options.width !== undefined && options.height !== undefined ) {
242
+ options.scale = Math.max( Math.min( window.innerWidth / options.width, window.innerHeight / options.height ), 1 );
243
+ }
244
+
245
+ if( options.scale > 1 ) {
246
+ options.x *= options.scale;
247
+ options.y *= options.scale;
248
+
249
+ magnify( options, options.scale );
250
+
251
+ if( options.pan !== false ) {
252
+
253
+ // Wait with engaging panning as it may conflict with the
254
+ // zoom transition
255
+ panEngageTimeout = setTimeout( function() {
256
+ panUpdateInterval = setInterval( pan, 1000 / 60 );
257
+ }, 800 );
258
+
259
+ }
260
+ }
261
+ }
262
+ },
263
+
264
+ /**
265
+ * Resets the document zoom state to its default.
266
+ */
267
+ out: function() {
268
+ clearTimeout( panEngageTimeout );
269
+ clearInterval( panUpdateInterval );
270
+
271
+ magnify( { x: 0, y: 0 }, 1 );
272
+
273
+ level = 1;
274
+ },
275
+
276
+ // Alias
277
+ magnify: function( options ) { this.to( options ) },
278
+ reset: function() { this.out() },
279
+
280
+ zoomLevel: function() {
281
+ return level;
282
+ }
283
+ }
284
+
285
+ })();
286
+
287
+
288
+