From fbf5eb630919ded28119eaa470d248670b7b78b6 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sat, 20 Aug 2016 13:21:47 +0100 Subject: [PATCH] Remove other unnecessary files and drop the templates, but use the static files. --- doc/source/conf.py | 4 +- doc/source/tools/static/py.png | Bin 695 -> 0 bytes doc/source/tools/static/version_switch.js | 68 ------------- doc/source/tools/templates/download.html | 65 ------------ doc/source/tools/templates/indexcontent.html | 59 ----------- doc/source/tools/templates/indexsidebar.html | 17 ---- doc/source/tools/templates/layout.html | 102 ------------------- doc/source/tools/templates/opensearch.xml | 4 - 8 files changed, 2 insertions(+), 317 deletions(-) delete mode 100644 doc/source/tools/static/py.png delete mode 100644 doc/source/tools/static/version_switch.js delete mode 100644 doc/source/tools/templates/download.html delete mode 100644 doc/source/tools/templates/indexcontent.html delete mode 100644 doc/source/tools/templates/indexsidebar.html delete mode 100644 doc/source/tools/templates/layout.html delete mode 100644 doc/source/tools/templates/opensearch.xml diff --git a/doc/source/conf.py b/doc/source/conf.py index c5f096f62..83ba0775d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -38,7 +38,7 @@ extensions = [ ] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates', 'tools/templates'] +templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -137,7 +137,7 @@ html_theme_options = {'collapsiblesidebar': True} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ['_static', 'tools/static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied diff --git a/doc/source/tools/static/py.png b/doc/source/tools/static/py.png deleted file mode 100644 index 93e4a02c3d321c545898a2ebb8873c26dd8a9e5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 695 zcmV;o0!aOdP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iOD~ z5jY_RGbdgE00K8jL_t(I%Vm>KNL4`;hrfH@vv+$Uln|xSCTLTOHmzE;5FTwpDtJ)a zz)exE-2_34AR^i+ZCXeh7m*-F5k*FrmbSHs%rX_!{PXUec{69`w(#D(>Vd<+%=bIz zH_V)XUD5sE?K5ebbKaSDu}#Dnq^Y!3`tis9>wSO*T+WBP3wS3NNBU~*PAtw^yjZ+< zQ5yK0z%d{y@_Pz6YdL>s7$6Y^hI$}5GUX?Ns>+iCUiRP z7h|*&%kQa?wQA%pYzqpaf*4?WM!x_ygY0K@07rplx^QhGhnE)r4wbx0x11<&3V?63 z=F8ch)p6iQ88E;iumPmSZif%JIwIgKh$T3)*ab8ImGLVf;IoYtVAb11Z&@wm>96=S z)!B&hojbAPoik&f)Lp;=N!HK;X~5oyfJ49$pbcorTyADv dm$H!t;2#0MumAjv0Ga>*002ovPDHLkV1gIiH5UK? diff --git a/doc/source/tools/static/version_switch.js b/doc/source/tools/static/version_switch.js deleted file mode 100644 index 7289a4d01..000000000 --- a/doc/source/tools/static/version_switch.js +++ /dev/null @@ -1,68 +0,0 @@ -(function() { - 'use strict'; - - var all_versions = { - '3.6': 'dev (3.6)', - '3.5': '3.5', - '3.4': '3.4', - '3.3': '3.3', - '3.2': '3.2', - '2.7': '2.7', - '2.6': '2.6' - }; - - function build_select(current_version, current_release) { - var buf = [''); - return buf.join(''); - } - - function patch_url(url, new_version) { - var url_re = /\.org\/(\d|py3k|dev|((release\/)?\d\.\d[\w\d\.]*))\//, - new_url = url.replace(url_re, '.org/' + new_version + '/'); - - if (new_url == url && !new_url.match(url_re)) { - // python 2 url without version? - new_url = url.replace(/\.org\//, '.org/' + new_version + '/'); - } - return new_url; - } - - function on_switch() { - var selected = $(this).children('option:selected').attr('value'); - - var url = window.location.href, - new_url = patch_url(url, selected); - - if (new_url != url) { - // check beforehand if url exists, else redirect to version's start page - $.ajax({ - url: new_url, - success: function() { - window.location.href = new_url; - }, - error: function() { - window.location.href = 'https://docs.python.org/' + selected; - } - }); - } - } - - $(document).ready(function() { - var release = DOCUMENTATION_OPTIONS.VERSION; - var version = release.substr(0, 3); - var select = build_select(version, release); - - $('.version_switcher_placeholder').html(select); - $('.version_switcher_placeholder select').bind('change', on_switch); - }); -})(); diff --git a/doc/source/tools/templates/download.html b/doc/source/tools/templates/download.html deleted file mode 100644 index de84ae3ab..000000000 --- a/doc/source/tools/templates/download.html +++ /dev/null @@ -1,65 +0,0 @@ -{% extends "layout.html" %} -{% set title = 'Download' %} -{% if daily is defined %} - {% set dlbase = pathto('archives', 1) %} -{% else %} - {% set dlbase = 'https://docs.python.org/ftp/python/doc/' + release %} -{% endif %} - -{% block body %} -

Download Python {{ release }} Documentation

- -{% if last_updated %}

Last updated on: {{ last_updated }}.

{% endif %} - -

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.

- - - - - - - - - - - - - - - - - - - - - - - -
FormatPacked as .zipPacked as .tar.bz2
PDF (US-Letter paper size)Download (ca. 8 MB)Download (ca. 8 MB)
PDF (A4 paper size)Download (ca. 8 MB)Download (ca. 8 MB)
HTMLDownload (ca. 6 MB)Download (ca. 4 MB)
Plain TextDownload (ca. 2 MB)Download (ca. 1.5 MB)
EPUBDownload (ca. 4.5 MB)
- -

These archives contain all the content in the documentation.

- -

HTML Help (.chm) files are made available in the "Windows" section -on the Python -download page.

- - -

Unpacking

- -

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 InfoZIP unzip program can be -used to handle the ZIP archives if desired. The .tar.bz2 archives provide the -best compression and fastest download times.

- -

Windows users can use the ZIP archives since those are customary on that -platform. These are created on Unix using the InfoZIP zip program.

- - -

Problems

- -

If you have comments or suggestions for the Python documentation, please send -email to docs@python.org.

-{% endblock %} diff --git a/doc/source/tools/templates/indexcontent.html b/doc/source/tools/templates/indexcontent.html deleted file mode 100644 index 1076c1f51..000000000 --- a/doc/source/tools/templates/indexcontent.html +++ /dev/null @@ -1,59 +0,0 @@ -{% extends "defindex.html" %} -{% block tables %} -

{% trans %}Parts of the documentation:{% endtrans %}

- - -
- - - - - - - - - - - - -
- -

{% trans %}Indices and tables:{% endtrans %}

- - -
- - - - - - -
- -

{% trans %}Meta information:{% endtrans %}

- - -
- - - - - -
-{% endblock %} diff --git a/doc/source/tools/templates/indexsidebar.html b/doc/source/tools/templates/indexsidebar.html deleted file mode 100644 index bb449ef1c..000000000 --- a/doc/source/tools/templates/indexsidebar.html +++ /dev/null @@ -1,17 +0,0 @@ -

{% trans %}Download{% endtrans %}

-

{% trans %}Download these documents{% endtrans %}

-

{% trans %}Docs for other versions{% endtrans %}

- - -

{% trans %}Other resources{% endtrans %}

- diff --git a/doc/source/tools/templates/layout.html b/doc/source/tools/templates/layout.html deleted file mode 100644 index 1887b85b6..000000000 --- a/doc/source/tools/templates/layout.html +++ /dev/null @@ -1,102 +0,0 @@ -{% extends "!layout.html" %} -{% block rootrellink %} -
  • -
  • Python{{ reldelim1 }}
  • -
  • - {%- if versionswitcher is defined %} - {{ release }} - {% trans %}Documentation {% endtrans %}{{ reldelim1 }} - {%- else %} - {{ shorttitle }}{{ reldelim1 }} - {%- endif %} -
  • -{% endblock %} -{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} -{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} -{% block extrahead %} - - {% if not embedded %}{% endif %} - {% if versionswitcher is defined and not embedded %}{% endif %} - {% if pagename == 'whatsnew/changelog' and not embedded %} - - {% endif %} -{{ super() }} -{% endblock %} -{% block footer %} - -{% endblock %} -{% block sidebarsourcelink %} -{%- if show_source and has_source and sourcename %} -

    {{ _('This Page') }}

    - -{%- endif %} -{% endblock %} diff --git a/doc/source/tools/templates/opensearch.xml b/doc/source/tools/templates/opensearch.xml deleted file mode 100644 index 7a5cdddd2..000000000 --- a/doc/source/tools/templates/opensearch.xml +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "!opensearch.xml" %} -{% block extra -%} -https://www.python.org/images/favicon16x16.ico -{%- endblock %}