aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/index.html1
-rw-r--r--templates/new_post.html29
2 files changed, 30 insertions, 0 deletions
diff --git a/templates/index.html b/templates/index.html
index 2a3a95b..674b867 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -4,6 +4,7 @@
<title>{{ title }}</title>
</head>
<body>
+ <p><a href="/posts/new">Create new post</a></p>
{{# posts }}{{> post_teaser.html }}{{/ posts }}
</body>
</html>
diff --git a/templates/new_post.html b/templates/new_post.html
new file mode 100644
index 0000000..93de696
--- /dev/null
+++ b/templates/new_post.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>{{ title }}</title>
+ </head>
+ <body>
+ <h1>Create a new post</h1>
+ <form id="new_post" name="post" method="post" action="/posts/create">
+ <div class="field">
+ <label>Title:</label>
+ <input type="text" name="title" value="{{ post.title }}">
+ </div>
+
+ <div class="field">
+ <label>Contents:</label>
+ <textarea name="body">{{ post.body }}</textarea>
+ </div>
+
+ <div class="field">
+ <input type="checkbox" checked="{{ post.published }}">
+ <label>Published</label>
+ </div>
+
+ <div class="actions">
+ <input type="submit" value="Create post">
+ </div>
+ </form>
+ </body>
+</html>