-
Notifications
You must be signed in to change notification settings - Fork 2
/
swc.tpl
55 lines (46 loc) · 1.17 KB
/
swc.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
---
layout: lesson
root: ../..
---
{% extends 'markdown.tpl' %}
{% block input %}
<div class="input">
<span>In [{{ cell.prompt_number }}]:</span>
<pre>{{ cell.input | escape }}</pre>
</div>
{% endblock input %}
{% block output_group %}
<div class="output">
<span>Out [{{ cell.prompt_number }}]:</span>
<pre>{{ super() }}</pre>
</div>
{% endblock output_group %}
{% block stream %}
{{ output.text | escape }}
{% endblock stream %}
{% block pyout %}
{{ output.text | escape }}
{% endblock pyout %}
{% block pyerr %}
{{ output.traceback | join('\n') | strip_ansi | escape }}
{% endblock pyerr %}
{% block data_svg %}
<img src="../../{{ output.svg_filename | path2url }}">
{% endblock data_svg %}
{% block data_png %}
<img src="../../{{ output.png_filename | path2url }}">
{% endblock data_png %}
{% block data_jpg %}
<img src="../../{{ output.jpeg_filename | path2url }}">
{% endblock data_jpg %}
{% block markdowncell %}
{% if 'cell_tags' in cell.metadata %}
<div class="{{ cell.metadata['cell_tags'][0] }}">
{{ cell.source | markdown2html | strip_files_prefix }}
</div>
{% else %}
<div>
{{ cell.source | markdown2html | strip_files_prefix }}
</div>
{% endif %}
{%- endblock markdowncell %}