diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..b7d29f24ce --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "scipy-sphinx-theme"] + path = scipy-sphinx-theme + url = https://github.com/scipy/scipy-sphinx-theme.git diff --git a/README.txt b/README.txt index 85ee3bbcdf..020b3c5547 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,13 @@ This repository contains the Sphinx source for the NumPy website (http://www.numpy.org/). +After cloning this repository, run + + $ git submodule init + $ git submodule update + +To get the Sphinx theme used. + To make a local build of the website $ make html diff --git a/_theme/scipy/static/favicon.ico b/_static/favicon.ico similarity index 100% rename from _theme/scipy/static/favicon.ico rename to _static/favicon.ico diff --git a/_theme/scipy/static/images/bugs.png b/_static/images/bugs.png similarity index 100% rename from _theme/scipy/static/images/bugs.png rename to _static/images/bugs.png diff --git a/_theme/scipy/static/images/documentation.png b/_static/images/documentation.png similarity index 100% rename from _theme/scipy/static/images/documentation.png rename to _static/images/documentation.png diff --git a/_theme/scipy/static/images/download.png b/_static/images/download.png similarity index 100% rename from _theme/scipy/static/images/download.png rename to _static/images/download.png diff --git a/_theme/scipy/static/images/feed-icon.png b/_static/images/feed-icon.png similarity index 100% rename from _theme/scipy/static/images/feed-icon.png rename to _static/images/feed-icon.png diff --git a/_theme/scipy/static/images/tutorial.png b/_static/images/tutorial.png similarity index 100% rename from _theme/scipy/static/images/tutorial.png rename to _static/images/tutorial.png diff --git a/_theme/scipy/static/logo.gif b/_static/logo.gif similarity index 100% rename from _theme/scipy/static/logo.gif rename to _static/logo.gif diff --git a/_theme/scipy/static/numpy_logo.png b/_static/numpy_logo.png similarity index 100% rename from _theme/scipy/static/numpy_logo.png rename to _static/numpy_logo.png diff --git a/_templates/layout.html b/_templates/layout.html new file mode 100644 index 0000000000..e7caf4c3d5 --- /dev/null +++ b/_templates/layout.html @@ -0,0 +1,11 @@ +{% extends "!layout.html" %} + +{%- block header %} +
+
+ + NumPy +
+
+ +{% endblock %} diff --git a/_templates/sitenav.html b/_templates/sitenav.html new file mode 100644 index 0000000000..725166a144 --- /dev/null +++ b/_templates/sitenav.html @@ -0,0 +1,21 @@ +{% block sitenav %} + + + + + +{% endblock %} diff --git a/_theme/scipy/layout.html b/_theme/scipy/layout.html deleted file mode 100644 index 1082494819..0000000000 --- a/_theme/scipy/layout.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "sphinxdoc/layout.html" %} - -{% block relbar1 %} -
-NumPy Homepage -
-{% endblock %} - -{% block relbar2 %}{{ relbar() }}{% endblock %} - -{% block sidebar1 %}{% endblock %} -{% block sidebar2 %}{% endblock %} diff --git a/_theme/scipy/static/scipy.css b/_theme/scipy/static/scipy.css deleted file mode 100644 index 3e8d7486bc..0000000000 --- a/_theme/scipy/static/scipy.css +++ /dev/null @@ -1,215 +0,0 @@ -@import "sphinxdoc.css"; - -/** - * Spacing fixes - */ - - -div.body { - width: 90%; -} - -div.bodywrapper { - width: 100%; -} - -div.documentwrapper { - border-left: 1px solid #ccc; - border-right: 1px solid #ccc; - border-bottom: 1px solid #ccc; -} - -div.body p, div.body dd, div.body li { - line-height: 125%; -} - -ul.simple { - margin-top: 0; - margin-bottom: 0; - padding-top: 0; - padding-bottom: 0; -} - -/* spacing around blockquoted fields in parameters/attributes/returns */ -td.field-body > blockquote { - margin-top: 0.1em; - margin-bottom: 0.5em; -} - -/* spacing around example code */ -div.highlight > pre { - padding: 2px 5px 2px 5px; -} - -/* spacing in see also definition lists */ -dl.last > dd { - margin-top: 1px; - margin-bottom: 5px; - margin-left: 30px; -} - -/** - * Hide dummy toctrees - */ - -ul { - padding-top: 0; - padding-bottom: 0; - margin-top: 0; - margin-bottom: 0; -} -ul li { - padding-top: 0; - padding-bottom: 0; - margin-top: 0; - margin-bottom: 0; -} -ul li a.reference { - padding-top: 0; - padding-bottom: 0; - margin-top: 0; - margin-bottom: 0; -} - -/** - * Make high-level subsections easier to distinguish from top-level ones - */ - -div.body h2 { - margin: 0; - padding: 0.7em 0 0.3em 0; - font-size: 1.5em; - color: #11557C; -} - -div.body h3 { - background-color: transparent; -} - -div.body h4 { - border: none; - background-color: transparent; -} - -/** - * Scipy colors - */ - -body { - background-color: rgb(100,135,220); - border: none; -} - -div.sphinxsidebar { - display: none; -} - -div.sphinxsidebar h3 { - color: rgb(0,102,204); -} - -div.sphinxsidebar h4 { - color: rgb(0,82,194); -} - -div.sphinxsidebar p { - color: black; -} - -div.sphinxsidebar ul.want-points { - list-style: disc; -} - -.field-list th { - color: rgb(0,102,204); -} - -/** - * Extra admonitions - */ - -div.tip { - background-color: #ffffe4; - border: 1px solid #ee6; -} - -div.plot-output { - clear-after: both; -} - -div.plot-output .figure { - float: left; - text-align: center; - margin-bottom: 0; - padding-bottom: 0; -} - -div.plot-output .caption { - margin-top: 2; - padding-top: 0; -} - -div.plot-output p.admonition-title { - display: none; -} - -div.plot-output:after { - content: ""; - display: block; - height: 0; - clear: both; -} - - -/* -div.admonition-example { - background-color: #e4ffe4; - border: 1px solid #ccc; -}*/ - - -/** - * Styling for field lists - */ - -table.field-list th { - border-left: 1px solid #aaa !important; - padding-left: 5px; -} - -table.field-list { - border-collapse: separate; - border-spacing: 10px; -} - -/** - * Styling for footnotes - */ - -table.footnote td, table.footnote th { - border: none; -} - -/** - * Top header logo and colors - */ -body div.top-logo-header { - text-align: left; - background-color: #a2bae8; - border-bottom: 8px solid #003399; - margin-top: 10px; - border-top: 1px solid #bbb; -} - -/** - * Footer colors - */ -body div.footer { - background-color: #6487dc; - border: none; - color: white; - text-align: center; -} -body div.footer a { - color: white; -} diff --git a/_theme/scipy/theme.conf b/_theme/scipy/theme.conf deleted file mode 100644 index e2f5ed848d..0000000000 --- a/_theme/scipy/theme.conf +++ /dev/null @@ -1,4 +0,0 @@ -[theme] -inherit = sphinxdoc -stylesheet = scipy.css -pygments_css = friendly diff --git a/conf.py b/conf.py index a561c55d56..03be1913b1 100644 --- a/conf.py +++ b/conf.py @@ -65,7 +65,7 @@ # List of directories, relative to source directory, that shouldn't be searched # for source files. -exclude_trees = [] +exclude_trees = ['scipy-sphinx-theme'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None @@ -97,10 +97,14 @@ # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +html_theme_options = { + 'sidebar': 'right', + 'rootlinks': [("http://scipy.org/", "Scipy.org")], + 'navigation_links': False, +} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ["_theme"] +html_theme_path = ["scipy-sphinx-theme/_theme"] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -117,12 +121,12 @@ # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None -html_favicon = 'favicon.ico' +html_favicon = '_static/favicon.ico' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['static'] +html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. @@ -133,7 +137,10 @@ #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -#html_sidebars = {} +html_sidebars = { + '**': ['sitenav.html', 'localtoc.html'], + 'index': ['sitenav.html'], +} # Additional templates that should be rendered to pages, maps page names to # template names. diff --git a/index.rst b/index.rst index 8847d8ea7d..b25f791402 100644 --- a/index.rst +++ b/index.rst @@ -1,14 +1,6 @@ -.. raw:: html - -
- -Scientific Computing Tools For Python -===================================== - -.. raw:: html - -
+NumPy +===== .. toctree:: :hidden: @@ -17,38 +9,6 @@ Scientific Computing Tools For Python old_array_packages -.. raw:: html - - - - - - - - - - - - - - - - - - -
- - Download - - Getting Started - - Documentation - - Bug Report - - Blog
DownloadGetting StartedDocumentationReport BugsRead the Blog
- - NumPy is the fundamental package for scientific computing with Python. It contains among other things: @@ -87,7 +47,7 @@ More Information .. raw:: html -
+
diff --git a/scipy-sphinx-theme b/scipy-sphinx-theme new file mode 160000 index 0000000000..0c0196105e --- /dev/null +++ b/scipy-sphinx-theme @@ -0,0 +1 @@ +Subproject commit 0c0196105ecf4df9f83a08808d77e8f984885202