From a9201807a9b53bcda2f024a0f0a2aaaef22d329c Mon Sep 17 00:00:00 2001 From: Mathieu Date: Wed, 28 Jan 2015 16:01:09 +0100 Subject: [PATCH 1/5] add running indication for notebook icon in dashboard --- IPython/html/static/style/style.min.css | 17 +++++++++++++++++ IPython/html/static/tree/js/notebooklist.js | 6 +++++- IPython/html/static/tree/less/tree.less | 6 ++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css index ec11e466a..8bd5a1947 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -8794,6 +8794,23 @@ input.engine_num_input { .notebook_icon:before.pull-right { margin-left: .3em; } +.running_notebook_icon:before { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + transform: translate(0, 0); + content: "\f02d"; + color: #5cb85c; +} +.running_notebook_icon:before.pull-left { + margin-right: .3em; +} +.running_notebook_icon:before.pull-right { + margin-left: .3em; +} .file_icon:before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; diff --git a/IPython/html/static/tree/js/notebooklist.js b/IPython/html/static/tree/js/notebooklist.js index 2b6e98b39..467955f4d 100644 --- a/IPython/html/static/tree/js/notebooklist.js +++ b/IPython/html/static/tree/js/notebooklist.js @@ -382,11 +382,16 @@ define([ NotebookList.prototype.add_link = function (model, item) { var path = model.path, name = model.name; + var running = (model.type == 'notebook' && this.sessions[path] !== undefined); + item.data('name', name); item.data('path', path); item.data('type', model.type); item.find(".item_name").text(name); var icon = NotebookList.icons[model.type]; + if (running) { + icon = 'running_' + icon; + } var uri_prefix = NotebookList.uri_prefixes[model.type]; item.find(".item_icon").addClass(icon).addClass('icon-fixed-width'); var link = item.find("a.item_link") @@ -398,7 +403,6 @@ define([ ) ); - var running = (model.type == 'notebook' && this.sessions[path] !== undefined); item.find(".item_buttons .running-indicator").css('visibility', running ? '' : 'hidden'); // directory nav doesn't open new tabs diff --git a/IPython/html/static/tree/less/tree.less b/IPython/html/static/tree/less/tree.less index 4f808eded..3f0c9c304 100644 --- a/IPython/html/static/tree/less/tree.less +++ b/IPython/html/static/tree/less/tree.less @@ -164,6 +164,12 @@ input.engine_num_input { .icon(@fa-var-book) } +.running_notebook_icon:before { + .icon(@fa-var-book); + color: @brand-success +} + + .file_icon:before { .icon(@fa-var-file-o) } From 8bf4dbb4886b1ad350fcafe78be2a60be8d81768 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Thu, 29 Jan 2015 01:06:56 +0100 Subject: [PATCH 2/5] add zebra striping to the dashboard --- IPython/html/static/tree/less/tree.less | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/IPython/html/static/tree/less/tree.less b/IPython/html/static/tree/less/tree.less index 3f0c9c304..742538676 100644 --- a/IPython/html/static/tree/less/tree.less +++ b/IPython/html/static/tree/less/tree.less @@ -12,6 +12,7 @@ @btn_small_height: 24px; @btn_mini_height: 22px; @dark_dashboard_color: @breadcrumb-color; +@list_stripe_color: lighten(@page-backdrop-color,3%); ul#tabs { margin-bottom: @dashboard_tb_pad; @@ -55,6 +56,7 @@ ul.breadcrumb { .list_header { font-weight: bold; + background-color: @page-backdrop-color } .list_container { @@ -80,6 +82,9 @@ ul.breadcrumb { background-color: @table-border-color; }; a {text-decoration: none;} + &:nth-child(odd) { + background-color: @list_stripe_color; + } } .action_col { From eca11122f985f8621ea53fd036d7a812c717e327 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Thu, 29 Jan 2015 01:08:05 +0100 Subject: [PATCH 3/5] invoke css --- IPython/html/static/style/style.min.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css index 8bd5a1947..11d1e9b11 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -8668,6 +8668,7 @@ ul.breadcrumb span { } .list_header { font-weight: bold; + background-color: #eeeeee; } .list_container { margin-top: 4px; @@ -8690,6 +8691,9 @@ ul.breadcrumb span { .list_item a { text-decoration: none; } +.list_item:nth-child(odd) { + background-color: #f6f6f6; +} .action_col { text-align: right; } From 0f7861296400afdf63d2920b6062fef534c950a1 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Fri, 30 Jan 2015 00:46:11 +0100 Subject: [PATCH 4/5] replace stripes with hover highlight --- IPython/html/static/tree/less/tree.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPython/html/static/tree/less/tree.less b/IPython/html/static/tree/less/tree.less index 742538676..83497bbeb 100644 --- a/IPython/html/static/tree/less/tree.less +++ b/IPython/html/static/tree/less/tree.less @@ -82,8 +82,8 @@ ul.breadcrumb { background-color: @table-border-color; }; a {text-decoration: none;} - &:nth-child(odd) { - background-color: @list_stripe_color; + &:hover { + background-color: darken(white,2%); } } From 5de2bdfbbb6adfc93d59b47ac22478b11c2ce491 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Fri, 30 Jan 2015 00:47:12 +0100 Subject: [PATCH 5/5] invoke css --- IPython/html/static/style/style.min.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css index 11d1e9b11..9687bef80 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -8691,8 +8691,8 @@ ul.breadcrumb span { .list_item a { text-decoration: none; } -.list_item:nth-child(odd) { - background-color: #f6f6f6; +.list_item:hover { + background-color: #fafafa; } .action_col { text-align: right;