Use own template to override the defaults. Make HTTP API Index page looks nicer without top flat index. May be one day we'll redesign docs to fit main site/fauxton style.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/fe79a4dc Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/fe79a4dc Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/fe79a4dc Branch: refs/heads/master Commit: fe79a4dcab08052ebaba3630e118b3fb5879143d Parents: 1e23d25 Author: Alexander Shorin <[email protected]> Authored: Sun Aug 25 15:29:54 2013 +0400 Committer: Alexander Shorin <[email protected]> Committed: Fri Sep 27 22:01:47 2013 +0400 ---------------------------------------------------------------------- NOTICE | 3 ++ share/doc/src/conf.py | 4 +- share/doc/templates/couchdb/domainindex.html | 49 +++++++++++++++++++++++ share/doc/templates/couchdb/theme.conf | 13 ++++++ 4 files changed, 68 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/fe79a4dc/NOTICE ---------------------------------------------------------------------- diff --git a/NOTICE b/NOTICE index da1b6d4..6a41c6c 100644 --- a/NOTICE +++ b/NOTICE @@ -186,3 +186,6 @@ This product also includes the following third-party components: Copyright 2007, Christopher Lenz <[email protected]> + * share/doc/src/templates/couchdb/domainindex.html + + Copyright 2007-2011 by the Sphinx team http://git-wip-us.apache.org/repos/asf/couchdb/blob/fe79a4dc/share/doc/src/conf.py ---------------------------------------------------------------------- diff --git a/share/doc/src/conf.py b/share/doc/src/conf.py index 9606213..3e6d5a3 100644 --- a/share/doc/src/conf.py +++ b/share/doc/src/conf.py @@ -64,7 +64,9 @@ highlight_language = "json" pygments_style = "sphinx" -html_theme = "default" +html_theme = "couchdb" + +html_theme_path = ['../templates'] templates_path = ["../templates"] http://git-wip-us.apache.org/repos/asf/couchdb/blob/fe79a4dc/share/doc/templates/couchdb/domainindex.html ---------------------------------------------------------------------- diff --git a/share/doc/templates/couchdb/domainindex.html b/share/doc/templates/couchdb/domainindex.html new file mode 100644 index 0000000..38ff144 --- /dev/null +++ b/share/doc/templates/couchdb/domainindex.html @@ -0,0 +1,49 @@ +{# + basic/domainindex.html + ~~~~~~~~~~~~~~~~~~~~~~ + + Template for domain indices (module index, ...). + + :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{% extends "layout.html" %} +{% set title = indextitle %} +{% block extrahead %} +{{ super() }} +{% if not embedded and collapse_index %} + <script type="text/javascript"> + DOCUMENTATION_OPTIONS.COLLAPSE_INDEX = true; + </script> +{% endif %} +{% endblock %} +{% block body %} + + {%- set groupid = idgen() %} + + <h1>{{ indextitle }}</h1> + + <table class="indextable modindextable" cellspacing="0" cellpadding="2"> + {%- for letter, entries in content %} + <tr class="pcap"><td></td><td> </td><td></td></tr> + <tr class="cap" id="cap-{{ letter }}"><td></td><td> + <strong>{{ letter }}</strong></td><td></td></tr> + {%- for (name, grouptype, page, anchor, extra, qualifier, description) + in entries %} + <tr{% if grouptype == 2 %} class="cg-{{ groupid.current() }}"{% endif %}> + <td>{% if grouptype == 1 -%} + <img src="{{ pathto('_static/minus.png', 1) }}" class="toggler" + id="toggle-{{ groupid.next() }}" style="display: none" alt="-" /> + {%- endif %}</td> + <td>{% if grouptype == 2 %} {% endif %} + {% if page %}<a href="{{ pathto(page) }}#{{ anchor }}">{% endif -%} + <tt class="xref">{{ name|e }}</tt> + {%- if page %}</a>{% endif %} + {%- if extra %} <em>({{ extra|e }})</em>{% endif -%} + </td><td>{% if qualifier %}<strong>{{ qualifier|e }}:</strong>{% endif %} + <em>{{ description|e }}</em></td></tr> + {%- endfor %} + {%- endfor %} + </table> + +{% endblock %} http://git-wip-us.apache.org/repos/asf/couchdb/blob/fe79a4dc/share/doc/templates/couchdb/theme.conf ---------------------------------------------------------------------- diff --git a/share/doc/templates/couchdb/theme.conf b/share/doc/templates/couchdb/theme.conf new file mode 100644 index 0000000..546fca0 --- /dev/null +++ b/share/doc/templates/couchdb/theme.conf @@ -0,0 +1,13 @@ +; Licensed under the Apache License, Version 2.0 (the "License"); you may not use +; this file except in compliance with the License. You may obtain a copy of the +; License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software distributed +; under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +; CONDITIONS OF ANY KIND, either express or implied. See the License for the +; specific language governing permissions and limitations under the License. + +[theme] +inherit = default
