diff options
author | Eric Carlson <ektar@carlsonhome.net> | 2017-04-08 07:52:48 -0400 |
---|---|---|
committer | Alexis Metaireau <alexis@notmyidea.org> | 2017-04-08 13:52:48 +0200 |
commit | 08ba93e4416c6be85ea398c980fb77a81a8016ec (patch) | |
tree | 265ab54de158a34d0ee3a8ebe07ab0350cf5f875 /pelican-bootstrap3 | |
parent | 9de98545f53904a8eec9b86bfb79aafce80dc690 (diff) | |
download | pelican-themes-08ba93e4416c6be85ea398c980fb77a81a8016ec.tar.gz |
Updated pelican-bootstrap3 to be compatible with the collapsible input cells feature of the liquid tags ipython notebook plugin (#467)
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> |