blogpop/views/admin/new.ejs

48 lines
1.2 KiB
Plaintext

<!DOCTYPE html>
<html>
<head>
<title>New 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;
}
.preview {
margin-top: 2rem;
padding: 1rem;
border: 1px solid #ddd;
border-radius: 4px;
}
</style>
</head>
<body>
<h1>New Blog Post</h1>
<form action="/admin/posts" method="POST">
<input type="text" name="title" placeholder="Title" required>
<textarea name="content" rows="10" placeholder="Content (Markdown supported)" required></textarea>
<div>
<button type="submit">Publish</button>
<a href="/admin/dashboard" style="margin-left: 1rem;">Cancel</a>
</div>
</form>
</body>
</html>