Source

FlaskKit / flaskkit / templates / show_entries.html

{% extends "layout.html" %}
{% block body %}
  {% if session.logged_in %}
    <form action="{{ url_for('add_entry') }}" method="post">
      <p>
        <label for="title">Title:</label><br />
        <input type="text" size="50" name="title" />
      </p>
      <p>
        <label for="text">Body:</label><br />
        <textarea name="body" rows="10" cols="48"></textarea>
      </p>
      <p><input type="submit" value="Share" /></p>
    </form>
  {% endif %}
  <section>
    {% for entry in entries %}
      <article>
        <h2>{{ entry.title }}</h2>
        {{ entry.body|markdown|safe }}
      </article>
    {% else %}
      <p>Unbelievable. No entries so far.</p>
    {% endfor %}
  </section>
{% endblock %}