##// END OF EJS Templates
Revert cell_input and cell_outputs...
Jonathan Frederic -
Show More
@@ -1,64 +1,95 b''
1 1 ((= Auto-generated template file, DO NOT edit directly!
2 2 To edit this file, please refer to ../../skeleton/README.md =))
3 3
4 4
5 5 ((=
6 6
7 DO NOT USE THIS AS A BASE WORK,
7 DO NOT USE THIS AS A BASE,
8 8 IF YOU ARE COPY AND PASTING THIS FILE
9 YOU ARE PROBABLY DOING THINGS WRONG.
9 YOU ARE PROBABLY DOING THINGS INCORRECTLY.
10 10
11 Null template, Does nothing except defining a basic structure
11 Null template, does nothing except defining a basic structure
12 12 To layout the different blocks of a notebook.
13 13
14 14 Subtemplates can override blocks to define their custom representation.
15 15
16 16 If one of the block you do overwrite is not a leave block, consider
17 17 calling super.
18 18
19 19 ((*- block nonLeaveBlock -*))
20 20 #add stuff at beginning
21 21 ((( super() )))
22 22 #add stuff at end
23 23 ((*- endblock nonLeaveBlock -*))
24 24
25 25 consider calling super even if it is a leave block, we might insert more blocks later.
26 26
27 27 =))
28 28 ((*- block header -*))
29 29 ((*- endblock header -*))
30 30 ((*- block body -*))
31 31 ((*- for worksheet in nb.worksheets -*))
32 32 ((*- for cell in worksheet.cells -*))
33 33 ((*- block any_cell scoped -*))
34 34 ((*- if cell.cell_type in ['code'] -*))
35 35 ((*- block codecell scoped -*))
36 36 ((*- block input_group -*))
37 ((*- include 'cell_input.tplx' -*))
37 ((*- block in_prompt -*))((*- endblock in_prompt -*))
38 ((*- block input -*))((*- endblock input -*))
38 39 ((*- endblock input_group -*))
39 40 ((*- if cell.outputs -*))
40 41 ((*- block output_group -*))
41 ((*- include 'cell_outputs.tplx' -*))
42 ((*- block output_prompt -*))((*- endblock output_prompt -*))
43 ((*- block outputs scoped -*))
44 ((*- for output in cell.outputs -*))
45 ((*- block output scoped -*))
46 ((*- if output.output_type in ['pyout'] -*))
47 ((*- block pyout scoped -*))((*- endblock pyout -*))
48 ((*- elif output.output_type in ['stream'] -*))
49 ((*- block stream scoped -*))
50 ((*- if output.stream in ['stdout'] -*))
51 ((*- block stream_stdout scoped -*))
52 ((*- endblock stream_stdout -*))
53 ((*- elif output.stream in ['stderr'] -*))
54 ((*- block stream_stderr scoped -*))
55 ((*- endblock stream_stderr -*))
56 ((*- endif -*))
57 ((*- endblock stream -*))
58 ((*- elif output.output_type in ['display_data'] -*))
59 ((*- block display_data scoped -*))
60 ((*- block data_priority scoped -*))
61 ((*- endblock data_priority -*))
62 ((*- endblock display_data -*))
63 ((*- elif output.output_type in ['pyerr'] -*))
64 ((*- block pyerr scoped -*))
65 ((*- for line in output.traceback -*))
66 ((*- block traceback_line scoped -*))((*- endblock traceback_line -*))
67 ((*- endfor -*))
68 ((*- endblock pyerr -*))
69 ((*- endif -*))
70 ((*- endblock output -*))
71 ((*- endfor -*))
72 ((*- endblock outputs -*))
42 73 ((*- endblock output_group -*))
43 74 ((*- endif -*))
44 75 ((*- endblock codecell -*))
45 76 ((*- elif cell.cell_type in ['markdown'] -*))
46 77 ((*- block markdowncell scoped-*))
47 78 ((*- endblock markdowncell -*))
48 79 ((*- elif cell.cell_type in ['heading'] -*))
49 80 ((*- block headingcell scoped-*))
50 81 ((*- endblock headingcell -*))
51 82 ((*- elif cell.cell_type in ['raw'] -*))
52 83 ((*- block rawcell scoped-*))
53 84 ((*- endblock rawcell -*))
54 85 ((*- else -*))
55 86 ((*- block unknowncell scoped-*))
56 87 ((*- endblock unknowncell -*))
57 88 ((*- endif -*))
58 89 ((*- endblock any_cell -*))
59 90 ((*- endfor -*))
60 91 ((*- endfor -*))
61 92 ((*- endblock body -*))
62 93
63 94 ((*- block footer -*))
64 95 ((*- endblock footer -*))
@@ -1,60 +1,91 b''
1 1 {#
2 2
3 3 DO NOT USE THIS AS A BASE,
4 4 IF YOU ARE COPY AND PASTING THIS FILE
5 5 YOU ARE PROBABLY DOING THINGS INCORRECTLY.
6 6
7 7 Null template, does nothing except defining a basic structure
8 8 To layout the different blocks of a notebook.
9 9
10 10 Subtemplates can override blocks to define their custom representation.
11 11
12 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 -%}
16 16 #add stuff at beginning
17 17 {{ super() }}
18 18 #add stuff at end
19 19 {%- endblock nonLeaveBlock -%}
20 20
21 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 -%}
25 25 {%- endblock header -%}
26 26 {%- block body -%}
27 27 {%- for worksheet in nb.worksheets -%}
28 28 {%- for cell in worksheet.cells -%}
29 29 {%- block any_cell scoped -%}
30 30 {%- if cell.cell_type in ['code'] -%}
31 31 {%- block codecell scoped -%}
32 32 {%- block input_group -%}
33 {%- include 'cell_input.tpl' -%}
33 {%- block in_prompt -%}{%- endblock in_prompt -%}
34 {%- block input -%}{%- endblock input -%}
34 35 {%- endblock input_group -%}
35 36 {%- if cell.outputs -%}
36 37 {%- block output_group -%}
37 {%- include 'cell_outputs.tpl' -%}
38 {%- block output_prompt -%}{%- endblock output_prompt -%}
39 {%- block outputs scoped -%}
40 {%- for output in cell.outputs -%}
41 {%- block output scoped -%}
42 {%- if output.output_type in ['pyout'] -%}
43 {%- block pyout scoped -%}{%- endblock pyout -%}
44 {%- elif output.output_type in ['stream'] -%}
45 {%- block stream scoped -%}
46 {%- if output.stream in ['stdout'] -%}
47 {%- block stream_stdout scoped -%}
48 {%- endblock stream_stdout -%}
49 {%- elif output.stream in ['stderr'] -%}
50 {%- block stream_stderr scoped -%}
51 {%- endblock stream_stderr -%}
52 {%- endif -%}
53 {%- endblock stream -%}
54 {%- elif output.output_type in ['display_data'] -%}
55 {%- block display_data scoped -%}
56 {%- block data_priority scoped -%}
57 {%- endblock data_priority -%}
58 {%- endblock display_data -%}
59 {%- elif output.output_type in ['pyerr'] -%}
60 {%- block pyerr scoped -%}
61 {%- for line in output.traceback -%}
62 {%- block traceback_line scoped -%}{%- endblock traceback_line -%}
63 {%- endfor -%}
64 {%- endblock pyerr -%}
65 {%- endif -%}
66 {%- endblock output -%}
67 {%- endfor -%}
68 {%- endblock outputs -%}
38 69 {%- endblock output_group -%}
39 70 {%- endif -%}
40 71 {%- endblock codecell -%}
41 72 {%- elif cell.cell_type in ['markdown'] -%}
42 73 {%- block markdowncell scoped-%}
43 74 {%- endblock markdowncell -%}
44 75 {%- elif cell.cell_type in ['heading'] -%}
45 76 {%- block headingcell scoped-%}
46 77 {%- endblock headingcell -%}
47 78 {%- elif cell.cell_type in ['raw'] -%}
48 79 {%- block rawcell scoped-%}
49 80 {%- endblock rawcell -%}
50 81 {%- else -%}
51 82 {%- block unknowncell scoped-%}
52 83 {%- endblock unknowncell -%}
53 84 {%- endif -%}
54 85 {%- endblock any_cell -%}
55 86 {%- endfor -%}
56 87 {%- endfor -%}
57 88 {%- endblock body -%}
58 89
59 90 {%- block footer -%}
60 91 {%- endblock footer -%}
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now