Show More
@@ -13,31 +13,23 b'' | |||||
13 | </div> |
|
13 | </div> | |
14 | {% endblock input_group %} |
|
14 | {% endblock input_group %} | |
15 |
|
15 | |||
16 |
{% block output |
|
16 | {% block output_group %} | |
17 | {{ super() }} |
|
|||
18 | {% endblock outputs %} |
|
|||
19 |
|
||||
20 | {% block output_group -%} |
|
|||
21 | <div class="output vbox"> |
|
|||
22 | <div class="vbox output_wrapper"> |
|
17 | <div class="vbox output_wrapper"> | |
23 |
<div class=" |
|
18 | <div class="output vbox"> | |
24 | {{ super() }} |
|
19 | {{ super() }} | |
25 | </div> |
|
20 | </div> | |
26 | </div> |
|
21 | </div> | |
27 | </div> |
|
|||
28 | {% endblock output_group %} |
|
22 | {% endblock output_group %} | |
29 |
|
23 | |||
30 |
|
||||
31 | {% block in_prompt -%} |
|
24 | {% block in_prompt -%} | |
32 | <div class="prompt input_prompt">In [{{cell.prompt_number}}]:</div> |
|
25 | <div class="prompt input_prompt">In [{{cell.prompt_number}}]:</div> | |
33 | {%- endblock in_prompt %} |
|
26 | {%- endblock in_prompt %} | |
34 |
|
27 | |||
35 | {% block output_prompt -%} |
|
28 | {# | |
36 | <div class="prompt output_prompt"> |
|
29 | output_prompt doesn't do anything in HTML, | |
37 | {%- if cell.haspyout -%} |
|
30 | because there is a prompt div in each output area (see output block) | |
38 | Out[{{cell.prompt_number}}]: |
|
31 | #} | |
39 | {%- endif -%} |
|
32 | {% block output_prompt %} | |
40 | </div> |
|
|||
41 | {% endblock output_prompt %} |
|
33 | {% endblock output_prompt %} | |
42 |
|
34 | |||
43 | {% block input %} |
|
35 | {% block input %} | |
@@ -46,6 +38,18 b' Out[{{cell.prompt_number}}]:' | |||||
46 | </div> |
|
38 | </div> | |
47 | {%- endblock input %} |
|
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 | {% block markdowncell scoped %} |
|
54 | {% block markdowncell scoped %} | |
51 | <div class="text_cell_render border-box-sizing rendered_html"> |
|
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 | YOU ARE PROBABLY DOING THINGS WRONG. |
|
5 | YOU ARE PROBABLY DOING THINGS WRONG. | |
6 |
|
6 | |||
7 | Null template, Does nothing except defining a basic structure |
|
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 | calling super. |
|
13 | calling super. | |
14 |
|
14 | |||
15 | {%- block nonLeaveBlock -%} |
|
15 | {%- block nonLeaveBlock -%} | |
@@ -18,7 +18,7 b' calling super.' | |||||
18 | #add stuff at end |
|
18 | #add stuff at end | |
19 | {%- endblock nonLeaveBlock -%} |
|
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 | {%- block header -%} |
|
24 | {%- block header -%} | |
@@ -33,11 +33,12 b' consider calling super even if block is leave block, we might insert more block ' | |||||
33 | {%- block in_prompt -%}{%- endblock in_prompt -%} |
|
33 | {%- block in_prompt -%}{%- endblock in_prompt -%} | |
34 | {%- block input -%}{%- endblock input -%} |
|
34 | {%- block input -%}{%- endblock input -%} | |
35 | {%- endblock input_group -%} |
|
35 | {%- endblock input_group -%} | |
36 |
|
|
36 | {%- if cell.outputs -%} | |
37 | {%- block output_group -%} |
|
37 | {%- block output_group -%} | |
38 |
|
|
38 | {%- block output_prompt -%}{%- endblock output_prompt -%} | |
39 |
|
|
39 | {%- block outputs scoped -%} | |
40 |
|
|
40 | {%- for output in cell.outputs -%} | |
|
41 | {%- block output scoped -%} | |||
41 | {%- if output.output_type in ['pyout'] -%} |
|
42 | {%- if output.output_type in ['pyout'] -%} | |
42 | {%- block pyout scoped -%}{%- endblock pyout -%} |
|
43 | {%- block pyout scoped -%}{%- endblock pyout -%} | |
43 | {%- elif output.output_type in ['stream'] -%} |
|
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 | {%- endfor -%} |
|
63 | {%- endfor -%} | |
63 | {%- endblock pyerr -%} |
|
64 | {%- endblock pyerr -%} | |
64 | {%- endif -%} |
|
65 | {%- endif -%} | |
65 |
{%- end |
|
66 | {%- endblock output -%} | |
66 |
{%- end |
|
67 | {%- endfor -%} | |
|
68 | {%- endblock outputs -%} | |||
67 | {%- endblock output_group -%} |
|
69 | {%- endblock output_group -%} | |
68 |
|
|
70 | {%- endif -%} | |
69 | {%- endblock codecell -%} |
|
71 | {%- endblock codecell -%} | |
70 | {%- elif cell.type in ['markdown'] -%} |
|
72 | {%- elif cell.type in ['markdown'] -%} | |
71 | {%- block markdowncell scoped-%} |
|
73 | {%- block markdowncell scoped-%} |
General Comments 0
You need to be logged in to leave comments.
Login now