From 083018598bc8bec548e12732a556a525932b4cf1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 3 Jun 2026 23:30:55 +0300 Subject: Show post share button on desktop too (clipboard copy fallback) Removed the mobile-only display:none gate so the share button is visible on all viewports. On desktop, navigator.share is typically unavailable, so the existing JS handler falls through to clipboard.writeText() and shows the 'Link copied' toast. The mobile @media rule still bumps the touch target to 40x40. Amp-Thread-ID: https://ampcode.com/threads/T-019e8f2a-b58e-72b3-b572-28d1fb1d9a1d Co-authored-by: Amp --- internal/generator/templates/shared/shared.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal') diff --git a/internal/generator/templates/shared/shared.css b/internal/generator/templates/shared/shared.css index e06bb50..4af2d94 100644 --- a/internal/generator/templates/shared/shared.css +++ b/internal/generator/templates/shared/shared.css @@ -949,11 +949,12 @@ body[data-sno-theme="matrix"] .post-text img, body[data-sno-theme="terminal"] .post-text img, body[data-sno-theme="dos"] .post-text img { animation:sno-matrix-decode 0.8s ease-out both; } -/* Per-post share button — only surfaced on mobile (see media query below). +/* Per-post share button — on mobile this uses navigator.share(); on desktop + it falls back to copying the permalink to the clipboard (handled in JS). Header is flex with @snonux on the left, time + share aligned to the right. */ .post-header { align-items:center; } .post-share-btn { - display:none; + display:inline-flex; align-items:center; justify-content:center; appearance:none; border:0; background:none; color:inherit; font:inherit; padding:6px 8px; margin-left:6px; cursor:pointer; opacity:0.7; transition:opacity 0.18s ease, transform 0.18s ease; -- cgit v1.2.3