Show More
@@ -1,143 +1,143 b'' | |||||
1 | {%- extends 'display_priority.tpl' -%} |
|
1 | {%- extends 'display_priority.tpl' -%} | |
2 |
|
2 | |||
3 |
|
3 | |||
4 |
|
4 | |||
5 | {% block codecell %} |
|
5 | {% block codecell %} | |
6 | <div class="cell border-box-sizing code_cell vbox"> |
|
6 | <div class="cell border-box-sizing code_cell vbox"> | |
7 | {{ super() }}</div> |
|
7 | {{ super() }}</div> | |
8 | {%- endblock codecell %} |
|
8 | {%- endblock codecell %} | |
9 |
|
9 | |||
10 | {% block input_group -%} |
|
10 | {% block input_group -%} | |
11 | <div class="input hbox"> |
|
11 | <div class="input hbox"> | |
12 | {{super()}} |
|
12 | {{super()}} | |
13 | </div> |
|
13 | </div> | |
14 | {% endblock input_group %} |
|
14 | {% endblock input_group %} | |
15 |
|
15 | |||
16 | {% block output_group %} |
|
16 | {% block output_group %} | |
17 | <div class="vbox output_wrapper"> |
|
17 | <div class="vbox output_wrapper"> | |
18 | <div class="output vbox"> |
|
18 | <div class="output vbox"> | |
19 | {{ super() }} |
|
19 | {{ super() }} | |
20 | </div> |
|
20 | </div> | |
21 | </div> |
|
21 | </div> | |
22 | {% endblock output_group %} |
|
22 | {% endblock output_group %} | |
23 |
|
23 | |||
24 | {% block in_prompt -%} |
|
24 | {% block in_prompt -%} | |
25 | <div class="prompt input_prompt">In [{{cell.prompt_number}}]:</div> |
|
25 | <div class="prompt input_prompt">In [{{cell.prompt_number}}]:</div> | |
26 | {%- endblock in_prompt %} |
|
26 | {%- endblock in_prompt %} | |
27 |
|
27 | |||
28 | {# |
|
28 | {# | |
29 | output_prompt doesn't do anything in HTML, |
|
29 | output_prompt doesn't do anything in HTML, | |
30 | because there is a prompt div in each output area (see output block) |
|
30 | because there is a prompt div in each output area (see output block) | |
31 | #} |
|
31 | #} | |
32 | {% block output_prompt %} |
|
32 | {% block output_prompt %} | |
33 | {% endblock output_prompt %} |
|
33 | {% endblock output_prompt %} | |
34 |
|
34 | |||
35 | {% block input %} |
|
35 | {% block input %} | |
36 | <div class="input_area box-flex1"> |
|
36 | <div class="input_area box-flex1"> | |
37 | {{cell.input | highlight }} |
|
37 | {{cell.input | highlight }} | |
38 | </div> |
|
38 | </div> | |
39 | {%- endblock input %} |
|
39 | {%- endblock input %} | |
40 |
|
40 | |||
41 | {% block output %} |
|
41 | {% block output %} | |
42 | <div class="hbox output_area"> |
|
42 | <div class="hbox output_area"> | |
43 | {%- if output.output_type == 'pyout' -%} |
|
43 | {%- if output.output_type == 'pyout' -%} | |
44 | <div class="prompt output_prompt"> |
|
44 | <div class="prompt output_prompt"> | |
45 | Out[{{cell.prompt_number}}]: |
|
45 | Out[{{cell.prompt_number}}]: | |
46 | {%- else -%} |
|
46 | {%- else -%} | |
47 | <div class="prompt"> |
|
47 | <div class="prompt"> | |
48 | {%- endif -%} |
|
48 | {%- endif -%} | |
49 | </div> |
|
49 | </div> | |
50 | {{ super() }} |
|
50 | {{ super() }} | |
51 | </div> |
|
51 | </div> | |
52 | {% endblock output %} |
|
52 | {% endblock output %} | |
53 |
|
53 | |||
54 | {% block markdowncell scoped %} |
|
54 | {% block markdowncell scoped %} | |
55 | <div class="text_cell_render border-box-sizing rendered_html"> |
|
55 | <div class="text_cell_render border-box-sizing rendered_html"> | |
56 | {{ cell.source | markdown| rm_fake}} |
|
56 | {{ cell.source | markdown| rm_fake}} | |
57 | </div> |
|
57 | </div> | |
58 | {%- endblock markdowncell %} |
|
58 | {%- endblock markdowncell %} | |
59 |
|
59 | |||
60 | {% block headingcell scoped %} |
|
60 | {% block headingcell scoped %} | |
61 | <div class="text_cell_render border-box-sizing rendered_html"> |
|
61 | <div class="text_cell_render border-box-sizing rendered_html"> | |
62 | <h{{cell.level}}> |
|
62 | <h{{cell.level}}> | |
63 | {% set source = cell.source | replace(' ','_') %} |
|
63 | {% set source = cell.source | replace(' ','_') %} | |
64 | <a class="heading-anchor" id="{{source}}" href="#{{source}}"> |
|
64 | <a class="heading-anchor" id="{{source}}" href="#{{source}}"> | |
65 | {{cell.source}} |
|
65 | {{cell.source | markdown| rm_fake}} | |
66 | </a> |
|
66 | </a> | |
67 | </h{{cell.level}}> |
|
67 | </h{{cell.level}}> | |
68 | </div> |
|
68 | </div> | |
69 | {% endblock headingcell %} |
|
69 | {% endblock headingcell %} | |
70 |
|
70 | |||
71 | {% block rawcell scoped %} |
|
71 | {% block rawcell scoped %} | |
72 | {{ cell.source }} |
|
72 | {{ cell.source }} | |
73 | {% endblock rawcell %} |
|
73 | {% endblock rawcell %} | |
74 |
|
74 | |||
75 | {% block unknowncell scoped %} |
|
75 | {% block unknowncell scoped %} | |
76 | unknown type {{cell.type}} |
|
76 | unknown type {{cell.type}} | |
77 | {% endblock unknowncell %} |
|
77 | {% endblock unknowncell %} | |
78 |
|
78 | |||
79 |
|
79 | |||
80 | {% block pyout -%} |
|
80 | {% block pyout -%} | |
81 | <div class="box-flex1 output_subarea output_pyout"> |
|
81 | <div class="box-flex1 output_subarea output_pyout"> | |
82 | {% block data_priority scoped %}{{ super()}}{% endblock %} |
|
82 | {% block data_priority scoped %}{{ super()}}{% endblock %} | |
83 | </div> |
|
83 | </div> | |
84 | {%- endblock pyout %} |
|
84 | {%- endblock pyout %} | |
85 |
|
85 | |||
86 | {% block stream_stdout -%} |
|
86 | {% block stream_stdout -%} | |
87 | <div class="box-flex1 output_subarea output_stream output_stdout"> |
|
87 | <div class="box-flex1 output_subarea output_stream output_stdout"> | |
88 | <pre>{{output.text |ansi2html}}</pre> |
|
88 | <pre>{{output.text |ansi2html}}</pre> | |
89 | </div> |
|
89 | </div> | |
90 | {%- endblock stream_stdout %} |
|
90 | {%- endblock stream_stdout %} | |
91 |
|
91 | |||
92 | {% block stream_stderr -%} |
|
92 | {% block stream_stderr -%} | |
93 | <div class="box-flex1 output_subarea output_stream output_stderr"> |
|
93 | <div class="box-flex1 output_subarea output_stream output_stderr"> | |
94 | <pre>{{output.text |ansi2html}}</pre> |
|
94 | <pre>{{output.text |ansi2html}}</pre> | |
95 | </div> |
|
95 | </div> | |
96 | {%- endblock stream_stderr %} |
|
96 | {%- endblock stream_stderr %} | |
97 |
|
97 | |||
98 | {% block data_svg -%} |
|
98 | {% block data_svg -%} | |
99 | {{output.svg}} |
|
99 | {{output.svg}} | |
100 | {%- endblock data_svg %} |
|
100 | {%- endblock data_svg %} | |
101 |
|
101 | |||
102 |
|
102 | |||
103 | {% block data_html -%} |
|
103 | {% block data_html -%} | |
104 | <div class="output_html rendered_html"> |
|
104 | <div class="output_html rendered_html"> | |
105 | {{output.html}} |
|
105 | {{output.html}} | |
106 | </div> |
|
106 | </div> | |
107 | {%- endblock data_html %} |
|
107 | {%- endblock data_html %} | |
108 |
|
108 | |||
109 | {% block data_png %} |
|
109 | {% block data_png %} | |
110 | <img src="data:image/png;base64,{{output.png}}"> |
|
110 | <img src="data:image/png;base64,{{output.png}}"> | |
111 | {%- endblock data_png %} |
|
111 | {%- endblock data_png %} | |
112 |
|
112 | |||
113 |
|
113 | |||
114 | {% block data_jpg %} |
|
114 | {% block data_jpg %} | |
115 | <img src="data:image/jpeg;base64,{{output.jpeg}}"> |
|
115 | <img src="data:image/jpeg;base64,{{output.jpeg}}"> | |
116 | {%- endblock data_jpg %} |
|
116 | {%- endblock data_jpg %} | |
117 |
|
117 | |||
118 |
|
118 | |||
119 | {% block data_latex %} |
|
119 | {% block data_latex %} | |
120 | {{output.latex}} |
|
120 | {{output.latex}} | |
121 | {%- endblock data_latex %} |
|
121 | {%- endblock data_latex %} | |
122 |
|
122 | |||
123 | {% block pyerr -%} |
|
123 | {% block pyerr -%} | |
124 | <div class="box-flex1 output_subarea output_pyerr"> |
|
124 | <div class="box-flex1 output_subarea output_pyerr"> | |
125 | <pre>{{super()}}</pre> |
|
125 | <pre>{{super()}}</pre> | |
126 | </div> |
|
126 | </div> | |
127 | {%- endblock pyerr %} |
|
127 | {%- endblock pyerr %} | |
128 |
|
128 | |||
129 | {%- block traceback_line %} |
|
129 | {%- block traceback_line %} | |
130 | {{line| ansi2html}} |
|
130 | {{line| ansi2html}} | |
131 | {%- endblock traceback_line %} |
|
131 | {%- endblock traceback_line %} | |
132 |
|
132 | |||
133 |
|
133 | |||
134 | {%- block data_text %} |
|
134 | {%- block data_text %} | |
135 | <pre>{{output.text | ansi2html}}</pre> |
|
135 | <pre>{{output.text | ansi2html}}</pre> | |
136 | {%- endblock -%} |
|
136 | {%- endblock -%} | |
137 |
|
137 | |||
138 |
|
138 | |||
139 | {%- block display_data scoped -%} |
|
139 | {%- block display_data scoped -%} | |
140 | <div class="box-flex1 output_subarea output_display_data"> |
|
140 | <div class="box-flex1 output_subarea output_display_data"> | |
141 | {{super()}} |
|
141 | {{super()}} | |
142 | </div> |
|
142 | </div> | |
143 | {%- endblock display_data -%} |
|
143 | {%- endblock display_data -%} |
@@ -1,73 +1,73 b'' | |||||
1 | {% extends 'display_priority.tpl' %} |
|
1 | {% extends 'display_priority.tpl' %} | |
2 | {% block in_prompt %} |
|
2 | {% block in_prompt %} | |
3 | In[{{cell.prompt_number if cell.prompt_number else ' '}}]:{% endblock in_prompt %} |
|
3 | In[{{cell.prompt_number if cell.prompt_number else ' '}}]:{% endblock in_prompt %} | |
4 |
|
4 | |||
5 | {% block output_prompt %}{% if cell.haspyout %}Out[{{cell.prompt_number}}]: |
|
5 | {% block output_prompt %}{% if cell.haspyout %}Out[{{cell.prompt_number}}]: | |
6 | {%- endif %}{%- endblock output_prompt %} |
|
6 | {%- endif %}{%- endblock output_prompt %} | |
7 |
|
7 | |||
8 | {% block input %} |
|
8 | {% block input %} | |
9 | ``` |
|
9 | ``` | |
10 | {{ cell.input}} |
|
10 | {{ cell.input}} | |
11 | ``` |
|
11 | ``` | |
12 | {% endblock input %} |
|
12 | {% endblock input %} | |
13 |
|
13 | |||
14 | {% block pyerr %} |
|
14 | {% block pyerr %} | |
15 | {{ super() }} |
|
15 | {{ super() }} | |
16 | {% endblock pyerr %} |
|
16 | {% endblock pyerr %} | |
17 |
|
17 | |||
18 | {% block traceback_line %} |
|
18 | {% block traceback_line %} | |
19 | {{ line |indent| rm_ansi }}{% endblock traceback_line %} |
|
19 | {{ line |indent| rm_ansi }}{% endblock traceback_line %} | |
20 |
|
20 | |||
21 | {% block pyout %} |
|
21 | {% block pyout %} | |
22 | {% block data_priority scoped %}{{ super()}}{% endblock %} |
|
22 | {% block data_priority scoped %}{{ super()}}{% endblock %} | |
23 | {% endblock pyout %} |
|
23 | {% endblock pyout %} | |
24 |
|
24 | |||
25 | {% block stream %} |
|
25 | {% block stream %} | |
26 | {{ output.text| indent }} |
|
26 | {{ output.text| indent }} | |
27 | {% endblock stream %} |
|
27 | {% endblock stream %} | |
28 |
|
28 | |||
29 |
|
29 | |||
30 |
|
30 | |||
31 |
|
31 | |||
32 | {% block data_svg %} |
|
32 | {% block data_svg %} | |
33 | [!image]({{output.key_svg}}) |
|
33 | [!image]({{output.key_svg}}) | |
34 | {% endblock data_svg %} |
|
34 | {% endblock data_svg %} | |
35 |
|
35 | |||
36 | {% block data_png %} |
|
36 | {% block data_png %} | |
37 | [!image]({{output.key_png}}) |
|
37 | [!image]({{output.key_png}}) | |
38 | {% endblock data_png %} |
|
38 | {% endblock data_png %} | |
39 |
|
39 | |||
40 | {% block data_jpg %} |
|
40 | {% block data_jpg %} | |
41 | [!image]({{output.key_jpg}}) |
|
41 | [!image]({{output.key_jpg}}) | |
42 | {% endblock data_jpg %} |
|
42 | {% endblock data_jpg %} | |
43 |
|
43 | |||
44 |
|
44 | |||
45 |
|
45 | |||
46 | {% block data_latex %} |
|
46 | {% block data_latex %} | |
47 | $$ |
|
47 | $$ | |
48 | {{output.latex}} |
|
48 | {{output.latex}} | |
49 | $$ |
|
49 | $$ | |
50 | {% endblock data_latex %} |
|
50 | {% endblock data_latex %} | |
51 |
|
51 | |||
52 | {% block data_text scoped %} |
|
52 | {% block data_text scoped %} | |
53 |
|
53 | |||
54 | {{output.text | indent}} |
|
54 | {{output.text | indent}} | |
55 |
|
55 | |||
56 | {% endblock data_text %} |
|
56 | {% endblock data_text %} | |
57 |
|
57 | |||
58 | {% block markdowncell scoped %} |
|
58 | {% block markdowncell scoped %} | |
59 | {{ cell.source | wrap(80)}} |
|
59 | {{ cell.source | wrap(80)}} | |
60 | {% endblock markdowncell %} |
|
60 | {% endblock markdowncell %} | |
61 |
|
61 | |||
62 | {% block headingcell scoped %} |
|
62 | {% block headingcell scoped %} | |
63 |
|
63 | |||
64 | {{ '#' * cell.level }} {{ cell.source}} |
|
64 | {{ '#' * cell.level }} {{ cell.source | wrap(80)}} | |
65 |
|
65 | |||
66 | {% endblock headingcell %} |
|
66 | {% endblock headingcell %} | |
67 |
|
67 | |||
68 | {% block rawcell scoped %}{{ cell.source }} |
|
68 | {% block rawcell scoped %}{{ cell.source }} | |
69 | {% endblock rawcell %} |
|
69 | {% endblock rawcell %} | |
70 |
|
70 | |||
71 | {% block unknowncell scoped %} |
|
71 | {% block unknowncell scoped %} | |
72 | unknown type {{cell.type}} |
|
72 | unknown type {{cell.type}} | |
73 | {% endblock unknowncell %} |
|
73 | {% endblock unknowncell %} |
@@ -1,89 +1,89 b'' | |||||
1 | {%- extends 'display_priority.tpl' -%} |
|
1 | {%- extends 'display_priority.tpl' -%} | |
2 | {% block in_prompt -%} |
|
2 | {% block in_prompt -%} | |
3 | In[{{cell.prompt_number if cell.prompt_number else ' '}}]: |
|
3 | In[{{cell.prompt_number if cell.prompt_number else ' '}}]: | |
4 |
|
4 | |||
5 | .. code:: python |
|
5 | .. code:: python | |
6 |
|
6 | |||
7 | {% endblock in_prompt %} |
|
7 | {% endblock in_prompt %} | |
8 |
|
8 | |||
9 | {% block output_prompt %}{% if cell.haspyout -%} |
|
9 | {% block output_prompt %}{% if cell.haspyout -%} | |
10 | Out[{{cell.prompt_number}}]:{% endif %}{% endblock output_prompt %} |
|
10 | Out[{{cell.prompt_number}}]:{% endif %}{% endblock output_prompt %} | |
11 |
|
11 | |||
12 | {% block input %}{{ cell.input | indent}} |
|
12 | {% block input %}{{ cell.input | indent}} | |
13 |
|
13 | |||
14 | {% endblock input %} |
|
14 | {% endblock input %} | |
15 |
|
15 | |||
16 | {% block pyerr %}:: |
|
16 | {% block pyerr %}:: | |
17 | {{ super() }} |
|
17 | {{ super() }} | |
18 | {% endblock pyerr %} |
|
18 | {% endblock pyerr %} | |
19 |
|
19 | |||
20 | {% block traceback_line %} |
|
20 | {% block traceback_line %} | |
21 | {{ line |indent| rm_ansi }}{% endblock traceback_line %} |
|
21 | {{ line |indent| rm_ansi }}{% endblock traceback_line %} | |
22 |
|
22 | |||
23 | {% block pyout %} |
|
23 | {% block pyout %} | |
24 | {% block data_priority scoped %}{{ super()}}{% endblock %} |
|
24 | {% block data_priority scoped %}{{ super()}}{% endblock %} | |
25 | {% endblock pyout %} |
|
25 | {% endblock pyout %} | |
26 |
|
26 | |||
27 | {% block stream %} |
|
27 | {% block stream %} | |
28 | .. parsed-literal:: |
|
28 | .. parsed-literal:: | |
29 |
|
29 | |||
30 | {{ output.text| indent }} |
|
30 | {{ output.text| indent }} | |
31 | {% endblock stream %} |
|
31 | {% endblock stream %} | |
32 |
|
32 | |||
33 |
|
33 | |||
34 |
|
34 | |||
35 |
|
35 | |||
36 | {% block data_svg %}.. image:: {{output.key_svg}} |
|
36 | {% block data_svg %}.. image:: {{output.key_svg}} | |
37 |
|
37 | |||
38 | {% endblock data_svg %} |
|
38 | {% endblock data_svg %} | |
39 |
|
39 | |||
40 | {% block data_png %}.. image:: {{output.key_png}} |
|
40 | {% block data_png %}.. image:: {{output.key_png}} | |
41 |
|
41 | |||
42 | {% endblock data_png %} |
|
42 | {% endblock data_png %} | |
43 |
|
43 | |||
44 | {% block data_jpg %}..jpg image:: {{output.key_jpg}} |
|
44 | {% block data_jpg %}..jpg image:: {{output.key_jpg}} | |
45 |
|
45 | |||
46 | {% endblock data_jpg %} |
|
46 | {% endblock data_jpg %} | |
47 |
|
47 | |||
48 |
|
48 | |||
49 |
|
49 | |||
50 | {% block data_latex %}.. math:: |
|
50 | {% block data_latex %}.. math:: | |
51 |
|
51 | |||
52 | {{output.latex| indent}} |
|
52 | {{output.latex| indent}} | |
53 |
|
53 | |||
54 | {% endblock data_latex %} |
|
54 | {% endblock data_latex %} | |
55 |
|
55 | |||
56 | {% block data_text scoped %}.. parsed-literal:: |
|
56 | {% block data_text scoped %}.. parsed-literal:: | |
57 |
|
57 | |||
58 | {{output.text | indent}} |
|
58 | {{output.text | indent}} | |
59 |
|
59 | |||
60 | {% endblock data_text %} |
|
60 | {% endblock data_text %} | |
61 |
|
61 | |||
62 | {% block markdowncell scoped %}{{ cell.source | markdown2rst }} |
|
62 | {% block markdowncell scoped %}{{ cell.source | markdown2rst }} | |
63 | {% endblock markdowncell %} |
|
63 | {% endblock markdowncell %} | |
64 |
|
64 | |||
65 | {% block headingcell scoped %} |
|
65 | {% block headingcell scoped %} | |
66 | {%- set len = cell.source|length -%} |
|
66 | {%- set len = cell.source|length -%} | |
67 | {{ cell.source}} |
|
67 | {{ cell.source | markdown2rst}} | |
68 | {% if cell.level == 1 %} |
|
68 | {% if cell.level == 1 %} | |
69 | {{- '=' * len }} |
|
69 | {{- '=' * len }} | |
70 | {%- elif cell.level == 2 %} |
|
70 | {%- elif cell.level == 2 %} | |
71 | {{- '-' * len }} |
|
71 | {{- '-' * len }} | |
72 | {%- elif cell.level == 3 %} |
|
72 | {%- elif cell.level == 3 %} | |
73 | {{- '~' * len }} |
|
73 | {{- '~' * len }} | |
74 | {%- elif cell.level == 4 %} |
|
74 | {%- elif cell.level == 4 %} | |
75 | {{- '.' * len }} |
|
75 | {{- '.' * len }} | |
76 | {%- elif cell.level == 5 %} |
|
76 | {%- elif cell.level == 5 %} | |
77 | {{- '\\' * len }} |
|
77 | {{- '\\' * len }} | |
78 | {%- elif cell.level == 6 %} |
|
78 | {%- elif cell.level == 6 %} | |
79 | {{- '`' * len }} |
|
79 | {{- '`' * len }} | |
80 | {% endif %} |
|
80 | {% endif %} | |
81 |
|
81 | |||
82 | {% endblock headingcell %} |
|
82 | {% endblock headingcell %} | |
83 |
|
83 | |||
84 | {% block rawcell scoped %}{{ cell.source }} |
|
84 | {% block rawcell scoped %}{{ cell.source }} | |
85 | {% endblock rawcell %} |
|
85 | {% endblock rawcell %} | |
86 |
|
86 | |||
87 | {% block unknowncell scoped %} |
|
87 | {% block unknowncell scoped %} | |
88 | unknown type {{cell.type}} |
|
88 | unknown type {{cell.type}} | |
89 | {% endblock unknowncell %} |
|
89 | {% endblock unknowncell %} |
General Comments 0
You need to be logged in to leave comments.
Login now