Debian Codegraph @

examples/bench/jinja2/template.html

raw
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
10 {%- macro greeting(name) %}
11 <p>hello {{ name }}</p>
12 {%- endmacro %}
13
14 {% include "header.html" %}
15
16 {{ greeting(user) }}
17 {{ greeting('me') }}
18 {{ greeting('world') }}
19
20 <h2>Loop</h2>
21 {%- if list_items %}
22 <ul>
23 {%- for list_item in list_items %}
24 <li {{ "class='last'" if loop.last else "" }}>{{ list_item }}</li>
25 {%- endfor %}
26 </ul>
27 {%- endif %}
28
29 {% include "footer.html" %}
30 </body>
31 </html>