blob: 1887b85b607366951216b9032fe225a994da4d98 [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 Brandl46761ec2014-10-29 08:36:15 +01005 <li><a href="https://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>
Victor Stinner875f29a2016-01-22 18:00:05 +01009 <a href="{{ pathto('index') }}">{% trans %}Documentation {% endtrans %}</a>{{ reldelim1 }}
Ezio Melotti380ce652012-10-27 22:09:16 +030010 {%- else %}
11 <a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}
12 {%- endif %}
13 </li>
Georg Brandlaf265f42008-12-07 15:06:20 +000014{% endblock %}
Georg Brandl1afe2af2014-03-25 10:12:47 +010015{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
16{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
Georg Brandlaf265f42008-12-07 15:06:20 +000017{% block extrahead %}
18 <link rel="shortcut icon" type="image/png" href="{{ pathto('_static/py.png', 1) }}" />
Ezio Melotti43427222012-02-25 19:24:24 +020019 {% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %}
Ezio Melotti380ce652012-10-27 22:09:16 +030020 {% if versionswitcher is defined and not embedded %}<script type="text/javascript" src="{{ pathto('_static/version_switch.js', 1) }}"></script>{% endif %}
Benjamin Petersonc836f712016-01-20 22:02:30 -080021 {% if pagename == 'whatsnew/changelog' and not embedded %}
Georg Brandl2cac28b2012-09-30 15:10:06 +020022 <script type="text/javascript">
Ezio Melotti7eb03dd2012-10-02 01:43:42 +030023 $(document).ready(function() {
24 // add the search form and bind the events
25 $('h1').after([
26 '<p>Filter entries by content:',
27 '<input type="text" value="" id="searchbox" style="width: 50%">',
28 '<input type="submit" id="searchbox-submit" value="Filter"></p>'
29 ].join('\n'));
30
31 function dofilter() {
32 try {
33 var query = new RegExp($('#searchbox').val(), 'i');
34 }
35 catch (e) {
36 return; // not a valid regex (yet)
37 }
38 // find headers for the versions (What's new in Python X.Y.Z?)
39 $('#changelog h2').each(function(index1, h2) {
40 var h2_parent = $(h2).parent();
41 var sections_found = 0;
42 // find headers for the sections (Core, Library, etc.)
43 h2_parent.find('h3').each(function(index2, h3) {
44 var h3_parent = $(h3).parent();
45 var entries_found = 0;
46 // find all the entries
47 h3_parent.find('li').each(function(index3, li) {
48 var li = $(li);
49 // check if the query matches the entry
50 if (query.test(li.text())) {
51 li.show();
52 entries_found++;
53 }
54 else {
55 li.hide();
56 }
57 });
58 // if there are entries, show the section, otherwise hide it
59 if (entries_found > 0) {
60 h3_parent.show();
61 sections_found++;
62 }
63 else {
64 h3_parent.hide();
65 }
66 });
67 if (sections_found > 0)
68 h2_parent.show();
69 else
70 h2_parent.hide();
71 });
Georg Brandl2cac28b2012-09-30 15:10:06 +020072 }
Ezio Melotti7eb03dd2012-10-02 01:43:42 +030073 $('#searchbox').keyup(dofilter);
74 $('#searchbox-submit').click(dofilter);
75 });
Georg Brandl2cac28b2012-09-30 15:10:06 +020076 </script>
77 {% endif %}
Georg Brandlaf265f42008-12-07 15:06:20 +000078{{ super() }}
Georg Brandle7570052008-05-03 20:52:18 +000079{% endblock %}
Georg Brandl3eb562b2009-08-04 20:25:54 +000080{% block footer %}
81 <div class="footer">
Victor Stinner875f29a2016-01-22 18:00:05 +010082 &copy; <a href="{{ pathto('copyright') }}">{% trans %}Copyright{% endtrans %}</a> {{ copyright|e }}.
Georg Brandl3eb562b2009-08-04 20:25:54 +000083 <br />
Victor Stinner875f29a2016-01-22 18:00:05 +010084 {% trans %}The Python Software Foundation is a non-profit corporation.{% endtrans %}
85 <a href="https://www.python.org/psf/donations/">{% trans %}Please donate.{% endtrans %}</a>
Georg Brandl3eb562b2009-08-04 20:25:54 +000086 <br />
Victor Stinner875f29a2016-01-22 18:00:05 +010087 {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
88 {% trans pathto_bugs=pathto('bugs') %}<a href="{{ pathto_bugs }}">Found a bug</a>?{% endtrans %}
Georg Brandl582c0a62010-04-22 23:20:19 +000089 <br />
Victor Stinner875f29a2016-01-22 18:00:05 +010090 {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
Georg Brandl3eb562b2009-08-04 20:25:54 +000091 </div>
92{% endblock %}
Georg Brandl582c0a62010-04-22 23:20:19 +000093{% block sidebarsourcelink %}
94{%- if show_source and has_source and sourcename %}
95<h3>{{ _('This Page') }}</h3>
96<ul class="this-page-menu">
Victor Stinner875f29a2016-01-22 18:00:05 +010097 <li><a href="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
Georg Brandl582c0a62010-04-22 23:20:19 +000098 <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
Victor Stinner875f29a2016-01-22 18:00:05 +010099 rel="nofollow">{% trans %}Show Source{% endtrans %}</a></li>
Georg Brandl582c0a62010-04-22 23:20:19 +0000100</ul>
101{%- endif %}
102{% endblock %}