Merge pull request #4 from ok2/codex/hide-idea-input-on-decision
Add decided badge to idea cards
This commit is contained in:
commit
046e84e996
18
index.html
18
index.html
@ -233,12 +233,24 @@
|
|||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.idea-card.decided {
|
.idea-card.decided {
|
||||||
background: rgba(0, 255, 0, 0.1);
|
background: rgba(0, 255, 0, 0.1);
|
||||||
border-color: rgba(0, 255, 0, 0.4);
|
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 {
|
.idea-card h3 {
|
||||||
margin-bottom: 20px; /* pushes the next form‐group down */
|
margin-bottom: 20px; /* pushes the next form‐group down */
|
||||||
@ -537,7 +549,7 @@
|
|||||||
<div id="tourInfo" class="tour-info"></div>
|
<div id="tourInfo" class="tour-info"></div>
|
||||||
|
|
||||||
<!-- Add Idea Section -->
|
<!-- Add Idea Section -->
|
||||||
<div class="glass-card">
|
<div id="addIdeaCard" class="glass-card">
|
||||||
<h3>Add New Idea</h3>
|
<h3>Add New Idea</h3>
|
||||||
<form id="addIdeaForm">
|
<form id="addIdeaForm">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -806,6 +818,8 @@
|
|||||||
|
|
||||||
// Render ideas
|
// Render ideas
|
||||||
function renderIdeas() {
|
function renderIdeas() {
|
||||||
|
const decidedIdea = currentTour.ideas.find(i => i.decided);
|
||||||
|
document.getElementById("addIdeaCard").classList.toggle("hidden", !!decidedIdea);
|
||||||
sortIdeasByVotes();
|
sortIdeasByVotes();
|
||||||
if (currentView === 'cards') {
|
if (currentView === 'cards') {
|
||||||
renderCardsView();
|
renderCardsView();
|
||||||
@ -824,6 +838,7 @@
|
|||||||
const card = document.createElement('div');
|
const card = document.createElement('div');
|
||||||
card.className = 'idea-card';
|
card.className = 'idea-card';
|
||||||
if (idea.decided) card.classList.add('decided');
|
if (idea.decided) card.classList.add('decided');
|
||||||
|
const badgeHTML = idea.decided ? '<span class="decided-badge">✅</span>' : '';
|
||||||
|
|
||||||
let timeBadge = "";
|
let timeBadge = "";
|
||||||
if (idea.start_time && idea.end_time) {
|
if (idea.start_time && idea.end_time) {
|
||||||
@ -867,6 +882,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
card.innerHTML = `
|
card.innerHTML = `
|
||||||
|
${badgeHTML}
|
||||||
<h3 class="idea-title">${idea.name}</h3>
|
<h3 class="idea-title">${idea.name}</h3>
|
||||||
${timeBadge}
|
${timeBadge}
|
||||||
<p class="idea-description" style="margin-top: 8px;">${linkify(idea.description)}</p>
|
<p class="idea-description" style="margin-top: 8px;">${linkify(idea.description)}</p>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user