123456789101112131415161718192021222324 |
- {% extends "layout.html" %} {% block content %} {% if logged_in %}
- <h1 class="heading">New Post</h1>
- <form class="form" method="POST" action="/posts">
- <input type="hidden" name="id" />
- <input type="hidden" name="date" />
- <div class="form__field">
- <label for="title" class="form__label">Title</label>
- <input class="form__text-field" type="text" name="title" required />
- </div>
- <div class="form__field">
- <label for="body" class="form__label">Body</label>
- <textarea class="form__textarea" name="body" required></textarea>
- </div>
- <div class="form__field">
- <input class="btn" type="submit" value="Post" />
- </div>
- </form>
- {% endif %}
-
- <div class="posts">
- {% for post in posts %} {{ components::post(post=post, type="index") }} {%
- endfor %}
- </div>
- {% endblock %}
|