Show More
@@ -1,173 +1,177 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"> |
|
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="input_area box-flex1"> |
|
44 | 44 | {{ cell.input | highlight2html(metadata=cell.metadata) }} |
|
45 | 45 | </div> |
|
46 | 46 | {%- endblock input %} |
|
47 | 47 | |
|
48 | 48 | {% block output %} |
|
49 | 49 | <div class="output_area"> |
|
50 | 50 | {%- if output.output_type == 'pyout' -%} |
|
51 | 51 | <div class="prompt output_prompt"> |
|
52 | 52 | Out[{{ cell.prompt_number }}]: |
|
53 | 53 | {%- else -%} |
|
54 | 54 | <div class="prompt"> |
|
55 | 55 | {%- endif -%} |
|
56 | 56 | </div> |
|
57 | 57 | {{ super() }} |
|
58 | 58 | </div> |
|
59 | 59 | {% endblock output %} |
|
60 | 60 | |
|
61 | 61 | {% block markdowncell scoped %} |
|
62 | <div class="cell border-box-sizing text_cell"> | |
|
62 | 63 | <div class="input"> |
|
63 | 64 | {{ self.empty_in_prompt() }} |
|
64 | 65 | <div class="inner_cell"> |
|
65 | 66 | <div class="text_cell_render border-box-sizing rendered_html"> |
|
66 | 67 | {{ cell.source | markdown2html | strip_files_prefix }} |
|
67 | 68 | </div> |
|
68 | 69 | </div> |
|
69 | 70 | </div> |
|
71 | </div> | |
|
70 | 72 | {%- endblock markdowncell %} |
|
71 | 73 | |
|
72 | 74 | {% block headingcell scoped %} |
|
75 | <div class="cell border-box-sizing text_cell"> | |
|
73 | 76 | <div class="input"> |
|
74 | 77 | {{ self.empty_in_prompt() }} |
|
75 | 78 | <div class="inner_cell"> |
|
76 | 79 | <div class="text_cell_render border-box-sizing rendered_html"> |
|
77 | 80 | {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | markdown2html | strip_files_prefix | add_anchor }} |
|
78 | 81 | </div> |
|
79 | 82 | </div> |
|
80 | 83 | </div> |
|
84 | </div> | |
|
81 | 85 | {% endblock headingcell %} |
|
82 | 86 | |
|
83 | 87 | {% block unknowncell scoped %} |
|
84 | 88 | unknown type {{ cell.type }} |
|
85 | 89 | {% endblock unknowncell %} |
|
86 | 90 | |
|
87 | 91 | {% block pyout -%} |
|
88 | 92 | <div class="box-flex1 output_subarea output_pyout"> |
|
89 | 93 | {% block data_priority scoped %} |
|
90 | 94 | {{ super() }} |
|
91 | 95 | {% endblock %} |
|
92 | 96 | </div> |
|
93 | 97 | {%- endblock pyout %} |
|
94 | 98 | |
|
95 | 99 | {% block stream_stdout -%} |
|
96 | 100 | <div class="box-flex1 output_subarea output_stream output_stdout"> |
|
97 | 101 | <pre> |
|
98 | 102 | {{ output.text | ansi2html }} |
|
99 | 103 | </pre> |
|
100 | 104 | </div> |
|
101 | 105 | {%- endblock stream_stdout %} |
|
102 | 106 | |
|
103 | 107 | {% block stream_stderr -%} |
|
104 | 108 | <div class="box-flex1 output_subarea output_stream output_stderr"> |
|
105 | 109 | <pre> |
|
106 | 110 | {{ output.text | ansi2html }} |
|
107 | 111 | </pre> |
|
108 | 112 | </div> |
|
109 | 113 | {%- endblock stream_stderr %} |
|
110 | 114 | |
|
111 | 115 | {% block data_svg -%} |
|
112 | 116 | {{ output.svg }} |
|
113 | 117 | {%- endblock data_svg %} |
|
114 | 118 | |
|
115 | 119 | {% block data_html -%} |
|
116 | 120 | <div class="output_html rendered_html"> |
|
117 | 121 | {{ output.html }} |
|
118 | 122 | </div> |
|
119 | 123 | {%- endblock data_html %} |
|
120 | 124 | |
|
121 | 125 | {% block data_png %} |
|
122 | 126 | <img src="data:image/png;base64,{{ output.png }}" |
|
123 | 127 | {%- if 'metadata' in output and 'width' in output.metadata.get('png', {}) %} |
|
124 | 128 | width={{output.metadata['png']['width']}} |
|
125 | 129 | {%- endif %} |
|
126 | 130 | {%- if 'metadata' in output and 'height' in output.metadata.get('png', {}) %} |
|
127 | 131 | height={{output.metadata['png']['height']}} |
|
128 | 132 | {%- endif %} |
|
129 | 133 | > |
|
130 | 134 | {%- endblock data_png %} |
|
131 | 135 | |
|
132 | 136 | {% block data_jpg %} |
|
133 | 137 | <img src="data:image/jpeg;base64,{{ output.jpeg }}" |
|
134 | 138 | {%- if 'metadata' in output and 'width' in output.metadata.get('jpeg', {}) %} |
|
135 | 139 | width={{output.metadata['jpeg']['width']}} |
|
136 | 140 | {%- endif %} |
|
137 | 141 | {%- if 'metadata' in output and 'height' in output.metadata.get('jpeg', {}) %} |
|
138 | 142 | height={{output.metadata['jpeg']['height']}} |
|
139 | 143 | {%- endif %} |
|
140 | 144 | > |
|
141 | 145 | {%- endblock data_jpg %} |
|
142 | 146 | |
|
143 | 147 | {% block data_latex %} |
|
144 | 148 | {{ output.latex }} |
|
145 | 149 | {%- endblock data_latex %} |
|
146 | 150 | |
|
147 | 151 | {% block pyerr -%} |
|
148 | 152 | <div class="box-flex1 output_subarea output_pyerr"> |
|
149 | 153 | <pre>{{ super() }}</pre> |
|
150 | 154 | </div> |
|
151 | 155 | {%- endblock pyerr %} |
|
152 | 156 | |
|
153 | 157 | {%- block traceback_line %} |
|
154 | 158 | {{ line | ansi2html }} |
|
155 | 159 | {%- endblock traceback_line %} |
|
156 | 160 | |
|
157 | 161 | {%- block data_text %} |
|
158 | 162 | <pre> |
|
159 | 163 | {{ output.text | ansi2html }} |
|
160 | 164 | </pre> |
|
161 | 165 | {%- endblock -%} |
|
162 | 166 | |
|
163 | 167 | {%- block data_javascript %} |
|
164 | 168 | <script type="text/javascript"> |
|
165 | 169 | {{ output.javascript }} |
|
166 | 170 | </script> |
|
167 | 171 | {%- endblock -%} |
|
168 | 172 | |
|
169 | 173 | {%- block display_data scoped -%} |
|
170 | 174 | <div class="box-flex1 output_subarea output_display_data"> |
|
171 | 175 | {{ super() }} |
|
172 | 176 | </div> |
|
173 | 177 | {%- endblock display_data -%} |
General Comments 0
You need to be logged in to leave comments.
Login now