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