Skip to content

Instantly share code, notes, and snippets.

@mutairibassam
Created December 16, 2020 06:21
Show Gist options
  • Save mutairibassam/9c16efbb6222bbb4dd715edaefe1aaab to your computer and use it in GitHub Desktop.
Save mutairibassam/9c16efbb6222bbb4dd715edaefe1aaab to your computer and use it in GitHub Desktop.
hide the input cells from your ipython slides
{# Jupyter Notebook Toggle Template for Slides by Damian Avila
from http://www.damian.oquanta.info/posts/hide-the-input-cells-from-your-ipython-slides.html
#}
{%- extends 'slides_reveal.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;
}
</style>
<script>
$(document).ready(function(){
$(".output_wrapper").click(function(){
$(this).prev('.input_hidden').slideToggle();
});
})
</script>
{%- endblock header -%}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment