crablog/site/content/templates/edit-form.html

43 lines
1.4 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
2024-08-10 09:41:01 +02:00
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Edit '{{ title }}'" />
<meta property="og:image" content="/static/site-image.png" />
2024-08-10 09:41:01 +02:00
<title>Edit '{{ title }}'</title>
<link rel="stylesheet" href="/static/css/blog.css">
<link rel="shortcut icon" type="image/jpg" href="/static/favicon.ico" />
</head>
2024-08-10 09:41:01 +02:00
<body>
<div id="cookie-block" hidden>
<label for="token">Password</label>
</br>
<input id="token" type="password" name="token">
</div>
<form id="submit-form" action="/api/blog/posts/edit/{{ id }}" method=POST>
<input class="token" type="text" name="token" hidden>
<label for="title">Title</label>
<textarea id="submit-title" type="text" name="title">{{ title }}</textarea>
<br>
<label for="submit-body">Content</label>
<textarea id="submit-body" type="text" name="body">{{ body }}</textarea>
<br>
<button id="submit-button" type="submit">Edit post</button>
</form>
<form action="/api/blog/posts/hide/{{ id }}" method="POST">
<input class="token" type="text" name="token" hidden>
<button type="submit">Hide post</button>
</form>
<form action="/api/blog/posts/delete/{{ id }}" method="POST">
<input class="token" type="text" name="token" hidden>
<button type="submit">Delete post</button>
</form>
</body>
</html>