Skip to content

Commit 8095a27

Browse files
sunnamed434claude
andcommitted
feat(web): anchor ids for comments & writeups — deep-links get the target lock
/challenge/<slug>#comment-<id> and #writeup-<id> now resolve; HashTarget already waits out the API fetch, scrolls, and locks on. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 977a737 commit 8095a27

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/src/pages/CrackmeDetail.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ function CommentsPanel({ slug, crackmeId, me, commentReactionsEnabled, commentsL
571571
<div className="space-y-3">
572572
{comments.length === 0 && <p className="font-mono text-[13px] text-faint">No comments yet.</p>}
573573
{comments.map((cm) => (
574-
<div key={cm.id} className={`rounded-lg border border-line bg-surface/30 p-3 ${cm.isHidden ? 'opacity-60' : ''}`}>
574+
<div key={cm.id} id={`comment-${cm.id}`} className={`rounded-lg border border-line bg-surface/30 p-3 ${cm.isHidden ? 'opacity-60' : ''}`}>
575575
{cm.isDeleted ? (
576576
<p className="font-mono text-[12px] italic text-faint">// comment deleted by its author</p>
577577
) : (
@@ -797,7 +797,7 @@ function WriteupsPanel({ slug, me, isOwner, zipPassword, turnstileSiteKey }: { s
797797
<div className="space-y-3">
798798
{writeups.length === 0 && <p className="font-mono text-[13px] text-faint">No writeups yet — be the first.</p>}
799799
{writeups.map((w) => (
800-
<div key={w.id} className={`rounded-lg border bg-surface/30 p-4 ${w.isAuthorPick ? 'border-acid/50' : 'border-line'}`}>
800+
<div key={w.id} id={`writeup-${w.id}`} className={`rounded-lg border bg-surface/30 p-4 ${w.isAuthorPick ? 'border-acid/50' : 'border-line'}`}>
801801
<div className="font-mono text-[11px] text-faint">
802802
{w.isAuthorPick && <span className="mr-2 rounded border border-acid/50 px-1.5 py-px text-[10px] uppercase tracking-wider text-acid">★ intended solution</span>}
803803
{w.title ?? 'Writeup'} · {w.author} · {formatDate(w.createdAt)}

0 commit comments

Comments
 (0)