Skip to content

Commit 1e8a673

Browse files
committed
Fix home code copy button styles
1 parent d700831 commit 1e8a673

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

static/home.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,48 @@
222222
font-family: "JetBrains Mono", monospace;
223223
}
224224

225+
/* Code block copy button (home page) */
226+
.code-block-wrapper {
227+
position: relative;
228+
}
229+
230+
.code-copy-btn {
231+
position: absolute;
232+
top: 0.5rem;
233+
right: 0.5rem;
234+
display: flex;
235+
align-items: center;
236+
justify-content: center;
237+
width: 28px;
238+
height: 28px;
239+
background: transparent;
240+
border: none;
241+
border-radius: 4px;
242+
color: var(--text-muted);
243+
opacity: 0;
244+
cursor: pointer;
245+
transition: all 0.2s;
246+
z-index: 10;
247+
}
248+
249+
.code-block-wrapper:hover .code-copy-btn {
250+
opacity: 0.5;
251+
}
252+
253+
.code-copy-btn:hover {
254+
opacity: 1 !important;
255+
background: var(--bg-card);
256+
}
257+
258+
.code-copy-btn.copied {
259+
color: #22c55e;
260+
opacity: 1 !important;
261+
}
262+
263+
.code-copy-btn i {
264+
font-size: 16px;
265+
}
266+
225267
/* ========================================
226268
Features Section
227269
======================================== */

0 commit comments

Comments
 (0)