feat: replace icon fonts with inline SVGs for code copy button and add "Copied" toast notification

This commit is contained in:
interlope committed 2026-06-01 23:39:45 +02:00
1 parent 1349d3b3dc
commit c0e40c7362
2 files changed
+50 -13

No files matched your search

+28 -9
View File
@@ -1648,9 +1648,8 @@ footer.footer-modern a:hover {
width: 32px;
height: 32px;
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
display: grid;
place-items: center;
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
background: var(--bg-subtle);
@@ -1677,14 +1676,34 @@ footer.footer-modern a:hover {
border-color: var(--accent);
}
.code-copy i {
.code-copy svg {
display: block;
}
/* "Copied" toast — pops up just left of the button */
.code-copy-toast {
position: absolute;
top: 0.5rem;
right: calc(0.5rem + 32px + 8px); /* clears the 32px button + gap */
height: 32px;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
font-size: 0.95rem;
line-height: 1;
padding: 0 0.6rem;
border-radius: var(--radius-sm);
background: var(--accent);
color: var(--accent-contrast);
font-size: var(--font-size-xs);
font-weight: 600;
white-space: nowrap;
pointer-events: none;
opacity: 0;
transform: translateX(6px);
transition: opacity 0.15s ease, transform 0.15s ease;
}
.code-copy-toast.is-visible {
opacity: 1;
transform: translateX(0);
}
/* Touch devices have no hover — keep the button discoverable */