Vote and comment on projects
by velo_ninja
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Project Brainstorm Board</title>
<style>
body {
font-family: sans-serif;
background: #f0f2f5;
padding: 20px;
}
#project-board {
max-width: 800px;
margin: auto;
}
.project {
background: #fff;
border-radius: 12px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.project h3 {
margin-top: 0;
}
.vote-btn {
margin-top: 10px;
background: #007bff;
color: white;
border: none;
padding: 8px 12px;
border-radius: 5px;
cursor: pointer;
}
textarea {
width: 100%;
margin-top: 10px;
padding: 8px;
border-radius: 6px;
border: 1px solid #ccc;
}
.comment-list {
margin-top: 10px;
list-style: none;
padding-left: 0;
}
.comment-list li {
background: #f1f3f5;
padding: 8px;
margin: 5px 0;
border-radius: 6px;
}
.attachment-placeholder {
margin-top: 10px;
font-size: 0.9rem;
color: #555;
}
</style>
</head>
<body>
<div id="project-board">
<h2>🧠 New / Upcoming Projects</h2>
<div class="project" id="project1">
<h3>🔧 Project A - AI Chatbot with API Integrations</h3>
<p><strong>Votes:</strong> <span class="vote-count">0</span></p>
<button class="vote-btn" onclick="upvote('project1')">⬆️ Upvote</button>
<div class="comments">
<textarea placeholder="Leave feedback or resource link..."></textarea>
<button class="vote-btn" onclick="submitComment('project1')">💬 Comment</button>
<ul class="comment-list"></ul>
</div>
<div class="attachment-placeholder">📎 Add resources like API docs or GitHub links here.</div>
</div>
<div class="project" id="project2">
<h3>📊 Project B - Real-time Data Dashboard</h3>
<p><strong>Votes:</strong> <span class="vote-count">0</span></p>
...
JavaScript
}