From charlesreid1

Line 11: Line 11:
List of themes here: https://github.com/nsonnad/base16-ipython-notebook/tree/master/ipython-3/output
List of themes here: https://github.com/nsonnad/base16-ipython-notebook/tree/master/ipython-3/output


Start by creating a custom profile in ipython:
Start by creating a custom Jupyter config directory:


<pre>
<pre>
ipython profile create bespin
$ jupyter notebook --generate-config
</pre>
Writing default config to: ~/.jupyter/jupyter_notebook_config.py
 
Now locate the directory containing files for that custom profile:
 
<pre>
ipython locate profile bespin
</pre>
</pre>


Line 26: Line 21:


<pre>
<pre>
mkdir -p `ipython locate profile bespin`/static/custom/
mkdir -p ~/.jupyter/custom
</pre>
</pre>


Line 32: Line 27:


<pre>
<pre>
wget -O `ipython locate profile bespin`/static/custom/custom.css \
wget -O ~/.jupyter/custom/custom.css \
https://raw.githubusercontent.com/nsonnad/base16-ipython-notebook/master/ipython-3/output/base16-bespin-dark.css
https://raw.githubusercontent.com/nsonnad/base16-ipython-notebook/master/ipython-3/output/base16-bespin-dark.css
</pre>
</pre>
Line 41: Line 36:


<pre>
<pre>
vim `ipython locate profile bespin`/static/custom/custom.css
#vim `ipython locate profile bespin`/static/custom/custom.css
</pre>
</pre>


Line 47: Line 42:


<pre>
<pre>
div#maintoolbar, div#header {display: none !important;}
#div#maintoolbar, div#header {display: none !important;}
</pre>
</pre>



Revision as of 10:17, 2 December 2017

Applying Base16 themes to ipython notebook via https://github.com/nsonnad/base16-ipython-notebook

Before

JupyterBase16 Before.png

Installing

Clone repo here: https://github.com/nsonnad/base16-ipython-notebook

List of themes here: https://github.com/nsonnad/base16-ipython-notebook/tree/master/ipython-3/output

Start by creating a custom Jupyter config directory:

$ jupyter notebook --generate-config
Writing default config to: ~/.jupyter/jupyter_notebook_config.py

Or skip straight to it:

mkdir -p ~/.jupyter/custom

once per profile, then:

wget -O ~/.jupyter/custom/custom.css \
https://raw.githubusercontent.com/nsonnad/base16-ipython-notebook/master/ipython-3/output/base16-bespin-dark.css

Bringing the toolbar back

The themes get rid of the toolbar; to bring it back:

#vim `ipython locate profile bespin`/static/custom/custom.css

and comment out the line:

#div#maintoolbar, div#header {display: none !important;}

Using

Start a new notebook using the custom profile: