##// END OF EJS Templates
some other fixes
Matthias BUSSONNIER -
Show More
@@ -1,75 +1,80 b''
1 1 {%- extends 'null.tpl' -%}
2 2
3 3
4 4
5 5 {% block codecell %}
6 6 <div class="cell border-box-sizing code_cell vbox">
7 {{ super() }}
8 </div>
9 {% endblock codecell %}
7 {{ super() }}</div>
8 {%- endblock codecell %}
10 9
11 10 {% block input_group -%}
12 11 <div class="input hbox">
13 12 {{super()}}
14 13 </div>
15 14 {% endblock input_group %}
16 15
17 16 {% block output_group -%}
18 17 <div class="vbox output_wrapper">
19 18 <div class="output vbox">
20 19 <div class="hbox output_area">
21 20 {{ super() }}
22 21 </div>
23 22 </div>
24 23 </div>
25 24 {% endblock output_group %}
26 25
27 26
28 27 {% block in_prompt -%}
29 28 <div class="prompt input_prompt">In&nbsp;[{{cell.prompt_number}}]:</div>
30 29 {%- endblock in_prompt %}
31 30
32 31 {% block output_prompt -%}
33 <div class="prompt output_prompt"></div>
32 <div class="prompt output_prompt">
33 {%- if cell.prompt_number is not none -%}
34 {#- check the case of Out[#]-#}
35 Out[{{cell.prompt_number}}]:
36 {%- endif -%}
37 </div>
34 38 {% endblock output_prompt %}
35 39
36 40 {% block input %}
37 41 <div class="input_area box-flex1">
38 {{cell.input | highlight }}</div>
42 {{cell.input | highlight }}
43 </div>
39 44 {%- endblock input %}
40 45
41 46
42 {% block markdowncell scoped -%}
47 {% block markdowncell scoped %}
43 48 <div class="text_cell_render border-box-sizing rendered_html">
44 49 {{ cell.source | markdown| rm_fake}}
45 50 </div>
46 51 {%- endblock markdowncell %}
47 52
48 53 {% block headingcell scoped %}
49 54 <div class="text_cell_render border-box-sizing rendered_html">
50 55 <h{{cell.level}}>
51 56 {{cell.source}}
52 57 </h{{cell.level}}>
53 58 </div>
54 59 {% endblock headingcell %}
55 60
56 61 {% block rawcell scoped %}
57 62 {{ cell.source | pycomment }}
58 63 {% endblock rawcell %}
59 64
60 65 {% block unknowncell scoped %}
61 66 unknown type {{cell.type}}
62 67 {% endblock unknowncell %}
63 68
64 69
65 70 {% block pyout -%}
66 <div class="output_subarea output_stream output_stdout">
71 <div class="output_subarea output_pyout">
67 72 <pre>{{output.text}}</pre>
68 73 </div>
69 74 {%- endblock pyout %}
70 75
71 76 {% block stream -%}
72 77 <div class="output_subarea output_stream output_stdout">
73 78 <pre>{{output.text}}</pre>
74 79 </div>
75 80 {%- endblock stream %}
@@ -1,78 +1,78 b''
1 1 {#
2 2
3 3 DO NOT USE THIS AS A BASE WORK,
4 4 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 8 To layout the diferents blocks of a notebook.
9 9
10 10 Subtemplates can Override Blocks to define their custom reresentation.
11 11
12 12 If one of the block you do overrite 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 block is leave block, we might insert more block later.
22 22
23 23 #}
24 24 {%- block header -%}
25 25 {%- endblock header -%}
26 26 {%- block body -%}
27 27 {%- for worksheet in worksheets -%}
28 28 {%- for cell in worksheet.cells -%}
29 29 {%- block any_cell scoped -%}
30 30 {%- if cell.type in ['code'] -%}
31 31 {%- block codecell scoped -%}
32 32 {%- block input_group -%}
33 33 {%- block in_prompt -%}{%- endblock in_prompt -%}
34 34 {%- block input -%}{%- endblock input -%}
35 35 {%- endblock input_group -%}
36 {%- block output_group -%}
37 36 {%- if cell.outputs -%}
37 {%- block output_group -%}
38 38 {%- block output_prompt -%}{%- endblock output_prompt -%}
39 39 {%- block outputs -%}
40 40 {%- for output in cell.outputs -%}
41 41 {%- if output.output_type in ['pyout'] -%}
42 42 {%- block pyout scoped -%}{%- endblock pyout -%}
43 43 {%- elif output.output_type in ['stream'] -%}
44 44 {%- block stream scoped -%}{%- endblock stream -%}
45 45 {%- elif output.output_type in ['display_data'] -%}
46 46 {%- block display_data scoped -%}{%- endblock display_data -%}
47 47 {%- elif output.output_type in ['pyerr'] -%}
48 48 {%- block pyerr scoped -%}
49 49 {%- for line in output.traceback -%}
50 50 {%- block traceback_line scoped -%}{%- endblock traceback_line -%}
51 51 {%- endfor -%}
52 52 {%- endblock pyerr -%}
53 53 {%- endif -%}
54 54 {%- endfor -%}
55 55 {%- endblock outputs -%}
56 {%- endif -%}
57 56 {%- endblock output_group -%}
57 {%- endif -%}
58 58 {%- endblock codecell -%}
59 59 {%- elif cell.type in ['markdown'] -%}
60 60 {%- block markdowncell scoped-%}
61 61 {%- endblock markdowncell -%}
62 62 {%- elif cell.type in ['heading'] -%}
63 63 {%- block headingcell scoped-%}
64 64 {%- endblock headingcell -%}
65 65 {%- elif cell.type in ['raw'] -%}
66 66 {%- block rawcell scoped-%}
67 67 {%- endblock rawcell -%}
68 68 {%- else -%}
69 69 {%- block unknowncell scoped-%}
70 70 {%- endblock unknowncell -%}
71 71 {%- endif -%}
72 72 {%- endblock any_cell -%}
73 73 {%- endfor -%}
74 74 {%- endfor -%}
75 75 {%- endblock body -%}
76 76
77 77 {%- block footer -%}
78 78 {%- endblock footer -%}
General Comments 0
You need to be logged in to leave comments. Login now