diff options
author | Pauli Virtanen <pav@iki.fi> | 2013-07-24 18:43:41 +0300 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2013-07-25 14:58:05 +0300 |
commit | df2198336bf8a0e513ac8f32cddf8b10278520db (patch) | |
tree | 2997a46226b1400f4773f14ad6160d60c33718d9 | |
parent | 756dad2846b3ae531e6ebd94b6c0fe89b48f25c6 (diff) | |
download | numpy-df2198336bf8a0e513ac8f32cddf8b10278520db.tar.gz |
DOC: use the new scipy-sphinx-theme in the documentation
-rw-r--r-- | .gitmodules | 3 | ||||
m--------- | doc/scipy-sphinx-theme | 0 | ||||
-rw-r--r-- | doc/source/_static/scipy.css | 189 | ||||
-rw-r--r-- | doc/source/_templates/indexsidebar.html | 1 | ||||
-rw-r--r-- | doc/source/_templates/layout.html | 5 | ||||
-rw-r--r-- | doc/source/conf.py | 83 | ||||
-rw-r--r-- | doc/source/scipyshiny_small.png | bin | 18991 -> 0 bytes |
7 files changed, 41 insertions, 240 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..94d7be00b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "doc/scipy-sphinx-theme"] + path = doc/scipy-sphinx-theme + url = https://github.com/scipy/scipy-sphinx-theme.git diff --git a/doc/scipy-sphinx-theme b/doc/scipy-sphinx-theme new file mode 160000 +Subproject 65c59fe6a516e23db50ecb8ca160b9f9de12dc1 diff --git a/doc/source/_static/scipy.css b/doc/source/_static/scipy.css deleted file mode 100644 index 89984b67d..000000000 --- a/doc/source/_static/scipy.css +++ /dev/null @@ -1,189 +0,0 @@ -@import "default.css"; - -/** - * Spacing fixes - */ - -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 overflowing content in the sidebar */ -div.sphinxsidebarwrapper p.topless { - overflow: hidden; -} - -/** - * 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 h3 { - background-color: transparent; -} - -div.body h4 { - border: none; - background-color: transparent; -} - -/** - * Scipy colors - */ - -body { - background-color: rgb(100,135,220); -} - -div.document { - background-color: rgb(230,230,230); -} - -div.sphinxsidebar { - background-color: rgb(230,230,230); -} - -div.related { - background-color: rgb(100,135,220); -} - -div.sphinxsidebar h3 { - color: rgb(0,102,204); -} - -div.sphinxsidebar h3 a { - color: rgb(0,102,204); -} - -div.sphinxsidebar h4 { - color: rgb(0,82,194); -} - -div.sphinxsidebar p { - color: black; -} - -div.sphinxsidebar a { - color: #355f7c; -} - -div.sphinxsidebar ul.want-points { - list-style: disc; -} - -.field-list th { - color: rgb(0,102,204); - white-space: nowrap; -} - -/** - * 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; -} diff --git a/doc/source/_templates/indexsidebar.html b/doc/source/_templates/indexsidebar.html index 409743a03..9edb003af 100644 --- a/doc/source/_templates/indexsidebar.html +++ b/doc/source/_templates/indexsidebar.html @@ -1,5 +1,4 @@ <h3>Resources</h3> <ul> <li><a href="http://scipy.org/">Scipy.org website</a></li> - <li> </li> </ul> diff --git a/doc/source/_templates/layout.html b/doc/source/_templates/layout.html index 27798878e..77da54a00 100644 --- a/doc/source/_templates/layout.html +++ b/doc/source/_templates/layout.html @@ -1,6 +1,9 @@ {% extends "!layout.html" %} + {% block rootrellink %} -<li><a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}</li> + {% if pagename != 'index' %} + <li class="active"><a href="{{ pathto('index') }}">{{ shorttitle|e }}</a></li> + {% endif %} {% endblock %} {% block sidebarsearch %} diff --git a/doc/source/conf.py b/doc/source/conf.py index 42e46c4f8..233f2e409 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -30,9 +30,6 @@ templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' -# The master toctree document. -#master_doc = 'index' - # General substitutions. project = 'NumPy' copyright = '2008-2009, The Scipy community' @@ -83,62 +80,50 @@ pygments_style = 'sphinx' # HTML output # ----------------------------------------------------------------------------- -# The style sheet to use for HTML and HTML Help pages. A file of that name -# must exist either in Sphinx' static/ path, or in one of the custom paths -# given in html_static_path. -html_style = 'scipy.css' - -# The name for this set of Sphinx documents. If None, it defaults to -# "<project> v<release> documentation". -html_title = "%s v%s Manual (DRAFT)" % (project, version) +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": [("http://scipy.org/", "Scipy.org"), + ("http://docs.scipy.org/", "Docs")] + } +else: + # Default build + html_theme_options = { + "edit_link": False, + "sidebar": "left", + "scipy_org_logo": False, + "rootlinks": [] + } + html_sidebars = {'index': 'indexsidebar.html'} -# The name of an image file (within the static path) to place at the top of -# the sidebar. -html_logo = 'scipyshiny_small.png' +html_additional_pages = { + 'index': 'indexcontent.html', +} -# 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_title = "%s v%s Manual" % (project, version) html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. html_last_updated_fmt = '%b %d, %Y' -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -html_sidebars = { - 'index': 'indexsidebar.html' -} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -html_additional_pages = { - 'index': 'indexcontent.html', -} - -# If false, no module index is generated. +html_use_modindex = True +html_copy_source = False html_domain_indices = False +html_file_suffix = '.html' -# If true, the reST sources are included in the HTML build as _sources/<name>. -#html_copy_source = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a <link> tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# If nonempty, this is the file name suffix for HTML files (e.g. ".html"). -#html_file_suffix = '.html' - -# Output file base name for HTML help builder. htmlhelp_basename = 'numpy' -# Pngmath should try to align formulas properly pngmath_use_preview = True +pngmath_dvipng_args = ['-gamma', '1.5', '-D', '96', '-bg', 'Transparent'] # ----------------------------------------------------------------------------- diff --git a/doc/source/scipyshiny_small.png b/doc/source/scipyshiny_small.png Binary files differdeleted file mode 100644 index 7ef81a9e8..000000000 --- a/doc/source/scipyshiny_small.png +++ /dev/null |