| <%! |
| from mako.ext.autohandler import autohandler |
| %> |
| <%inherit file="${autohandler(template, context)}"/> |
| <%page cached="False" cache_key="${self.filename}"/> |
| |
| <%def name="style()"> |
| ${parent.style()} |
| <link rel="stylesheet" href="docs.css"></link> |
| </%def> |
| |
| # base.html - common to all documentation pages. intentionally separate |
| # from autohandler, which can be swapped out for a different one |
| <% |
| # bootstrap TOC structure from request args, or pickled file if not present. |
| import cPickle as pickle |
| import os, time |
| print "%s generating from table of contents for file %s" % (local.filename, self.filename) |
| toc = context.get('toc') |
| if toc is None: |
| filename = os.path.join(os.path.dirname(self.filename), 'table_of_contents.pickle') |
| toc = pickle.load(file(filename)) |
| version = toc.version |
| last_updated = toc.last_updated |
| |
| if paged is UNDEFINED: |
| ispaged = True |
| else: |
| ispaged = paged |
| %> |
| |
| <div id="topanchor"><a name="top"></a> </div> |
| |
| <div id="pagecontrol"><a href="index.${extension}">Multiple Pages</a> | <a href="documentation.${extension}">One Page</a></div> |
| |
| <h1>${toc.root.doctitle}</h1> |
| |
| <div class="versionheader">Version: ${version} Last Updated: ${time.strftime('%x %X', time.localtime(last_updated))}</div> |
| |
| ${next.body(toc=toc, paged=ispaged)} |
| |
| |
| |