Mercurial > genshi > mirror
comparison examples/trac/templates/layout.html @ 43:e03b77726756 trunk
Trac example: fixes for alternative links.
author | cmlenz |
---|---|
date | Mon, 03 Jul 2006 22:03:21 +0000 |
parents | 686059a8a32b |
children | 1340e3297d19 |
comparison
equal
deleted
inserted
replaced
42:28ddb79414b2 | 43:e03b77726756 |
---|---|
18 <div id="banner"> | 18 <div id="banner"> |
19 <div id="header"> | 19 <div id="header"> |
20 <a id="logo" py:if="chrome.logo.src" href="${chrome.logo.link}"><img | 20 <a id="logo" py:if="chrome.logo.src" href="${chrome.logo.link}"><img |
21 src="${chrome.logo.src}" /></a> | 21 src="${chrome.logo.src}" /></a> |
22 </div> | 22 </div> |
23 <form py:if="perm.has_permission('SEARCH_VIEW')" id="search" | 23 <form py:if="'SEARCH_VIEW' in perm" id="search" |
24 action="${href.search()}" method="get"> | 24 action="${href.search()}" method="get"> |
25 <div> | 25 <div> |
26 <label for="proj-search">Search:</label> | 26 <label for="proj-search">Search:</label> |
27 <input type="text" id="proj-search" name="q" size="10" accesskey="f" value="" /> | 27 <input type="text" id="proj-search" name="q" size="10" accesskey="f" value="" /> |
28 <input type="submit" value="Search" /> | 28 <input type="submit" value="Search" /> |
33 </form> | 33 </form> |
34 <div id="metanav" class="nav"> | 34 <div id="metanav" class="nav"> |
35 <ul py:if="chrome.nav.metanav"> | 35 <ul py:if="chrome.nav.metanav"> |
36 <li py:for="idx, item in enumerate(chrome.nav.metanav)" | 36 <li py:for="idx, item in enumerate(chrome.nav.metanav)" |
37 py:content="HTML(item.label)" | 37 py:content="HTML(item.label)" |
38 class="${' '.join(filter(None, [ | 38 class="${' '.join(filter(None, [ |
39 (idx == 0) and 'first', | 39 (idx == 0) and 'first', |
40 (idx == len(chrome.nav.metanav) - 1) and 'last' | 40 (idx == len(chrome.nav.metanav) - 1) and 'last' |
41 ])) or None}"/> | 41 ])) or None}"/> |
42 </ul> | 42 </ul> |
43 </div> | 43 </div> |
44 </div> | 44 </div> |
45 <div id="mainnav" class="nav"> | 45 <div id="mainnav" class="nav"> |
46 <ul py:if="chrome.nav.mainnav"> | 46 <ul py:if="chrome.nav.mainnav"> |
56 <div id="main"> | 56 <div id="main"> |
57 ${select('*')} | 57 ${select('*')} |
58 | 58 |
59 <div id="altlinks" py:if="chrome.links.alternate"> | 59 <div id="altlinks" py:if="chrome.links.alternate"> |
60 <h3>Download in other formats:</h3> | 60 <h3>Download in other formats:</h3> |
61 <ul><li py:for="link in chrome.links.alternate"> | 61 <ul><li py:for="idx, link in enumerate(chrome.links.alternate)" |
62 class="${' '.join(filter(None, [ | |
63 (idx == 0) and 'first', | |
64 (idx == len(chrome.links.alternate) - 1) and 'last' | |
65 ])) or None}"> | |
62 <a href="${link.href}" class="${link['class']}" | 66 <a href="${link.href}" class="${link['class']}" |
63 py:content="${link.title}" /> | 67 py:content="link.title" /> |
64 </li></ul> | 68 </li></ul> |
65 </div> | 69 </div> |
66 </div> | 70 </div> |
67 | 71 |
68 <div id="footer"> | 72 <div id="footer"> |