diff options
Diffstat (limited to 'Doc/tools/templates')
-rw-r--r-- | Doc/tools/templates/download.html | 65 | ||||
-rw-r--r-- | Doc/tools/templates/indexcontent.html | 59 | ||||
-rw-r--r-- | Doc/tools/templates/indexsidebar.html | 18 | ||||
-rw-r--r-- | Doc/tools/templates/layout.html | 102 | ||||
-rw-r--r-- | Doc/tools/templates/opensearch.xml | 4 |
5 files changed, 248 insertions, 0 deletions
diff --git a/Doc/tools/templates/download.html b/Doc/tools/templates/download.html new file mode 100644 index 0000000..0550111 --- /dev/null +++ b/Doc/tools/templates/download.html @@ -0,0 +1,65 @@ +{% extends "layout.html" %} +{% set title = 'Download' %} +{% if daily is defined %} + {% set dlbase = pathto('archives', 1) %} +{% else %} + {% set dlbase = 'http://docs.python.org/ftp/python/doc/' + release %} +{% endif %} + +{% block body %} +<h1>Download Python {{ release }} Documentation</h1> + +{% if last_updated %}<p><b>Last updated on: {{ last_updated }}.</b></p>{% endif %} + +<p>To download an archive containing all the documents for this version of +Python in one of various formats, follow one of links in this table. The numbers +in the table are the size of the download files in megabytes.</p> + +<table class="docutils"> + <tr><th>Format</th><th>Packed as .zip</th><th>Packed as .tar.bz2</th></tr> + <tr><td>PDF (US-Letter paper size)</td> + <td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-letter.zip">Download</a> (ca. 8 MB)</td> + <td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-letter.tar.bz2">Download</a> (ca. 8 MB)</td> + </tr> + <tr><td>PDF (A4 paper size)</td> + <td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-a4.zip">Download</a> (ca. 8 MB)</td> + <td><a href="{{ dlbase }}/python-{{ release }}-docs-pdf-a4.tar.bz2">Download</a> (ca. 8 MB)</td> + </tr> + <tr><td>HTML</td> + <td><a href="{{ dlbase }}/python-{{ release }}-docs-html.zip">Download</a> (ca. 6 MB)</td> + <td><a href="{{ dlbase }}/python-{{ release }}-docs-html.tar.bz2">Download</a> (ca. 4 MB)</td> + </tr> + <tr><td>Plain Text</td> + <td><a href="{{ dlbase }}/python-{{ release }}-docs-text.zip">Download</a> (ca. 2 MB)</td> + <td><a href="{{ dlbase }}/python-{{ release }}-docs-text.tar.bz2">Download</a> (ca. 1.5 MB)</td> + </tr> + <tr><td>EPUB</td> + <td><a href="{{ dlbase }}/python-{{ release }}-docs.epub">Download</a> (ca. 4.5 MB)</td> + <td></td> + </tr> +</table> + +<p>These archives contain all the content in the documentation.</p> + +<p>HTML Help (<tt>.chm</tt>) files are made available in the "Windows" section +on the <a href="http://python.org/download/releases/{{ release[:5] }}/">Python +download page</a>.</p> + + +<h2>Unpacking</h2> + +<p>Unix users should download the .tar.bz2 archives; these are bzipped tar +archives and can be handled in the usual way using tar and the bzip2 +program. The <a href="http://www.info-zip.org">InfoZIP</a> unzip program can be +used to handle the ZIP archives if desired. The .tar.bz2 archives provide the +best compression and fastest download times.</p> + +<p>Windows users can use the ZIP archives since those are customary on that +platform. These are created on Unix using the InfoZIP zip program.</p> + + +<h2>Problems</h2> + +<p>If you have comments or suggestions for the Python documentation, please send +email to <a href="mailto:docs@python.org">docs@python.org</a>.</p> +{% endblock %} diff --git a/Doc/tools/templates/indexcontent.html b/Doc/tools/templates/indexcontent.html new file mode 100644 index 0000000..969099a --- /dev/null +++ b/Doc/tools/templates/indexcontent.html @@ -0,0 +1,59 @@ +{% extends "defindex.html" %} +{% block tables %} + <p><strong>Parts of the documentation:</strong></p> + <table class="contentstable" align="center"><tr> + <td width="50%"> + <p class="biglink"><a class="biglink" href="{{ pathto("whatsnew/" + version) }}">What's new in Python {{ version }}?</a><br/> + <span class="linkdescr">or <a href="{{ pathto("whatsnew/index") }}">all "What's new" documents</a> since 2.0</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("tutorial/index") }}">Tutorial</a><br/> + <span class="linkdescr">start here</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("library/index") }}">Library Reference</a><br/> + <span class="linkdescr">keep this under your pillow</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("reference/index") }}">Language Reference</a><br/> + <span class="linkdescr">describes syntax and language elements</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("using/index") }}">Python Setup and Usage</a><br/> + <span class="linkdescr">how to use Python on different platforms</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("howto/index") }}">Python HOWTOs</a><br/> + <span class="linkdescr">in-depth documents on specific topics</span></p> + </td><td width="50%"> + <p class="biglink"><a class="biglink" href="{{ pathto("installing/index") }}">Installing Python Modules</a><br/> + <span class="linkdescr">installing from the Python Package Index & other sources</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("distributing/index") }}">Distributing Python Modules</a><br/> + <span class="linkdescr">publishing modules for installation by others</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("extending/index") }}">Extending and Embedding</a><br/> + <span class="linkdescr">tutorial for C/C++ programmers</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("c-api/index") }}">Python/C API</a><br/> + <span class="linkdescr">reference for C/C++ programmers</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("faq/index") }}">FAQs</a><br/> + <span class="linkdescr">frequently asked questions (with answers!)</span></p> + </td></tr> + </table> + + <p><strong>Indices and tables:</strong></p> + <table class="contentstable" align="center"><tr> + <td width="50%"> + <p class="biglink"><a class="biglink" href="{{ pathto("py-modindex") }}">Global Module Index</a><br/> + <span class="linkdescr">quick access to all modules</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">General Index</a><br/> + <span class="linkdescr">all functions, classes, terms</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("glossary") }}">Glossary</a><br/> + <span class="linkdescr">the most important terms explained</span></p> + </td><td width="50%"> + <p class="biglink"><a class="biglink" href="{{ pathto("search") }}">Search page</a><br/> + <span class="linkdescr">search this documentation</span></p> + <p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">Complete Table of Contents</a><br/> + <span class="linkdescr">lists all sections and subsections</span></p> + </td></tr> + </table> + + <p><strong>Meta information:</strong></p> + <table class="contentstable" align="center"><tr> + <td width="50%"> + <p class="biglink"><a class="biglink" href="{{ pathto("bugs") }}">Reporting bugs</a></p> + <p class="biglink"><a class="biglink" href="{{ pathto("about") }}">About the documentation</a></p> + </td><td width="50%"> + <p class="biglink"><a class="biglink" href="{{ pathto("license") }}">History and License of Python</a></p> + <p class="biglink"><a class="biglink" href="{{ pathto("copyright") }}">Copyright</a></p> + </td></tr> + </table> +{% endblock %} diff --git a/Doc/tools/templates/indexsidebar.html b/Doc/tools/templates/indexsidebar.html new file mode 100644 index 0000000..83ba123 --- /dev/null +++ b/Doc/tools/templates/indexsidebar.html @@ -0,0 +1,18 @@ +<h3>Download</h3> +<p><a href="{{ pathto('download') }}">Download these documents</a></p> +<h3>Docs for other versions</h3> +<ul> + <li><a href="http://docs.python.org/2.7/">Python 2.7 (stable)</a></li> + <li><a href="http://docs.python.org/3.3/">Python 3.3 (stable)</a></li> + <li><a href="http://docs.python.org/3.5/">Python 3.5 (in development)</a></li> + <li><a href="http://www.python.org/doc/versions/">Old versions</a></li> +</ul> + +<h3>Other resources</h3> +<ul> + {# XXX: many of these should probably be merged in the main docs #} + <li><a href="http://www.python.org/dev/peps/">PEP Index</a></li> + <li><a href="http://wiki.python.org/moin/BeginnersGuide">Beginner's Guide</a></li> + <li><a href="http://wiki.python.org/moin/PythonBooks">Book List</a></li> + <li><a href="http://www.python.org/doc/av/">Audio/Visual Talks</a></li> +</ul> diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html new file mode 100644 index 0000000..d3b2801 --- /dev/null +++ b/Doc/tools/templates/layout.html @@ -0,0 +1,102 @@ +{% extends "!layout.html" %} +{% block rootrellink %} + <li><img src="{{ pathto('_static/py.png', 1) }}" alt="" + style="vertical-align: middle; margin-top: -1px"/></li> + <li><a href="http://www.python.org/">Python</a>{{ reldelim1 }}</li> + <li> + {%- if versionswitcher is defined %} + <span class="version_switcher_placeholder">{{ release }}</span> + <a href="{{ pathto('index') }}">Documentation</a>{{ reldelim1 }} + {%- else %} + <a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }} + {%- endif %} + </li> +{% endblock %} +{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} +{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} +{% block extrahead %} + <link rel="shortcut icon" type="image/png" href="{{ pathto('_static/py.png', 1) }}" /> + {% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %} + {% if versionswitcher is defined and not embedded %}<script type="text/javascript" src="{{ pathto('_static/version_switch.js', 1) }}"></script>{% endif %} + {% if pagename == 'whatsnew/changelog' %} + <script type="text/javascript"> + $(document).ready(function() { + // add the search form and bind the events + $('h1').after([ + '<p>Filter entries by content:', + '<input type="text" value="" id="searchbox" style="width: 50%">', + '<input type="submit" id="searchbox-submit" value="Filter"></p>' + ].join('\n')); + + function dofilter() { + try { + var query = new RegExp($('#searchbox').val(), 'i'); + } + catch (e) { + return; // not a valid regex (yet) + } + // find headers for the versions (What's new in Python X.Y.Z?) + $('#changelog h2').each(function(index1, h2) { + var h2_parent = $(h2).parent(); + var sections_found = 0; + // find headers for the sections (Core, Library, etc.) + h2_parent.find('h3').each(function(index2, h3) { + var h3_parent = $(h3).parent(); + var entries_found = 0; + // find all the entries + h3_parent.find('li').each(function(index3, li) { + var li = $(li); + // check if the query matches the entry + if (query.test(li.text())) { + li.show(); + entries_found++; + } + else { + li.hide(); + } + }); + // if there are entries, show the section, otherwise hide it + if (entries_found > 0) { + h3_parent.show(); + sections_found++; + } + else { + h3_parent.hide(); + } + }); + if (sections_found > 0) + h2_parent.show(); + else + h2_parent.hide(); + }); + } + $('#searchbox').keyup(dofilter); + $('#searchbox-submit').click(dofilter); + }); + </script> + {% endif %} +{{ super() }} +{% endblock %} +{% block footer %} + <div class="footer"> + © <a href="{{ pathto('copyright') }}">Copyright</a> {{ copyright|e }}. + <br /> + The Python Software Foundation is a non-profit corporation. + <a href="http://www.python.org/psf/donations/">Please donate.</a> + <br /> + Last updated on {{ last_updated|e }}. + <a href="{{ pathto('bugs') }}">Found a bug</a>? + <br /> + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version|e }}. + </div> +{% endblock %} +{% block sidebarsourcelink %} +{%- if show_source and has_source and sourcename %} +<h3>{{ _('This Page') }}</h3> +<ul class="this-page-menu"> + <li><a href="{{ pathto('bugs') }}">Report a Bug</a></li> + <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}" + rel="nofollow">Show Source</a></li> +</ul> +{%- endif %} +{% endblock %} diff --git a/Doc/tools/templates/opensearch.xml b/Doc/tools/templates/opensearch.xml new file mode 100644 index 0000000..69cec80 --- /dev/null +++ b/Doc/tools/templates/opensearch.xml @@ -0,0 +1,4 @@ +{% extends "!opensearch.xml" %} +{% block extra -%} +<Image height="16" width="16" type="image/x-icon">http://www.python.org/images/favicon16x16.ico</Image> +{%- endblock %} |