PageRenderTime 25ms CodeModel.GetById 18ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/hyde/tests/templates/jinja2/index.html

http://github.com/hyde/hyde
HTML | 29 lines | 29 code | 0 blank | 0 comment | 0 complexity | 8d68bdca6e7bf24f0e0079d1c3250f59 MD5 | raw file
 1{% extends "layout.html" %}
 2{% from "helpers.html" import input_field, textarea, form %}
 3{% block page_title %}Index Page{% endblock %}
 4{% block body %}
 5  {%- for article in articles if article.published %}
 6  <div class="article">
 7    <h2><a href="{{ article.href|e }}">{{ article.title|e }}</a></h2>
 8    <p class="meta">written by <a href="{{ article.user.href|e
 9      }}">{{ article.user.username|e }}</a> on {{ article.pub_date|dateformat }}</p>
10    <div class="text">{{ article.body }}</div>
11  </div>
12  {%- endfor %}
13  {%- call form() %}
14    <dl>
15      <dt>Name</dt>
16      <dd>{{ input_field('name') }}</dd>
17      <dt>E-Mail</dt>
18      <dd>{{ input_field('email') }}</dd>
19      <dt>URL</dt>
20      <dd>{{ input_field('url') }}</dd>
21      <dt>Comment</dt>
22      <dd>{{ textarea('comment') }}</dd>
23      <dt>Captcha</dt>
24      <dd>{{ input_field('captcha') }}</dd>
25    </dl>
26    {{ input_field(type='submit', value='Submit') }}
27    {{ input_field('cancel', type='submit', value='Cancel') }}
28  {%- endcall %}
29{% endblock %}