Skip to content

Commit

Permalink
Added custom style. this refs #1
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Oct 6, 2020
1 parent b4bd6a3 commit 9d67695
Show file tree
Hide file tree
Showing 4 changed files with 269 additions and 77 deletions.
127 changes: 127 additions & 0 deletions notebooks/__static/custom_nb_styling.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<style>

/* The following CSS has been adapted from
http://nbviewer.ipython.org/github/ketch/teaching-numerics-with-notebooks/blob/master/Styling_notebooks.ipynb
by Aron Ahmadia and David Ketcheson and has been reused under CC BY 4.0
*/

/* main background */
#site {
background: #888;
color: #red;
}

div.container {
width: 100% ! important;
}

div.cell { /* set cell width to about 80 chars */
width: 95%;
}

div #notebook { /* centre the content */
/* background: #fff; /* white background for content */
background: blue;
width: 100%;
margin: auto;
padding-left: 1em;
padding-right: 1em;
background-image: url("tile_background.jpg");
}

#notebook li { /* More space between bullet points */
margin-top:0.4em;
}

/* change background color of running cells */
div.cell.code_cell.running {
/* background-color: rgba(164,188,194,.75); */
background-color: green;
border-width: 8px
border-style: solid
border-color: #111;
}

/* Put a solid color box around each cell and its output, visually linking them together */
div.cell.code_cell {
background-color: rgba(164,188,194,.25); /* Continuum L Gray with alpha 0.25 */
border-radius: 10px; /* rounded borders */
padding: 1em;
margin-top: 1em;
}

div.text_cell_render{
font-family: Georgia, Times, 'Times New Roman', serif;
line-height: 110%;
font-size: 105%;
width: 95%;
margin-left: auto;
margin-right: auto;
}


/* Formatting for header cells */
.text_cell_render h1 {
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
font-weight: 400;
font-size: 30pt;
line-height: 100%;
color: rgb(37,55,70); /* Continuum Blue*/
margin-bottom: 0.1em;
margin-top: 0.1em;
display: block;
}
.text_cell_render h2 {
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
font-weight: 700;
font-size: 22pt;
line-height: 100%;
color: rgb(37,55,70);
margin-bottom: 0.1em;
margin-top: 0.1em;
display: block;
}

.text_cell_render h3 {
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
margin-top:12px;
margin-bottom: 3px;
font-style: italic;
color: rgb(37, 55, 70);
}

.text_cell_render h4 {
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
}

.text_cell_render h5 {
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
font-weight: 300;
font-size: 14pt;
font-style: italic;
margin-bottom: .1em;
margin-top: 0.1em;
display: block;
}

.text_cell_render h6 {
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
font-weight: 300;
font-size: 10pt;
margin-bottom: 1px;
margin-top: 1px;
}

.CodeMirror{
font-family: "PT Mono", fixed;
font-size: 100%;
}

#notebook_panel { /* main background */
background-image: url("tile_background.jpg");
}




</style>
6 changes: 6 additions & 0 deletions notebooks/__static/custom_style.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from IPython.core.display import HTML


def style():
css_file = '__static/custom_nb_styling.css'
return HTML(open(css_file, "r").read())
Binary file added notebooks/__static/tile_background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
213 changes: 136 additions & 77 deletions notebooks/bragg_edge_peak_fitting.ipynb

Large diffs are not rendered by default.

0 comments on commit 9d67695

Please sign in to comment.