Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Fixed template structure CSS #16067

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 38 additions & 7 deletions doc/source/style.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"nbsphinx": "hidden"
},
"outputs": [],
Expand All @@ -61,7 +62,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import pandas as pd\n",
Expand Down Expand Up @@ -127,7 +130,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def color_negative_red(val):\n",
Expand Down Expand Up @@ -181,7 +186,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def highlight_max(s):\n",
Expand Down Expand Up @@ -244,7 +251,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def highlight_max(data, color='yellow'):\n",
Expand Down Expand Up @@ -810,7 +819,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def magnify():\n",
Expand Down Expand Up @@ -872,7 +883,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"df.style.\\\n",
Expand Down Expand Up @@ -1058,6 +1071,23 @@
"source": [
"See the template in the [GitHub repo](https://github.com/pandas-dev/pandas) for more details."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"nbsphinx": "hidden"
},
"outputs": [],
"source": [
"# Hack to get the same style in the notebook as the\n",
"# main site. This is hidden in the docs.\n",
"from IPython.display import HTML\n",
"with open(\"themes/nature_with_gtoc/static/nature.css_t\") as f:\n",
" css = f.read()\n",
" \n",
"HTML('<style>{}</style>'.format(css))"
]
}
],
"metadata": {
Expand All @@ -1075,7 +1105,8 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3"
"pygments_lexer": "ipython3",
"version": "3.6.1"
}
},
"nbformat": 4,
Expand Down
3 changes: 0 additions & 3 deletions doc/source/template_structure.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
-->
<style type="text/css">
/* Overrides of notebook CSS for static HTML export */
body {
font-family: sans;
}
.template_block {
background-color: hsla(120, 60%, 70%, 0.2);
margin: 10px;
Expand Down