diff --git a/liquid_tags/notebook.py b/liquid_tags/notebook.py index 8b45d5d..2dce5e4 100644 --- a/liquid_tags/notebook.py +++ b/liquid_tags/notebook.py @@ -112,6 +112,14 @@ pre.ipynb { } img.anim_icon{padding:0; border:0; vertical-align:middle; -webkit-box-shadow:none; -box-shadow:none} + +div.collapseheader { + width=100%; + background-color:#d3d3d3; + padding: 2px; + cursor: pointer; + font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; +} @@ -134,6 +142,23 @@ init_mathjax = function() { } init_mathjax(); + + + + """ CSS_WRAPPER = """ @@ -171,36 +196,6 @@ class SubCell(Transformer): return nbc, resources -#---------------------------------------------------------------------- -# Customize the html template: -# This changes the
tags in basic_html.tpl to-{{output.text |ansi2html}}- -{%- endblock stream_stdout %} - -{% block stream_stderr -%} - -{%- endblock stream_stderr %} - -{% block pyerr -%} - -{%- endblock pyerr %} - -{%- block data_text %} -{{output.text | ansi2html}}-{%- endblock -%} -"""}) - #---------------------------------------------------------------------- # Custom highlighter: @@ -254,10 +249,9 @@ def notebook(preprocessor, tag, markup): {'enabled':True, 'start':start, 'end':end}}) exporter = HTMLExporter(config=c, - template_file='basic', + template_file='pelicanhtml', filters={'highlight2html': custom_highlighter}, - transformers=[SubCell], - extra_loaders=[pelican_loader]) + transformers=[SubCell]) # read and parse the notebook with open(nb_path) as f: