basic.tpl
193 lines
| 4.6 KiB
| application/vnd.groove-tool-template
|
SmartyLexer
Matthias BUSSONNIER
|
r9599 | {%- extends 'display_priority.tpl' -%} | ||
Matthias BUSSONNIER
|
r9580 | |||
Matthias BUSSONNIER
|
r9590 | {% block codecell %} | ||
Jonathan Frederic
|
r15723 | <div class="cell border-box-sizing code_cell rendered"> | ||
damianavila
|
r11770 | {{ super() }} | ||
</div> | ||||
Matthias BUSSONNIER
|
r9591 | {%- endblock codecell %} | ||
Matthias BUSSONNIER
|
r9590 | |||
{% block input_group -%} | ||||
Matthias BUSSONNIER
|
r12918 | <div class="input"> | ||
damianavila
|
r11770 | {{ super() }} | ||
Matthias BUSSONNIER
|
r9580 | </div> | ||
Matthias BUSSONNIER
|
r9590 | {% endblock input_group %} | ||
MinRK
|
r10041 | {% block output_group %} | ||
Matthias BUSSONNIER
|
r12918 | <div class="output_wrapper"> | ||
Matthias BUSSONNIER
|
r13332 | <div class="output"> | ||
Matthias BUSSONNIER
|
r9823 | {{ super() }} | ||
Matthias BUSSONNIER
|
r9580 | </div> | ||
damianavila
|
r9707 | </div> | ||
Matthias BUSSONNIER
|
r9590 | {% endblock output_group %} | ||
{% block in_prompt -%} | ||||
damianavila
|
r11770 | <div class="prompt input_prompt"> | ||
In [{{ cell.prompt_number }}]: | ||||
</div> | ||||
Matthias BUSSONNIER
|
r9590 | {%- endblock in_prompt %} | ||
damianavila
|
r14198 | {% block empty_in_prompt -%} | ||
damianavila
|
r14193 | <div class="prompt input_prompt"> | ||
</div> | ||||
damianavila
|
r14198 | {%- endblock empty_in_prompt %} | ||
damianavila
|
r14193 | |||
MinRK
|
r10041 | {# | ||
output_prompt doesn't do anything in HTML, | ||||
because there is a prompt div in each output area (see output block) | ||||
#} | ||||
{% block output_prompt %} | ||||
Matthias BUSSONNIER
|
r9590 | {% endblock output_prompt %} | ||
{% block input %} | ||||
Jonathan Frederic
|
r15713 | <div class="inner_cell"> | ||
<div class="input_area"> | ||||
MinRK
|
r15672 | {{ cell.input | highlight2html(language=resources.get('language'), metadata=cell.metadata) }} | ||
Matthias BUSSONNIER
|
r9591 | </div> | ||
Jonathan Frederic
|
r15713 | </div> | ||
Matthias BUSSONNIER
|
r9590 | {%- endblock input %} | ||
MinRK
|
r10041 | {% block output %} | ||
Matthias BUSSONNIER
|
r12918 | <div class="output_area"> | ||
MinRK
|
r10041 | {%- if output.output_type == 'pyout' -%} | ||
damianavila
|
r11770 | <div class="prompt output_prompt"> | ||
Out[{{ cell.prompt_number }}]: | ||||
MinRK
|
r10041 | {%- else -%} | ||
damianavila
|
r11770 | <div class="prompt"> | ||
MinRK
|
r10041 | {%- endif -%} | ||
damianavila
|
r11770 | </div> | ||
MinRK
|
r10041 | {{ super() }} | ||
</div> | ||||
{% endblock output %} | ||||
Matthias BUSSONNIER
|
r9580 | |||
damianavila
|
r14195 | {% block markdowncell scoped %} | ||
Jonathan Frederic
|
r15723 | <div class="cell border-box-sizing text_cell rendered"> | ||
damianavila
|
r14198 | {{ self.empty_in_prompt() }} | ||
damianavila
|
r14191 | <div class="inner_cell"> | ||
damianavila
|
r14192 | <div class="text_cell_render border-box-sizing rendered_html"> | ||
MinRK
|
r12864 | {{ cell.source | markdown2html | strip_files_prefix }} | ||
Matthias BUSSONNIER
|
r9580 | </div> | ||
damianavila
|
r14191 | </div> | ||
damianavila
|
r14195 | </div> | ||
{%- endblock markdowncell %} | ||||
Matthias BUSSONNIER
|
r9580 | |||
damianavila
|
r14195 | {% block headingcell scoped %} | ||
Jonathan Frederic
|
r15723 | <div class="cell border-box-sizing text_cell rendered"> | ||
damianavila
|
r14198 | {{ self.empty_in_prompt() }} | ||
damianavila
|
r14192 | <div class="inner_cell"> | ||
Matthias BUSSONNIER
|
r9580 | <div class="text_cell_render border-box-sizing rendered_html"> | ||
MinRK
|
r12864 | {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | markdown2html | strip_files_prefix | add_anchor }} | ||
Matthias BUSSONNIER
|
r9580 | </div> | ||
damianavila
|
r14192 | </div> | ||
damianavila
|
r14195 | </div> | ||
{% endblock headingcell %} | ||||
damianavila
|
r14192 | |||
damianavila
|
r14195 | {% block unknowncell scoped %} | ||
damianavila
|
r11770 | unknown type {{ cell.type }} | ||
damianavila
|
r14195 | {% endblock unknowncell %} | ||
Matthias BUSSONNIER
|
r9590 | |||
{% block pyout -%} | ||||
Jonathan Frederic
|
r15730 | {%- set extra_class="output_pyout" -%} | ||
damianavila
|
r11770 | {% block data_priority scoped %} | ||
{{ super() }} | ||||
{% endblock %} | ||||
Jonathan Frederic
|
r15730 | {%- set extra_class="" -%} | ||
Matthias BUSSONNIER
|
r9590 | {%- endblock pyout %} | ||
Matthias BUSSONNIER
|
r9600 | {% block stream_stdout -%} | ||
Jonathan Frederic
|
r15715 | <div class="output_subarea output_stream output_stdout output_text"> | ||
damianavila
|
r11770 | <pre> | ||
{{ output.text | ansi2html }} | ||||
</pre> | ||||
Matthias BUSSONNIER
|
r9590 | </div> | ||
Matthias BUSSONNIER
|
r9600 | {%- endblock stream_stdout %} | ||
{% block stream_stderr -%} | ||||
Jonathan Frederic
|
r15724 | <div class="output_subarea output_stream output_stderr output_text"> | ||
damianavila
|
r11770 | <pre> | ||
{{ output.text | ansi2html }} | ||||
</pre> | ||||
Matthias BUSSONNIER
|
r9600 | </div> | ||
{%- endblock stream_stderr %} | ||||
Matthias BUSSONNIER
|
r9592 | |||
Jonathan Frederic
|
r15725 | {% block data_svg scoped -%} | ||
Jonathan Frederic
|
r15730 | <div class="output_svg output_subarea {{extra_class}}"> | ||
MinRK
|
r15535 | {%- if output.svg_filename %} | ||
<img src="{{output.svg_filename | posix_path}}" | ||||
{%- else %} | ||||
damianavila
|
r11770 | {{ output.svg }} | ||
MinRK
|
r15535 | {%- endif %} | ||
Jonathan Frederic
|
r15719 | </div> | ||
Matthias BUSSONNIER
|
r9599 | {%- endblock data_svg %} | ||
Matthias BUSSONNIER
|
r9592 | |||
Jonathan Frederic
|
r15725 | {% block data_html scoped -%} | ||
Jonathan Frederic
|
r15730 | <div class="output_html rendered_html output_subarea {{extra_class}}"> | ||
damianavila
|
r11770 | {{ output.html }} | ||
Matthias BUSSONNIER
|
r9599 | </div> | ||
{%- endblock data_html %} | ||||
Jonathan Frederic
|
r15725 | {% block data_png scoped %} | ||
Jonathan Frederic
|
r15730 | <div class="output_png output_subarea {{extra_class}}"> | ||
MinRK
|
r15535 | {%- if output.png_filename %} | ||
<img src="{{output.png_filename | posix_path}}" | ||||
{%- else %} | ||||
MinRK
|
r15298 | <img src="data:image/png;base64,{{ output.png }}" | ||
MinRK
|
r15535 | {%- endif %} | ||
MinRK
|
r15417 | {%- if 'metadata' in output and 'width' in output.metadata.get('png', {}) %} | ||
MinRK
|
r15298 | width={{output.metadata['png']['width']}} | ||
{%- endif %} | ||||
MinRK
|
r15417 | {%- if 'metadata' in output and 'height' in output.metadata.get('png', {}) %} | ||
MinRK
|
r15298 | height={{output.metadata['png']['height']}} | ||
{%- endif %} | ||||
> | ||||
Jonathan Frederic
|
r15719 | </div> | ||
Matthias BUSSONNIER
|
r9599 | {%- endblock data_png %} | ||
Jonathan Frederic
|
r15725 | {% block data_jpg scoped %} | ||
Jonathan Frederic
|
r15730 | <div class="output_jpeg output_subarea {{extra_class}}"> | ||
MinRK
|
r15535 | {%- if output.jpeg_filename %} | ||
<img src="{{output.jpeg_filename | posix_path}}" | ||||
{%- else %} | ||||
MinRK
|
r15298 | <img src="data:image/jpeg;base64,{{ output.jpeg }}" | ||
MinRK
|
r15535 | {%- endif %} | ||
MinRK
|
r15417 | {%- if 'metadata' in output and 'width' in output.metadata.get('jpeg', {}) %} | ||
MinRK
|
r15298 | width={{output.metadata['jpeg']['width']}} | ||
{%- endif %} | ||||
MinRK
|
r15417 | {%- if 'metadata' in output and 'height' in output.metadata.get('jpeg', {}) %} | ||
MinRK
|
r15298 | height={{output.metadata['jpeg']['height']}} | ||
{%- endif %} | ||||
> | ||||
Jonathan Frederic
|
r15719 | </div> | ||
Matthias BUSSONNIER
|
r9599 | {%- endblock data_jpg %} | ||
Jonathan Frederic
|
r15725 | {% block data_latex scoped %} | ||
Jonathan Frederic
|
r15730 | <div class="output_latex output_subarea {{extra_class}}"> | ||
damianavila
|
r11770 | {{ output.latex }} | ||
Jonathan Frederic
|
r15720 | </div> | ||
Matthias BUSSONNIER
|
r9599 | {%- endblock data_latex %} | ||
Matthias BUSSONNIER
|
r9592 | {% block pyerr -%} | ||
Jonathan Frederic
|
r15715 | <div class="output_subarea output_text output_pyerr"> | ||
damianavila
|
r11770 | <pre>{{ super() }}</pre> | ||
Matthias BUSSONNIER
|
r9592 | </div> | ||
{%- endblock pyerr %} | ||||
{%- block traceback_line %} | ||||
damianavila
|
r11770 | {{ line | ansi2html }} | ||
Matthias BUSSONNIER
|
r9592 | {%- endblock traceback_line %} | ||
Matthias BUSSONNIER
|
r9599 | |||
Jonathan Frederic
|
r15725 | {%- block data_text scoped %} | ||
Jonathan Frederic
|
r15730 | <div class="output_text output_subarea {{extra_class}}"> | ||
damianavila
|
r11770 | <pre> | ||
{{ output.text | ansi2html }} | ||||
</pre> | ||||
Jonathan Frederic
|
r15720 | </div> | ||
Matthias BUSSONNIER
|
r9599 | {%- endblock -%} | ||
Matthias BUSSONNIER
|
r9600 | |||
Jonathan Frederic
|
r15725 | {%- block data_javascript scoped %} | ||
Jonathan Frederic
|
r15730 | <div class="output_subarea output_javascript {{extra_class}}"> | ||
MinRK
|
r12446 | <script type="text/javascript"> | ||
{{ output.javascript }} | ||||
</script> | ||||
Jonathan Frederic
|
r15717 | </div> | ||
MinRK
|
r12446 | {%- endblock -%} | ||