summaryrefslogtreecommitdiff
path: root/doc/build/templates/layout.mako
diff options
context:
space:
mode:
Diffstat (limited to 'doc/build/templates/layout.mako')
-rw-r--r--doc/build/templates/layout.mako222
1 files changed, 143 insertions, 79 deletions
diff --git a/doc/build/templates/layout.mako b/doc/build/templates/layout.mako
index 59c3f07..5f21ef9 100644
--- a/doc/build/templates/layout.mako
+++ b/doc/build/templates/layout.mako
@@ -1,6 +1,32 @@
## coding: utf-8
+
+<%doc>
+ Structural elements are all prefixed with "docs-"
+ to prevent conflicts when the structure is integrated into the
+ main site.
+
+ docs-container ->
+ docs-header ->
+ docs-search
+ docs-version-header
+ docs-top-navigation
+ docs-top-page-control
+ docs-navigation-banner
+ docs-body-container ->
+ docs-sidebar
+ docs-body
+ docs-bottom-navigation
+ docs-copyright
+</%doc>
+
<%inherit file="${context['mako_layout']}"/>
+<%
+withsidebar = bool(toc) and current_page_name != 'index'
+%>
+
+<div id="docs-container">
+
<%block name="headers">
<link rel="stylesheet" href="${pathto('_static/pygments.css', 1)}" type="text/css" />
<link rel="stylesheet" href="${pathto('_static/docs.css', 1)}" type="text/css" />
@@ -35,95 +61,133 @@
% if prevtopic:
<link rel="prev" title="${prevtopic['title']|util.striptags}" href="${prevtopic['link']|h}" />
% endif
-
- <%block name="extrahead">
- </%block>
</%block>
- <h1>${docstitle|h}</h1>
+<div id="docs-header">
+ <h1>${docstitle|h}</h1>
- <div id="search">
- Search:
- <form class="search" action="${pathto('search')}" method="get">
- <input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- </div>
+ <div id="docs-search">
+ Search:
+ <form class="search" action="${pathto('search')}" method="get">
+ <input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ </div>
- <div class="versionheader">
- Version: <span class="versionnum">${release}</span> Last Updated: ${last_updated}
- </div>
- <div class="clearboth"></div>
-
- <div class="topnav">
- <div id="pagecontrol">
- <a href="${pathto('genindex')}">Index</a>
-
- % if sourcename:
- <div class="sourcelink">(<a href="${pathto('_sources/' + sourcename, True)|h}">${_('view source')})</div>
- % endif
- </div>
-
- <div class="navbanner">
- <a class="totoc" href="${pathto(master_doc)}">Table of Contents</a>
- % if parents:
- % for parent in parents:
- » <a href="${parent['link']|h}" title="${parent['title']}">${parent['title']}</a>
- % endfor
- % endif
- % if current_page_name != master_doc:
- » ${self.show_title()}
- % endif
-
- ${prevnext()}
- <h2>
- <%block name="show_title" filter="util.striptags">
- % if title:
- ${title}
- % endif
- </%block>
- </h2>
- </div>
- % if display_toc and not current_page_name.startswith('index'):
- ${toc}
+ <div id="docs-version-header">
+ Release: <span class="version-num">${release}</span>
+
+ </div>
+
+</div>
+
+<div id="docs-top-navigation">
+ <div id="docs-top-page-control" class="docs-navigation-links">
+ <ul>
+ % if prevtopic:
+ <li>Prev:
+ <a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
+ </li>
+ % endif
+ % if nexttopic:
+ <li>Next:
+ <a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
+ </li>
+ % endif
+
+ <li>
+ <a href="${pathto('index')}">Table of Contents</a> |
+ <a href="${pathto('genindex')}">Index</a>
+ % if sourcename:
+ | <a href="${pathto('_sources/' + sourcename, True)|h}">${_('view source')}
% endif
- <div class="clearboth"></div>
- </div>
-
- <div class="document">
- <div class="body">
- ${next.body()}
- </div>
- </div>
+ </li>
+ </ul>
+ </div>
+
+ <div id="docs-navigation-banner">
+ <a href="${pathto('index')}">${docstitle|h}</a>
+ % if parents:
+ % for parent in parents:
+ » <a href="${parent['link']|h}" title="${parent['title']}">${parent['title']}</a>
+ % endfor
+ % endif
+ % if current_page_name != 'index':
+ » ${self.show_title()}
+ % endif
+
+ <h2>
+ <%block name="show_title">
+ % if title:
+ ${title}
+ % endif
+ </%block>
+ </h2>
+ </div>
+
+</div>
+
+<div id="docs-body-container">
+
+% if withsidebar:
+ <div id="docs-sidebar">
+ <h3><a href="${pathto('index')}">Table of Contents</a></h3>
+ ${toc}
- <%block name="footer">
- <div class="bottomnav">
- ${prevnext()}
- <div class="doc_copyright">
- % if hasdoc('copyright'):
- &copy; <a href="${pathto('copyright')}">Copyright</a> ${copyright|h}.
- % else:
- &copy; Copyright ${copyright|h}.
- % endif
- % if show_sphinx:
- Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> ${sphinx_version|h}.
- % endif
- </div>
- </div>
- </%block>
-
-<%def name="prevnext()">
-<div class="prevnext">
% if prevtopic:
- Previous:
- <a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
+ <h4>Previous Topic</h4>
+ <p>
+ <a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
+ </p>
% endif
% if nexttopic:
- Next:
- <a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
+ <h4>Next Topic</h4>
+ <p>
+ <a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
+ </p>
% endif
+
+ <h4>Quick Search</h4>
+ <p>
+ <form class="search" action="${pathto('search')}" method="get">
+ <input type="text" name="q" size="18" /> <input type="submit" value="${_('Search')}" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ </p>
+
+ </div>
+% endif
+
+ <div id="docs-body" class="${'withsidebar' if withsidebar else ''}" >
+ ${next.body()}
+ </div>
+
</div>
-</%def>
+<%block name="footer">
+ <div id="docs-bottom-navigation" class="docs-navigation-links">
+ % if prevtopic:
+ Previous:
+ <a href="${prevtopic['link']|h}" title="${_('previous chapter')}">${prevtopic['title']}</a>
+ % endif
+ % if nexttopic:
+ Next:
+ <a href="${nexttopic['link']|h}" title="${_('next chapter')}">${nexttopic['title']}</a>
+ % endif
+ <div id="docs-copyright">
+ % if hasdoc('copyright'):
+ &copy; <a href="${pathto('copyright')}">Copyright</a> ${copyright|h}.
+ % else:
+ &copy; Copyright ${copyright|h}.
+ % endif
+ % if show_sphinx:
+ Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> ${sphinx_version|h}.
+ % endif
+ </div>
+ </div>
+</%block>
+
+</div>