diff --git a/index.html b/index.html index 27bc162..0fd8982 100644 --- a/index.html +++ b/index.html @@ -217,12 +217,9 @@ .join-msg{font-family:'Roboto Mono',monospace;font-size:13px;min-height:20px;margin-bottom:8px} .join-msg.success{color:#11cc77} .join-msg.error{color:#ff0099} -/* ── Flag & share-image buttons ── */ -.flag-btn{background:none;border:none;color:#444;font-size:12px;cursor:pointer;padding:4px 6px;font-family:'Roboto Mono',monospace;transition:color .15s} -.flag-btn:hover{color:#ff0099} -.flag-btn.flagged{color:#ff0099} -.share-img-btn{background:none;border:none;color:#444;font-size:12px;cursor:pointer;padding:4px 6px;font-family:'Roboto Mono',monospace;transition:color .15s} -.share-img-btn:hover{color:#ff0099} +/* ── Card action buttons (share / card) ── */ +.card-action-btn{background:none;border:none;color:#444;font-family:'Roboto Mono',monospace;font-size:11px;cursor:pointer;padding:3px 6px;transition:color .15s;letter-spacing:.3px} +.card-action-btn:hover{color:#ff0099} /* ── Postcode badge ── */ .postcode-badge{font-size:10px;color:#555;font-family:'Roboto Mono',monospace} .postcode-badge span{color:#ff0099} @@ -938,30 +935,7 @@ async function safeFetch(url, options = {}) { } -// Function to initialize share buttons -function initializeShareButtons() { - console.log("Initializing share buttons"); - - // Find any elements with a share function and add event listeners - const shareButtons = document.querySelectorAll('.custom-copy-button'); - if (shareButtons.length > 0) { - shareButtons.forEach(button => { - const proposalId = button.getAttribute('data-id'); - button.addEventListener('click', (e) => { - e.preventDefault(); - e.stopPropagation(); - // If you have a smartCopyShare function, use it - if (typeof smartCopyShare === 'function') { - smartCopyShare(proposalId); - } else { - // Fallback to basic copy - const link = getShareableLink(proposalId); - copyToClipboard(link); - } - }); - }); - } -} +function initializeShareButtons() {} // Updated fetchProposals with fallback mechanism async function fetchProposals() { @@ -1127,10 +1101,8 @@ function initializeShareButtons() { ${netVotes > 0 ? '+' : ''}${netVotes} ${postcodeBadge} -
- + +