A fork of hyde, the static site generation. Some patches will be pushed upstream.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
1.0 KiB

  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 %}