diff --git a/IPython/html/static/notebook/less/terminal.less b/IPython/html/static/notebook/less/terminal.less new file mode 100644 index 0000000..6eb7fcb --- /dev/null +++ b/IPython/html/static/notebook/less/terminal.less @@ -0,0 +1,13 @@ +.terminal { + float: left; + border: black solid 5px; + font-family: "DejaVu Sans Mono", "Liberation Mono", monospace; + font-size: 11px; + color: white; + background: black; +} + +.terminal-cursor { + color: black; + background: white; +} diff --git a/IPython/html/static/style/style.less b/IPython/html/static/style/style.less index 0f8c37d..ad5130d 100644 --- a/IPython/html/static/style/style.less +++ b/IPython/html/static/style/style.less @@ -26,4 +26,4 @@ // notebook @import "../notebook/less/style.less"; - +@import "../notebook/less/terminal.less"; diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css index 8905b2f..f6bc109 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -10483,4 +10483,16 @@ span#autosave_status { -ms-transform: rotate(45deg); -o-transform: rotate(45deg); } +.terminal { + float: left; + border: black solid 5px; + font-family: "DejaVu Sans Mono", "Liberation Mono", monospace; + font-size: 11px; + color: white; + background: black; +} +.terminal-cursor { + color: black; + background: white; +} /*# sourceMappingURL=../style/style.min.css.map */ \ No newline at end of file diff --git a/IPython/html/static/terminal/js/main.js b/IPython/html/static/terminal/js/main.js index 1fb58b3..ff44311 100644 --- a/IPython/html/static/terminal/js/main.js +++ b/IPython/html/static/terminal/js/main.js @@ -17,9 +17,8 @@ require([ ){ page = new page.Page(); // Test size: 25x80 - var termRowHeight = 1.00 * $("#dummy-screen")[0].offsetHeight / 25; - var termColWidth = 1.02 * $("#dummy-screen-rows")[0].offsetWidth / 80; - $("#dummy-screen").hide(); + var termRowHeight = function(){ return 1.00 * $("#dummy-screen")[0].offsetHeight / 25;}; + var termColWidth = function() { return 1.02 * $("#dummy-screen-rows")[0].offsetWidth / 80;}; var base_url = utils.get_body_data('baseUrl'); var ws_path = utils.get_body_data('wsPath'); @@ -30,10 +29,9 @@ require([ function calculate_size() { height = window.innerHeight - header.offsetHeight; width = window.innerWidth; - var rows = Math.min(1000, Math.max(20, Math.floor(height/termRowHeight)-1)); - var cols = Math.min(1000, Math.max(40, Math.floor(width/termColWidth)-1)); - console.log("resize:", termRowHeight, termColWidth, height, width, - rows, cols); + var rows = Math.min(1000, Math.max(20, Math.floor(height/termRowHeight())-1)); + var cols = Math.min(1000, Math.max(40, Math.floor(width/termColWidth())-1)); + console.log("resize to :", rows , 'rows by ', cols, 'columns'); return {rows: rows, cols: cols}; } diff --git a/IPython/html/static/terminal/js/terminado.js b/IPython/html/static/terminal/js/terminado.js index e8dc780..2fda37a 100644 --- a/IPython/html/static/terminal/js/terminado.js +++ b/IPython/html/static/terminal/js/terminado.js @@ -5,7 +5,7 @@ define ([], function() { cols: size.cols, rows: size.rows, screenKeys: true, - useStyle: true + useStyle: false }); ws.onopen = function(event) { ws.send(JSON.stringify(["set_size", size.rows, size.cols, diff --git a/IPython/html/templates/terminal.html b/IPython/html/templates/terminal.html index ace19ae..977d349 100644 --- a/IPython/html/templates/terminal.html +++ b/IPython/html/templates/terminal.html @@ -27,7 +27,8 @@ data-ws-path="{{ws_path}}" its size in JS in setting up the page. It is still invisible. Putting in the script block gets it outside the initially undisplayed region. --> -