diff --git a/setup.py b/setup.py index 78613f3..c45c683 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ def user_dir(): class DevelopCmd(develop): prefix_targets = [ - ("voila/templates", 'material') + ("nbconvert/templates", 'material') ] def run(self): target_dir = os.path.join(sys.prefix, 'share', 'jupyter') @@ -77,7 +77,7 @@ def run(self): # WARNING: all files generates during setup.py will not end up in the source distribution data_files = [] # Add all the templates -for (dirpath, dirnames, filenames) in os.walk('share/jupyter/voila/templates/'): +for (dirpath, dirnames, filenames) in os.walk('share/jupyter/nbconvert/templates/'): if filenames: data_files.append((dirpath, [os.path.join(dirpath, filename) for filename in filenames])) diff --git a/share/jupyter/nbconvert/templates/material/conf.json b/share/jupyter/nbconvert/templates/material/conf.json new file mode 100644 index 0000000..ff4bfee --- /dev/null +++ b/share/jupyter/nbconvert/templates/material/conf.json @@ -0,0 +1 @@ +{"base_template": "lab"} \ No newline at end of file diff --git a/share/jupyter/voila/templates/material/nbconvert_templates/voila.tpl b/share/jupyter/nbconvert/templates/material/index.html similarity index 52% rename from share/jupyter/voila/templates/material/nbconvert_templates/voila.tpl rename to share/jupyter/nbconvert/templates/material/index.html index f3938d2..48b3c57 100644 --- a/share/jupyter/voila/templates/material/nbconvert_templates/voila.tpl +++ b/share/jupyter/nbconvert/templates/material/index.html @@ -1,15 +1,9 @@ -{%- extends 'base.tpl' -%} -{% from 'mathjax.tpl' import mathjax %} +{%- extends 'lab/index.html' -%} -{%- block html_head_css -%} - -{% if resources.theme == 'dark' %} - -{% else %} - -{% endif %} - +{%- block html_head_css -%} +{{ super() }} +{{ resources.include_css("static/materialize.min.css") }} +{%- endblock html_head_css -%} -{% for css in resources.inlining.css %} - -{% endfor %} - - -{{ mathjax() }} -{%- endblock html_head_css -%} -{%- block body -%} -
+{% block body_content %}