diff --git a/IPython/frontend/html/notebook/fabfile.py b/IPython/frontend/html/notebook/fabfile.py index 06de449..22b750d 100644 --- a/IPython/frontend/html/notebook/fabfile.py +++ b/IPython/frontend/html/notebook/fabfile.py @@ -6,16 +6,28 @@ import os static_dir = 'static' components_dir = os.path.join(static_dir, 'components') - +to_compile = [ + ('notebooks', 'style.less'), + ('tree', 'style.less'), + ('auth', 'style.less') +] def css(minify=True): """generate the css from less files""" + for subdir, filename in to_compile: + _compile_less(subdir, filename, minify=minify) + + +def _compile_less(subdir, filename, minify=True): if minify not in ['True', 'False', True, False]: abort('minify must be Boolean') minify = (minify in ['True',True]) - min_flag= '-x' if minify is True else '' lessc = os.path.join('components', 'less.js', 'bin', 'lessc') + + source = os.path.join(subdir, 'less', filename) + target = os.path.join(subdir, 'css', filename.replace('.less','.min.css')) + subdir = os.path.join(static_dir, subdir) with lcd(static_dir): - local('{lessc} {min_flag} less/style.less css/style.min.css'.format(**locals())) + local('{lessc} {min_flag} {source} {target}'.format(**locals())) diff --git a/IPython/frontend/html/notebook/static/auth/less/variables.less b/IPython/frontend/html/notebook/static/auth/less/variables.less index ab895c5..7e01b2a 100644 --- a/IPython/frontend/html/notebook/static/auth/less/variables.less +++ b/IPython/frontend/html/notebook/static/auth/less/variables.less @@ -1 +1 @@ -// Bootstrap customizations specific to this page. +// Our global less variables for this page go here diff --git a/IPython/frontend/html/notebook/static/base/less/base.less b/IPython/frontend/html/notebook/static/base/less/base.less index d0f0249..77a557b 100644 --- a/IPython/frontend/html/notebook/static/base/less/base.less +++ b/IPython/frontend/html/notebook/static/base/less/base.less @@ -1,7 +1,7 @@ // Our base less styles. This should be @import'ed by the main .less // files of each page. This file should not itself be compiled to css. -@import "../../../components/bootstrap/less/bootstrap.less"; +@import "../../components/bootstrap/less/bootstrap.less"; @import "variables.less"; @import "mixins.less"; @import "flexbox.less"; diff --git a/IPython/frontend/html/notebook/static/base/less/variables.less b/IPython/frontend/html/notebook/static/base/less/variables.less index 084d40f..8d706e0 100644 --- a/IPython/frontend/html/notebook/static/base/less/variables.less +++ b/IPython/frontend/html/notebook/static/base/less/variables.less @@ -1,3 +1,7 @@ -// Our customizations to bootstrap no here. +// Our customizations to bootstrap go here. @textColor: @black; + +// Our own global variables for all pages go here + +@corner_radius: 4px; \ No newline at end of file diff --git a/IPython/frontend/html/notebook/static/notebooks/less/variables.less b/IPython/frontend/html/notebook/static/notebooks/less/variables.less index 910d296..b4c18fe 100644 --- a/IPython/frontend/html/notebook/static/notebooks/less/variables.less +++ b/IPython/frontend/html/notebook/static/notebooks/less/variables.less @@ -1,6 +1,8 @@ // Bootstrap customizations specific to this page. -@corner_radius: 4px; + +// Our own global variables for this page + @notebook_background: white; @cell_selected_background: darken(@notebook_background, 2%); @cell_background: darken(@notebook_background, 3.2%); @@ -8,4 +10,4 @@ @light_border_color: darken(@cell_selected_background, 17%); @borderwidth: 1px; @fontBaseColor: black; -@baseFontSize: 30pt; +