Skip to content

Commit

Permalink
Add css
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Hopper committed Oct 8, 2015
1 parent c1d5d36 commit 33bec9a
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 0 deletions.
15 changes: 15 additions & 0 deletions 2015-10-07-econtalk-topics.ipynb
Expand Up @@ -766,6 +766,21 @@
"source": [
"If you have feedback on this implementation of HDP-LDA, you can reach me on [Twitter](http://twitter.com/tdhopper) or open an [issue on Github](https://github.com/datamicroscopes/lda/issues)."
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from IPython.core.display import HTML\n",
"def css():\n",
" style = open(\"css/custom.css\", \"r\").read()\n",
" return HTML(style)\n",
"_=css()"
]
}
],
"metadata": {
Expand Down
122 changes: 122 additions & 0 deletions css/custom.css
@@ -0,0 +1,122 @@
/* Experimental typographically tinkered IJulia stylesheet
* Copyright © 2013--2015 Jiahao Chen <jiahao@mit.edu>
* MIT License
*
* To use, place in ~/.ipython/profile_notebook/static/custom/custom.css
* and refresh the page. (The IPython/Jupyter server does not need to be restarted.)
*
* Based on suggestions from practicaltypography.com
*/

.rendered_html ol {
list-style:decimal;
margin: 1em 2em;
}

.autosave_status, .checkpoint_status {
color: #bbbbbb;
font-family: "Fira Sans", sans-serif;
}

.filename {
font-family: "Charis SIL", "Hoefler Text", Garamond, Palatino, serif;
font-variant: small-caps;
letter-spacing: 0.15em;
}

.text_cell, .text_cell_render {
font-family: "Charis SIL", "Hoefler Text", Garamond, Palatino, serif;
font-size: 18px;
line-height:1.4em;
padding-left:3em;
padding-right:3em;
max-width: 36em;
text-rendering: optimizeLegibility;
font-variant-ligatures: contextual no-historical-ligatures common-ligatures;
}

blockquote p {
font-size: 17px;
line-height:1.2em;
font-family: "Charis SIL", "Hoefler Text", Garamond, Palatino, serif;
text-rendering: optimizeLegibility;
font-variant-ligatures: contextual no-historical-ligatures common-ligatures;
}

.code_cell { /* Area containing both code and output */
font-family: "Source Code Pro", "Droid Sans Mono", Consolas, "Ubuntu Mono", "Liberation Mono", monospace;
background-color:#F1F0FF; /* light blue */
border-radius: 0.8em;
padding: 1em;
}

code, pre, .CodeMirror {
font-family: "Source Code Pro", "Droid Sans Mono", Consolas, "Ubuntu Mono", "Liberation Mono", monospace;
line-height:1.25em;
font-size: 14px;
}

.slide-header, p.slide-header
{
color: #498AF3;
font-size: 200%;
font-weight:bold;
margin: 0px 20px 10px;
page-break-before: always;
text-align: center;
}

div.prompt {
font-family: "Source Code Pro", "Droid Sans Mono", Consolas, "Ubuntu Mono", "Liberation Mono", monospace;
font-size: 11px;
}

div.output_area pre {
font-family: "Source Code Pro", "Droid Sans Mono", Consolas, "Ubuntu Mono", "Liberation Mono", monospace;
line-height:1.25em;
font-size: 14px;
background-color: #F4F4F4;
}

div.output_error pre {
background-color: #ffeeee;
}

.cm-header-1, .rendered_html h1 {
font-family: "Charis SIL", "Hoefler Text", Garamond, Palatino, serif;
font-size: 24px;
font-variant: small-caps;
text-rendering: auto;
letter-spacing: 0.06em;
font-variant-ligatures: contextual no-historical-ligatures common-ligatures;
}

.cm-header-2, .rendered_html h2 {
font-family: "Charis SIL", "Hoefler Text", Garamond, Palatino, serif;
font-size: 21px;
font-weight: bold;
text-rendering: optimizeLegibility;
font-variant-ligatures: contextual no-historical-ligatures common-ligatures;
}

.cm-header-3, .rendered_html h3 {
font-family: "Charis SIL", "Hoefler Text", Garamond, Palatino, serif;
font-size: 19px;
font-weight: bold;
text-rendering: optimizeLegibility;
font-variant-ligatures: contextual no-historical-ligatures common-ligatures;
}

.cm-header-4, .rendered_html h4, .cm-header-5, .rendered_html h5, .cm-header-6, .rendered_html h6 {
font-family: "Charis SIL", "Hoefler Text", Garamond, Palatino, serif;
font-size: 18px;
font-weight: bold;
text-rendering: optimizeLegibility;
font-variant-ligatures: contextual no-historical-ligatures common-ligatures;
}

.rendered_html td {
font-variant-numeric: tabular-nums;
}

.CodeMirror-ruler {border-left: 1px solid #cccccc;}

0 comments on commit 33bec9a

Please sign in to comment.