Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[toc2] use unaltered notebook metadata in template #1141

Merged
merged 1 commit into from
Feb 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/jupyter_contrib_nbextensions/templates/toc2.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,7 @@
<script>
$( document ).ready(function(){

var cfg={'threshold':{{ nb.get('metadata', {}).get('toc', {}).get('threshold', '3') }}, // depth of toc (number of levels)
'number_sections': {{ 'true' if nb.get('metadata', {}).get('toc', {}).get('number_sections', False) else 'false' }}, // sections numbering
'toc_cell': false, // useless here
'toc_window_display': true, // display the toc window
"toc_section_display": "block", // display toc contents in the window
'markTocItemOnScroll': {{ 'true' if nb.get('metadata', {}).get('toc', {}).get('markTocItemOnScroll', False) else 'false' }},
'sideBar':{{ 'true' if nb.get('metadata', {}).get('toc', {}).get('sideBar', False) else 'false' }}, // sidebar or floating window
'navigate_menu':false, // navigation menu (only in liveNotebook -- do not change)
title_cell: 'Table of Contents',
title_sidebar: 'Contents',
}
var cfg = {{ nb.get('metadata', {}).get('toc', {})|tojson|safe }};

var st={}; // some variables used in the script
st.oldTocHeight = undefined
Expand Down