Mercurial > genshi > mirror
view examples/trac/templates/layout.html @ 92:01d36818bb3d trunk
More performance improvements... this time for whitespace normalization and template loops.
author | cmlenz |
---|---|
date | Thu, 20 Jul 2006 23:06:36 +0000 |
parents | 448792ab1303 |
children |
line wrap: on
line source
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://markup.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude" py:strip=""> <xi:include href="site.html"><xi:fallback/></xi:include> <head py:match="head"> <title>${select('title/text()')} – Trac</title> <div py:for="rel, links in chrome.links.items()" py:strip=""> <link rel="${rel}" py:for="link in links" py:attrs="link"/> </div> <script py:for="script in chrome.scripts" type="${script.type}" src="${script.href}"></script> </head> <div py:def="navigation(category)" id="${category}" class="nav"> <ul py:if="chrome.nav[category]"> <li py:for="idx, item in enumerate(chrome.nav[category])" class="${' '.join(filter(None, [ (idx == 0) and 'first', (idx == len(chrome.nav[category]) - 1) and 'last' ])) or None}">${HTML(item.label)}</li> </ul> </div> <body py:match="body"> <div id="banner"> <div id="header"> <a id="logo" py:if="chrome.logo.src" href="${chrome.logo.link}"><img src="${chrome.logo.src}" /></a> </div> <form py:if="'SEARCH_VIEW' in perm" id="search" action="${href.search()}" method="get"><div> <label for="proj-search">Search:</label> <input type="text" id="proj-search" name="q" size="10" accesskey="f" value="" /> <input type="submit" value="Search" /> <input type="hidden" name="wiki" value="on" /> <input type="hidden" name="changeset" value="on" /> <input type="hidden" name="ticket" value="on" /> </div></form> ${navigation('metanav')} </div> ${navigation('mainnav')} <div id="main"> ${select('*')} <div id="altlinks" py:if="chrome.links.alternate"> <h3>Download in other formats:</h3> <ul><li py:for="idx, link in enumerate(chrome.links.alternate)" class="${' '.join(filter(None, [ (idx == 0) and 'first', (idx == len(chrome.links.alternate) - 1) and 'last' ])) or None}"> <a href="${link.href}" class="${link['class']}" py:content="link.title" /> </li></ul> </div> </div> <div id="footer"> <hr/> <a id="tracpowered" href="http://trac.edgewall.com/"><img src="${href.chrome('common/trac_logo_mini.png')}" height="30" width="107" alt="Trac Powered"/></a> <p class="left"> Powered by <a href="${href.about()}"><strong>Trac ${chrome.version}</strong></a><br /> By <a href="http://www.edgewall.com/">Edgewall Software</a>. </p> <p class="right"> ${chrome.footer} </p> </div> </body> </html>