diff options
author | Michael McVady <femtonaut@gmail.com> | 2024-05-07 16:55:24 -0500 |
---|---|---|
committer | Michael McVady <femtonaut@gmail.com> | 2024-05-07 16:55:24 -0500 |
commit | 444104e22a47ca820fc4f35786e169d6cf2f2811 (patch) | |
tree | 09cdd224010f1aa9ec73e4572f150e9ab32cd3e1 | |
parent | a95eae4452a98ec551c9820598d1e8fae9407714 (diff) |
-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); |