summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2020-08-12 19:01:08 +0300
committermattip <matti.picus@gmail.com>2020-08-14 09:19:09 +0300
commit3166c0d7646efe9d43cb7b363e58db2cf941a5e6 (patch)
tree926c5aefc29356623af5c265611272d7673d3d49 /doc/source
parent986e533f72c91f8a356c499c2e499c2894c94235 (diff)
downloadnumpy-3166c0d7646efe9d43cb7b363e58db2cf941a5e6.tar.gz
DOC: first step toward switching themes
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/_templates/layout.html34
-rw-r--r--doc/source/conf.py37
-rw-r--r--doc/source/contents.rst25
-rw-r--r--doc/source/user/index.rst17
4 files changed, 39 insertions, 74 deletions
diff --git a/doc/source/_templates/layout.html b/doc/source/_templates/layout.html
index 1f8ec518f..a90cad8f6 100644
--- a/doc/source/_templates/layout.html
+++ b/doc/source/_templates/layout.html
@@ -2,38 +2,16 @@
{%- block extrahead %}
<style>
- .main {
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
- box-shadow: none;
- }
- div.top-scipy-org-logo-header {
- background-color: #fafafa;
- border-bottom: 2px solid #013243; /* Warm Black */
- margin-top: 0;
- box-shadow: none;
- }
- div.top-scipy-org-logo-header img {
- height: 100px;
- padding-left: 27px;
- }
- div.spc-navbar .nav-pills > li > a {
- background-color: #4d77cf; /* Han Blue */
- }
+.navbar-brand img {
+ height: 75px;
+}
+.navbar-brand {
+ height: 75px;
+}
</style>
{{ super() }}
{% endblock %}
-{%- block header %}
-<div class="container">
- <div class="top-scipy-org-logo-header">
- <a href="{{ pathto('index') }}">
- <img border=0 alt="NumPy" src="{{ pathto('_static/numpylogo.svg', 1) }}">
- </a>
- </div>
-</div>
-
-{% endblock %}
{% block rootrellink %}
{% if pagename != 'index' %}
<li class="active"><a href="{{ pathto('index') }}">{{ shorttitle|e }}</a></li>
diff --git a/doc/source/conf.py b/doc/source/conf.py
index b908a5a28..e34be7f5c 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -94,34 +94,15 @@ def setup(app):
# HTML output
# -----------------------------------------------------------------------------
-themedir = os.path.join(os.pardir, 'scipy-sphinx-theme', '_theme')
-if not os.path.isdir(themedir):
- raise RuntimeError("Get the scipy-sphinx-theme first, "
- "via git submodule init && git submodule update")
-
-html_theme = 'scipy'
-html_theme_path = [themedir]
-
-if 'scipyorg' in tags:
- # Build for the scipy.org website
- html_theme_options = {
- "edit_link": True,
- "sidebar": "right",
- "scipy_org_logo": True,
- "rootlinks": [("https://scipy.org/", "Scipy.org"),
- ("https://docs.scipy.org/", "Docs")]
- }
-else:
- # Default build
- html_theme_options = {
- "edit_link": False,
- "sidebar": "left",
- "scipy_org_logo": False,
- "rootlinks": [("https://numpy.org/", "NumPy.org"),
- ("https://numpy.org/doc", "Docs"),
- ]
- }
- html_sidebars = {'index': ['indexsidebar.html', 'searchbox.html']}
+html_theme = 'pydata_sphinx_theme'
+
+html_logo = '_static/numpylogo.svg'
+
+html_theme_options = {
+ "github_url": "https://github.com/numpy/numpy",
+ "twitter_url": "https://twitter.com/numpy_team",
+}
+
html_additional_pages = {
'index': 'indexcontent.html',
diff --git a/doc/source/contents.rst b/doc/source/contents.rst
index baea7784c..953587c6a 100644
--- a/doc/source/contents.rst
+++ b/doc/source/contents.rst
@@ -5,23 +5,12 @@ NumPy Documentation
###################
.. toctree::
+ :maxdepth: 1
- user/setting-up
- user/quickstart
- user/absolute_beginners
- user/tutorials_index
- user/howtos_index
- reference/index
- user/explanations_index
- f2py/index
- glossary
- dev/index
- dev/underthehood
- docs/index
- docs/howto_document
- benchmarking
- bugs
- release
- about
- license
+ User Guide <user/index>
+ API reference <reference/index>
+ Development <dev/index>
+.. This is not really the index page, that is found in
+ _templates/intexcontent.html The toctree content here will be added to the
+ top of the template header
diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst
index 4e6a29d9f..3a79f0f2e 100644
--- a/doc/source/user/index.rst
+++ b/doc/source/user/index.rst
@@ -24,3 +24,20 @@ classes contained in the package, see the :ref:`reference`.
c-info
tutorials_index
howtos_index
+
+
+.. These are stuck here to avoid the "WARNING: document isn't included in any
+ toctree" message
+
+.. toctree::
+ :hidden:
+
+ explanations_index
+ ../f2py/index
+ ../glossary
+ ../dev/underthehood
+ ../docs/index
+ ../bugs
+ ../release
+ ../about
+ ../license