diff options
-rw-r--r-- | assets/entry_new.html | 8 | ||||
-rw-r--r-- | conf/clog.conf | 2 | ||||
-rw-r--r-- | src/clog.c | 5 |
3 files changed, 10 insertions, 5 deletions
diff --git a/assets/entry_new.html b/assets/entry_new.html new file mode 100644 index 0000000..958dedc --- /dev/null +++ b/assets/entry_new.html @@ -0,0 +1,8 @@ +<form action="/entries" method="post"> +<input type="text" id="title" name="title" placeholder="title" style="width: 100%;"/> +<textarea id="body" name="body" rows="50" style="width: 100%;"></textarea> +<br> +<input type="button" value="Preview (N/A)"> +<input type="submit" value="Save"> +</form> + diff --git a/conf/clog.conf b/conf/clog.conf index 8d8e778..9237b53 100644 --- a/conf/clog.conf +++ b/conf/clog.conf @@ -45,7 +45,7 @@ domain * { methods get } - route /entries/ { + route /entries { handler save_new_entry methods post @@ -487,10 +487,7 @@ int get_new_entry_form(struct http_request *req) { content = kore_buf_alloc(0); - kore_buf_appendf( - content, (const char *) asset_entry_edit_html, - "", "", "" - ); + kore_buf_append(content, asset_entry_new_html, asset_len_entry_new_html); http_ok_resp(req, HTTP_STATUS_OK, content); |