In [1]:
from IPython.utils.path import get_ipython_dir
import os
In [2]:
profile_dir = os.path.join(get_ipython_dir(), "profile_rise", "static", "custom")
%cd {profile_dir}
In [15]:
%load custom.css
In [15]:
%%writefile custom.css
/*
Placeholder for custom user CSS
mainly to be overridden in profile/static/custom/custom.css
This will always be an empty file in IPython
*/
.mytag {
font-family: Helvetica, Arial, sans-serif;
/*font-size: small;*/
background: #80b1d3;
display: inline-block;
color: #fff;
position: relative;
padding: 0 8px 0 10px;
/*border-top-right-radius: 4px;
border-bottom-right-radius: 4px;*/
border-radius: 4px;
margin: 0 0 0 15px;
text-decoration: none;
}
/*.mytag:before {
display: inline-block;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-right: 10px solid #80b1d3;
height: 0;
width: 0;
position: absolute;
left: -10px;
top: 0;
content: "";
display: inline-block;
}*/
.mytag:before {
background: #fff;
width: 10px;
height: 10px;
content: "";
display: inline-block;
border-radius: 20px;
margin: 0 8px 0 0;
}
.barred-tag {
text-decoration: line-through;
}
.orange-tag {
background: #fdb462;
}
/*.orange-tag:before {
border-right: 10px solid #fdb462;
}*/
.green-tag {
background: #8dd3c7;
}
/*.green-tag:before {
border-right: 10px solid #8dd3c7;
}*/
.violet-tag {
background: #bebada;
}
/*.violet-tag:before {
border-right: 10px solid #bebada;
}*/
.red-tag {
background: #fb8072;
}
/*.red-tag:before {
border-right: 10px solid #fb8072;
}*/
.green2-tag {
background: #a3ce59;
}
/*.green2-tag:before {
border-right: 10px solid #a3ce59;
}*/
In [3]:
%load custom.js
In [4]:
%%writefile custom.js
// we want strict javascript that fails
// on ambiguous syntax
"using strict";
// to prevent timeout
requirejs.config({
waitSeconds: 60
});
// do not use notebook loaded event as it is re-triggerd on
// revert to checkpoint but this allow extension to be loaded
// late enough to work.
$([IPython.events]).on('app_initialized.NotebookApp', function(){
require(['nbextensions/livereveal/main'],function(livereveal){
// livereveal.parameters('theme', 'transition', 'fontsize', static_prefix);
// * theme can be: simple, sky, beige, serif, solarized
// (you will need aditional css for default, night, moon themes).
// * transition can be: linear, zoom, fade, none
livereveal.parameters('simple', 'fade');
console.log('Live reveal extension loaded correctly');
});
});
In [ ]: