12345678910111213141516171819 |
- {% macro post(post, type) %}
- <div class="post">
- <h3 class="post__heading">
- <div class="post__links">
- {% if type == "index" %}
- <a class="post__link" href="/posts/{{ post.id }}">view</a>
- {% endif %} {% if logged_in %}
- <a class="post__link" href="/posts/{{ post.id }}/edit">edit</a>
- {% endif %}
- </div>
- <span class="post__title">
- {{ post.title }} :: {{ post.date }}
- </span>
- </h3>
- <div class="post__body">
- {{ post.body | safe }}
- </div>
- </div>
- {% endmacro %}
|