42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Edit Post</title>
|
|
<style>
|
|
body {
|
|
font-family: -apple-system, system-ui, sans-serif;
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding: 2rem;
|
|
}
|
|
form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
input, textarea {
|
|
padding: 0.5rem;
|
|
font-size: 1rem;
|
|
}
|
|
button {
|
|
padding: 0.5rem 1rem;
|
|
background: #007bff;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Edit Blog Post</h1>
|
|
<form action="/admin/posts/<%= post._id %>" method="POST">
|
|
<input type="text" name="title" value="<%= post.title %>" required>
|
|
<textarea name="content" rows="10" required><%= post.content %></textarea>
|
|
<div>
|
|
<button type="submit">Update</button>
|
|
<a href="/admin/dashboard" style="margin-left: 1rem;">Cancel</a>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |