|
@@ -1,21 +1,20 @@
|
1
|
|
-{% extends "layout.html" %} {% block content %}
|
2
|
|
-{% if logged_in %}
|
3
|
|
- <h1 class="heading">New Post</h1>
|
4
|
|
- <form class="form" method="POST" action="/posts">
|
5
|
|
- <input type="hidden" name="id" />
|
6
|
|
- <input type="hidden" name="date" />
|
7
|
|
- <div class="form__field">
|
8
|
|
- <label for="title" class="form__label">Title</label>
|
9
|
|
- <input class="form__text-field" type="text" name="title" required />
|
10
|
|
- </div>
|
11
|
|
- <div class="form__field">
|
12
|
|
- <label for="body" class="form__label">Body</label>
|
13
|
|
- <textarea class="form__textarea" name="body" required></textarea>
|
14
|
|
- </div>
|
15
|
|
- <div class="form__field">
|
16
|
|
- <input class="form__button" type="submit" value="Post" />
|
17
|
|
- </div>
|
18
|
|
- </form>
|
|
1
|
+{% extends "layout.html" %} {% block content %} {% if logged_in %}
|
|
2
|
+<h1 class="heading">New Post</h1>
|
|
3
|
+<form class="form" method="POST" action="/posts">
|
|
4
|
+ <input type="hidden" name="id" />
|
|
5
|
+ <input type="hidden" name="date" />
|
|
6
|
+ <div class="form__field">
|
|
7
|
+ <label for="title" class="form__label">Title</label>
|
|
8
|
+ <input class="form__text-field" type="text" name="title" required />
|
|
9
|
+ </div>
|
|
10
|
+ <div class="form__field">
|
|
11
|
+ <label for="body" class="form__label">Body</label>
|
|
12
|
+ <textarea class="form__textarea" name="body" required></textarea>
|
|
13
|
+ </div>
|
|
14
|
+ <div class="form__field">
|
|
15
|
+ <input class="form__button" type="submit" value="Post" />
|
|
16
|
+ </div>
|
|
17
|
+</form>
|
19
|
18
|
{% endif %}
|
20
|
19
|
|
21
|
20
|
<div class="posts">
|
|
@@ -23,7 +22,7 @@
|
23
|
22
|
<div class="posts__post post">
|
24
|
23
|
<h3 class="post__heading">
|
25
|
24
|
{% if logged_in %}
|
26
|
|
- <a class="post__edit-link" href="/posts/{{ post.id }}/edit">edit</a>
|
|
25
|
+ <a class="post__edit-link" href="/posts/{{ post.id }}/edit">edit</a>
|
27
|
26
|
{% endif %}
|
28
|
27
|
<span>
|
29
|
28
|
{{ post.title }} :: {{ post.date }}
|