Show More
@@ -1,193 +1,193 b'' | |||||
1 | {%- extends 'display_priority.tpl' -%} |
|
1 | {%- extends 'display_priority.tpl' -%} | |
2 |
|
2 | |||
3 |
|
3 | |||
4 | {% block codecell %} |
|
4 | {% block codecell %} | |
5 | <div class="cell border-box-sizing code_cell rendered"> |
|
5 | <div class="cell border-box-sizing code_cell rendered"> | |
6 | {{ super() }} |
|
6 | {{ super() }} | |
7 | </div> |
|
7 | </div> | |
8 | {%- endblock codecell %} |
|
8 | {%- endblock codecell %} | |
9 |
|
9 | |||
10 | {% block input_group -%} |
|
10 | {% block input_group -%} | |
11 | <div class="input"> |
|
11 | <div class="input"> | |
12 | {{ super() }} |
|
12 | {{ super() }} | |
13 | </div> |
|
13 | </div> | |
14 | {% endblock input_group %} |
|
14 | {% endblock input_group %} | |
15 |
|
15 | |||
16 | {% block output_group %} |
|
16 | {% block output_group %} | |
17 | <div class="output_wrapper"> |
|
17 | <div class="output_wrapper"> | |
18 | <div class="output"> |
|
18 | <div class="output"> | |
19 | {{ super() }} |
|
19 | {{ super() }} | |
20 | </div> |
|
20 | </div> | |
21 | </div> |
|
21 | </div> | |
22 | {% endblock output_group %} |
|
22 | {% endblock output_group %} | |
23 |
|
23 | |||
24 | {% block in_prompt -%} |
|
24 | {% block in_prompt -%} | |
25 | <div class="prompt input_prompt"> |
|
25 | <div class="prompt input_prompt"> | |
26 | In [{{ cell.prompt_number }}]: |
|
26 | In [{{ cell.prompt_number }}]: | |
27 | </div> |
|
27 | </div> | |
28 | {%- endblock in_prompt %} |
|
28 | {%- endblock in_prompt %} | |
29 |
|
29 | |||
30 | {% block empty_in_prompt -%} |
|
30 | {% block empty_in_prompt -%} | |
31 | <div class="prompt input_prompt"> |
|
31 | <div class="prompt input_prompt"> | |
32 | </div> |
|
32 | </div> | |
33 | {%- endblock empty_in_prompt %} |
|
33 | {%- endblock empty_in_prompt %} | |
34 |
|
34 | |||
35 | {# |
|
35 | {# | |
36 | output_prompt doesn't do anything in HTML, |
|
36 | output_prompt doesn't do anything in HTML, | |
37 | because there is a prompt div in each output area (see output block) |
|
37 | because there is a prompt div in each output area (see output block) | |
38 | #} |
|
38 | #} | |
39 | {% block output_prompt %} |
|
39 | {% block output_prompt %} | |
40 | {% endblock output_prompt %} |
|
40 | {% endblock output_prompt %} | |
41 |
|
41 | |||
42 | {% block input %} |
|
42 | {% block input %} | |
43 | <div class="inner_cell"> |
|
43 | <div class="inner_cell"> | |
44 | <div class="input_area"> |
|
44 | <div class="input_area"> | |
45 | {{ cell.input | highlight2html(language=resources.get('language'), metadata=cell.metadata) }} |
|
45 | {{ cell.input | highlight2html(language=resources.get('language'), metadata=cell.metadata) }} | |
46 | </div> |
|
46 | </div> | |
47 | </div> |
|
47 | </div> | |
48 | {%- endblock input %} |
|
48 | {%- endblock input %} | |
49 |
|
49 | |||
50 | {% block output %} |
|
50 | {% block output %} | |
51 | <div class="output_area"> |
|
51 | <div class="output_area"> | |
52 | {%- if output.output_type == 'pyout' -%} |
|
52 | {%- if output.output_type == 'pyout' -%} | |
53 | <div class="prompt output_prompt"> |
|
53 | <div class="prompt output_prompt"> | |
54 | Out[{{ cell.prompt_number }}]: |
|
54 | Out[{{ cell.prompt_number }}]: | |
55 | {%- else -%} |
|
55 | {%- else -%} | |
56 | <div class="prompt"> |
|
56 | <div class="prompt"> | |
57 | {%- endif -%} |
|
57 | {%- endif -%} | |
58 | </div> |
|
58 | </div> | |
59 | {{ super() }} |
|
59 | {{ super() }} | |
60 | </div> |
|
60 | </div> | |
61 | {% endblock output %} |
|
61 | {% endblock output %} | |
62 |
|
62 | |||
63 | {% block markdowncell scoped %} |
|
63 | {% block markdowncell scoped %} | |
64 | <div class="cell border-box-sizing text_cell rendered"> |
|
64 | <div class="cell border-box-sizing text_cell rendered"> | |
65 | {{ self.empty_in_prompt() }} |
|
65 | {{ self.empty_in_prompt() }} | |
66 | <div class="inner_cell"> |
|
66 | <div class="inner_cell"> | |
67 | <div class="text_cell_render border-box-sizing rendered_html"> |
|
67 | <div class="text_cell_render border-box-sizing rendered_html"> | |
68 | {{ cell.source | markdown2html | strip_files_prefix }} |
|
68 | {{ cell.source | markdown2html | strip_files_prefix }} | |
69 | </div> |
|
69 | </div> | |
70 | </div> |
|
70 | </div> | |
71 | </div> |
|
71 | </div> | |
72 | {%- endblock markdowncell %} |
|
72 | {%- endblock markdowncell %} | |
73 |
|
73 | |||
74 | {% block headingcell scoped %} |
|
74 | {% block headingcell scoped %} | |
75 | <div class="cell border-box-sizing text_cell rendered"> |
|
75 | <div class="cell border-box-sizing text_cell rendered"> | |
76 | {{ self.empty_in_prompt() }} |
|
76 | {{ self.empty_in_prompt() }} | |
77 | <div class="inner_cell"> |
|
77 | <div class="inner_cell"> | |
78 | <div class="text_cell_render border-box-sizing rendered_html"> |
|
78 | <div class="text_cell_render border-box-sizing rendered_html"> | |
79 | {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | markdown2html | strip_files_prefix | add_anchor }} |
|
79 | {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | markdown2html | strip_files_prefix | add_anchor }} | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 | {% endblock headingcell %} |
|
83 | {% endblock headingcell %} | |
84 |
|
84 | |||
85 | {% block unknowncell scoped %} |
|
85 | {% block unknowncell scoped %} | |
86 | unknown type {{ cell.type }} |
|
86 | unknown type {{ cell.type }} | |
87 | {% endblock unknowncell %} |
|
87 | {% endblock unknowncell %} | |
88 |
|
88 | |||
89 | {% block pyout -%} |
|
89 | {% block pyout -%} | |
90 | <div class="output_subarea output_text output_pyout"> |
|
90 | {%- set extra_classes=" output_pyout" -%} | |
91 | {% block data_priority scoped %} |
|
91 | {% block data_priority scoped %} | |
92 | {{ super() }} |
|
92 | {{ super() }} | |
93 | {% endblock %} |
|
93 | {% endblock %} | |
94 | </div> |
|
94 | {%- set extra_classes="" -%} | |
95 | {%- endblock pyout %} |
|
95 | {%- endblock pyout %} | |
96 |
|
96 | |||
97 | {% block stream_stdout -%} |
|
97 | {% block stream_stdout -%} | |
98 | <div class="output_subarea output_stream output_stdout output_text"> |
|
98 | <div class="output_subarea output_stream output_stdout output_text"> | |
99 | <pre> |
|
99 | <pre> | |
100 | {{ output.text | ansi2html }} |
|
100 | {{ output.text | ansi2html }} | |
101 | </pre> |
|
101 | </pre> | |
102 | </div> |
|
102 | </div> | |
103 | {%- endblock stream_stdout %} |
|
103 | {%- endblock stream_stdout %} | |
104 |
|
104 | |||
105 | {% block stream_stderr -%} |
|
105 | {% block stream_stderr -%} | |
106 | <div class="output_subarea output_stream output_stderr output_text"> |
|
106 | <div class="output_subarea output_stream output_stderr output_text"> | |
107 | <pre> |
|
107 | <pre> | |
108 | {{ output.text | ansi2html }} |
|
108 | {{ output.text | ansi2html }} | |
109 | </pre> |
|
109 | </pre> | |
110 | </div> |
|
110 | </div> | |
111 | {%- endblock stream_stderr %} |
|
111 | {%- endblock stream_stderr %} | |
112 |
|
112 | |||
113 | {% block data_svg -%} |
|
113 | {% block data_svg scoped -%} | |
114 | <div class="output_svg output_subarea"> |
|
114 | <div class="output_svg output_subarea{{extra_classes}}"> | |
115 | {%- if output.svg_filename %} |
|
115 | {%- if output.svg_filename %} | |
116 | <img src="{{output.svg_filename | posix_path}}" |
|
116 | <img src="{{output.svg_filename | posix_path}}" | |
117 | {%- else %} |
|
117 | {%- else %} | |
118 | {{ output.svg }} |
|
118 | {{ output.svg }} | |
119 | {%- endif %} |
|
119 | {%- endif %} | |
120 | </div> |
|
120 | </div> | |
121 | {%- endblock data_svg %} |
|
121 | {%- endblock data_svg %} | |
122 |
|
122 | |||
123 | {% block data_html -%} |
|
123 | {% block data_html scoped -%} | |
124 | <div class="output_html rendered_html output_subarea"> |
|
124 | <div class="output_html rendered_html output_subarea{{extra_classes}}"> | |
125 | {{ output.html }} |
|
125 | {{ output.html }} | |
126 | </div> |
|
126 | </div> | |
127 | {%- endblock data_html %} |
|
127 | {%- endblock data_html %} | |
128 |
|
128 | |||
129 | {% block data_png %} |
|
129 | {% block data_png scoped %} | |
130 | <div class="output_png output_subarea"> |
|
130 | <div class="output_png output_subarea{{extra_classes}}"> | |
131 | {%- if output.png_filename %} |
|
131 | {%- if output.png_filename %} | |
132 | <img src="{{output.png_filename | posix_path}}" |
|
132 | <img src="{{output.png_filename | posix_path}}" | |
133 | {%- else %} |
|
133 | {%- else %} | |
134 | <img src="data:image/png;base64,{{ output.png }}" |
|
134 | <img src="data:image/png;base64,{{ output.png }}" | |
135 | {%- endif %} |
|
135 | {%- endif %} | |
136 | {%- if 'metadata' in output and 'width' in output.metadata.get('png', {}) %} |
|
136 | {%- if 'metadata' in output and 'width' in output.metadata.get('png', {}) %} | |
137 | width={{output.metadata['png']['width']}} |
|
137 | width={{output.metadata['png']['width']}} | |
138 | {%- endif %} |
|
138 | {%- endif %} | |
139 | {%- if 'metadata' in output and 'height' in output.metadata.get('png', {}) %} |
|
139 | {%- if 'metadata' in output and 'height' in output.metadata.get('png', {}) %} | |
140 | height={{output.metadata['png']['height']}} |
|
140 | height={{output.metadata['png']['height']}} | |
141 | {%- endif %} |
|
141 | {%- endif %} | |
142 | > |
|
142 | > | |
143 | </div> |
|
143 | </div> | |
144 | {%- endblock data_png %} |
|
144 | {%- endblock data_png %} | |
145 |
|
145 | |||
146 | {% block data_jpg %} |
|
146 | {% block data_jpg scoped %} | |
147 | <div class="output_jpeg output_subarea"> |
|
147 | <div class="output_jpeg output_subarea{{extra_classes}}"> | |
148 | {%- if output.jpeg_filename %} |
|
148 | {%- if output.jpeg_filename %} | |
149 | <img src="{{output.jpeg_filename | posix_path}}" |
|
149 | <img src="{{output.jpeg_filename | posix_path}}" | |
150 | {%- else %} |
|
150 | {%- else %} | |
151 | <img src="data:image/jpeg;base64,{{ output.jpeg }}" |
|
151 | <img src="data:image/jpeg;base64,{{ output.jpeg }}" | |
152 | {%- endif %} |
|
152 | {%- endif %} | |
153 | {%- if 'metadata' in output and 'width' in output.metadata.get('jpeg', {}) %} |
|
153 | {%- if 'metadata' in output and 'width' in output.metadata.get('jpeg', {}) %} | |
154 | width={{output.metadata['jpeg']['width']}} |
|
154 | width={{output.metadata['jpeg']['width']}} | |
155 | {%- endif %} |
|
155 | {%- endif %} | |
156 | {%- if 'metadata' in output and 'height' in output.metadata.get('jpeg', {}) %} |
|
156 | {%- if 'metadata' in output and 'height' in output.metadata.get('jpeg', {}) %} | |
157 | height={{output.metadata['jpeg']['height']}} |
|
157 | height={{output.metadata['jpeg']['height']}} | |
158 | {%- endif %} |
|
158 | {%- endif %} | |
159 | > |
|
159 | > | |
160 | </div> |
|
160 | </div> | |
161 | {%- endblock data_jpg %} |
|
161 | {%- endblock data_jpg %} | |
162 |
|
162 | |||
163 | {% block data_latex %} |
|
163 | {% block data_latex scoped %} | |
164 | <div class="output_latex output_subarea"> |
|
164 | <div class="output_latex output_subarea{{extra_classes}}"> | |
165 | {{ output.latex }} |
|
165 | {{ output.latex }} | |
166 | </div> |
|
166 | </div> | |
167 | {%- endblock data_latex %} |
|
167 | {%- endblock data_latex %} | |
168 |
|
168 | |||
169 | {% block pyerr -%} |
|
169 | {% block pyerr -%} | |
170 | <div class="output_subarea output_text output_pyerr"> |
|
170 | <div class="output_subarea output_text output_pyerr"> | |
171 | <pre>{{ super() }}</pre> |
|
171 | <pre>{{ super() }}</pre> | |
172 | </div> |
|
172 | </div> | |
173 | {%- endblock pyerr %} |
|
173 | {%- endblock pyerr %} | |
174 |
|
174 | |||
175 | {%- block traceback_line %} |
|
175 | {%- block traceback_line %} | |
176 | {{ line | ansi2html }} |
|
176 | {{ line | ansi2html }} | |
177 | {%- endblock traceback_line %} |
|
177 | {%- endblock traceback_line %} | |
178 |
|
178 | |||
179 | {%- block data_text %} |
|
179 | {%- block data_text scoped %} | |
180 | <div class="output_text output_subarea"> |
|
180 | <div class="output_text output_subarea{{extra_classes}}"> | |
181 | <pre> |
|
181 | <pre> | |
182 | {{ output.text | ansi2html }} |
|
182 | {{ output.text | ansi2html }} | |
183 | </pre> |
|
183 | </pre> | |
184 | </div> |
|
184 | </div> | |
185 | {%- endblock -%} |
|
185 | {%- endblock -%} | |
186 |
|
186 | |||
187 | {%- block data_javascript %} |
|
187 | {%- block data_javascript scoped %} | |
188 | <div class="output_subarea output_javascript"> |
|
188 | <div class="output_subarea output_javascript{{extra_classes}}"> | |
189 | <script type="text/javascript"> |
|
189 | <script type="text/javascript"> | |
190 | {{ output.javascript }} |
|
190 | {{ output.javascript }} | |
191 | </script> |
|
191 | </script> | |
192 | </div> |
|
192 | </div> | |
193 | {%- endblock -%} |
|
193 | {%- endblock -%} |
@@ -1,90 +1,78 b'' | |||||
1 | {%- extends 'basic.tpl' -%} |
|
1 | {%- extends 'basic.tpl' -%} | |
2 | {% from 'mathjax.tpl' import mathjax %} |
|
2 | {% from 'mathjax.tpl' import mathjax %} | |
3 |
|
3 | |||
4 |
|
4 | |||
5 | {%- block header -%} |
|
5 | {%- block header -%} | |
6 | <!DOCTYPE html> |
|
6 | <!DOCTYPE html> | |
7 | <html> |
|
7 | <html> | |
8 | <head> |
|
8 | <head> | |
9 |
|
9 | |||
10 | <meta charset="utf-8" /> |
|
10 | <meta charset="utf-8" /> | |
11 | <title>{{resources['metadata']['name']}}</title> |
|
11 | <title>{{resources['metadata']['name']}}</title> | |
12 |
|
12 | |||
13 | {% for css in resources.inlining.css -%} |
|
13 | {% for css in resources.inlining.css -%} | |
14 | <style type="text/css"> |
|
14 | <style type="text/css"> | |
15 | {{ css }} |
|
15 | {{ css }} | |
16 | </style> |
|
16 | </style> | |
17 | {% endfor %} |
|
17 | {% endfor %} | |
18 |
|
18 | |||
19 | <style type="text/css"> |
|
19 | <style type="text/css"> | |
20 | /* Overrides of notebook CSS for static HTML export */ |
|
20 | /* Overrides of notebook CSS for static HTML export */ | |
21 | body { |
|
21 | body { | |
22 | overflow: visible; |
|
22 | overflow: visible; | |
23 | padding: 8px; |
|
23 | padding: 8px; | |
24 | } |
|
24 | } | |
25 | .input_area { |
|
25 | .input_area { | |
26 | padding: 0.2em; |
|
26 | padding: 0.2em; | |
27 | } |
|
27 | } | |
28 |
|
28 | |||
29 | pre { |
|
29 | pre { | |
30 | padding: 0.2em; |
|
30 | padding: 0.2em; | |
31 | border: none; |
|
31 | border: none; | |
32 | margin: 0px; |
|
32 | margin: 0px; | |
33 | font-size: 13px; |
|
33 | font-size: 13px; | |
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 | div#notebook_panel { |
|
|||
37 | -webkit-box-shadow: none; |
|
|||
38 | -moz-box-shadow: none; |
|
|||
39 | box-shadow: none; |
|
|||
40 | } |
|
|||
41 |
|
||||
42 | div#notebook { |
|
36 | div#notebook { | |
43 | overflow: visible; |
|
37 | overflow: visible; | |
44 | border-top: none; |
|
38 | border-top: none; | |
45 | } |
|
39 | } | |
46 |
|
40 | |||
47 | @media print { |
|
41 | @media print { | |
48 | div.cell { |
|
42 | div.cell { | |
49 | display: block; |
|
43 | display: block; | |
50 | page-break-inside: avoid; |
|
44 | page-break-inside: avoid; | |
51 | } |
|
45 | } | |
52 | div.output_wrapper { |
|
46 | div.output_wrapper { | |
53 | display: block; |
|
47 | display: block; | |
54 | page-break-inside: avoid; |
|
48 | page-break-inside: avoid; | |
55 | } |
|
49 | } | |
56 | div.output { |
|
50 | div.output { | |
57 | display: block; |
|
51 | display: block; | |
58 | page-break-inside: avoid; |
|
52 | page-break-inside: avoid; | |
59 | } |
|
53 | } | |
60 | } |
|
54 | } | |
61 | </style> |
|
55 | </style> | |
62 |
|
56 | |||
63 | <!-- Custom stylesheet, it must be in the same directory as the html file --> |
|
57 | <!-- Custom stylesheet, it must be in the same directory as the html file --> | |
64 | <link rel="stylesheet" href="custom.css"> |
|
58 | <link rel="stylesheet" href="custom.css"> | |
65 |
|
59 | |||
66 | <!-- Loading mathjax macro --> |
|
60 | <!-- Loading mathjax macro --> | |
67 | {{ mathjax() }} |
|
61 | {{ mathjax() }} | |
68 |
|
62 | |||
69 | </head> |
|
63 | </head> | |
70 | {%- endblock header -%} |
|
64 | {%- endblock header -%} | |
71 |
|
65 | |||
72 | {% block body %} |
|
66 | {% block body %} | |
73 | <body> |
|
67 | <body> | |
74 |
|
|
68 | <div tabindex="-1" id="notebook" class="border-box-sizing"> | |
75 | <div id="ipython-main-app" class="border-box-sizing"> |
|
69 | <div class="container" id="notebook-container"> | |
76 | <div id="notebook_panel" class="border-box-sizing"> |
|
|||
77 | <div tabindex="-1" id="notebook" class="border-box-sizing"> |
|
|||
78 | <div class="container" id="notebook-container"> |
|
|||
79 | {{ super() }} |
|
70 | {{ super() }} | |
80 | </div> |
|
|||
81 | </div> |
|
|||
82 | </div> |
|
71 | </div> | |
83 | </div> |
|
72 | </div> | |
84 | </div> |
|
|||
85 | </body> |
|
73 | </body> | |
86 | {%- endblock body %} |
|
74 | {%- endblock body %} | |
87 |
|
75 | |||
88 | {% block footer %} |
|
76 | {% block footer %} | |
89 | </html> |
|
77 | </html> | |
90 | {% endblock footer %} |
|
78 | {% endblock footer %} |
General Comments 0
You need to be logged in to leave comments.
Login now