Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirmation Page for Blog Post Deletion #95

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions views/admin/delete-post.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Delete Post</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f7f7f7;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.confirmation-box {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
text-align: center;
}
.btn {
margin-top: 10px;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
.btn-delete {
background-color: #ff5f6d;
color: white;
}
.btn-delete:hover {
background-color: #ff4e50;
}
.btn-cancel {
background-color: #ccc;
color: #333;
}
.btn-cancel:hover {
background-color: #bbb;
}
</style>
</head>
<body>

<div class="confirmation-box">
<h2>Are you sure you want to delete this post?</h2>
<p>This action cannot be undone.</p>
<form action="/delete-post/<%= data._id %>" method="POST" onsubmit="return confirm('Are you sure you want to delete this post?');">
<button type="submit" class="btn btn-delete">Delete</button>
<a href="/dashboard" class="btn btn-cancel">Cancel</a>
</form>
</div>

</body>
</html>