Merge pull request #4 from ok2/codex/hide-idea-input-on-decision

Add decided badge to idea cards
This commit is contained in:
Kiyomichi Kosaka 2025-06-08 21:56:34 +02:00 committed by GitHub
commit 046e84e996
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -233,12 +233,24 @@
border-radius: 15px;
padding: 20px;
transition: all 0.3s ease;
position: relative;
}
.idea-card.decided {
background: rgba(0, 255, 0, 0.1);
border-color: rgba(0, 255, 0, 0.4);
}
.idea-card.decided:hover {
background: rgba(0, 255, 0, 0.1);
border-color: rgba(0, 255, 0, 0.4);
}
.decided-badge {
position: absolute;
top: 10px;
right: 10px;
font-size: 1.5rem;
}
.idea-card h3 {
margin-bottom: 20px; /* pushes the next formgroup down */
@ -537,7 +549,7 @@
<div id="tourInfo" class="tour-info"></div>
<!-- Add Idea Section -->
<div class="glass-card">
<div id="addIdeaCard" class="glass-card">
<h3>Add New Idea</h3>
<form id="addIdeaForm">
<div class="form-group">
@ -806,6 +818,8 @@
// Render ideas
function renderIdeas() {
const decidedIdea = currentTour.ideas.find(i => i.decided);
document.getElementById("addIdeaCard").classList.toggle("hidden", !!decidedIdea);
sortIdeasByVotes();
if (currentView === 'cards') {
renderCardsView();
@ -824,6 +838,7 @@
const card = document.createElement('div');
card.className = 'idea-card';
if (idea.decided) card.classList.add('decided');
const badgeHTML = idea.decided ? '<span class="decided-badge"></span>' : '';
let timeBadge = "";
if (idea.start_time && idea.end_time) {
@ -867,6 +882,7 @@
}
card.innerHTML = `
${badgeHTML}
<h3 class="idea-title">${idea.name}</h3>
${timeBadge}
<p class="idea-description" style="margin-top: 8px;">${linkify(idea.description)}</p>