-
Notifications
You must be signed in to change notification settings - Fork 12
/
pelicanhtml_3.tpl
55 lines (50 loc) · 1.51 KB
/
pelicanhtml_3.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
{%- extends 'basic.tpl' -%}
{% block stream_stdout -%}
<div class="output_subarea output_stream output_stdout output_text">
<pre class="ipynb">
{{- output.text | ansi2html -}}
</pre>
</div>
{%- endblock stream_stdout %}
{% block stream_stderr -%}
<div class="output_subarea output_stream output_stderr output_text">
<pre class="ipynb">
{{- output.text | ansi2html -}}
</pre>
</div>
{%- endblock stream_stderr %}
{% block error -%}
<div class="output_subarea output_text output_error">
<pre class="ipynb">
{{- super() -}}
</pre>
</div>
{%- endblock error %}
{%- block data_text scoped %}
<div class="output_text output_subarea {{extra_class}}">
<pre class="ipynb">
{{- output.data['text/plain'] | ansi2html -}}
</pre>
</div>
{%- endblock -%}
{% block input %}
{% if "# <!-- collapse=True -->" in cell.source %}
<div class="collapseheader inner_cell"><span style="font-weight: bold;">Ver Código</span>
<div class="input_area" style="display:none">
{{ cell.source.replace("# <!-- collapse=True -->\n", "") | highlight2html(metadata=cell.metadata) }}
</div>
</div>
{% elif "# <!-- collapse=False -->" in cell.source %}
<div class="collapseheader inner_cell"><span style="font-weight: bold;">Esconder Código</span>
<div class="input_area">
{{ cell.source.replace("# <!-- collapse=False -->\n", "") | highlight2html(metadata=cell.metadata) }}
</div>
</div>
{% else %}
<div class="inner_cell">
<div class="input_area">
{{ cell.source | highlight_code(metadata=cell.metadata) }}
</div>
</div>
{% endif %}
{%- endblock input %}