##// END OF EJS Templates
Fixed reveal in the new nbconvert to make it work.
damianavila -
Show More
@@ -47,4 +47,7 b' class RevealExporter(basichtml.BasicHtmlExporter):'
47
47
48 #Register reveal help transformer
48 #Register reveal help transformer
49 self.register_transformer(nbconvert.transformers.revealhelp.RevealHelpTransformer)
49 self.register_transformer(nbconvert.transformers.revealhelp.RevealHelpTransformer)
50
51 #Register CSSHtmlHeaderTransformer transformer
52 self.register_transformer(nbconvert.transformers.csshtmlheader.CSSHtmlHeaderTransformer)
50 No newline at end of file
53
@@ -12,19 +12,19 b''
12 <meta name="apple-mobile-web-app-capable" content="yes" />
12 <meta name="apple-mobile-web-app-capable" content="yes" />
13 <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
13 <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
14
14
15 <link rel="stylesheet" href="reveal/css/reveal.css">
15 <link rel="stylesheet" href="reveal.js/css/reveal.css">
16 <link rel="stylesheet" href="reveal/css/theme/simple.css" id="theme">
16 <link rel="stylesheet" href="reveal.js/css/theme/simple.css" id="theme">
17
17
18 <!-- For syntax highlighting -->
18 <!-- For syntax highlighting -->
19 <link rel="stylesheet" href="reveal/lib/css/zenburn.css">
19 <link rel="stylesheet" href="reveal.js/lib/css/zenburn.css">
20
20
21 <!-- If the query includes 'print-pdf', use the PDF print sheet -->
21 <!-- If the query includes 'print-pdf', use the PDF print sheet -->
22 <script>
22 <script>
23 document.write( '<link rel="stylesheet" href="reveal/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
23 document.write( '<link rel="stylesheet" href="reveal.js/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
24 </script>
24 </script>
25
25
26 <!--[if lt IE 9]>
26 <!--[if lt IE 9]>
27 <script src="reveal/lib/js/html5shiv.js"></script>
27 <script src="reveal.js/lib/js/html5shiv.js"></script>
28 <![endif]-->
28 <![endif]-->
29
29
30 {% for css in resources.inlining.css -%}
30 {% for css in resources.inlining.css -%}
@@ -88,7 +88,7 b' div.output_prompt {'
88
88
89 </div></div>
89 </div></div>
90
90
91 <!-- Social buttons -->
91 <!-- Social buttons
92 <div class="addthis_toolbox addthis_floating_style addthis_32x32_style" style="left:20px;top:20px;">
92 <div class="addthis_toolbox addthis_floating_style addthis_32x32_style" style="left:20px;top:20px;">
93 <a class="addthis_button_twitter"></a>
93 <a class="addthis_button_twitter"></a>
94 <a class="addthis_button_google_plusone_share"></a>
94 <a class="addthis_button_google_plusone_share"></a>
@@ -96,26 +96,11 b' div.output_prompt {'
96 <a class="addthis_button_facebook"></a>
96 <a class="addthis_button_facebook"></a>
97 <a class="addthis_button_more"></a>
97 <a class="addthis_button_more"></a>
98 </div>
98 </div>
99 <!-- End of social buttons -->
99 End of social buttons -->
100
100
101 <!-- MathJax configuration -->
101 <script src="reveal.js/lib/js/head.min.js"></script>
102 <script type="text/x-mathjax-config">
103 MathJax.Hub.Config({
104 tex2jax: {
105 inlineMath: [ ['$','$'], ["\\(","\\)"] ],
106 displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
107 },
108 displayAlign: 'left', // Change this to 'center' to center equations.
109 "HTML-CSS": {
110 styles: {'.MathJax_Display': {"margin": 0}}
111 }
112 });
113 </script>
114 <!-- End of mathjax configuration -->
115
116 <script src="reveal/lib/js/head.min.js"></script>
117
102
118 <script src="reveal/js/reveal.min.js"></script>
103 <script src="reveal.js/js/reveal.min.js"></script>
119
104
120 <script>
105 <script>
121
106
@@ -130,16 +115,46 b" transition: Reveal.getQueryHash().transition || 'linear', // default/cube/page/c"
130
115
131 // Optional libraries used to extend on reveal.js
116 // Optional libraries used to extend on reveal.js
132 dependencies: [
117 dependencies: [
133 { src: 'reveal/lib/js/classList.js', condition: function() { return !document.body.classList; } },
118 { src: 'reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
134 { src: 'reveal/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
119 { src: 'reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
135 { src: 'reveal/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
120 { src: 'reveal.js/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
136 { src: 'reveal/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } },
121 { src: 'reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
137 { src: 'http://s7.addthis.com/js/300/addthis_widget.js', async: true},
122 // { src: 'http://s7.addthis.com/js/300/addthis_widget.js', async: true},
138 { src: 'js/mathjax-onload.js', async: true}
123 // { src: 'js/mathjax-onload.js', async: true}
139 ]
124 ]
140 });
125 });
141 </script>
126 </script>
142
127
128 <!-- MathJax configuration -->
129 <script type="text/x-mathjax-config">
130 MathJax.Hub.Config({
131 tex2jax: {
132 inlineMath: [ ['$','$'], ["\\(","\\)"] ],
133 displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
134 },
135 displayAlign: 'left', // Change this to 'center' to center equations.
136 "HTML-CSS": {
137 styles: {'.MathJax_Display': {"margin": 0}}
138 }
139 });
140 </script>
141 <!-- End of mathjax configuration -->
142
143 <script>
144 // We wait for the onload function to load MathJax after the page is completely loaded.
145 // MathJax is loaded 1 unit of time after the page is ready.
146 // This hack prevent problems when you load multiple js files (i.e. social button from addthis).
147 //
148 window.onload = function () {
149 setTimeout(function () {
150 var script = document.createElement("script");
151 script.type = "text/javascript";
152 script.src = "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML";
153 document.getElementsByTagName("head")[0].appendChild(script);
154 },1)
155 }
156 </script>
157
143 <script>
158 <script>
144 Reveal.addEventListener( 'slidechanged', function( event ) {
159 Reveal.addEventListener( 'slidechanged', function( event ) {
145 MathJax.Hub.Rerender(event.currentSlide);
160 MathJax.Hub.Rerender(event.currentSlide);
@@ -36,16 +36,12 b' class RevealHelpTransformer(ConfigurableTransformer):'
36
36
37 for worksheet in nb.worksheets :
37 for worksheet in nb.worksheets :
38 for i, cell in enumerate(worksheet.cells):
38 for i, cell in enumerate(worksheet.cells):
39
39
40 #Make sure the cell has metadata.
40 #Make sure the cell has slideshow metadata.
41 if not cell.get('metadata', None):
41 cell.metadata.slide_type = cell.get('metadata', {}).get('slideshow', {}).get('slide_type', '-')
42 break
42
43
44 #Get the slide type. If type is start of subslide or slide,
43 #Get the slide type. If type is start of subslide or slide,
45 #end the last subslide/slide.
44 #end the last subslide/slide.
46 cell.metadata.slide_type = cell.metadata.get('slideshow', {}).get('slide_type', None)
47 if cell.metadata.slide_type is None:
48 cell.metadata.slide_type = '-'
49 if cell.metadata.slide_type in ['slide']:
45 if cell.metadata.slide_type in ['slide']:
50 worksheet.cells[i - 1].metadata.slide_helper = 'slide_end'
46 worksheet.cells[i - 1].metadata.slide_helper = 'slide_end'
51 if cell.metadata.slide_type in ['subslide']:
47 if cell.metadata.slide_type in ['subslide']:
General Comments 0
You need to be logged in to leave comments. Login now