Add PNG download for the participant QR code in the admin
A button appears on hover/focus over the QR code (always visible on touch devices) and saves it as a 1024px PNG, rendered client-side from the SVG via canvas. No new dependency or server image library needed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a9b14af8bf
commit
945fc94e77
4 files changed
+57
-3
No files matched your search
@@ -347,6 +347,11 @@ textarea { resize: vertical; }
|
||||
|
||||
.join-code { font-size: 2rem; font-weight: 800; letter-spacing: .12em; text-align: center; margin: 0 0 12px; }
|
||||
.qr { display: block; margin: 0 auto 16px; background: #fff; border-radius: 8px; padding: 6px; }
|
||||
.qr-wrap { position: relative; width: fit-content; margin: 0 auto; }
|
||||
.qr-wrap .qr { margin-bottom: 16px; }
|
||||
.qr-wrap__download { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); white-space: nowrap; opacity: 0; transition: opacity .15s; }
|
||||
.qr-wrap:hover .qr-wrap__download, .qr-wrap:focus-within .qr-wrap__download { opacity: 1; }
|
||||
@media (hover: none) { .qr-wrap__download { opacity: 1; } }
|
||||
.copy-field { display: flex; gap: 8px; }
|
||||
.copy-field input { font-size: .85rem; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user