Mercurial > genshi > mirror
annotate examples/bench/mako/template.html @ 814:a5c74a9b9782 trunk
Remove unneeded conversion of empty attribute values into a single-item list of an empty `TEXT` event.
author | cmlenz |
---|---|
date | Mon, 09 Mar 2009 14:04:21 +0000 |
parents | 0449396999c5 |
children |
rev | line source |
---|---|
540 | 1 <!DOCTYPE html |
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> | |
5 <head> | |
6 <title>${title}</title> | |
7 </head> | |
8 <body> | |
9 <%def name="greeting(name)"> | |
543
0449396999c5
Replace Myghty by Mako in bigtable benchmark, apply escaping in Mako templates.
cmlenz
parents:
540
diff
changeset
|
10 <p>Hello, ${name | h}!</p> |
540 | 11 </%def> |
12 | |
13 <%include file="header.html"/> | |
14 | |
15 ${greeting(user)} | |
16 ${greeting('me')} | |
17 ${greeting('world')} | |
18 | |
19 <h2>Loop</h2> | |
20 % if items: | |
21 <ul> | |
22 % for idx, item in enumerate(items): | |
543
0449396999c5
Replace Myghty by Mako in bigtable benchmark, apply escaping in Mako templates.
cmlenz
parents:
540
diff
changeset
|
23 <li ${idx+1==len(items) and "class='last'" or ""}>${item | h}</li> |
540 | 24 % endfor |
25 </ul> | |
26 % endif | |
27 <%include file="footer.html"/> | |
28 </body> | |
29 </html> |