This repository has been archived by the owner on Jan 3, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from r-gaia-cs/ipynb-template
Template for IPython Notebook
- Loading branch information
Showing
3 changed files
with
76 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
layout: lesson | ||
root: ../.. | ||
--- | ||
{% extends 'markdown.tpl' %} | ||
|
||
{% block input %} | ||
<div class="input"> | ||
<span>In [{{ cell.prompt_number }}]:</span> | ||
<pre>{{ cell.input | escape }}</pre> | ||
</div> | ||
{% endblock input %} | ||
|
||
{% block output_group %} | ||
<div class="output"> | ||
<span>Out [{{ cell.prompt_number }}]:</span> | ||
<pre>{{ super() }}</pre> | ||
</div> | ||
{% endblock output_group %} | ||
|
||
{% block stream %} | ||
{{ output.text | escape }} | ||
{% endblock stream %} | ||
|
||
{% block pyout %} | ||
{{ output.text | escape }} | ||
{% endblock pyout %} | ||
|
||
{% block pyerr %} | ||
{{ output.traceback | join('\n') | strip_ansi | escape }} | ||
{% endblock pyerr %} | ||
|
||
{% block data_svg %} | ||
<img src="../../{{ output.svg_filename | path2url }}"> | ||
{% endblock data_svg %} | ||
|
||
{% block data_png %} | ||
<img src="../../{{ output.png_filename | path2url }}"> | ||
{% endblock data_png %} | ||
|
||
{% block data_jpg %} | ||
<img src="../../{{ output.jpeg_filename | path2url }}"> | ||
{% endblock data_jpg %} | ||
|
||
{% block markdowncell %} | ||
{% if 'cell_tags' in cell.metadata %} | ||
<div class="{{ cell.metadata['cell_tags'][0] }}"> | ||
{{ cell.source | markdown2html | strip_files_prefix }} | ||
</div> | ||
{% else %} | ||
<div> | ||
{{ cell.source | markdown2html | strip_files_prefix }} | ||
</div> | ||
{% endif %} | ||
{%- endblock markdowncell %} |