blob: 3f68a00d95e6ec7882878c0fb245faabf798f8f0 [file] [log] [blame]
Georg Brandle7570052008-05-03 20:52:18 +00001{% extends "!layout.html" %}
2{% block rootrellink %}
Georg Brandlaf265f42008-12-07 15:06:20 +00003 <li><img src="{{ pathto('_static/py.png', 1) }}" alt=""
4 style="vertical-align: middle; margin-top: -1px"/></li>
Georg Brandlab712142012-03-25 20:31:57 +02005 <li><a href="http://www.python.org/">Python</a>{{ reldelim1 }}</li>
Georg Brandlaf265f42008-12-07 15:06:20 +00006 <li><a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}</li>
7{% endblock %}
8{% block extrahead %}
9 <link rel="shortcut icon" type="image/png" href="{{ pathto('_static/py.png', 1) }}" />
Ezio Melotti43427222012-02-25 19:24:24 +020010 {% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %}
Georg Brandl4524b462012-10-01 19:38:34 +020011 {% if pagename == 'whatsnew/changelog' %}
Georg Brandl2cac28b2012-09-30 15:10:06 +020012 <script type="text/javascript">
Ezio Melotti7eb03dd2012-10-02 01:43:42 +030013 $(document).ready(function() {
14 // add the search form and bind the events
15 $('h1').after([
16 '<p>Filter entries by content:',
17 '<input type="text" value="" id="searchbox" style="width: 50%">',
18 '<input type="submit" id="searchbox-submit" value="Filter"></p>'
19 ].join('\n'));
20
21 function dofilter() {
22 try {
23 var query = new RegExp($('#searchbox').val(), 'i');
24 }
25 catch (e) {
26 return; // not a valid regex (yet)
27 }
28 // find headers for the versions (What's new in Python X.Y.Z?)
29 $('#changelog h2').each(function(index1, h2) {
30 var h2_parent = $(h2).parent();
31 var sections_found = 0;
32 // find headers for the sections (Core, Library, etc.)
33 h2_parent.find('h3').each(function(index2, h3) {
34 var h3_parent = $(h3).parent();
35 var entries_found = 0;
36 // find all the entries
37 h3_parent.find('li').each(function(index3, li) {
38 var li = $(li);
39 // check if the query matches the entry
40 if (query.test(li.text())) {
41 li.show();
42 entries_found++;
43 }
44 else {
45 li.hide();
46 }
47 });
48 // if there are entries, show the section, otherwise hide it
49 if (entries_found > 0) {
50 h3_parent.show();
51 sections_found++;
52 }
53 else {
54 h3_parent.hide();
55 }
56 });
57 if (sections_found > 0)
58 h2_parent.show();
59 else
60 h2_parent.hide();
61 });
Georg Brandl2cac28b2012-09-30 15:10:06 +020062 }
Ezio Melotti7eb03dd2012-10-02 01:43:42 +030063 $('#searchbox').keyup(dofilter);
64 $('#searchbox-submit').click(dofilter);
65 });
Georg Brandl2cac28b2012-09-30 15:10:06 +020066 </script>
67 {% endif %}
Georg Brandlaf265f42008-12-07 15:06:20 +000068{{ super() }}
Georg Brandle7570052008-05-03 20:52:18 +000069{% endblock %}
Georg Brandl3eb562b2009-08-04 20:25:54 +000070{% block footer %}
71 <div class="footer">
72 &copy; <a href="{{ pathto('copyright') }}">Copyright</a> {{ copyright|e }}.
73 <br />
Ezio Melotti7eb03dd2012-10-02 01:43:42 +030074 The Python Software Foundation is a non-profit corporation.
Georg Brandl3eb562b2009-08-04 20:25:54 +000075 <a href="http://www.python.org/psf/donations/">Please donate.</a>
76 <br />
77 Last updated on {{ last_updated|e }}.
Georg Brandl582c0a62010-04-22 23:20:19 +000078 <a href="{{ pathto('bugs') }}">Found a bug</a>?
79 <br />
Georg Brandl3eb562b2009-08-04 20:25:54 +000080 Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version|e }}.
81 </div>
82{% endblock %}
Georg Brandl582c0a62010-04-22 23:20:19 +000083{% block sidebarsourcelink %}
84{%- if show_source and has_source and sourcename %}
85<h3>{{ _('This Page') }}</h3>
86<ul class="this-page-menu">
87 <li><a href="{{ pathto('bugs') }}">Report a Bug</a></li>
88 <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
89 rel="nofollow">Show Source</a></li>
90</ul>
91{%- endif %}
92{% endblock %}