annotate Doc/tools/sphinxext/layout.html @ 79691:05c8928362ee

Merge __next__ method link fixes with 3.3.
author Ezio Melotti <ezio.melotti@gmail.com>
date Fri, 12 Oct 2012 13:46:37 +0300
parents e9c28d6983f4
children 9505a34b4484
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
46648
5bb94065b079 Merge OpenSearch-related changes.
Georg Brandl <georg@python.org>
parents:
diff changeset
1 {% extends "!layout.html" %}
5bb94065b079 Merge OpenSearch-related changes.
Georg Brandl <georg@python.org>
parents:
diff changeset
2 {% block rootrellink %}
50078
63ee6a0f7358 Manual merge of r67636 from py3k branch:
Georg Brandl <georg@python.org>
parents: 49493
diff changeset
3 <li><img src="{{ pathto('_static/py.png', 1) }}" alt=""
63ee6a0f7358 Manual merge of r67636 from py3k branch:
Georg Brandl <georg@python.org>
parents: 49493
diff changeset
4 style="vertical-align: middle; margin-top: -1px"/></li>
75932
ca0230c21c79 Switch to new "lighter" doc design.
Georg Brandl <georg@python.org>
parents: 75813
diff changeset
5 <li><a href="http://www.python.org/">Python</a>{{ reldelim1 }}</li>
50078
63ee6a0f7358 Manual merge of r67636 from py3k branch:
Georg Brandl <georg@python.org>
parents: 49493
diff changeset
6 <li><a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}</li>
46648
5bb94065b079 Merge OpenSearch-related changes.
Georg Brandl <georg@python.org>
parents:
diff changeset
7 {% endblock %}
50078
63ee6a0f7358 Manual merge of r67636 from py3k branch:
Georg Brandl <georg@python.org>
parents: 49493
diff changeset
8 {% block extrahead %}
63ee6a0f7358 Manual merge of r67636 from py3k branch:
Georg Brandl <georg@python.org>
parents: 49493
diff changeset
9 <link rel="shortcut icon" type="image/png" href="{{ pathto('_static/py.png', 1) }}" />
75813
b585c33077d2 #14114: don't include copybutton.js in the htmlhelp output.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 73196
diff changeset
10 {% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %}
79375
735bfdb1fbb0 Fix template syntax.
Georg Brandl <georg@python.org>
parents: 79371
diff changeset
11 {% if pagename == 'whatsnew/changelog' %}
79321
6347fb67239a Add a filterable HTML version of Misc/NEWS to the docs "whatsnew" section.
Georg Brandl <georg@python.org>
parents: 75932
diff changeset
12 <script type="text/javascript">
79391
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
13 $(document).ready(function() {
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
14 // add the search form and bind the events
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
15 $('h1').after([
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
16 '<p>Filter entries by content:',
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
17 '<input type="text" value="" id="searchbox" style="width: 50%">',
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
18 '<input type="submit" id="searchbox-submit" value="Filter"></p>'
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
19 ].join('\n'));
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
20
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
21 function dofilter() {
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
22 try {
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
23 var query = new RegExp($('#searchbox').val(), 'i');
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
24 }
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
25 catch (e) {
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
26 return; // not a valid regex (yet)
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
27 }
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
28 // find headers for the versions (What's new in Python X.Y.Z?)
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
29 $('#changelog h2').each(function(index1, h2) {
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
30 var h2_parent = $(h2).parent();
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
31 var sections_found = 0;
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
32 // find headers for the sections (Core, Library, etc.)
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
33 h2_parent.find('h3').each(function(index2, h3) {
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
34 var h3_parent = $(h3).parent();
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
35 var entries_found = 0;
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
36 // find all the entries
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
37 h3_parent.find('li').each(function(index3, li) {
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
38 var li = $(li);
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
39 // check if the query matches the entry
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
40 if (query.test(li.text())) {
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
41 li.show();
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
42 entries_found++;
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
43 }
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
44 else {
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
45 li.hide();
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
46 }
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
47 });
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
48 // if there are entries, show the section, otherwise hide it
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
49 if (entries_found > 0) {
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
50 h3_parent.show();
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
51 sections_found++;
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
52 }
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
53 else {
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
54 h3_parent.hide();
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
55 }
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
56 });
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
57 if (sections_found > 0)
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
58 h2_parent.show();
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
59 else
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
60 h2_parent.hide();
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
61 });
79321
6347fb67239a Add a filterable HTML version of Misc/NEWS to the docs "whatsnew" section.
Georg Brandl <georg@python.org>
parents: 75932
diff changeset
62 }
79391
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
63 $('#searchbox').keyup(dofilter);
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
64 $('#searchbox-submit').click(dofilter);
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
65 });
79321
6347fb67239a Add a filterable HTML version of Misc/NEWS to the docs "whatsnew" section.
Georg Brandl <georg@python.org>
parents: 75932
diff changeset
66 </script>
6347fb67239a Add a filterable HTML version of Misc/NEWS to the docs "whatsnew" section.
Georg Brandl <georg@python.org>
parents: 75932
diff changeset
67 {% endif %}
50078
63ee6a0f7358 Manual merge of r67636 from py3k branch:
Georg Brandl <georg@python.org>
parents: 49493
diff changeset
68 {{ super() }}
63ee6a0f7358 Manual merge of r67636 from py3k branch:
Georg Brandl <georg@python.org>
parents: 49493
diff changeset
69 {% endblock %}
55545
3ff1725f837e Merged revisions 74309 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50078
diff changeset
70 {% block footer %}
3ff1725f837e Merged revisions 74309 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50078
diff changeset
71 <div class="footer">
3ff1725f837e Merged revisions 74309 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50078
diff changeset
72 &copy; <a href="{{ pathto('copyright') }}">Copyright</a> {{ copyright|e }}.
3ff1725f837e Merged revisions 74309 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50078
diff changeset
73 <br />
79391
e9c28d6983f4 Fix/improve the changelog filtering.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 79375
diff changeset
74 The Python Software Foundation is a non-profit corporation.
55545
3ff1725f837e Merged revisions 74309 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50078
diff changeset
75 <a href="http://www.python.org/psf/donations/">Please donate.</a>
3ff1725f837e Merged revisions 74309 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50078
diff changeset
76 <br />
3ff1725f837e Merged revisions 74309 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50078
diff changeset
77 Last updated on {{ last_updated|e }}.
60881
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
78 <a href="{{ pathto('bugs') }}">Found a bug</a>?
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
79 <br />
55545
3ff1725f837e Merged revisions 74309 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50078
diff changeset
80 Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version|e }}.
3ff1725f837e Merged revisions 74309 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50078
diff changeset
81 </div>
3ff1725f837e Merged revisions 74309 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50078
diff changeset
82 {% endblock %}
60881
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
83 {% block sidebarsourcelink %}
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
84 {%- if show_source and has_source and sourcename %}
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
85 <h3>{{ _('This Page') }}</h3>
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
86 <ul class="this-page-menu">
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
87 <li><a href="{{ pathto('bugs') }}">Report a Bug</a></li>
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
88 <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
89 rel="nofollow">Show Source</a></li>
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
90 </ul>
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
91 {%- endif %}
54526eec8bc6 Merged revisions 80390 via svnmerge from
Georg Brandl <georg@python.org>
parents: 55545
diff changeset
92 {% endblock %}