Skip to content
This repository
tree: 9de21094a8
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 31 lines (24 sloc) 0.916 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<html xmlns:py="http://genshi.edgewall.org/" py:strip="">

  <!--! insert search form -->
  <div py:match="div[@id='sidebar']" py:attrs="select('@*')">
    ${select('*')}
    <h2>Search</h2>
    <form><input name="q"/></form>
  </div>

  <?python from urlparse import urljoin ?>

  <!--! insert opensearch autodiscovery link -->
  <head py:match="head" py:attrs="select('@*')">
    ${select('*')}
    <link rel="search" type="application/opensearchdescription+xml"
      href="${urljoin(str(select('link[@rel=\'alternate\']/@href')),
        'opensearchdescription.xml')}"
      title="${select('link[@rel=\'alternate\']/@title')} search"/>
  </head>

  <!--! ensure that scripts don't use empty tag syntax -->
  <script py:match="script" py:attrs="select('@*')">
    ${select('*')}
  </script>

  <!--! Include the original stream, which will be processed by the rules
        defined above -->
  ${input}

</html>
Something went wrong with that request. Please try again.