##// END OF EJS Templates
Fixed classed for latex and text output
Jonathan Frederic -
Show More
@@ -1,189 +1,193 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&nbsp;[{{ 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 114 <div class="output_svg output_subarea">
115 115 {%- if output.svg_filename %}
116 116 <img src="{{output.svg_filename | posix_path}}"
117 117 {%- else %}
118 118 {{ output.svg }}
119 119 {%- endif %}
120 120 </div>
121 121 {%- endblock data_svg %}
122 122
123 123 {% block data_html -%}
124 124 <div class="output_html rendered_html output_subarea">
125 125 {{ output.html }}
126 126 </div>
127 127 {%- endblock data_html %}
128 128
129 129 {% block data_png %}
130 130 <div class="output_png output_subarea">
131 131 {%- if output.png_filename %}
132 132 <img src="{{output.png_filename | posix_path}}"
133 133 {%- else %}
134 134 <img src="data:image/png;base64,{{ output.png }}"
135 135 {%- endif %}
136 136 {%- if 'metadata' in output and 'width' in output.metadata.get('png', {}) %}
137 137 width={{output.metadata['png']['width']}}
138 138 {%- endif %}
139 139 {%- if 'metadata' in output and 'height' in output.metadata.get('png', {}) %}
140 140 height={{output.metadata['png']['height']}}
141 141 {%- endif %}
142 142 >
143 143 </div>
144 144 {%- endblock data_png %}
145 145
146 146 {% block data_jpg %}
147 147 <div class="output_jpeg output_subarea">
148 148 {%- if output.jpeg_filename %}
149 149 <img src="{{output.jpeg_filename | posix_path}}"
150 150 {%- else %}
151 151 <img src="data:image/jpeg;base64,{{ output.jpeg }}"
152 152 {%- endif %}
153 153 {%- if 'metadata' in output and 'width' in output.metadata.get('jpeg', {}) %}
154 154 width={{output.metadata['jpeg']['width']}}
155 155 {%- endif %}
156 156 {%- if 'metadata' in output and 'height' in output.metadata.get('jpeg', {}) %}
157 157 height={{output.metadata['jpeg']['height']}}
158 158 {%- endif %}
159 159 >
160 160 </div>
161 161 {%- endblock data_jpg %}
162 162
163 163 {% block data_latex %}
164 <div class="output_latex output_subarea">
164 165 {{ output.latex }}
166 </div>
165 167 {%- endblock data_latex %}
166 168
167 169 {% block pyerr -%}
168 170 <div class="output_subarea output_text output_pyerr">
169 171 <pre>{{ super() }}</pre>
170 172 </div>
171 173 {%- endblock pyerr %}
172 174
173 175 {%- block traceback_line %}
174 176 {{ line | ansi2html }}
175 177 {%- endblock traceback_line %}
176 178
177 179 {%- block data_text %}
180 <div class="output_text output_subarea">
178 181 <pre>
179 182 {{ output.text | ansi2html }}
180 183 </pre>
184 </div>
181 185 {%- endblock -%}
182 186
183 187 {%- block data_javascript %}
184 188 <div class="output_subarea output_javascript">
185 189 <script type="text/javascript">
186 190 {{ output.javascript }}
187 191 </script>
188 192 </div>
189 193 {%- endblock -%}
General Comments 0
You need to be logged in to leave comments. Login now