Skip to content

Commit

Permalink
Update layout customization for new theme features
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed Jun 25, 2022
1 parent 0dc1f11 commit 1a40476
Show file tree
Hide file tree
Showing 20 changed files with 43 additions and 77 deletions.
8 changes: 8 additions & 0 deletions doc/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ html[data-theme=light] .highlight .kc {
font-weight: bold;
}


/* Use full page width without sidebars */
.bd-content {
max-width: 100%;
flex-grow: 1;
}


/* *********************************************************************** */

/* --- Badges for categorizing release notes --- */
Expand Down
21 changes: 0 additions & 21 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
{% extends "!layout.html" %}

{% block docs_main %}
{% if sidebars %}
<div class="bd-content col-12 col-md-9 col-xl-7">
{% else %}
<div class="bd-content col-12 col-md-12 col-xl-11">
{% endif %}
{% block docs_body %}
<article class="bd-article" role="main">
{% block body %} {% endblock %}
</article>
{% endblock %}

{% if theme_show_prev_next %}
<footer class="bd-footer-article">
{% include "sections/footer-article.html" %}
</footer>
{% endif %}
</div>
{% endblock %}


{%- block footer %}
<footer class="footer" style="border-top: 1px solid #ccc; padding-top: 10px">
<div class="container">
Expand Down
17 changes: 0 additions & 17 deletions doc/_templates/sections/sidebar-primary.html

This file was deleted.

14 changes: 0 additions & 14 deletions doc/_templates/sections/sidebar-secondary.html

This file was deleted.

10 changes: 7 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,14 @@
plot_html_show_formats = False
plot_html_show_source_link = False

# Don't add a source link in the sidebar
html_show_sourcelink = False

# Control the appearance of type hints
autodoc_typehints = "description"
autodoc_typehints_format = "short"

# Allow shorthand references for main function interface
rst_prolog = """
.. currentmodule:: seaborn
"""
Expand Down Expand Up @@ -120,19 +124,19 @@
{
"name": "GitHub",
"url": "https://github.com/mwaskom/seaborn",
"icon": "fab fa-github-square",
"icon": "fab fa-github",
"type": "fontawesome",
},
{
"name": "Twitter",
"url": "https://twitter.com/michaelwaskom",
"icon": "fab fa-twitter-square",
"icon": "fab fa-twitter",
"type": "fontawesome",
},
],
"show_prev_next": False,
"navbar_start": ["navbar-logo"],
"navbar_end": ["search-field", "navbar-icon-links"],
"navbar_end": ["search-button", "navbar-icon-links"],
}

html_context = {
Expand Down
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:theme_html_remove_secondary_sidebar:

seaborn: statistical data visualization
=======================================
Expand Down
5 changes: 5 additions & 0 deletions doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ and it can be installed with `conda`::

conda install seaborn

As the main Anaconda repository can be slow to add new releaes, you may prefer using the
`conda-forge <https://conda-forge.org/>`_ channel::

conda install seaborn -c conda-forge

Dependencies
~~~~~~~~~~~~

Expand Down
2 changes: 2 additions & 0 deletions doc/sphinxext/gallery_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def execfile(filename, globals=None, locals=None):


INDEX_TEMPLATE = """
:theme_html_remove_secondary_sidebar:
.. raw:: html
Expand Down
2 changes: 0 additions & 2 deletions doc/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,3 @@ Figure aesthetics
:maxdepth: 2

tutorial/color_palettes

.
20 changes: 10 additions & 10 deletions doc/tutorial/aesthetics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
"metadata": {},
"outputs": [],
"source": [
"def sinplot(flip=1):\n",
"def sinplot(n=10, flip=1):\n",
" x = np.linspace(0, 14, 100)\n",
" for i in range(1, 7):\n",
" plt.plot(x, np.sin(x + i * .5) * (7 - i) * flip)"
" for i in range(1, n + 1):\n",
" plt.plot(x, np.sin(x + i * .5) * (n + 2 - i) * flip)"
]
},
{
Expand Down Expand Up @@ -255,19 +255,19 @@
"\n",
"with sns.axes_style(\"darkgrid\"):\n",
" ax = f.add_subplot(gs[0, 0])\n",
" sinplot()\n",
" sinplot(6)\n",
" \n",
"with sns.axes_style(\"white\"):\n",
" ax = f.add_subplot(gs[0, 1])\n",
" sinplot()\n",
" sinplot(6)\n",
"\n",
"with sns.axes_style(\"ticks\"):\n",
" ax = f.add_subplot(gs[1, 0])\n",
" sinplot()\n",
" sinplot(6)\n",
"\n",
"with sns.axes_style(\"whitegrid\"):\n",
" ax = f.add_subplot(gs[1, 1])\n",
" sinplot()\n",
" sinplot(6)\n",
" \n",
"f.tight_layout()"
]
Expand Down Expand Up @@ -404,9 +404,9 @@
"metadata": {
"celltoolbar": "Tags",
"kernelspec": {
"display_name": "seaborn-py38-latest",
"display_name": "seaborn-py39-latest",
"language": "python",
"name": "seaborn-py38-latest"
"name": "seaborn-py39-latest"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -418,7 +418,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/axis_grids.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/categorical.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/color_palettes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/data_structure.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/distributions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/error_bars.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/function_overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/relational.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 1a40476

Please sign in to comment.