From 6b8a9d57a3644fb27c47dc5866c12d0ba70ee1ec 2013-07-27 17:39:21 From: damianavila Date: 2013-07-27 17:39:21 Subject: [PATCH] Redo of fixing templates structure. --- diff --git a/IPython/nbconvert/templates/html_basic.tpl b/IPython/nbconvert/templates/html_basic.tpl index e879c60..0de72d6 100644 --- a/IPython/nbconvert/templates/html_basic.tpl +++ b/IPython/nbconvert/templates/html_basic.tpl @@ -1,15 +1,15 @@ {%- extends 'display_priority.tpl' -%} - {% block codecell %}
-{{ super() }}
+{{ super() }} + {%- endblock codecell %} {% block input_group -%}
-{{super()}} +{{ super() }}
{% endblock input_group %} @@ -22,7 +22,9 @@ {% endblock output_group %} {% block in_prompt -%} -
In [{{cell.prompt_number}}]:
+
+In [{{ cell.prompt_number }}]: +
{%- endblock in_prompt %} {# @@ -34,32 +36,32 @@ {% block input %}
-{{cell.input | highlight2html }} +{{ cell.input | highlight2html }}
{%- endblock input %} {% block output %}
{%- if output.output_type == 'pyout' -%} -
-Out[{{cell.prompt_number}}]: +
+ Out[{{ cell.prompt_number }}]: {%- else -%} -
+
{%- endif -%} -
+
{{ super() }}
{% endblock output %} {% block markdowncell scoped %}
-{{ cell.source | strip_math_space | markdown2html | strip_files_prefix}} +{{ cell.source | strip_math_space | markdown2html | strip_files_prefix }}
{%- endblock markdowncell %} {% block headingcell scoped %}
- {{("#" * cell.level + cell.source) | replace('\n', ' ') | strip_math_space | markdown2html | strip_files_prefix | add_anchor }} +{{ ("#" * cell.level + cell.source) | replace('\n', ' ') | strip_math_space | markdown2html | strip_files_prefix | add_anchor }}
{% endblock headingcell %} @@ -68,71 +70,73 @@ Out[{{cell.prompt_number}}]: {% endblock rawcell %} {% block unknowncell scoped %} -unknown type {{cell.type}} +unknown type {{ cell.type }} {% endblock unknowncell %} - {% block pyout -%}
-{% block data_priority scoped %}{{ super()}}{% endblock %} +{% block data_priority scoped %} +{{ super() }} +{% endblock %}
{%- endblock pyout %} {% block stream_stdout -%}
-
{{output.text |ansi2html}}
+
+{{ output.text | ansi2html }}
+
{%- endblock stream_stdout %} {% block stream_stderr -%}
-
{{output.text |ansi2html}}
+
+{{ output.text | ansi2html }}
+
{%- endblock stream_stderr %} {% block data_svg -%} -{{output.svg}} +{{ output.svg }} {%- endblock data_svg %} - {% block data_html -%}
-{{output.html}} +{{ output.html }}
{%- endblock data_html %} {% block data_png %} - + {%- endblock data_png %} - {% block data_jpg %} - + {%- endblock data_jpg %} - {% block data_latex %} -{{output.latex}} +{{ output.latex }} {%- endblock data_latex %} {% block pyerr -%}
-
{{super()}}
+
{{ super() }}
{%- endblock pyerr %} {%- block traceback_line %} -{{line| ansi2html}} +{{ line | ansi2html }} {%- endblock traceback_line %} - {%- block data_text %} -
{{output.text | ansi2html}}
+
+{{ output.text | ansi2html }}
+
{%- endblock -%} - {%- block display_data scoped -%}
-{{super()}} +{{ super() }}
-{%- endblock display_data -%} +{%- endblock display_data -%} \ No newline at end of file diff --git a/IPython/nbconvert/templates/html_full.tpl b/IPython/nbconvert/templates/html_full.tpl index 07f1c53..626399b 100644 --- a/IPython/nbconvert/templates/html_full.tpl +++ b/IPython/nbconvert/templates/html_full.tpl @@ -1,14 +1,16 @@ {%- extends 'html_basic.tpl' -%} -{%- block header -%} + +{%- block header -%} + [{{nb.metadata.name}}] {% for css in resources.inlining.css -%} - + {% endfor %} + {% endfor %}