Skip to content

Commit 90c0754

Browse files
ralyodioclaude
andcommitted
fix(web): make 'click to copy' hint opaque so it stops overlapping the install URL
The hint span was absolute-positioned over the code block with no background, so when it faded in on hover it sat on top of the install URL text and looked like a render bug. Adds bg-black/90 + a small border/padding so the badge cleanly occludes the text beneath it, and pointer-events-none so the parent container still receives the click. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 13c0ae7 commit 90c0754

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/web/src/app/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export default function Home() {
171171
>
172172
<span className="text-tc-text-dim">$ </span>
173173
<span className="text-tc-green">curl -fsSL https://threatcrush.com/install.sh | sh</span>
174-
<span className="absolute right-3 top-1/2 -translate-y-1/2 text-tc-text-dim text-xs opacity-0 group-hover:opacity-100 transition-opacity">📋 click to copy</span>
174+
<span className="pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-tc-text-dim text-xs opacity-0 group-hover:opacity-100 transition-opacity bg-black/90 border border-tc-border/60 rounded px-2 py-0.5 shadow">📋 click to copy</span>
175175
</div>
176176
<div className="mt-3 text-left">
177177
<a href="/docs" className="text-xs font-semibold text-tc-green hover:underline">
@@ -199,14 +199,14 @@ export default function Home() {
199199
onClick={() => { navigator.clipboard?.writeText('threatcrush update'); }}
200200
>
201201
<span className="text-tc-green">threatcrush update</span>
202-
<span className="absolute right-3 top-1/2 -translate-y-1/2 text-tc-text-dim text-xs opacity-0 group-hover:opacity-100 transition-opacity">📋 click to copy</span>
202+
<span className="pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-tc-text-dim text-xs opacity-0 group-hover:opacity-100 transition-opacity bg-black/90 border border-tc-border/60 rounded px-2 py-0.5 shadow">📋 click to copy</span>
203203
</div>
204204
<div
205205
className="group relative rounded-lg bg-black/60 border border-tc-border px-4 py-3 font-mono text-sm cursor-pointer transition-all hover:border-tc-green/40"
206206
onClick={() => { navigator.clipboard?.writeText('threatcrush remove'); }}
207207
>
208208
<span className="text-tc-green">threatcrush remove</span>
209-
<span className="absolute right-3 top-1/2 -translate-y-1/2 text-tc-text-dim text-xs opacity-0 group-hover:opacity-100 transition-opacity">📋 click to copy</span>
209+
<span className="pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-tc-text-dim text-xs opacity-0 group-hover:opacity-100 transition-opacity bg-black/90 border border-tc-border/60 rounded px-2 py-0.5 shadow">📋 click to copy</span>
210210
</div>
211211
</div>
212212
</div>

0 commit comments

Comments
 (0)