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