##// END OF EJS Templates
Hacks to prevent FLOUC (flash of unformatted content).
Brian E. Granger -
Show More
@@ -92,11 +92,13 body {
92
92
93
93
94 div#header {
94 div#header {
95 /* Initially hidden to prevent FLOUC */
96 display: none;
95 position: relative;
97 position: relative;
96 height: 45px;
98 height: 45px;
97 padding: 5px;
99 padding: 5px;
98 margin: 0px;
100 margin: 0px;
99 width: 100%
101 width: 100%;
100 }
102 }
101
103
102 span#ipython_notebook {
104 span#ipython_notebook {
@@ -143,6 +145,8 span#kernel_status {
143 }
145 }
144
146
145 div#notebook_app {
147 div#notebook_app {
148 /* Initially hidden to prevent FLOUC */
149 display: none;
146 width: 100%;
150 width: 100%;
147 position: relative;
151 position: relative;
148 }
152 }
@@ -470,17 +470,17 var IPython = (function (IPython) {
470 var that = this;
470 var that = this;
471 var cell = that.selected_cell();
471 var cell = that.selected_cell();
472 var cell_index = that.find_cell_index(cell);
472 var cell_index = that.find_cell_index(cell);
473 // TODO: the logic here needs to be moved into appropriate
474 // methods of Notebook.
475 if (cell instanceof IPython.CodeCell) {
473 if (cell instanceof IPython.CodeCell) {
476 cell.clear_output();
474 cell.clear_output();
477 var code = cell.get_code();
475 var code = cell.get_code();
478 if (that.notebook_load_re.test(code)) {
476 if (that.notebook_load_re.test(code)) {
477 // %notebook load
479 var code_parts = code.split(' ');
478 var code_parts = code.split(' ');
480 if (code_parts.length === 3) {
479 if (code_parts.length === 3) {
481 that.load_notebook(code_parts[2]);
480 that.load_notebook(code_parts[2]);
482 };
481 };
483 } else if (that.notebook_save_re.test(code)) {
482 } else if (that.notebook_save_re.test(code)) {
483 // %notebook save
484 var code_parts = code.split(' ');
484 var code_parts = code.split(' ');
485 if (code_parts.length === 3) {
485 if (code_parts.length === 3) {
486 that.save_notebook(code_parts[2]);
486 that.save_notebook(code_parts[2]);
@@ -34,5 +34,9 $(document).ready(function () {
34 IPython.layout_manager.do_resize();
34 IPython.layout_manager.do_resize();
35 IPython.pager.collapse();
35 IPython.pager.collapse();
36 IPython.layout_manager.do_resize();
36 IPython.layout_manager.do_resize();
37
38 // These have display: none in the css file and are made visible here to prevent FLOUC.
39 $('div#header').css('display','block');
40 $('div#notebook_app').css('display','block');
37 });
41 });
38
42
General Comments 0
You need to be logged in to leave comments. Login now