diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-03 23:30:55 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-03 23:30:55 +0300 |
| commit | 083018598bc8bec548e12732a556a525932b4cf1 (patch) | |
| tree | dbb64492f7e7a7216ec2f74053301b8bc0ec62ed | |
| parent | b1bf055da68e6f77650dbbd13320f377c543f470 (diff) | |
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 <amp@ampcode.com>
| -rw-r--r-- | internal/generator/templates/shared/shared.css | 5 |
1 files changed, 3 insertions, 2 deletions
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; |
