Show More
@@ -13,31 +13,23 b'' | |||
|
13 | 13 | </div> |
|
14 | 14 | {% endblock input_group %} |
|
15 | 15 | |
|
16 |
{% block output |
|
|
17 | <div class="output vbox"> | |
|
18 | {{ super() }} | |
|
19 | </div> | |
|
20 | {% endblock outputs %} | |
|
21 | ||
|
22 | {% block output_group -%} | |
|
16 | {% block output_group %} | |
|
23 | 17 | <div class="vbox output_wrapper"> |
|
24 |
<div class=" |
|
|
18 | <div class="output vbox"> | |
|
25 | 19 | {{ super() }} |
|
26 | 20 | </div> |
|
27 | 21 | </div> |
|
28 | 22 | {% endblock output_group %} |
|
29 | 23 | |
|
30 | ||
|
31 | 24 | {% block in_prompt -%} |
|
32 | 25 | <div class="prompt input_prompt">In [{{cell.prompt_number}}]:</div> |
|
33 | 26 | {%- endblock in_prompt %} |
|
34 | 27 | |
|
35 | {% block output_prompt -%} | |
|
36 | <div class="prompt output_prompt"> | |
|
37 | {%- if cell.haspyout -%} | |
|
38 | Out[{{cell.prompt_number}}]: | |
|
39 | {%- endif -%} | |
|
40 | </div> | |
|
28 | {# | |
|
29 | output_prompt doesn't do anything in HTML, | |
|
30 | because there is a prompt div in each output area (see output block) | |
|
31 | #} | |
|
32 | {% block output_prompt %} | |
|
41 | 33 | {% endblock output_prompt %} |
|
42 | 34 | |
|
43 | 35 | {% block input %} |
@@ -46,6 +38,18 b' Out[{{cell.prompt_number}}]:' | |||
|
46 | 38 | </div> |
|
47 | 39 | {%- endblock input %} |
|
48 | 40 | |
|
41 | {% block output %} | |
|
42 | <div class="hbox output_area"> | |
|
43 | {%- if output.output_type == 'pyout' -%} | |
|
44 | <div class="prompt output_prompt"> | |
|
45 | Out[{{cell.prompt_number}}]: | |
|
46 | {%- else -%} | |
|
47 | <div class="prompt"> | |
|
48 | {%- endif -%} | |
|
49 | </div> | |
|
50 | {{ super() }} | |
|
51 | </div> | |
|
52 | {% endblock output %} | |
|
49 | 53 | |
|
50 | 54 | {% block markdowncell scoped %} |
|
51 | 55 | <div class="text_cell_render border-box-sizing rendered_html"> |
@@ -5,11 +5,11 b' IF YOU ARE COPY AND PASTING THIS FILE' | |||
|
5 | 5 | YOU ARE PROBABLY DOING THINGS WRONG. |
|
6 | 6 | |
|
7 | 7 | Null template, Does nothing except defining a basic structure |
|
8 |
To layout the diferent |
|
|
8 | To layout the different blocks of a notebook. | |
|
9 | 9 | |
|
10 |
Subtemplates can |
|
|
10 | Subtemplates can override blocks to define their custom representation. | |
|
11 | 11 | |
|
12 | If one of the block you do overrite is not a leave block, consider | |
|
12 | If one of the block you do overwrite is not a leave block, consider | |
|
13 | 13 | calling super. |
|
14 | 14 | |
|
15 | 15 | {%- block nonLeaveBlock -%} |
@@ -18,7 +18,7 b' calling super.' | |||
|
18 | 18 | #add stuff at end |
|
19 | 19 | {%- endblock nonLeaveBlock -%} |
|
20 | 20 | |
|
21 |
consider calling super even if |
|
|
21 | consider calling super even if it is a leave block, we might insert more blocks later. | |
|
22 | 22 | |
|
23 | 23 | #} |
|
24 | 24 | {%- block header -%} |
@@ -33,11 +33,12 b' consider calling super even if block is leave block, we might insert more block ' | |||
|
33 | 33 | {%- block in_prompt -%}{%- endblock in_prompt -%} |
|
34 | 34 | {%- block input -%}{%- endblock input -%} |
|
35 | 35 | {%- endblock input_group -%} |
|
36 |
|
|
|
36 | {%- if cell.outputs -%} | |
|
37 | 37 | {%- block output_group -%} |
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
38 | {%- block output_prompt -%}{%- endblock output_prompt -%} | |
|
39 | {%- block outputs scoped -%} | |
|
40 | {%- for output in cell.outputs -%} | |
|
41 | {%- block output scoped -%} | |
|
41 | 42 | {%- if output.output_type in ['pyout'] -%} |
|
42 | 43 | {%- block pyout scoped -%}{%- endblock pyout -%} |
|
43 | 44 | {%- elif output.output_type in ['stream'] -%} |
@@ -62,10 +63,11 b' consider calling super even if block is leave block, we might insert more block ' | |||
|
62 | 63 | {%- endfor -%} |
|
63 | 64 | {%- endblock pyerr -%} |
|
64 | 65 | {%- endif -%} |
|
65 |
{%- end |
|
|
66 |
{%- end |
|
|
66 | {%- endblock output -%} | |
|
67 | {%- endfor -%} | |
|
68 | {%- endblock outputs -%} | |
|
67 | 69 | {%- endblock output_group -%} |
|
68 |
|
|
|
70 | {%- endif -%} | |
|
69 | 71 | {%- endblock codecell -%} |
|
70 | 72 | {%- elif cell.type in ['markdown'] -%} |
|
71 | 73 | {%- block markdowncell scoped-%} |
@@ -6,11 +6,11 b' IF YOU ARE COPY AND PASTING THIS FILE' | |||
|
6 | 6 | YOU ARE PROBABLY DOING THINGS WRONG. |
|
7 | 7 | |
|
8 | 8 | Null template, Does nothing except defining a basic structure |
|
9 |
To layout the diferent |
|
|
9 | To layout the different blocks of a notebook. | |
|
10 | 10 | |
|
11 |
Subtemplates can |
|
|
11 | Subtemplates can override blocks to define their custom representation. | |
|
12 | 12 | |
|
13 | If one of the block you do overrite is not a leave block, consider | |
|
13 | If one of the block you do overwrite is not a leave block, consider | |
|
14 | 14 | calling super. |
|
15 | 15 | |
|
16 | 16 | ((*- block nonLeaveBlock -*)) |
@@ -19,7 +19,7 b' calling super.' | |||
|
19 | 19 | #add stuff at end |
|
20 | 20 | ((*- endblock nonLeaveBlock -*)) |
|
21 | 21 | |
|
22 |
consider calling super even if |
|
|
22 | consider calling super even if it is a leave block, we might insert more blocks later. | |
|
23 | 23 | |
|
24 | 24 | =)) |
|
25 | 25 | ((*- block header -*)) |
@@ -34,11 +34,12 b' consider calling super even if block is leave block, we might insert more block ' | |||
|
34 | 34 | ((*- block in_prompt -*))((*- endblock in_prompt -*)) |
|
35 | 35 | ((*- block input -*))((*- endblock input -*)) |
|
36 | 36 | ((*- endblock input_group -*)) |
|
37 |
|
|
|
37 | ((*- if cell.outputs -*)) | |
|
38 | 38 | ((*- block output_group -*)) |
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
39 | ((*- block output_prompt -*))((*- endblock output_prompt -*)) | |
|
40 | ((*- block outputs scoped -*)) | |
|
41 | ((*- for output in cell.outputs -*)) | |
|
42 | ((*- block output scoped -*)) | |
|
42 | 43 | ((*- if output.output_type in ['pyout'] -*)) |
|
43 | 44 | ((*- block pyout scoped -*))((*- endblock pyout -*)) |
|
44 | 45 | ((*- elif output.output_type in ['stream'] -*)) |
@@ -63,10 +64,11 b' consider calling super even if block is leave block, we might insert more block ' | |||
|
63 | 64 | ((*- endfor -*)) |
|
64 | 65 | ((*- endblock pyerr -*)) |
|
65 | 66 | ((*- endif -*)) |
|
66 |
((*- end |
|
|
67 |
((*- end |
|
|
67 | ((*- endblock output -*)) | |
|
68 | ((*- endfor -*)) | |
|
69 | ((*- endblock outputs -*)) | |
|
68 | 70 | ((*- endblock output_group -*)) |
|
69 |
|
|
|
71 | ((*- endif -*)) | |
|
70 | 72 | ((*- endblock codecell -*)) |
|
71 | 73 | ((*- elif cell.type in ['markdown'] -*)) |
|
72 | 74 | ((*- block markdowncell scoped-*)) |
General Comments 0
You need to be logged in to leave comments.
Login now