diff options
Diffstat (limited to 'pelican-bootstrap3')
3 files changed, 26 insertions, 0 deletions
diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html index eecc53f..020300e 100644 --- a/pelican-bootstrap3/templates/base.html +++ b/pelican-bootstrap3/templates/base.html @@ -210,6 +210,10 @@ {% include 'includes/ga.html' %} {% include 'includes/piwik.html' %} +{% if 'liquid_tags.notebook' in PLUGINS %} + {% include 'includes/liquid_tags_nb_footer.html' %} +{% endif %} + {% block scripts %}{% endblock %} </body> </html> diff --git a/pelican-bootstrap3/templates/includes/liquid_tags_nb_footer.html b/pelican-bootstrap3/templates/includes/liquid_tags_nb_footer.html new file mode 100644 index 0000000..f5f8007 --- /dev/null +++ b/pelican-bootstrap3/templates/includes/liquid_tags_nb_footer.html @@ -0,0 +1,14 @@ +<script type="text/javascript"> +jQuery(document).ready(function($) { + $("div.collapseheader").click(function () { + $header = $(this).children("span").first(); + $codearea = $(this).children(".input_area"); + console.log($(this).children()); + $codearea.slideToggle(500, function () { + $header.text(function () { + return $codearea.is(":visible") ? "Collapse Code" : "Expand Code"; + }); + }); +}); +}); +</script> diff --git a/pelican-bootstrap3/templates/includes/liquid_tags_nb_header.html b/pelican-bootstrap3/templates/includes/liquid_tags_nb_header.html index c9e9c59..5dc6d1c 100644 --- a/pelican-bootstrap3/templates/includes/liquid_tags_nb_header.html +++ b/pelican-bootstrap3/templates/includes/liquid_tags_nb_header.html @@ -133,6 +133,14 @@ div.text_cell_render { } img.anim_icon{padding:0; border:0; vertical-align:middle; -webkit-box-shadow:none; -box-shadow:none} + +div.collapseheader { + width=100%; + padding: 2px; + cursor: pointer; + font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; +} + </style> <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" type="text/javascript"></script> |