##// END OF EJS Templates
Updated notebook template so menubar is rendered correctly
Jonathan Frederic -
Show More
@@ -1,362 +1,362
1 1 {% extends "page.html" %}
2 2
3 3 {% block stylesheet %}
4 4
5 5 {% if mathjax_url %}
6 6 <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML-full&delayStartupUntil=configured" charset="utf-8"></script>
7 7 {% endif %}
8 8 <script type="text/javascript">
9 9 // MathJax disabled, set as null to distingish from *missing* MathJax,
10 10 // where it will be undefined, and should prompt a dialog later.
11 11 window.mathjax_url = "{{mathjax_url}}";
12 12 </script>
13 13
14 14 <link rel="stylesheet" href="{{ static_url("components/bootstrap-tour/build/css/bootstrap-tour.min.css") }}" type="text/css" />
15 15 <link rel="stylesheet" href="{{ static_url("components/codemirror/lib/codemirror.css") }}">
16 16
17 17 {{super()}}
18 18
19 19 <link rel="stylesheet" href="{{ static_url("notebook/css/override.css") }}" type="text/css" />
20 20
21 21 {% endblock %}
22 22
23 23 {% block params %}
24 24
25 25 data-project="{{project}}"
26 26 data-base-url="{{base_url}}"
27 27 data-notebook-name="{{notebook_name}}"
28 28 data-notebook-path="{{notebook_path}}"
29 29 class="notebook_app"
30 30
31 31 {% endblock %}
32 32
33 33
34 34 {% block header %}
35 35
36 36 <span id="save_widget" class="nav pull-left">
37 37 <span id="notebook_name"></span>
38 38 <span id="checkpoint_status"></span>
39 39 <span id="autosave_status"></span>
40 40 </span>
41 41
42 42 {% endblock %}
43 43
44 44
45 45 {% block site %}
46 46
47 47 <div id="menubar-container" class="container">
48 48 <div id="menubar">
49 <div class="navbar">
50 <div class="navbar-inner">
51 <div class="container">
52 <ul id="menus" class="nav nav-pills">
49 <div id="menus" class="navbar navbar-default" role="navigation">
50 <div class="container-fluid">
51 <ul class="nav navbar-nav">
53 52 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">File</a>
54 53 <ul id="file_menu" class="dropdown-menu">
55 54 <li id="new_notebook"
56 55 title="Make a new notebook (Opens a new window)">
57 56 <a href="#">New</a></li>
58 57 <li id="open_notebook"
59 58 title="Opens a new window with the Dashboard view">
60 59 <a href="#">Open...</a></li>
61 60 <!-- <hr/> -->
62 61 <li class="divider"></li>
63 62 <li id="copy_notebook"
64 63 title="Open a copy of this notebook's contents and start a new kernel">
65 64 <a href="#">Make a Copy...</a></li>
66 65 <li id="rename_notebook"><a href="#">Rename...</a></li>
67 66 <li id="save_checkpoint"><a href="#">Save and Checkpoint</a></li>
68 67 <!-- <hr/> -->
69 68 <li class="divider"></li>
70 69 <li id="restore_checkpoint" class="dropdown-submenu"><a href="#">Revert to Checkpoint</a>
71 70 <ul class="dropdown-menu">
72 71 <li><a href="#"></a></li>
73 72 <li><a href="#"></a></li>
74 73 <li><a href="#"></a></li>
75 74 <li><a href="#"></a></li>
76 75 <li><a href="#"></a></li>
77 76 </ul>
78 77 </li>
79 78 <li class="divider"></li>
80 79 <li id="print_preview"><a href="#">Print Preview</a></li>
81 80 <li class="dropdown-submenu"><a href="#">Download as</a>
82 81 <ul class="dropdown-menu">
83 82 <li id="download_ipynb"><a href="#">IPython Notebook (.ipynb)</a></li>
84 83 <li id="download_py"><a href="#">Python (.py)</a></li>
85 84 <li id="download_html"><a href="#">HTML (.html)</a></li>
86 85 <li id="download_rst"><a href="#">reST (.rst)</a></li>
87 86 <li id="download_pdf"><a href="#">PDF (.pdf)</a></li>
88 87 </ul>
89 88 </li>
90 89 <li class="divider"></li>
91 90 <li id="trust_notebook"
92 91 title="Trust the output of this notebook">
93 92 <a href="#" >Trust Notebook</a></li>
94 93 <li class="divider"></li>
95 94 <li id="kill_and_exit"
96 95 title="Shutdown this notebook's kernel, and close this window">
97 96 <a href="#" >Close and halt</a></li>
98 97 </ul>
99 98 </li>
100 99 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Edit</a>
101 100 <ul id="edit_menu" class="dropdown-menu">
102 101 <li id="cut_cell"><a href="#">Cut Cell</a></li>
103 102 <li id="copy_cell"><a href="#">Copy Cell</a></li>
104 103 <li id="paste_cell_above" class="disabled"><a href="#">Paste Cell Above</a></li>
105 104 <li id="paste_cell_below" class="disabled"><a href="#">Paste Cell Below</a></li>
106 105 <li id="paste_cell_replace" class="disabled"><a href="#">Paste Cell &amp; Replace</a></li>
107 106 <li id="delete_cell"><a href="#">Delete Cell</a></li>
108 107 <li id="undelete_cell" class="disabled"><a href="#">Undo Delete Cell</a></li>
109 108 <li class="divider"></li>
110 109 <li id="split_cell"><a href="#">Split Cell</a></li>
111 110 <li id="merge_cell_above"><a href="#">Merge Cell Above</a></li>
112 111 <li id="merge_cell_below"><a href="#">Merge Cell Below</a></li>
113 112 <li class="divider"></li>
114 113 <li id="move_cell_up"><a href="#">Move Cell Up</a></li>
115 114 <li id="move_cell_down"><a href="#">Move Cell Down</a></li>
116 115 <li class="divider"></li>
117 116 <li id="edit_nb_metadata"><a href="#">Edit Notebook Metadata</a></li>
118 117 </ul>
119 118 </li>
120 119 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">View</a>
121 120 <ul id="view_menu" class="dropdown-menu">
122 121 <li id="toggle_header"
123 122 title="Show/Hide the IPython Notebook logo and notebook title (above menu bar)">
124 123 <a href="#">Toggle Header</a></li>
125 124 <li id="toggle_toolbar"
126 125 title="Show/Hide the action icons (below menu bar)">
127 126 <a href="#">Toggle Toolbar</a></li>
128 127 </ul>
129 128 </li>
130 129 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Insert</a>
131 130 <ul id="insert_menu" class="dropdown-menu">
132 131 <li id="insert_cell_above"
133 132 title="Insert an empty Code cell above the currently active cell">
134 133 <a href="#">Insert Cell Above</a></li>
135 134 <li id="insert_cell_below"
136 135 title="Insert an empty Code cell below the currently active cell">
137 136 <a href="#">Insert Cell Below</a></li>
138 137 </ul>
139 138 </li>
140 139 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Cell</a>
141 140 <ul id="cell_menu" class="dropdown-menu">
142 141 <li id="run_cell" title="Run this cell, and move cursor to the next one">
143 142 <a href="#">Run</a></li>
144 143 <li id="run_cell_select_below" title="Run this cell, select below">
145 144 <a href="#">Run and Select Below</a></li>
146 145 <li id="run_cell_insert_below" title="Run this cell, insert below">
147 146 <a href="#">Run and Insert Below</a></li>
148 147 <li id="run_all_cells" title="Run all cells in the notebook">
149 148 <a href="#">Run All</a></li>
150 149 <li id="run_all_cells_above" title="Run all cells above (but not including) this cell">
151 150 <a href="#">Run All Above</a></li>
152 151 <li id="run_all_cells_below" title="Run this cell and all cells below it">
153 152 <a href="#">Run All Below</a></li>
154 153 <li class="divider"></li>
155 154 <li id="change_cell_type" class="dropdown-submenu"
156 155 title="All cells in the notebook have a cell type. By default, new cells are created as 'Code' cells">
157 156 <a href="#">Cell Type</a>
158 157 <ul class="dropdown-menu">
159 158 <li id="to_code"
160 159 title="Contents will be sent to the kernel for execution, and output will display in the footer of cell">
161 160 <a href="#">Code</a></li>
162 161 <li id="to_markdown"
163 162 title="Contents will be rendered as HTML and serve as explanatory text">
164 163 <a href="#">Markdown</a></li>
165 164 <li id="to_raw"
166 165 title="Contents will pass through nbconvert unmodified">
167 166 <a href="#">Raw NBConvert</a></li>
168 167 <li id="to_heading1"><a href="#">Heading 1</a></li>
169 168 <li id="to_heading2"><a href="#">Heading 2</a></li>
170 169 <li id="to_heading3"><a href="#">Heading 3</a></li>
171 170 <li id="to_heading4"><a href="#">Heading 4</a></li>
172 171 <li id="to_heading5"><a href="#">Heading 5</a></li>
173 172 <li id="to_heading6"><a href="#">Heading 6</a></li>
174 173 </ul>
175 174 </li>
176 175 <li class="divider"></li>
177 176 <li id="current_outputs" class="dropdown-submenu"><a href="#">Current Output</a>
178 177 <ul class="dropdown-menu">
179 178 <li id="toggle_current_output"
180 179 title="Hide/Show the output of the current cell">
181 180 <a href="#">Toggle</a>
182 181 </li>
183 182 <li id="toggle_current_output_scroll"
184 183 title="Scroll the output of the current cell">
185 184 <a href="#">Toggle Scrolling</a>
186 185 </li>
187 186 <li id="clear_current_output"
188 187 title="Clear the output of the current cell">
189 188 <a href="#">Clear</a>
190 189 </li>
191 190 </ul>
192 191 </li>
193 192 <li id="all_outputs" class="dropdown-submenu"><a href="#">All Output</a>
194 193 <ul class="dropdown-menu">
195 194 <li id="toggle_all_output"
196 195 title="Hide/Show the output of all cells">
197 196 <a href="#">Toggle</a>
198 197 </li>
199 198 <li id="toggle_all_output_scroll"
200 199 title="Scroll the output of all cells">
201 200 <a href="#">Toggle Scrolling</a>
202 201 </li>
203 202 <li id="clear_all_output"
204 203 title="Clear the output of all cells">
205 204 <a href="#">Clear</a>
206 205 </li>
207 206 </ul>
208 207 </li>
209 208 </ul>
210 209 </li>
211 210 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Kernel</a>
212 211 <ul id="kernel_menu" class="dropdown-menu">
213 212 <li id="int_kernel"
214 213 title="Send KeyboardInterrupt (CTRL-C) to the Kernel">
215 214 <a href="#">Interrupt</a></li>
216 215 <li id="restart_kernel"
217 216 title="Restart the Kernel">
218 217 <a href="#">Restart</a></li>
219 218 </ul>
220 219 </li>
221 220 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Help</a>
222 221 <ul id="help_menu" class="dropdown-menu">
223 222 <li id="notebook_tour" title="A quick tour of the notebook user interface"><a href="#">User Interface Tour</a></li>
224 223 <li id="keyboard_shortcuts" title="Opens a tooltip with all keyboard shortcuts"><a href="#">Keyboard Shortcuts</a></li>
225 224 <li class="divider"></li>
226 225 {% set
227 226 sections = (
228 227 (
229 228 ("http://ipython.org/documentation.html","IPython Help",True),
230 229 ("http://nbviewer.ipython.org/github/ipython/ipython/tree/2.x/examples/Index.ipynb", "Notebook Help", True),
231 230 ),(
232 231 ("http://docs.python.org","Python",True),
233 232 ("http://help.github.com/articles/github-flavored-markdown","Markdown",True),
234 233 ("http://docs.scipy.org/doc/numpy/reference/","NumPy",True),
235 234 ("http://docs.scipy.org/doc/scipy/reference/","SciPy",True),
236 235 ("http://matplotlib.org/contents.html","Matplotlib",True),
237 236 ("http://docs.sympy.org/latest/index.html","SymPy",True),
238 237 ("http://pandas.pydata.org/pandas-docs/stable/","pandas", True)
239 238 )
240 239 )
241 240 %}
242 241
243 242 {% for helplinks in sections %}
244 243 {% for link in helplinks %}
245 244 <li><a href="{{link[0]}}" {{'target="_blank" title="Opens in a new window"' if link[2]}}>
246 245 {{'<i class="icon-external-link menu-icon pull-right"></i>' if link[2]}}
247 246 {{link[1]}}
248 247 </a></li>
249 248 {% endfor %}
250 249 {% if not loop.last %}
251 250 <li class="divider"></li>
252 251 {% endif %}
253 252 {% endfor %}
254 253 </li>
255 254 </ul>
256 255 </li>
257 256 </ul>
257 </div>
258 </div>
259
260 <!-- float to the right of the menu bar -->
258 261 <div id="kernel_indicator" class="indicator_area pull-right">
259 262 <i id="kernel_indicator_icon"></i>
260 263 </div>
261 264 <div id="modal_indicator" class="indicator_area pull-right">
262 265 <i id="modal_indicator_icon"></i>
263 266 </div>
264 267 <div id="notification_area"></div>
265 268 </div>
266 </div>
267 </div>
268 </div>
269 269 <div id="maintoolbar" class="navbar">
270 270 <div class="toolbar-inner navbar-inner navbar-nobg">
271 271 <div id="maintoolbar-container" class="container"></div>
272 272 </div>
273 273 </div>
274 274 </div>
275 275
276 276 <div id="ipython-main-app">
277 277
278 278 <div id="notebook_panel">
279 279 <div id="notebook"></div>
280 280 <div id="pager_splitter"></div>
281 281 <div id="pager">
282 282 <div id='pager_button_area'>
283 283 </div>
284 284 <div id="pager-container" class="container"></div>
285 285 </div>
286 286 </div>
287 287
288 288 </div>
289 289 <div id='tooltip' class='ipython_tooltip' style='display:none'></div>
290 290
291 291
292 292 {% endblock %}
293 293
294 294
295 295 {% block script %}
296 296
297 297 {{super()}}
298 298
299 299 <script src="{{ static_url("components/google-caja/html-css-sanitizer-minified.js") }}" charset="utf-8"></script>
300 300 <script src="{{ static_url("components/codemirror/lib/codemirror.js") }}" charset="utf-8"></script>
301 301 <script type="text/javascript">
302 302 CodeMirror.modeURL = "{{ static_url("components/codemirror/mode/%N/%N.js", include_version=False) }}";
303 303 </script>
304 304 <script src="{{ static_url("components/codemirror/addon/mode/loadmode.js") }}" charset="utf-8"></script>
305 305 <script src="{{ static_url("components/codemirror/addon/mode/multiplex.js") }}" charset="utf-8"></script>
306 306 <script src="{{ static_url("components/codemirror/addon/mode/overlay.js") }}" charset="utf-8"></script>
307 307 <script src="{{ static_url("components/codemirror/addon/edit/matchbrackets.js") }}" charset="utf-8"></script>
308 308 <script src="{{ static_url("components/codemirror/addon/edit/closebrackets.js") }}" charset="utf-8"></script>
309 309 <script src="{{ static_url("components/codemirror/addon/comment/comment.js") }}" charset="utf-8"></script>
310 310 <script src="{{ static_url("components/codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script>
311 311 <script src="{{ static_url("components/codemirror/mode/xml/xml.js") }}" charset="utf-8"></script>
312 312 <script src="{{ static_url("components/codemirror/mode/javascript/javascript.js") }}" charset="utf-8"></script>
313 313 <script src="{{ static_url("components/codemirror/mode/css/css.js") }}" charset="utf-8"></script>
314 314 <script src="{{ static_url("components/codemirror/mode/rst/rst.js") }}" charset="utf-8"></script>
315 315 <script src="{{ static_url("components/codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script>
316 316 <script src="{{ static_url("components/codemirror/mode/python/python.js") }}" charset="utf-8"></script>
317 317 <script src="{{ static_url("notebook/js/codemirror-ipython.js") }}" charset="utf-8"></script>
318 318 <script src="{{ static_url("notebook/js/codemirror-ipythongfm.js") }}" charset="utf-8"></script>
319 319
320 320 <script src="{{ static_url("components/highlight.js/build/highlight.pack.js") }}" charset="utf-8"></script>
321 321
322 322 <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script>
323 323
324 324 <script src="{{ static_url("base/js/events.js") }}" type="text/javascript" charset="utf-8"></script>
325 325 <script src="{{ static_url("base/js/utils.js") }}" type="text/javascript" charset="utf-8"></script>
326 326 <script src="{{ static_url("base/js/keyboard.js") }}" type="text/javascript" charset="utf-8"></script>
327 327 <script src="{{ static_url("base/js/security.js") }}" type="text/javascript" charset="utf-8"></script>
328 328 <script src="{{ static_url("base/js/dialog.js") }}" type="text/javascript" charset="utf-8"></script>
329 329 <script src="{{ static_url("services/kernels/js/kernel.js") }}" type="text/javascript" charset="utf-8"></script>
330 330 <script src="{{ static_url("services/kernels/js/comm.js") }}" type="text/javascript" charset="utf-8"></script>
331 331 <script src="{{ static_url("services/sessions/js/session.js") }}" type="text/javascript" charset="utf-8"></script>
332 332 <script src="{{ static_url("notebook/js/layoutmanager.js") }}" type="text/javascript" charset="utf-8"></script>
333 333 <script src="{{ static_url("notebook/js/mathjaxutils.js") }}" type="text/javascript" charset="utf-8"></script>
334 334 <script src="{{ static_url("notebook/js/outputarea.js") }}" type="text/javascript" charset="utf-8"></script>
335 335 <script src="{{ static_url("notebook/js/cell.js") }}" type="text/javascript" charset="utf-8"></script>
336 336 <script src="{{ static_url("notebook/js/celltoolbar.js") }}" type="text/javascript" charset="utf-8"></script>
337 337 <script src="{{ static_url("notebook/js/codecell.js") }}" type="text/javascript" charset="utf-8"></script>
338 338 <script src="{{ static_url("notebook/js/completer.js") }}" type="text/javascript" charset="utf-8"></script>
339 339 <script src="{{ static_url("notebook/js/textcell.js") }}" type="text/javascript" charset="utf-8"></script>
340 340 <script src="{{ static_url("notebook/js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script>
341 341 <script src="{{ static_url("notebook/js/quickhelp.js") }}" type="text/javascript" charset="utf-8"></script>
342 342 <script src="{{ static_url("notebook/js/pager.js") }}" type="text/javascript" charset="utf-8"></script>
343 343 <script src="{{ static_url("notebook/js/menubar.js") }}" type="text/javascript" charset="utf-8"></script>
344 344 <script src="{{ static_url("notebook/js/toolbar.js") }}" type="text/javascript" charset="utf-8"></script>
345 345 <script src="{{ static_url("notebook/js/maintoolbar.js") }}" type="text/javascript" charset="utf-8"></script>
346 346 <script src="{{ static_url("notebook/js/notebook.js") }}" type="text/javascript" charset="utf-8"></script>
347 347 <script src="{{ static_url("notebook/js/keyboardmanager.js") }}" type="text/javascript" charset="utf-8"></script>
348 348 <script src="{{ static_url("notebook/js/notificationwidget.js") }}" type="text/javascript" charset="utf-8"></script>
349 349 <script src="{{ static_url("notebook/js/notificationarea.js") }}" type="text/javascript" charset="utf-8"></script>
350 350 <script src="{{ static_url("notebook/js/tooltip.js") }}" type="text/javascript" charset="utf-8"></script>
351 351 <script src="{{ static_url("notebook/js/tour.js") }}" type="text/javascript" charset="utf-8"></script>
352 352
353 353 <script src="{{ static_url("notebook/js/config.js") }}" type="text/javascript" charset="utf-8"></script>
354 354 <script src="{{ static_url("notebook/js/main.js") }}" type="text/javascript" charset="utf-8"></script>
355 355
356 356 <script src="{{ static_url("notebook/js/contexthint.js") }}" charset="utf-8"></script>
357 357
358 358 <script src="{{ static_url("notebook/js/celltoolbarpresets/default.js") }}" type="text/javascript" charset="utf-8"></script>
359 359 <script src="{{ static_url("notebook/js/celltoolbarpresets/rawcell.js") }}" type="text/javascript" charset="utf-8"></script>
360 360 <script src="{{ static_url("notebook/js/celltoolbarpresets/slideshow.js") }}" type="text/javascript" charset="utf-8"></script>
361 361
362 362 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now