Last active
February 15, 2017 17:37
-
-
Save gabraganca/7097067 to your computer and use it in GitHub Desktop.
Template to use with `ipython nbconvert` when generating HTML. With this, all input cell are hidden. Thanks @damianavila for the initial setup (http://www.damian.oquanta.info/posts/hide-the-input-cells-from-your-ipython-slides.html). I have also take some code from the `custom.css` of @olgablot published in http://nbviewer.ipython.org/5357268.
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
{%- extends 'full.tpl' -%} | |
{% block input_group -%} | |
<div class="input_hidden"> | |
{{ super() }} | |
</div> | |
{% endblock input_group %} | |
{%- block header -%} | |
{{ super() }} | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<style type="text/css"> | |
//div.output_wrapper { | |
// margin-top: 0px; | |
//} | |
.input_hidden { | |
display: none; | |
// margin-top: 5px; | |
} | |
div.prompt { | |
display: none; | |
} | |
.CodeMirror{ | |
font-family: "Consolas", sans-serif; | |
} | |
pre, code, kbd, samp { | |
font-family: Consolas, monospace; | |
font-size: 100px; | |
} | |
p {font-size:14px;} | |
div.cell{ | |
max-width:80%; | |
margin-left:auto; | |
margin-right:auto; | |
} | |
div.text_cell_render{ | |
max-width:90%; | |
margin-left:auto; | |
margin-right:auto; | |
} | |
h1 { | |
text-align:center; | |
font-familly:"Charis SIL", serif; | |
</style> | |
<script> | |
$(document).ready(function(){ | |
$(".output_wrapper").click(function(){ | |
$(this).prev('.input_hidden').slideToggle(); | |
}); | |
}) | |
</script> | |
{%- endblock header -%} |
Thanks for the hint. I will try that.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice work, this is awesome.
One comment