| Georg Brandl | e757005 | 2008-05-03 20:52:18 +0000 | [diff] [blame] | 1 | {% extends "!layout.html" %} | 
 | 2 | {% block rootrellink %} | 
| Georg Brandl | af265f4 | 2008-12-07 15:06:20 +0000 | [diff] [blame] | 3 |         <li><img src="{{ pathto('_static/py.png', 1) }}" alt="" | 
 | 4 |                  style="vertical-align: middle; margin-top: -1px"/></li> | 
| Georg Brandl | 46761ec | 2014-10-29 08:36:15 +0100 | [diff] [blame] | 5 |         <li><a href="https://www.python.org/">Python</a>{{ reldelim1 }}</li> | 
| Ezio Melotti | 380ce65 | 2012-10-27 22:09:16 +0300 | [diff] [blame] | 6 |         <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 Brandl | af265f4 | 2008-12-07 15:06:20 +0000 | [diff] [blame] | 14 | {% endblock %} | 
| Georg Brandl | 1afe2af | 2014-03-25 10:12:47 +0100 | [diff] [blame] | 15 | {% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} | 
 | 16 | {% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %} | 
| Georg Brandl | af265f4 | 2008-12-07 15:06:20 +0000 | [diff] [blame] | 17 | {% block extrahead %} | 
 | 18 |     <link rel="shortcut icon" type="image/png" href="{{ pathto('_static/py.png', 1) }}" /> | 
| Ezio Melotti | 4342722 | 2012-02-25 19:24:24 +0200 | [diff] [blame] | 19 |     {% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %} | 
| Ezio Melotti | 380ce65 | 2012-10-27 22:09:16 +0300 | [diff] [blame] | 20 |     {% if versionswitcher is defined and not embedded %}<script type="text/javascript" src="{{ pathto('_static/version_switch.js', 1) }}"></script>{% endif %} | 
| Georg Brandl | 4524b46 | 2012-10-01 19:38:34 +0200 | [diff] [blame] | 21 |     {% if pagename == 'whatsnew/changelog' %} | 
| Georg Brandl | 2cac28b | 2012-09-30 15:10:06 +0200 | [diff] [blame] | 22 |     <script type="text/javascript"> | 
| Ezio Melotti | 7eb03dd | 2012-10-02 01:43:42 +0300 | [diff] [blame] | 23 |       $(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 Brandl | 2cac28b | 2012-09-30 15:10:06 +0200 | [diff] [blame] | 72 |           } | 
| Ezio Melotti | 7eb03dd | 2012-10-02 01:43:42 +0300 | [diff] [blame] | 73 |           $('#searchbox').keyup(dofilter); | 
 | 74 |           $('#searchbox-submit').click(dofilter); | 
 | 75 |       }); | 
| Georg Brandl | 2cac28b | 2012-09-30 15:10:06 +0200 | [diff] [blame] | 76 |     </script> | 
 | 77 |     {% endif %} | 
| Georg Brandl | af265f4 | 2008-12-07 15:06:20 +0000 | [diff] [blame] | 78 | {{ super() }} | 
| Georg Brandl | e757005 | 2008-05-03 20:52:18 +0000 | [diff] [blame] | 79 | {% endblock %} | 
| Georg Brandl | 3eb562b | 2009-08-04 20:25:54 +0000 | [diff] [blame] | 80 | {% block footer %} | 
 | 81 |     <div class="footer"> | 
 | 82 |     © <a href="{{ pathto('copyright') }}">Copyright</a> {{ copyright|e }}. | 
 | 83 |     <br /> | 
| Ezio Melotti | 7eb03dd | 2012-10-02 01:43:42 +0300 | [diff] [blame] | 84 |     The Python Software Foundation is a non-profit corporation. | 
| Georg Brandl | 46761ec | 2014-10-29 08:36:15 +0100 | [diff] [blame] | 85 |     <a href="https://www.python.org/psf/donations/">Please donate.</a> | 
| Georg Brandl | 3eb562b | 2009-08-04 20:25:54 +0000 | [diff] [blame] | 86 |     <br /> | 
 | 87 |     Last updated on {{ last_updated|e }}. | 
| Georg Brandl | 582c0a6 | 2010-04-22 23:20:19 +0000 | [diff] [blame] | 88 |     <a href="{{ pathto('bugs') }}">Found a bug</a>? | 
 | 89 |     <br /> | 
| Georg Brandl | 3eb562b | 2009-08-04 20:25:54 +0000 | [diff] [blame] | 90 |     Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version|e }}. | 
 | 91 |     </div> | 
 | 92 | {% endblock %} | 
| Georg Brandl | 582c0a6 | 2010-04-22 23:20:19 +0000 | [diff] [blame] | 93 | {% block sidebarsourcelink %} | 
 | 94 | {%- if show_source and has_source and sourcename %} | 
 | 95 | <h3>{{ _('This Page') }}</h3> | 
 | 96 | <ul class="this-page-menu"> | 
 | 97 |   <li><a href="{{ pathto('bugs') }}">Report a Bug</a></li> | 
 | 98 |   <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}" | 
 | 99 |          rel="nofollow">Show Source</a></li> | 
 | 100 | </ul> | 
 | 101 | {%- endif %} | 
 | 102 | {% endblock %} |