-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit.ejs
More file actions
33 lines (28 loc) · 1.16 KB
/
edit.ejs
File metadata and controls
33 lines (28 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/style.css">
<title> Edit Your Post </title>
</head>
<body>
<!-- includes the header as well when editing as it is another file -->
<%- include ('header')%>
<form class= "edit-post-form" action="/edit/<%= post.id %>" method="POST">
<!-- For the editing portion, this reasks for the author of the post name-->
<input type= "text" name= "author" value="<%= post.author %>" placeholder= "Your name" required>
<!-- For the editing portion, this reasks for the title of the post-->
<input type= "text" name= "title" value="<%= post.title %>" placeholder= "Caption" required>
<!-- Says what you want to post -->
<textarea name= "content" placeholder= "What are you resharing?" required><%= post.content %></textarea>
<!-- Repost button-->
<button type= "submit"> Repost </button>
</form>
<div style="margin-top:15px; text-align:center;">
<button type= "submit"> Discard Edit </button>
</div>
<!-- includes footer which is another file-->
<%- include ('footer')%>
</body>
</html>