diff options
Diffstat (limited to 'doc/build/templates/layout.mako')
-rw-r--r-- | doc/build/templates/layout.mako | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/doc/build/templates/layout.mako b/doc/build/templates/layout.mako index ba3e81c01..a879fa481 100644 --- a/doc/build/templates/layout.mako +++ b/doc/build/templates/layout.mako @@ -2,13 +2,19 @@ <%! local_script_files = [] + + default_css_files = [ + '_static/pygments.css', + '_static/docs.css', + ] %> + <%doc> Structural elements are all prefixed with "docs-" - to prevent conflicts when the structure is integrated into the + to prevent conflicts when the structure is integrated into the main site. - + docs-container -> docs-header -> docs-search @@ -31,16 +37,19 @@ withsidebar = bool(toc) and current_page_name != 'index' <%block name="head_title"> % if current_page_name != 'index': - ${capture(self.show_title) | util.striptags} — + ${capture(self.show_title) | util.striptags} — % endif ${docstitle|h} </%block> <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" /> + + ${parent.headers()} + + <!-- begin layout.mako headers --> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { @@ -50,9 +59,13 @@ withsidebar = bool(toc) and current_page_name != 'index' FILE_SUFFIX: '${file_suffix}' }; </script> + + <!-- begin iterate through sphinx environment script_files --> % for scriptfile in script_files + self.attr.local_script_files: <script type="text/javascript" src="${pathto(scriptfile, 1)}"></script> % endfor + <!-- end iterate through sphinx environment script_files --> + <script type="text/javascript" src="${pathto('_static/init.js', 1)}"></script> % if hasdoc('about'): <link rel="author" title="${_('About these documents')}" href="${pathto('about')}" /> @@ -72,6 +85,8 @@ withsidebar = bool(toc) and current_page_name != 'index' % if prevtopic: <link rel="prev" title="${prevtopic['title']|util.striptags}" href="${prevtopic['link']|h}" /> % endif + <!-- end layout.mako headers --> + </%block> <div id="docs-header"> @@ -129,7 +144,7 @@ withsidebar = bool(toc) and current_page_name != 'index' % endfor % endif % if current_page_name != 'index': - » ${self.show_title()} + » ${self.show_title()} % endif <h2> |