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