Skip to content

Commit 6155658

Browse files
authored
DOC use pydata sphinx theme for website (#801)
1 parent ce4e1f7 commit 6155658

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+643
-592
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,5 @@ cythonize.dat
121121
doc/_build/
122122
doc/auto_examples/
123123
doc/generated/
124-
doc/bibtex/auto
124+
doc/references/generated/
125+
doc/bibtex/auto

build_tools/circle/build_doc.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,16 @@ conda update --yes --quiet conda
9797

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

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

110111
# Build and install imbalanced-learn in dev mode
111112
ls -l

doc/_static/css/imbalanced-learn.css

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,64 @@
11
@import url("theme.css");
22

33
.highlight a {
4-
text-decoration: underline;
4+
text-decoration: underline;
55
}
66

77
.deprecated p {
8-
padding: 10px 7px 10px 10px;
9-
color: #b94a48;
10-
background-color: #F3E5E5;
11-
border: 1px solid #eed3d7;
8+
padding: 10px 7px 10px 10px;
9+
color: #b94a48;
10+
background-color: #f3e5e5;
11+
border: 1px solid #eed3d7;
1212
}
1313

1414
.deprecated p span.versionmodified {
15-
font-weight: bold;
15+
font-weight: bold;
1616
}
1717

1818
.wy-nav-content {
19-
max-width: 1200px !important;
19+
max-width: 1200px !important;
20+
}
21+
22+
/* Override some aspects of the pydata-sphinx-theme */
23+
24+
/* Getting started index page */
25+
26+
.intro-card {
27+
background: #fff;
28+
border-radius: 0;
29+
padding: 30px 10px 10px 10px;
30+
margin: 10px 0px;
31+
}
32+
33+
.intro-card .card-text {
34+
margin: 20px 0px;
35+
/*min-height: 150px; */
36+
}
37+
38+
.custom-button {
39+
background-color: #dcdcdc;
40+
border: none;
41+
color: #484848;
42+
text-align: center;
43+
text-decoration: none;
44+
display: inline-block;
45+
font-size: 0.9rem;
46+
border-radius: 0.5rem;
47+
max-width: 220px;
48+
padding: 0.5rem 0rem;
49+
}
50+
51+
.custom-button a {
52+
color: #484848;
53+
}
54+
55+
.custom-button p {
56+
margin-top: 0;
57+
margin-bottom: 0rem;
58+
color: #484848;
59+
}
60+
61+
.navbar-brand img {
62+
width: 0%;
63+
height: 0%;
2064
}

doc/_static/img/favicon.ico

1.12 KB
Binary file not shown.

doc/_static/img/logo.png

34.4 KB
Loading

doc/_static/img/logo.xcf

264 KB
Binary file not shown.

doc/_templates/class.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
:mod:`{{module}}`.{{objname}}
1+
{{objname}}
22
{{ underline }}==============
33

44
.. currentmodule:: {{ module }}
55

66
.. autoclass:: {{ objname }}
77

8+
{% block methods %}
9+
10+
{% if methods %}
11+
.. rubric:: Methods
12+
13+
.. autosummary::
14+
{% for item in methods %}
15+
{% if '__init__' not in item %}
16+
~{{ name }}.{{ item }}
17+
{% endif %}
18+
{%- endfor %}
19+
{% endif %}
20+
{% endblock %}
21+
822
.. include:: {{module}}.{{objname}}.examples
923

1024
.. raw:: html

doc/_templates/function.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:mod:`{{module}}`.{{objname}}
1+
{{objname}}
22
{{ underline }}====================
33

44
.. currentmodule:: {{ module }}

doc/_templates/sidebar-search-bs.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<div class="navbar-brand-box">
2+
<a class="navbar-brand text-wrap" href="{{ pathto('index') }}">
3+
{% if logo %}
4+
<img
5+
src="{{ pathto('_static/' + logo, 1) }}"
6+
class="logo"
7+
style="width: 60%"
8+
alt="logo"
9+
/>
10+
{% endif %} {% if docstitle %}
11+
<h4 class="site-logo" id="site-title">{{ docstitle }}</h4>
12+
{% endif %}
13+
</a>
14+
</div>

0 commit comments

Comments
 (0)