Edgewall Software

source: trunk/examples/bench/mako/template.html

Last change on this file was 652, checked in by cmlenz, 16 years ago

Replace Myghty by Mako in bigtable benchmark, apply escaping in Mako templates.

File size: 682 bytes
Line 
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)">
10      <p>Hello, ${name | h}!</p>
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):
23          <li ${idx+1==len(items) and "class='last'" or ""}>${item | h}</li>
24        % endfor
25      </ul>
26    % endif
27    <%include file="footer.html"/>
28  </body>
29</html>
Note: See TracBrowser for help on using the repository browser.