keep working on the like button

This commit is contained in:
2026-07-20 19:02:04 +10:00
parent 7d0727a7aa
commit 6241824960
9 changed files with 67 additions and 4 deletions

View File

@@ -53,8 +53,8 @@ std::string Post::genHtml() const {
ss << "<p class='postinfo'>" << likes << " likes</p>";
ss << "<div class='post-buttons'>";
ss << "<button onclick='like(" << id << ")'>Like</button>";
ss << "<button onclick='" << id << "'>Open</button>";
ss << "<button onclick='like(\"" << id << "\")' id='likebutton" << id << "'>Like</button>";
ss << "<button onclick='window.location.href = \"/posts/" << id << "\"'>Open</button>";
ss << "</div>";
return ss.str();