Skip to content

Commit

Permalink
[toc2] use unaltered notebook metadata in template
Browse files Browse the repository at this point in the history
  • Loading branch information
jcb91 committed Oct 23, 2017
1 parent f105d1d commit fd201d5
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/jupyter_contrib_nbextensions/templates/toc2.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +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)
}
var cfg = {{ nb.get('metadata', {}).get('toc', {})|tojson|safe }};
var st={}; // some variables used in the script
st.oldTocHeight = undefined
Expand Down

0 comments on commit fd201d5

Please sign in to comment.