You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2013/08/26 18:22:19 UTC

[3/6] git commit: updated refs/heads/1781-reorganize-and-improve-docs to 26d9c02

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/49d6be65
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/49d6be65
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/49d6be65

Branch: refs/heads/1781-reorganize-and-improve-docs
Commit: 49d6be6553fb1b49bc82f30ff7775b39f0aa9882
Parents: 9307664
Author: Alexander Shorin <kx...@apache.org>
Authored: Sun Aug 25 15:29:54 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Sun Aug 25 15:29:54 2013 +0400

----------------------------------------------------------------------
 NOTICE                                       |  4 ++
 share/doc/src/conf.py                        |  4 +-
 share/doc/templates/couchdb/domainindex.html | 49 +++++++++++++++++++++++
 share/doc/templates/couchdb/theme.conf       | 13 ++++++
 4 files changed, 69 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/49d6be65/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
index fb94ba1..b5a9da0 100644
--- a/NOTICE
+++ b/NOTICE
@@ -165,3 +165,7 @@ This product also includes the following third-party components:
  * share/doc/src/couchapp/views/joins.rst (Using View Collation)
 
    Copyright 2007, Christopher Lenz <cm...@gmail.com>
+
+ * share/doc/src/templates/couchdb/domainindex.html
+
+   Copyright 2007-2011 by the Sphinx team

http://git-wip-us.apache.org/repos/asf/couchdb/blob/49d6be65/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/49d6be65/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>&nbsp;</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 %}&nbsp;&nbsp;&nbsp;{% 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/49d6be65/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