From 89c548bb860046b846d7986dc938ae91d9aa22ca Mon Sep 17 00:00:00 2001 From: King Omar Date: Sat, 27 Jun 2026 03:19:56 +1000 Subject: [PATCH] Replace broken share/image buttons with clean text actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove custom-copy-button (relied on missing image file) and share-img-btn (emoji clashed with monospace aesthetic). Replace both with .card-action-btn text buttons: 'share ↗' and 'card ↗' — monospace, grey, pink on hover, consistent with the rest of the card UI. Co-Authored-By: Claude Sonnet 4.6 --- index.html | 40 ++++++---------------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) 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} -
- Share -
- + +
${formatDate(proposal.timestamp)}