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 use pydata sphinx theme #801

Merged
merged 25 commits into from
Feb 15, 2021
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,5 @@ cythonize.dat
doc/_build/
doc/auto_examples/
doc/generated/
doc/bibtex/auto
doc/references/generated/
doc/bibtex/auto
5 changes: 3 additions & 2 deletions build_tools/circle/build_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,16 @@ conda update --yes --quiet conda

# Configure the conda environment and put it in the path using the
# provided versions
conda create -n $CONDA_ENV_NAME --yes --quiet python=3.7
conda create -n $CONDA_ENV_NAME --yes --quiet python=3.8
source activate $CONDA_ENV_NAME

conda install --yes pip numpy scipy joblib pillow matplotlib memory_profiler \
sphinx sphinx_rtd_theme \pandas keras tensorflow=1
sphinx pandas tensorflow=2
pip install --pre -f https://sklearn-nightly.scdn8.secure.raxcdn.com scikit-learn
pip install -U git+https://github.com/sphinx-gallery/sphinx-gallery.git
pip install -U git+https://github.com/numpy/numpydoc.git
pip install -U git+https://github.com/mcmtroffaes/sphinxcontrib-bibtex.git
pip install -U git+https://github.com/pandas-dev/pydata-sphinx-theme.git@master

# Build and install imbalanced-learn in dev mode
ls -l
Expand Down
58 changes: 51 additions & 7 deletions doc/_static/css/imbalanced-learn.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,64 @@
@import url("theme.css");

.highlight a {
text-decoration: underline;
text-decoration: underline;
}

.deprecated p {
padding: 10px 7px 10px 10px;
color: #b94a48;
background-color: #F3E5E5;
border: 1px solid #eed3d7;
padding: 10px 7px 10px 10px;
color: #b94a48;
background-color: #f3e5e5;
border: 1px solid #eed3d7;
}

.deprecated p span.versionmodified {
font-weight: bold;
font-weight: bold;
}

.wy-nav-content {
max-width: 1200px !important;
max-width: 1200px !important;
}

/* Override some aspects of the pydata-sphinx-theme */

/* Getting started index page */

.intro-card {
background: #fff;
border-radius: 0;
padding: 30px 10px 10px 10px;
margin: 10px 0px;
}

.intro-card .card-text {
margin: 20px 0px;
/*min-height: 150px; */
}

.custom-button {
background-color: #dcdcdc;
border: none;
color: #484848;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.9rem;
border-radius: 0.5rem;
max-width: 220px;
padding: 0.5rem 0rem;
}

.custom-button a {
color: #484848;
}

.custom-button p {
margin-top: 0;
margin-bottom: 0rem;
color: #484848;
}

.navbar-brand img {
width: 0%;
height: 0%;
}
Binary file added doc/_static/img/favicon.ico
Binary file not shown.
Binary file added doc/_static/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/img/logo.xcf
Binary file not shown.
16 changes: 15 additions & 1 deletion doc/_templates/class.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
:mod:`{{module}}`.{{objname}}
{{objname}}
{{ underline }}==============

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}

{% block methods %}

{% if methods %}
.. rubric:: Methods

.. autosummary::
{% for item in methods %}
{% if '__init__' not in item %}
~{{ name }}.{{ item }}
{% endif %}
{%- endfor %}
{% endif %}
{% endblock %}

.. include:: {{module}}.{{objname}}.examples

.. raw:: html
Expand Down
2 changes: 1 addition & 1 deletion doc/_templates/function.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:mod:`{{module}}`.{{objname}}
{{objname}}
{{ underline }}====================

.. currentmodule:: {{ module }}
Expand Down
14 changes: 14 additions & 0 deletions doc/_templates/sidebar-search-bs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="navbar-brand-box">
<a class="navbar-brand text-wrap" href="{{ pathto('index') }}">
{% if logo %}
<img
src="{{ pathto('_static/' + logo, 1) }}"
class="logo"
style="width: 60%"
alt="logo"
/>
{% endif %} {% if docstitle %}
<h4 class="site-logo" id="site-title">{{ docstitle }}</h4>
{% endif %}
</a>
</div>
Loading