Skip to content

Commit c9c103b

Browse files
authored
Update index.html
1 parent 0757689 commit c9c103b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

projects/postbox/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,16 @@ <h3>Create a New Post</h3>
6565
const postElement = document.createElement("div");
6666
postElement.classList.add("post-item");
6767

68+
// Now, each post is wrapped with an anchor tag linking to post.html#<ID>
6869
postElement.innerHTML = `
6970
<div class="post-meta">
7071
<span>Posted by <a href="user.html#${post.user}">${post.username}</a></span>
7172
<p>Posted on ${post.posted}</p>
7273
</div>
73-
<h4>${post.title}</h4>
74-
<p>${post.content}</p>
74+
<a href="post.html#${post.id}">
75+
<h4>${post.title}</h4>
76+
<p>${post.content}</p>
77+
</a>
7578
${imageHTML}
7679
`;
7780

0 commit comments

Comments
 (0)