##// END OF EJS Templates
Merge pull request #4322 from damianavila/scrollup...
Matthias Bussonnier -
r12888:fd1d6480 merge
parent child Browse files
Show More
@@ -1,169 +1,171 b''
1 {%- extends 'reveal_internals/slides.tpl' -%}
1 {%- extends 'reveal_internals/slides.tpl' -%}
2
2
3
3
4 {% block header %}
4 {% block header %}
5 <!DOCTYPE html>
5 <!DOCTYPE html>
6 <html>
6 <html>
7 <head>
7 <head>
8
8
9 <meta charset="utf-8" />
9 <meta charset="utf-8" />
10 <meta http-equiv="X-UA-Compatible" content="chrome=1">
10 <meta http-equiv="X-UA-Compatible" content="chrome=1">
11
11
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 <!-- General and theme style sheets -->
15 <!-- General and theme style sheets -->
16 <link rel="stylesheet" href="{{resources.reveal.url_prefix}}/css/reveal.css">
16 <link rel="stylesheet" href="{{resources.reveal.url_prefix}}/css/reveal.css">
17 <link rel="stylesheet" href="{{resources.reveal.url_prefix}}/css/theme/simple.css" id="theme">
17 <link rel="stylesheet" href="{{resources.reveal.url_prefix}}/css/theme/simple.css" id="theme">
18
18
19 <!-- For syntax highlighting -->
19 <!-- For syntax highlighting -->
20 <link rel="stylesheet" href="{{resources.reveal.url_prefix}}/lib/css/zenburn.css">
20 <link rel="stylesheet" href="{{resources.reveal.url_prefix}}/lib/css/zenburn.css">
21
21
22 <!-- If the query includes 'print-pdf', use the PDF print sheet -->
22 <!-- If the query includes 'print-pdf', use the PDF print sheet -->
23 <script>
23 <script>
24 document.write( '<link rel="stylesheet" href="{{resources.reveal.url_prefix}}/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
24 document.write( '<link rel="stylesheet" href="{{resources.reveal.url_prefix}}/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
25 </script>
25 </script>
26
26
27 <!--[if lt IE 9]>
27 <!--[if lt IE 9]>
28 <script src="{{resources.reveal.url_prefix}}/lib/js/html5shiv.js"></script>
28 <script src="{{resources.reveal.url_prefix}}/lib/js/html5shiv.js"></script>
29 <![endif]-->
29 <![endif]-->
30
30
31 {% for css in resources.inlining.css -%}
31 {% for css in resources.inlining.css -%}
32 <style type="text/css">
32 <style type="text/css">
33 {{ css }}
33 {{ css }}
34 </style>
34 </style>
35 {% endfor %}
35 {% endfor %}
36
36
37 <style type="text/css">
37 <style type="text/css">
38 /* Overrides of notebook CSS for static HTML export */
38 /* Overrides of notebook CSS for static HTML export */
39 html {
40 overflow-y: auto;
41 }
39 .reveal {
42 .reveal {
40 font-size: 20px;
43 font-size: 20px;
41 overflow-y: auto;
42 overflow-x: hidden;
43 }
44 }
44 .reveal pre {
45 .reveal pre {
45 width: 95%;
46 width: 95%;
46 padding: 0.4em;
47 padding: 0.4em;
47 margin: 0px;
48 margin: 0px;
48 font-family: monospace, sans-serif;
49 font-family: monospace, sans-serif;
49 font-size: 80%;
50 font-size: 80%;
50 box-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
51 box-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
51 }
52 }
52 .reveal section img {
53 .reveal section img {
53 border: 0px solid black;
54 border: 0px solid black;
54 box-shadow: 0 0 10px rgba(0, 0, 0, 0);
55 box-shadow: 0 0 10px rgba(0, 0, 0, 0);
55 }
56 }
56 .reveal .slides {
57 .reveal .slides {
57 text-align: left;
58 text-align: left;
58 }
59 }
59 .reveal.fade {
60 .reveal.fade {
60 opacity: 1;
61 opacity: 1;
61 }
62 }
62 div.input_area {
63 div.input_area {
63 padding: 0.06em;
64 padding: 0.06em;
64 }
65 }
65 div.code_cell {
66 div.code_cell {
66 background-color: transparent;
67 background-color: transparent;
67 }
68 }
68 div.prompt {
69 div.prompt {
69 width: 11ex;
70 width: 11ex;
70 padding: 0.4em;
71 padding: 0.4em;
71 margin: 0px;
72 margin: 0px;
72 font-family: monospace, sans-serif;
73 font-family: monospace, sans-serif;
73 font-size: 80%;
74 font-size: 80%;
74 text-align: right;
75 text-align: right;
75 }
76 }
76 div.output_area pre {
77 div.output_area pre {
77 font-family: monospace, sans-serif;
78 font-family: monospace, sans-serif;
78 font-size: 80%;
79 font-size: 80%;
79 }
80 }
80 div.output_prompt {
81 div.output_prompt {
81 /* 5px right shift to account for margin in parent container */
82 /* 5px right shift to account for margin in parent container */
82 margin: 5px 5px 0 0;
83 margin: 5px 5px 0 0;
83 }
84 }
84 .rendered_html p {
85 .rendered_html p {
85 text-align: inherit;
86 text-align: inherit;
86 }
87 }
87 </style>
88 </style>
88
89
89 <!-- Custom stylesheet, it must be in the same directory as the html file -->
90 <!-- Custom stylesheet, it must be in the same directory as the html file -->
90 <link rel="stylesheet" href="custom.css">
91 <link rel="stylesheet" href="custom.css">
91
92
92 </head>
93 </head>
93 {% endblock header%}
94 {% endblock header%}
94
95
95
96
96 {% block body %}
97 {% block body %}
97 <body>
98 <body>
98 <div class="reveal">
99 <div class="reveal">
99 <div class="slides">
100 <div class="slides">
100 {{ super() }}
101 {{ super() }}
101 </div>
102 </div>
102 </div>
103 </div>
103
104
104 <script src="{{resources.reveal.url_prefix}}/lib/js/head.min.js"></script>
105 <script src="{{resources.reveal.url_prefix}}/lib/js/head.min.js"></script>
105
106
106 <script src="{{resources.reveal.url_prefix}}/js/reveal.js"></script>
107 <script src="{{resources.reveal.url_prefix}}/js/reveal.js"></script>
107
108
108 <script>
109 <script>
109
110
110 // Full list of configuration options available here: https://github.com/hakimel/reveal.js#configuration
111 // Full list of configuration options available here: https://github.com/hakimel/reveal.js#configuration
111 Reveal.initialize({
112 Reveal.initialize({
112 controls: true,
113 controls: true,
113 progress: true,
114 progress: true,
114 history: true,
115 history: true,
115
116
116 theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
117 theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
117 transition: Reveal.getQueryHash().transition || 'linear', // default/cube/page/concave/zoom/linear/none
118 transition: Reveal.getQueryHash().transition || 'linear', // default/cube/page/concave/zoom/linear/none
118
119
119 // Optional libraries used to extend on reveal.js
120 // Optional libraries used to extend on reveal.js
120 dependencies: [
121 dependencies: [
121 { src: "{{resources.reveal.url_prefix}}/lib/js/classList.js", condition: function() { return !document.body.classList; } },
122 { src: "{{resources.reveal.url_prefix}}/lib/js/classList.js", condition: function() { return !document.body.classList; } },
122 { src: "{{resources.reveal.url_prefix}}/plugin/highlight/highlight.js", async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
123 { src: "{{resources.reveal.url_prefix}}/plugin/highlight/highlight.js", async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
123 { src: "{{resources.reveal.url_prefix}}/plugin/notes/notes.js", async: true, condition: function() { return !!document.body.classList; } }
124 { src: "{{resources.reveal.url_prefix}}/plugin/notes/notes.js", async: true, condition: function() { return !!document.body.classList; } }
124 ]
125 ]
125 });
126 });
126 </script>
127 </script>
127
128
128 <!-- MathJax configuration -->
129 <!-- MathJax configuration -->
129 <script type="text/x-mathjax-config">
130 <script type="text/x-mathjax-config">
130 MathJax.Hub.Config({
131 MathJax.Hub.Config({
131 tex2jax: {
132 tex2jax: {
132 inlineMath: [ ['$','$'], ["\\(","\\)"] ],
133 inlineMath: [ ['$','$'], ["\\(","\\)"] ],
133 displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
134 displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
134 },
135 },
135 displayAlign: 'left', // Change this to 'center' to center equations.
136 displayAlign: 'left', // Change this to 'center' to center equations.
136 "HTML-CSS": {
137 "HTML-CSS": {
137 styles: {'.MathJax_Display': {"margin": 0}}
138 styles: {'.MathJax_Display': {"margin": 0}}
138 }
139 }
139 });
140 });
140 </script>
141 </script>
141 <!-- End of mathjax configuration -->
142 <!-- End of mathjax configuration -->
142
143
143 <script>
144 <script>
144 // We wait for the onload function to load MathJax after the page is completely loaded.
145 // 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 // MathJax is loaded 1 unit of time after the page is ready.
146 // This hack prevent problems when you load multiple js files.
147 // This hack prevent problems when you load multiple js files.
147 //
148 //
148 window.onload = function () {
149 window.onload = function () {
149 setTimeout(function () {
150 setTimeout(function () {
150 var script = document.createElement("script");
151 var script = document.createElement("script");
151 script.type = "text/javascript";
152 script.type = "text/javascript";
152 script.src = "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML";
153 script.src = "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML";
153 document.getElementsByTagName("head")[0].appendChild(script);
154 document.getElementsByTagName("head")[0].appendChild(script);
154 },1)
155 },1)
155 }
156 }
156 </script>
157 </script>
157
158
158 <script>
159 <script>
159 Reveal.addEventListener( 'slidechanged', function( event ) {
160 Reveal.addEventListener( 'slidechanged', function( event ) {
160 MathJax.Hub.Rerender(event.currentSlide);
161 window.scrollTo(0,0);
162 MathJax.Hub.Rerender(event.currentSlide);
161 });
163 });
162 </script>
164 </script>
163
165
164 </body>
166 </body>
165 {% endblock body %}
167 {% endblock body %}
166
168
167 {% block footer %}
169 {% block footer %}
168 </html>
170 </html>
169 {% endblock footer %} No newline at end of file
171 {% endblock footer %}
General Comments 0
You need to be logged in to leave comments. Login now