blob: 16a92128d8ec3508a8dbb912285631f1ff50c56b [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>
Ezio Melotti380ce652012-10-27 22:09:16 +03006 <li>
7 {%- if versionswitcher is defined %}
8 <span class="version_switcher_placeholder">{{ release }}</span>
9 <a href="{{ pathto('index') }}">Documentation</a>{{ reldelim1 }}
10 {%- else %}
11 <a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}
12 {%- endif %}
13 </li>
Georg Brandlaf265f42008-12-07 15:06:20 +000014{% endblock %}
15{% block extrahead %}
16 <link rel="shortcut icon" type="image/png" href="{{ pathto('_static/py.png', 1) }}" />
Ezio Melotti43427222012-02-25 19:24:24 +020017 {% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %}
Ezio Melotti380ce652012-10-27 22:09:16 +030018 {% if versionswitcher is defined and not embedded %}<script type="text/javascript" src="{{ pathto('_static/version_switch.js', 1) }}"></script>{% endif %}
Georg Brandl4524b462012-10-01 19:38:34 +020019 {% if pagename == 'whatsnew/changelog' %}
Georg Brandl2cac28b2012-09-30 15:10:06 +020020 <script type="text/javascript">
Ezio Melotti7eb03dd2012-10-02 01:43:42 +030021 $(document).ready(function() {
22 // add the search form and bind the events
23 $('h1').after([
24 '<p>Filter entries by content:',
25 '<input type="text" value="" id="searchbox" style="width: 50%">',
26 '<input type="submit" id="searchbox-submit" value="Filter"></p>'
27 ].join('\n'));
28
29 function dofilter() {
30 try {
31 var query = new RegExp($('#searchbox').val(), 'i');
32 }
33 catch (e) {
34 return; // not a valid regex (yet)
35 }
36 // find headers for the versions (What's new in Python X.Y.Z?)
37 $('#changelog h2').each(function(index1, h2) {
38 var h2_parent = $(h2).parent();
39 var sections_found = 0;
40 // find headers for the sections (Core, Library, etc.)
41 h2_parent.find('h3').each(function(index2, h3) {
42 var h3_parent = $(h3).parent();
43 var entries_found = 0;
44 // find all the entries
45 h3_parent.find('li').each(function(index3, li) {
46 var li = $(li);
47 // check if the query matches the entry
48 if (query.test(li.text())) {
49 li.show();
50 entries_found++;
51 }
52 else {
53 li.hide();
54 }
55 });
56 // if there are entries, show the section, otherwise hide it
57 if (entries_found > 0) {
58 h3_parent.show();
59 sections_found++;
60 }
61 else {
62 h3_parent.hide();
63 }
64 });
65 if (sections_found > 0)
66 h2_parent.show();
67 else
68 h2_parent.hide();
69 });
Georg Brandl2cac28b2012-09-30 15:10:06 +020070 }
Ezio Melotti7eb03dd2012-10-02 01:43:42 +030071 $('#searchbox').keyup(dofilter);
72 $('#searchbox-submit').click(dofilter);
73 });
Georg Brandl2cac28b2012-09-30 15:10:06 +020074 </script>
75 {% endif %}
Georg Brandlaf265f42008-12-07 15:06:20 +000076{{ super() }}
Georg Brandle7570052008-05-03 20:52:18 +000077{% endblock %}
Georg Brandl3eb562b2009-08-04 20:25:54 +000078{% block footer %}
79 <div class="footer">
80 &copy; <a href="{{ pathto('copyright') }}">Copyright</a> {{ copyright|e }}.
81 <br />
Ezio Melotti7eb03dd2012-10-02 01:43:42 +030082 The Python Software Foundation is a non-profit corporation.
Georg Brandl3eb562b2009-08-04 20:25:54 +000083 <a href="http://www.python.org/psf/donations/">Please donate.</a>
84 <br />
85 Last updated on {{ last_updated|e }}.
Georg Brandl582c0a62010-04-22 23:20:19 +000086 <a href="{{ pathto('bugs') }}">Found a bug</a>?
87 <br />
Georg Brandl3eb562b2009-08-04 20:25:54 +000088 Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version|e }}.
89 </div>
90{% endblock %}
Georg Brandl582c0a62010-04-22 23:20:19 +000091{% block sidebarsourcelink %}
92{%- if show_source and has_source and sourcename %}
93<h3>{{ _('This Page') }}</h3>
94<ul class="this-page-menu">
95 <li><a href="{{ pathto('bugs') }}">Report a Bug</a></li>
96 <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
97 rel="nofollow">Show Source</a></li>
98</ul>
99{%- endif %}
100{% endblock %}