Show More
@@ -0,0 +1,83 b'' | |||||
|
1 | //---------------------------------------------------------------------------- | |||
|
2 | // Copyright (C) 2008-2011 The IPython Development Team | |||
|
3 | // | |||
|
4 | // Distributed under the terms of the BSD License. The full license is in | |||
|
5 | // the file COPYING, distributed as part of this software. | |||
|
6 | //---------------------------------------------------------------------------- | |||
|
7 | ||||
|
8 | //============================================================================ | |||
|
9 | // MathJax initialization | |||
|
10 | //============================================================================ | |||
|
11 | ||||
|
12 | var IPython = (function (IPython) { | |||
|
13 | ||||
|
14 | var init_mathjax = function () { | |||
|
15 | if (window.MathJax) { | |||
|
16 | // MathJax loaded | |||
|
17 | MathJax.Hub.Config({ | |||
|
18 | tex2jax: { | |||
|
19 | inlineMath: [ ['$','$'], ["\\(","\\)"] ], | |||
|
20 | displayMath: [ ['$$','$$'], ["\\[","\\]"] ] | |||
|
21 | }, | |||
|
22 | displayAlign: 'left', // Change this to 'center' to center equations. | |||
|
23 | "HTML-CSS": { | |||
|
24 | styles: {'.MathJax_Display': {"margin": 0}} | |||
|
25 | } | |||
|
26 | }); | |||
|
27 | } else if (window.mathjax_url != "") { | |||
|
28 | // Don't have MathJax, but should. Show dialog. | |||
|
29 | var dialog = $('<div></div>') | |||
|
30 | .append( | |||
|
31 | $("<p></p>").addClass('dialog').html( | |||
|
32 | "Math/LaTeX rendering will be disabled." | |||
|
33 | ) | |||
|
34 | ).append( | |||
|
35 | $("<p></p>").addClass('dialog').html( | |||
|
36 | "If you have administrative access to the notebook server and" + | |||
|
37 | " a working internet connection, you can install a local copy" + | |||
|
38 | " of MathJax for offline use with the following command on the server" + | |||
|
39 | " at a Python or IPython prompt:" | |||
|
40 | ) | |||
|
41 | ).append( | |||
|
42 | $("<pre></pre>").addClass('dialog').html( | |||
|
43 | ">>> from IPython.external import mathjax; mathjax.install_mathjax()" | |||
|
44 | ) | |||
|
45 | ).append( | |||
|
46 | $("<p></p>").addClass('dialog').html( | |||
|
47 | "This will try to install MathJax into the IPython source directory." | |||
|
48 | ) | |||
|
49 | ).append( | |||
|
50 | $("<p></p>").addClass('dialog').html( | |||
|
51 | "If IPython is installed to a location that requires" + | |||
|
52 | " administrative privileges to write, you will need to make this call as" + | |||
|
53 | " an administrator, via 'sudo'." | |||
|
54 | ) | |||
|
55 | ).append( | |||
|
56 | $("<p></p>").addClass('dialog').html( | |||
|
57 | "When you start the notebook server, you can instruct it to disable MathJax support altogether:" | |||
|
58 | ) | |||
|
59 | ).append( | |||
|
60 | $("<pre></pre>").addClass('dialog').html( | |||
|
61 | "$ ipython notebook --no-mathjax" | |||
|
62 | ) | |||
|
63 | ).append( | |||
|
64 | $("<p></p>").addClass('dialog').html( | |||
|
65 | "which will prevent this dialog from appearing." | |||
|
66 | ) | |||
|
67 | ).dialog({ | |||
|
68 | title: "Failed to retrieve MathJax from '" + window.mathjax_url + "'", | |||
|
69 | width: "70%", | |||
|
70 | modal: true, | |||
|
71 | }) | |||
|
72 | } else { | |||
|
73 | // No MathJax, but none expected. No dialog. | |||
|
74 | }; | |||
|
75 | }; | |||
|
76 | ||||
|
77 | ||||
|
78 | // Set module variables | |||
|
79 | IPython.init_mathjax = init_mathjax; | |||
|
80 | ||||
|
81 | return IPython; | |||
|
82 | ||||
|
83 | }(IPython)); No newline at end of file |
@@ -6,14 +6,6 b'' | |||||
6 |
|
6 | |||
7 |
|
7 | |||
8 | body { |
|
8 | body { | |
9 | background-color: white; |
|
|||
10 | /* This makes sure that the body covers the entire window and needs to |
|
|||
11 | be in a different element than the display: box in wrapper below */ |
|
|||
12 | position: absolute; |
|
|||
13 | left: 0px; |
|
|||
14 | right: 0px; |
|
|||
15 | top: 0px; |
|
|||
16 | bottom: 0px; |
|
|||
17 | overflow: hidden; |
|
9 | overflow: hidden; | |
18 | } |
|
10 | } | |
19 |
|
11 | |||
@@ -31,11 +23,6 b' span#notebook_name {' | |||||
31 | font-size: 146.5%; |
|
23 | font-size: 146.5%; | |
32 | } |
|
24 | } | |
33 |
|
25 | |||
34 | #menubar { |
|
|||
35 | /* Initially hidden to prevent FLOUC */ |
|
|||
36 | display: none; |
|
|||
37 | } |
|
|||
38 |
|
||||
39 | .ui-menubar-item .ui-button .ui-button-text { |
|
26 | .ui-menubar-item .ui-button .ui-button-text { | |
40 | padding: 0.4em 1.0em; |
|
27 | padding: 0.4em 1.0em; | |
41 | font-size: 100%; |
|
28 | font-size: 100%; | |
@@ -69,8 +56,6 b' span#notebook_name {' | |||||
69 | } |
|
56 | } | |
70 |
|
57 | |||
71 | #toolbar { |
|
58 | #toolbar { | |
72 | /* Initially hidden to prevent FLOUC */ |
|
|||
73 | display: none; |
|
|||
74 | padding: 3px 15px; |
|
59 | padding: 3px 15px; | |
75 | } |
|
60 | } | |
76 |
|
61 | |||
@@ -80,8 +65,6 b' span#notebook_name {' | |||||
80 |
|
65 | |||
81 |
|
66 | |||
82 | div#main_app { |
|
67 | div#main_app { | |
83 | /* Initially hidden to prevent FLOUC */ |
|
|||
84 | display: none; |
|
|||
85 | width: 100%; |
|
68 | width: 100%; | |
86 | position: relative; |
|
69 | position: relative; | |
87 | } |
|
70 | } |
@@ -42,7 +42,7 b' span#ipython_notebook h1 img {' | |||||
42 | } |
|
42 | } | |
43 |
|
43 | |||
44 | #site { |
|
44 | #site { | |
45 | width: 100% |
|
45 | width: 100%; | |
46 | display: none; |
|
46 | display: none; | |
47 | } |
|
47 | } | |
48 |
|
48 |
@@ -38,9 +38,9 b' var IPython = (function (IPython) {' | |||||
38 | } else { |
|
38 | } else { | |
39 | toolbar_height = $('div#toolbar').outerHeight(true); |
|
39 | toolbar_height = $('div#toolbar').outerHeight(true); | |
40 | } |
|
40 | } | |
41 |
var app_height = h-header_height-menubar_height-toolbar_height |
|
41 | var app_height = h-header_height-menubar_height-toolbar_height; // content height | |
42 |
|
42 | |||
43 |
$('div#main_app').height(app_height |
|
43 | $('div#main_app').height(app_height); // content+padding+border height | |
44 |
|
44 | |||
45 | var pager_height = IPython.pager.percentage_height*app_height; |
|
45 | var pager_height = IPython.pager.percentage_height*app_height; | |
46 | var pager_splitter_height = $('div#pager_splitter').outerHeight(true); |
|
46 | var pager_splitter_height = $('div#pager_splitter').outerHeight(true); |
@@ -22,6 +22,7 b' var IPython = (function (IPython) {' | |||||
22 |
|
22 | |||
23 |
|
23 | |||
24 | MenuBar.prototype.style = function () { |
|
24 | MenuBar.prototype.style = function () { | |
|
25 | this.element.addClass('border-box-sizing'); | |||
25 | $('ul#menus').menubar({ |
|
26 | $('ul#menus').menubar({ | |
26 | select : function (event, ui) { |
|
27 | select : function (event, ui) { | |
27 | // The selected cell loses focus when the menu is entered, so we |
|
28 | // The selected cell loses focus when the menu is entered, so we |
@@ -93,6 +93,7 b' var IPython = (function (IPython) {' | |||||
93 | NotebookList.prototype.new_notebook_item = function (index) { |
|
93 | NotebookList.prototype.new_notebook_item = function (index) { | |
94 | var item = $('<div/>'); |
|
94 | var item = $('<div/>'); | |
95 | item.addClass('notebook_item ui-widget ui-widget-content ui-helper-clearfix'); |
|
95 | item.addClass('notebook_item ui-widget ui-widget-content ui-helper-clearfix'); | |
|
96 | item.css('border-top-style','none'); | |||
96 | var item_name = $('<span/>').addClass('item_name'); |
|
97 | var item_name = $('<span/>').addClass('item_name'); | |
97 |
|
98 | |||
98 | item.append(item_name); |
|
99 | item.append(item_name); |
@@ -11,75 +11,17 b'' | |||||
11 |
|
11 | |||
12 |
|
12 | |||
13 | $(document).ready(function () { |
|
13 | $(document).ready(function () { | |
14 | if (window.MathJax){ |
|
|||
15 | // MathJax loaded |
|
|||
16 | MathJax.Hub.Config({ |
|
|||
17 | tex2jax: { |
|
|||
18 | inlineMath: [ ['$','$'], ["\\(","\\)"] ], |
|
|||
19 | displayMath: [ ['$$','$$'], ["\\[","\\]"] ] |
|
|||
20 | }, |
|
|||
21 | displayAlign: 'left', // Change this to 'center' to center equations. |
|
|||
22 | "HTML-CSS": { |
|
|||
23 | styles: {'.MathJax_Display': {"margin": 0}} |
|
|||
24 | } |
|
|||
25 | }); |
|
|||
26 | }else if (window.mathjax_url != ""){ |
|
|||
27 | // Don't have MathJax, but should. Show dialog. |
|
|||
28 | var dialog = $('<div></div>') |
|
|||
29 | .append( |
|
|||
30 | $("<p></p>").addClass('dialog').html( |
|
|||
31 | "Math/LaTeX rendering will be disabled." |
|
|||
32 | ) |
|
|||
33 | ).append( |
|
|||
34 | $("<p></p>").addClass('dialog').html( |
|
|||
35 | "If you have administrative access to the notebook server and" + |
|
|||
36 | " a working internet connection, you can install a local copy" + |
|
|||
37 | " of MathJax for offline use with the following command on the server" + |
|
|||
38 | " at a Python or IPython prompt:" |
|
|||
39 | ) |
|
|||
40 | ).append( |
|
|||
41 | $("<pre></pre>").addClass('dialog').html( |
|
|||
42 | ">>> from IPython.external import mathjax; mathjax.install_mathjax()" |
|
|||
43 | ) |
|
|||
44 | ).append( |
|
|||
45 | $("<p></p>").addClass('dialog').html( |
|
|||
46 | "This will try to install MathJax into the IPython source directory." |
|
|||
47 | ) |
|
|||
48 | ).append( |
|
|||
49 | $("<p></p>").addClass('dialog').html( |
|
|||
50 | "If IPython is installed to a location that requires" + |
|
|||
51 | " administrative privileges to write, you will need to make this call as" + |
|
|||
52 | " an administrator, via 'sudo'." |
|
|||
53 | ) |
|
|||
54 | ).append( |
|
|||
55 | $("<p></p>").addClass('dialog').html( |
|
|||
56 | "When you start the notebook server, you can instruct it to disable MathJax support altogether:" |
|
|||
57 | ) |
|
|||
58 | ).append( |
|
|||
59 | $("<pre></pre>").addClass('dialog').html( |
|
|||
60 | "$ ipython notebook --no-mathjax" |
|
|||
61 | ) |
|
|||
62 | ).append( |
|
|||
63 | $("<p></p>").addClass('dialog').html( |
|
|||
64 | "which will prevent this dialog from appearing." |
|
|||
65 | ) |
|
|||
66 | ).dialog({ |
|
|||
67 | title: "Failed to retrieve MathJax from '" + window.mathjax_url + "'", |
|
|||
68 | width: "70%", |
|
|||
69 | modal: true, |
|
|||
70 | }) |
|
|||
71 | }else{ |
|
|||
72 | // No MathJax, but none expected. No dialog. |
|
|||
73 | } |
|
|||
74 |
|
||||
75 |
|
14 | |||
76 | IPython.markdown_converter = new Markdown.Converter(); |
|
15 | IPython.init_mathjax(); | |
77 | IPython.read_only = $('meta[name=read_only]').attr("content") == 'True'; |
|
|||
78 |
|
16 | |||
79 | $('div#header').addClass('border-box-sizing'); |
|
17 | IPython.read_only = $('body').data('readOnly') === 'True'; | |
80 |
$('div#main_app').addClass('border-box-sizing ui-widget |
|
18 | $('div#main_app').addClass('border-box-sizing ui-widget'); | |
81 | $('div#notebook_panel').addClass('border-box-sizing ui-widget'); |
|
19 | $('div#notebook_panel').addClass('border-box-sizing ui-widget'); | |
|
20 | // The header's bottom border is provided by the menu bar so we remove it. | |||
|
21 | $('div#header').css('border-bottom-style','none'); | |||
82 |
|
22 | |||
|
23 | IPython.page = new IPython.Page(); | |||
|
24 | IPython.markdown_converter = new Markdown.Converter(); | |||
83 | IPython.layout_manager = new IPython.LayoutManager(); |
|
25 | IPython.layout_manager = new IPython.LayoutManager(); | |
84 | IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter'); |
|
26 | IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter'); | |
85 | IPython.quick_help = new IPython.QuickHelp('span#quick_help_area'); |
|
27 | IPython.quick_help = new IPython.QuickHelp('span#quick_help_area'); | |
@@ -92,9 +34,6 b' $(document).ready(function () {' | |||||
92 |
|
34 | |||
93 | IPython.layout_manager.do_resize(); |
|
35 | IPython.layout_manager.do_resize(); | |
94 |
|
36 | |||
95 | // These have display: none in the css file and are made visible here to prevent FLOUC. |
|
|||
96 | $('div#header').css('display','block'); |
|
|||
97 |
|
||||
98 | if(IPython.read_only){ |
|
37 | if(IPython.read_only){ | |
99 | // hide various elements from read-only view |
|
38 | // hide various elements from read-only view | |
100 | $('div#pager').remove(); |
|
39 | $('div#pager').remove(); | |
@@ -104,9 +43,7 b' $(document).ready(function () {' | |||||
104 | $('#notebook_name').attr('disabled','disabled') |
|
43 | $('#notebook_name').attr('disabled','disabled') | |
105 | } |
|
44 | } | |
106 |
|
45 | |||
107 | $('div#menubar').css('display','block'); |
|
46 | IPython.page.show(); | |
108 | $('div#toolbar').css('display','block'); |
|
|||
109 | $('div#main_app').css('display','block'); |
|
|||
110 |
|
47 | |||
111 | IPython.layout_manager.do_resize(); |
|
48 | IPython.layout_manager.do_resize(); | |
112 | $([IPython.events]).on('notebook_loaded.Notebook', function () { |
|
49 | $([IPython.events]).on('notebook_loaded.Notebook', function () { |
@@ -33,10 +33,25 b' var IPython = (function (IPython) {' | |||||
33 | Page.prototype.show = function () { |
|
33 | Page.prototype.show = function () { | |
34 | // The header and site divs start out hidden to prevent FLOUC. |
|
34 | // The header and site divs start out hidden to prevent FLOUC. | |
35 | // Main scripts should call this method after styling everything. |
|
35 | // Main scripts should call this method after styling everything. | |
|
36 | this.show_header(); | |||
|
37 | this.show_site(); | |||
|
38 | }; | |||
|
39 | ||||
|
40 | ||||
|
41 | Page.prototype.show_header = function () { | |||
|
42 | // The header and site divs start out hidden to prevent FLOUC. | |||
|
43 | // Main scripts should call this method after styling everything. | |||
36 | $('div#header').css('display','block'); |
|
44 | $('div#header').css('display','block'); | |
|
45 | }; | |||
|
46 | ||||
|
47 | ||||
|
48 | Page.prototype.show_site = function () { | |||
|
49 | // The header and site divs start out hidden to prevent FLOUC. | |||
|
50 | // Main scripts should call this method after styling everything. | |||
37 | $('div#site').css('display','block'); |
|
51 | $('div#site').css('display','block'); | |
38 | }; |
|
52 | }; | |
39 |
|
53 | |||
|
54 | ||||
40 | IPython.Page = Page; |
|
55 | IPython.Page = Page; | |
41 |
|
56 | |||
42 | return IPython; |
|
57 | return IPython; |
@@ -11,81 +11,18 b'' | |||||
11 |
|
11 | |||
12 |
|
12 | |||
13 | $(document).ready(function () { |
|
13 | $(document).ready(function () { | |
14 | if (window.MathJax){ |
|
|||
15 | // MathJax loaded |
|
|||
16 | MathJax.Hub.Config({ |
|
|||
17 | tex2jax: { |
|
|||
18 | inlineMath: [ ['$','$'], ["\\(","\\)"] ], |
|
|||
19 | displayMath: [ ['$$','$$'], ["\\[","\\]"] ] |
|
|||
20 | }, |
|
|||
21 | displayAlign: 'left', // Change this to 'center' to center equations. |
|
|||
22 | "HTML-CSS": { |
|
|||
23 | styles: {'.MathJax_Display': {"margin": 0}} |
|
|||
24 | } |
|
|||
25 | }); |
|
|||
26 | }else if (window.mathjax_url != ""){ |
|
|||
27 | // Don't have MathJax, but should. Show dialog. |
|
|||
28 | var dialog = $('<div></div>') |
|
|||
29 | .append( |
|
|||
30 | $("<p></p>").addClass('dialog').html( |
|
|||
31 | "Math/LaTeX rendering will be disabled." |
|
|||
32 | ) |
|
|||
33 | ).append( |
|
|||
34 | $("<p></p>").addClass('dialog').html( |
|
|||
35 | "If you have administrative access to the notebook server and" + |
|
|||
36 | " a working internet connection, you can install a local copy" + |
|
|||
37 | " of MathJax for offline use with the following command on the server" + |
|
|||
38 | " at a Python or IPython prompt:" |
|
|||
39 | ) |
|
|||
40 | ).append( |
|
|||
41 | $("<pre></pre>").addClass('dialog').html( |
|
|||
42 | ">>> from IPython.external import mathjax; mathjax.install_mathjax()" |
|
|||
43 | ) |
|
|||
44 | ).append( |
|
|||
45 | $("<p></p>").addClass('dialog').html( |
|
|||
46 | "This will try to install MathJax into the IPython source directory." |
|
|||
47 | ) |
|
|||
48 | ).append( |
|
|||
49 | $("<p></p>").addClass('dialog').html( |
|
|||
50 | "If IPython is installed to a location that requires" + |
|
|||
51 | " administrative privileges to write, you will need to make this call as" + |
|
|||
52 | " an administrator, via 'sudo'." |
|
|||
53 | ) |
|
|||
54 | ).append( |
|
|||
55 | $("<p></p>").addClass('dialog').html( |
|
|||
56 | "When you start the notebook server, you can instruct it to disable MathJax support altogether:" |
|
|||
57 | ) |
|
|||
58 | ).append( |
|
|||
59 | $("<pre></pre>").addClass('dialog').html( |
|
|||
60 | "$ ipython notebook --no-mathjax" |
|
|||
61 | ) |
|
|||
62 | ).append( |
|
|||
63 | $("<p></p>").addClass('dialog').html( |
|
|||
64 | "which will prevent this dialog from appearing." |
|
|||
65 | ) |
|
|||
66 | ).dialog({ |
|
|||
67 | title: "Failed to retrieve MathJax from '" + window.mathjax_url + "'", |
|
|||
68 | width: "70%", |
|
|||
69 | modal: true, |
|
|||
70 | }) |
|
|||
71 | }else{ |
|
|||
72 | // No MathJax, but none expected. No dialog. |
|
|||
73 | } |
|
|||
74 |
|
||||
75 | IPython.markdown_converter = new Markdown.Converter(); |
|
|||
76 | IPython.read_only = $('meta[name=read_only]').attr("content") == 'True'; |
|
|||
77 |
|
14 | |||
78 | $('div#header').addClass('border-box-sizing'); |
|
15 | IPython.init_mathjax(); | |
79 | $('div#main_app').addClass('border-box-sizing ui-widget ui-widget-content'); |
|
16 | ||
|
17 | IPython.read_only = $('body').data('readOnly') === 'True'; | |||
|
18 | $('div#main_app').addClass('border-box-sizing ui-widget'); | |||
80 | $('div#notebook_panel').addClass('border-box-sizing ui-widget'); |
|
19 | $('div#notebook_panel').addClass('border-box-sizing ui-widget'); | |
81 |
|
20 | |||
|
21 | IPython.page = new IPython.Page(); | |||
|
22 | IPython.markdown_converter = new Markdown.Converter(); | |||
82 | IPython.login_widget = new IPython.LoginWidget('span#login_widget'); |
|
23 | IPython.login_widget = new IPython.LoginWidget('span#login_widget'); | |
83 | IPython.notebook = new IPython.Notebook('div#notebook'); |
|
24 | IPython.notebook = new IPython.Notebook('div#notebook'); | |
84 | IPython.save_widget = new IPython.SaveWidget('span#save_widget'); |
|
25 | IPython.page.show_site(); | |
85 |
|
||||
86 | // These have display: none in the css file and are made visible here to prevent FLOUC. |
|
|||
87 | $('div#header').css('display','block'); |
|
|||
88 | $('div#main_app').css('display','block'); |
|
|||
89 |
|
26 | |||
90 | IPython.notebook.load_notebook($('body').data('notebookId')); |
|
27 | IPython.notebook.load_notebook($('body').data('notebookId')); | |
91 |
|
28 |
@@ -22,7 +22,11 b' var IPython = (function (IPython) {' | |||||
22 |
|
22 | |||
23 |
|
23 | |||
24 | ToolBar.prototype.style = function () { |
|
24 | ToolBar.prototype.style = function () { | |
25 |
this.element.addClass('border-box-sizing') |
|
25 | this.element.addClass('border-box-sizing'). | |
|
26 | addClass('ui-widget ui-widget-content'). | |||
|
27 | css('border-top-style','none'). | |||
|
28 | css('border-left-style','none'). | |||
|
29 | css('border-right-style','none'); | |||
26 | this.element.find('#cell_type').addClass('ui-widget ui-widget-content'); |
|
30 | this.element.find('#cell_type').addClass('ui-widget ui-widget-content'); | |
27 | this.element.find('#save_b').button({ |
|
31 | this.element.find('#save_b').button({ | |
28 | icons : {primary: 'ui-icon-disk'}, |
|
32 | icons : {primary: 'ui-icon-disk'}, |
@@ -1,60 +1,49 b'' | |||||
1 | <!DOCTYPE HTML> |
|
1 | {% extends page.html %} | |
2 | <html> |
|
|||
3 |
|
||||
4 | <head> |
|
|||
5 | <meta charset="utf-8"> |
|
|||
6 |
|
||||
7 | <title>IPython Notebook</title> |
|
|||
8 |
|
||||
9 | {% if mathjax_url %} |
|
|||
10 | <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML" charset="utf-8"></script> |
|
|||
11 | {% end %} |
|
|||
12 | <script type="text/javascript"> |
|
|||
13 | // MathJax disabled, set as null to distingish from *missing* MathJax, |
|
|||
14 | // where it will be undefined, and should prompt a dialog later. |
|
|||
15 | window.mathjax_url = "{{mathjax_url}}"; |
|
|||
16 | </script> |
|
|||
17 |
|
||||
18 | <link rel="stylesheet" href="{{ static_url("jquery/css/themes/base/jquery-ui.min.css") }}" type="text/css" /> |
|
|||
19 | <link rel="stylesheet" href="{{ static_url("codemirror/lib/codemirror.css") }}"> |
|
|||
20 | <link rel="stylesheet" href="{{ static_url("codemirror/theme/ipython.css") }}"> |
|
|||
21 |
|
||||
22 | <link rel="stylesheet" href="{{ static_url("prettify/prettify.css") }}"/> |
|
|||
23 |
|
||||
24 | <link rel="stylesheet" href="{{ static_url("css/boilerplate.css") }}" type="text/css" /> |
|
|||
25 | <link rel="stylesheet" href="{{ static_url("css/layout.css") }}" type="text/css" /> |
|
|||
26 | <link rel="stylesheet" href="{{ static_url("css/base.css") }}" type="text/css" /> |
|
|||
27 | <link rel="stylesheet" href="{{ static_url("css/notebook.css") }}" type="text/css" /> |
|
|||
28 | <link rel="stylesheet" href="{{ static_url("css/renderedhtml.css") }}" type="text/css" /> |
|
|||
29 |
|
||||
30 | {% comment In the notebook, the read-only flag is used to determine %} |
|
|||
31 | {% comment whether to hide the side panels and switch off input %} |
|
|||
32 | <meta name="read_only" content="{{read_only and not logged_in}}"/> |
|
|||
33 |
|
||||
34 | </head> |
|
|||
35 |
|
||||
36 | <body |
|
|||
37 | data-project={{project}} data-notebook-id={{notebook_id}} |
|
|||
38 | data-base-project-url={{base_project_url}} data-base-kernel-url={{base_kernel_url}} |
|
|||
39 | > |
|
|||
40 |
|
||||
41 | <div id="header"> |
|
|||
42 | <span id="ipython_notebook"><h1><a href='..' alt='dashboard'><img src='{{static_url("ipynblogo.png")}}' alt='IPython Notebook'/></a></h1></span> |
|
|||
43 | <span id="save_widget"> |
|
|||
44 | <span id="notebook_name"></span> |
|
|||
45 | <span id="save_status"></span> |
|
|||
46 | </span> |
|
|||
47 |
|
2 | |||
48 | <span id="login_widget"> |
|
3 | {% block stylesheet %} | |
49 | {% comment This is a temporary workaround to hide the logout button %} |
|
4 | ||
50 | {% comment when appropriate until notebook.html is templated %} |
|
5 | {% if mathjax_url %} | |
51 | {% if logged_in %} |
|
6 | <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML" charset="utf-8"></script> | |
52 | <button id="logout">Logout</button> |
|
7 | {% end %} | |
53 | {% elif not logged_in and login_available %} |
|
8 | <script type="text/javascript"> | |
54 | <button id="login">Login</button> |
|
9 | // MathJax disabled, set as null to distingish from *missing* MathJax, | |
55 | {% end %} |
|
10 | // where it will be undefined, and should prompt a dialog later. | |
56 | </span> |
|
11 | window.mathjax_url = "{{mathjax_url}}"; | |
57 | </div> |
|
12 | </script> | |
|
13 | ||||
|
14 | <link rel="stylesheet" href="{{ static_url("codemirror/lib/codemirror.css") }}"> | |||
|
15 | <link rel="stylesheet" href="{{ static_url("codemirror/theme/ipython.css") }}"> | |||
|
16 | ||||
|
17 | <link rel="stylesheet" href="{{ static_url("prettify/prettify.css") }}"/> | |||
|
18 | ||||
|
19 | <link rel="stylesheet" href="{{ static_url("css/notebook.css") }}" type="text/css" /> | |||
|
20 | <link rel="stylesheet" href="{{ static_url("css/renderedhtml.css") }}" type="text/css" /> | |||
|
21 | ||||
|
22 | {% end %} | |||
|
23 | ||||
|
24 | ||||
|
25 | {% block params %} | |||
|
26 | ||||
|
27 | data-project={{project}} | |||
|
28 | data-base-project-url={{base_project_url}} | |||
|
29 | data-base-kernel-url={{base_kernel_url}} | |||
|
30 | data-read-only={{read_only and not logged_in}} | |||
|
31 | data-notebook-id={{notebook_id}} | |||
|
32 | ||||
|
33 | {% end %} | |||
|
34 | ||||
|
35 | ||||
|
36 | {% block header %} | |||
|
37 | ||||
|
38 | <span id="save_widget"> | |||
|
39 | <span id="notebook_name"></span> | |||
|
40 | <span id="save_status"></span> | |||
|
41 | </span> | |||
|
42 | ||||
|
43 | {% end %} | |||
|
44 | ||||
|
45 | ||||
|
46 | {% block site %} | |||
58 |
|
47 | |||
59 | <div id="menubar_container"> |
|
48 | <div id="menubar_container"> | |
60 | <div id="menubar"> |
|
49 | <div id="menubar"> | |
@@ -204,8 +193,10 b'' | |||||
204 |
|
193 | |||
205 | </div> |
|
194 | </div> | |
206 |
|
195 | |||
207 | <script src="{{ static_url("jquery/js/jquery-1.7.1.min.js") }}" type="text/javascript" charset="utf-8"></script> |
|
196 | {% end %} | |
208 | <script src="{{ static_url("jquery/js/jquery-ui.min.js") }}" type="text/javascript" charset="utf-8"></script> |
|
197 | ||
|
198 | ||||
|
199 | {% block script %} | |||
209 |
|
200 | |||
210 | <script src="{{ static_url("codemirror/lib/codemirror.js") }}" charset="utf-8"></script> |
|
201 | <script src="{{ static_url("codemirror/lib/codemirror.js") }}" charset="utf-8"></script> | |
211 | <script src="{{ static_url("codemirror/mode/python/python.js") }}" charset="utf-8"></script> |
|
202 | <script src="{{ static_url("codemirror/mode/python/python.js") }}" charset="utf-8"></script> | |
@@ -221,17 +212,16 b'' | |||||
221 | <script src="{{ static_url("prettify/prettify.js") }}" charset="utf-8"></script> |
|
212 | <script src="{{ static_url("prettify/prettify.js") }}" charset="utf-8"></script> | |
222 | <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script> |
|
213 | <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script> | |
223 |
|
214 | |||
224 | <script src="{{ static_url("js/namespace.js") }}" type="text/javascript" charset="utf-8"></script> |
|
|||
225 | <script src="{{ static_url("js/events.js") }}" type="text/javascript" charset="utf-8"></script> |
|
215 | <script src="{{ static_url("js/events.js") }}" type="text/javascript" charset="utf-8"></script> | |
226 | <script src="{{ static_url("js/utils.js") }}" type="text/javascript" charset="utf-8"></script> |
|
216 | <script src="{{ static_url("js/utils.js") }}" type="text/javascript" charset="utf-8"></script> | |
|
217 | <script src="{{ static_url("js/layoutmanager.js") }}" type="text/javascript" charset="utf-8"></script> | |||
|
218 | <script src="{{ static_url("js/initmathjax.js") }}" type="text/javascript" charset="utf-8"></script> | |||
227 | <script src="{{ static_url("js/cell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
219 | <script src="{{ static_url("js/cell.js") }}" type="text/javascript" charset="utf-8"></script> | |
228 | <script src="{{ static_url("js/codecell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
220 | <script src="{{ static_url("js/codecell.js") }}" type="text/javascript" charset="utf-8"></script> | |
229 | <script src="{{ static_url("js/textcell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
221 | <script src="{{ static_url("js/textcell.js") }}" type="text/javascript" charset="utf-8"></script> | |
230 | <script src="{{ static_url("js/kernel.js") }}" type="text/javascript" charset="utf-8"></script> |
|
222 | <script src="{{ static_url("js/kernel.js") }}" type="text/javascript" charset="utf-8"></script> | |
231 | <script src="{{ static_url("js/layout.js") }}" type="text/javascript" charset="utf-8"></script> |
|
|||
232 | <script src="{{ static_url("js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script> |
|
223 | <script src="{{ static_url("js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script> | |
233 | <script src="{{ static_url("js/quickhelp.js") }}" type="text/javascript" charset="utf-8"></script> |
|
224 | <script src="{{ static_url("js/quickhelp.js") }}" type="text/javascript" charset="utf-8"></script> | |
234 | <script src="{{ static_url("js/loginwidget.js") }}" type="text/javascript" charset="utf-8"></script> |
|
|||
235 | <script src="{{ static_url("js/pager.js") }}" type="text/javascript" charset="utf-8"></script> |
|
225 | <script src="{{ static_url("js/pager.js") }}" type="text/javascript" charset="utf-8"></script> | |
236 | <script src="{{ static_url("js/menubar.js") }}" type="text/javascript" charset="utf-8"></script> |
|
226 | <script src="{{ static_url("js/menubar.js") }}" type="text/javascript" charset="utf-8"></script> | |
237 | <script src="{{ static_url("js/toolbar.js") }}" type="text/javascript" charset="utf-8"></script> |
|
227 | <script src="{{ static_url("js/toolbar.js") }}" type="text/javascript" charset="utf-8"></script> | |
@@ -239,6 +229,5 b'' | |||||
239 | <script src="{{ static_url("js/notificationwidget.js") }}" type="text/javascript" charset="utf-8"></script> |
|
229 | <script src="{{ static_url("js/notificationwidget.js") }}" type="text/javascript" charset="utf-8"></script> | |
240 | <script src="{{ static_url("js/notebookmain.js") }}" type="text/javascript" charset="utf-8"></script> |
|
230 | <script src="{{ static_url("js/notebookmain.js") }}" type="text/javascript" charset="utf-8"></script> | |
241 |
|
231 | |||
242 | </body> |
|
232 | {% end %} | |
243 |
|
233 | |||
244 | </html> |
|
@@ -1,63 +1,44 b'' | |||||
1 | <!DOCTYPE HTML> |
|
1 | {% extends page.html %} | |
2 | <html> |
|
|||
3 |
|
||||
4 | <head> |
|
|||
5 | <meta charset="utf-8"> |
|
|||
6 |
|
||||
7 | <title>IPython Notebook</title> |
|
|||
8 |
|
||||
9 | {% if mathjax_url %} |
|
|||
10 | <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML" charset="utf-8"></script> |
|
|||
11 | {% end %} |
|
|||
12 | <script type="text/javascript"> |
|
|||
13 | // MathJax disabled, set as null to distingish from *missing* MathJax, |
|
|||
14 | // where it will be undefined, and should prompt a dialog later. |
|
|||
15 | window.mathjax_url = "{{mathjax_url}}"; |
|
|||
16 | </script> |
|
|||
17 |
|
||||
18 | <link rel="stylesheet" href="{{ static_url("jquery/css/themes/base/jquery-ui.min.css") }}" type="text/css" /> |
|
|||
19 | <link rel="stylesheet" href="{{ static_url("codemirror/lib/codemirror.css") }}"> |
|
|||
20 | <link rel="stylesheet" href="{{ static_url("codemirror/theme/ipython.css") }}"> |
|
|||
21 |
|
||||
22 | <link rel="stylesheet" href="{{ static_url("prettify/prettify.css") }}"/> |
|
|||
23 |
|
||||
24 | <link rel="stylesheet" href="{{ static_url("css/boilerplate.css") }}" type="text/css" /> |
|
|||
25 | <link rel="stylesheet" href="{{ static_url("css/layout.css") }}" type="text/css" /> |
|
|||
26 | <link rel="stylesheet" href="{{ static_url("css/base.css") }}" type="text/css" /> |
|
|||
27 | <link rel="stylesheet" href="{{ static_url("css/notebook.css") }}" type="text/css" /> |
|
|||
28 | <link rel="stylesheet" href="{{ static_url("css/printnotebook.css") }}" type="text/css" /> |
|
|||
29 | <link rel="stylesheet" href="{{ static_url("css/renderedhtml.css") }}" type="text/css" /> |
|
|||
30 |
|
||||
31 | {% comment In the notebook, the read-only flag is used to determine %} |
|
|||
32 | {% comment whether to hide the side panels and switch off input %} |
|
|||
33 | <meta name="read_only" content="{{read_only and not logged_in}}"/> |
|
|||
34 |
|
||||
35 | </head> |
|
|||
36 |
|
||||
37 | <body |
|
|||
38 | data-project={{project}} data-notebook-id={{notebook_id}} |
|
|||
39 | data-base-project-url={{base_project_url}} data-base-kernel-url={{base_kernel_url}} |
|
|||
40 | > |
|
|||
41 |
|
||||
42 | <div id="header"> |
|
|||
43 | <span id="ipython_notebook"><h1><a href='..' alt='dashboard'><img src='{{static_url("ipynblogo.png") }}' alt='IPython Notebook'/></a></h1></span> |
|
|||
44 | <span id="save_widget"> |
|
|||
45 | <span id="notebook_name"></span> |
|
|||
46 | <span id="save_status"></span> |
|
|||
47 | </span> |
|
|||
48 |
|
||||
49 | <span id="login_widget"> |
|
|||
50 | {% comment This is a temporary workaround to hide the logout button %} |
|
|||
51 | {% comment when appropriate until notebook.html is templated %} |
|
|||
52 | {% if logged_in %} |
|
|||
53 | <button id="logout">Logout</button> |
|
|||
54 | {% elif not logged_in and login_available %} |
|
|||
55 | <button id="login">Login</button> |
|
|||
56 | {% end %} |
|
|||
57 | </span> |
|
|||
58 |
|
2 | |||
59 | </div> |
|
3 | {% block stylesheet %} | |
|
4 | ||||
|
5 | {% if mathjax_url %} | |||
|
6 | <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML" charset="utf-8"></script> | |||
|
7 | {% end %} | |||
|
8 | <script type="text/javascript"> | |||
|
9 | // MathJax disabled, set as null to distingish from *missing* MathJax, | |||
|
10 | // where it will be undefined, and should prompt a dialog later. | |||
|
11 | window.mathjax_url = "{{mathjax_url}}"; | |||
|
12 | </script> | |||
|
13 | ||||
|
14 | <link rel="stylesheet" href="{{ static_url("codemirror/lib/codemirror.css") }}"> | |||
|
15 | <link rel="stylesheet" href="{{ static_url("codemirror/theme/ipython.css") }}"> | |||
|
16 | ||||
|
17 | <link rel="stylesheet" href="{{ static_url("prettify/prettify.css") }}"/> | |||
|
18 | ||||
|
19 | <link rel="stylesheet" href="{{ static_url("css/notebook.css") }}" type="text/css" /> | |||
|
20 | <link rel="stylesheet" href="{{ static_url("css/printnotebook.css") }}" type="text/css" /> | |||
|
21 | <link rel="stylesheet" href="{{ static_url("css/renderedhtml.css") }}" type="text/css" /> | |||
|
22 | ||||
|
23 | {% end %} | |||
|
24 | ||||
|
25 | ||||
|
26 | {% block params %} | |||
60 |
|
27 | |||
|
28 | data-project={{project}} | |||
|
29 | data-base-project-url={{base_project_url}} | |||
|
30 | data-base-kernel-url={{base_kernel_url}} | |||
|
31 | data-read-only={{read_only and not logged_in}} | |||
|
32 | data-notebook-id={{notebook_id}} | |||
|
33 | ||||
|
34 | {% end %} | |||
|
35 | ||||
|
36 | ||||
|
37 | {% block header %} | |||
|
38 | {% end %} | |||
|
39 | ||||
|
40 | ||||
|
41 | {% block site %} | |||
61 |
|
42 | |||
62 | <div id="main_app"> |
|
43 | <div id="main_app"> | |
63 |
|
44 | |||
@@ -67,8 +48,10 b'' | |||||
67 |
|
48 | |||
68 | </div> |
|
49 | </div> | |
69 |
|
50 | |||
70 | <script src="{{ static_url("jquery/js/jquery-1.7.1.min.js") }}" type="text/javascript" charset="utf-8"></script> |
|
51 | {% end %} | |
71 | <script src="{{ static_url("jquery/js/jquery-ui.min.js") }}" type="text/javascript" charset="utf-8"></script> |
|
52 | ||
|
53 | ||||
|
54 | {% block script %} | |||
72 |
|
55 | |||
73 | <script src="{{ static_url("codemirror/lib/codemirror.js") }}" charset="utf-8"></script> |
|
56 | <script src="{{ static_url("codemirror/lib/codemirror.js") }}" charset="utf-8"></script> | |
74 | <script src="{{ static_url("codemirror/mode/python/python.js") }}" charset="utf-8"></script> |
|
57 | <script src="{{ static_url("codemirror/mode/python/python.js") }}" charset="utf-8"></script> | |
@@ -84,19 +67,14 b'' | |||||
84 | <script src="{{ static_url("prettify/prettify.js") }}" charset="utf-8"></script> |
|
67 | <script src="{{ static_url("prettify/prettify.js") }}" charset="utf-8"></script> | |
85 | <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script> |
|
68 | <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script> | |
86 |
|
69 | |||
87 | <script src="{{ static_url("js/namespace.js") }}" type="text/javascript" charset="utf-8"></script> |
|
|||
88 | <script src="{{ static_url("js/events.js") }}" type="text/javascript" charset="utf-8"></script> |
|
70 | <script src="{{ static_url("js/events.js") }}" type="text/javascript" charset="utf-8"></script> | |
89 | <script src="{{ static_url("js/utils.js") }}" type="text/javascript" charset="utf-8"></script> |
|
71 | <script src="{{ static_url("js/utils.js") }}" type="text/javascript" charset="utf-8"></script> | |
|
72 | <script src="{{ static_url("js/initmathjax.js") }}" type="text/javascript" charset="utf-8"></script> | |||
90 | <script src="{{ static_url("js/cell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
73 | <script src="{{ static_url("js/cell.js") }}" type="text/javascript" charset="utf-8"></script> | |
91 | <script src="{{ static_url("js/codecell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
74 | <script src="{{ static_url("js/codecell.js") }}" type="text/javascript" charset="utf-8"></script> | |
92 | <script src="{{ static_url("js/textcell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
75 | <script src="{{ static_url("js/textcell.js") }}" type="text/javascript" charset="utf-8"></script> | |
93 | <script src="{{ static_url("js/kernel.js") }}" type="text/javascript" charset="utf-8"></script> |
|
76 | <script src="{{ static_url("js/kernel.js") }}" type="text/javascript" charset="utf-8"></script> | |
94 | <script src="{{ static_url("js/kernelstatus.js") }}" type="text/javascript" charset="utf-8"></script> |
|
|||
95 | <script src="{{ static_url("js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script> |
|
|||
96 | <script src="{{ static_url("js/loginwidget.js") }}" type="text/javascript" charset="utf-8"></script> |
|
|||
97 | <script src="{{ static_url("js/notebook.js") }}" type="text/javascript" charset="utf-8"></script> |
|
77 | <script src="{{ static_url("js/notebook.js") }}" type="text/javascript" charset="utf-8"></script> | |
98 | <script src="{{ static_url("js/printnotebookmain.js") }}" type="text/javascript" charset="utf-8"></script> |
|
78 | <script src="{{ static_url("js/printnotebookmain.js") }}" type="text/javascript" charset="utf-8"></script> | |
99 |
|
79 | |||
100 | </body> |
|
80 | {% end %} | |
101 |
|
||||
102 | </html> |
|
@@ -8,12 +8,15 b'' | |||||
8 |
|
8 | |||
9 |
|
9 | |||
10 | {% block params %} |
|
10 | {% block params %} | |
|
11 | ||||
11 | data-project={{project}} |
|
12 | data-project={{project}} | |
12 | data-base-project-url={{base_project_url}} |
|
13 | data-base-project-url={{base_project_url}} | |
13 | data-base-kernel-url={{base_kernel_url}} |
|
14 | data-base-kernel-url={{base_kernel_url}} | |
14 | data-read-only={{read_only}} |
|
15 | data-read-only={{read_only}} | |
|
16 | ||||
15 | {% end %} |
|
17 | {% end %} | |
16 |
|
18 | |||
|
19 | ||||
17 | {% block site %} |
|
20 | {% block site %} | |
18 |
|
21 | |||
19 | <div id="main_app"> |
|
22 | <div id="main_app"> |
General Comments 0
You need to be logged in to leave comments.
Login now