Skip to content

Commit 1f5b3d0

Browse files
ux: remove Add to README section and unify card backgrounds
- Remove entire "Add to README" badge embed from CertificateCard - Match Famous Casualties card background (#EDE8E1) to Recently Buried Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ce9bd40 commit 1f5b3d0

File tree

2 files changed

+1
-62
lines changed

2 files changed

+1
-62
lines changed

src/components/CertificateCard.tsx

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export default function CertificateCard({ cert, onReset }: Props) {
9292
const [exportError, setExportError] = useState<string | null>(null)
9393
const [showInlineShare, setShowInlineShare] = useState(false)
9494
const [copied, setCopied] = useState(false)
95-
const [badgeCopied, setBadgeCopied] = useState(false)
9695

9796
function getPixelRatio(highQuality = false): number {
9897
if (typeof navigator === 'undefined') return 2
@@ -576,66 +575,6 @@ export default function CertificateCard({ cert, onReset }: Props) {
576575
</p>
577576
)}
578577

579-
{/* README embed */}
580-
{(() => {
581-
const fullName = cert.repoData.fullName
582-
const repoUrl = `https://commitmentissues.dev/?repo=${encodeURIComponent(fullName)}`
583-
const shieldsUrl = `https://img.shields.io/badge/%F0%9F%AA%A6%20declared%20dead-view%20certificate-555?style=for-the-badge&labelColor=cc0000`
584-
const badgeMd = `[![commitmentissues](${shieldsUrl})](${repoUrl})`
585-
const shieldsPreviewUrl = `https://img.shields.io/badge/%F0%9F%AA%A6%20declared%20dead-view%20certificate-555?style=for-the-badge&labelColor=cc0000`
586-
587-
const CopyIcon = ({ done }: { done: boolean }) => done
588-
? <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"><polyline points="20 6 9 17 4 12"/></svg>
589-
: <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><rect x="9" y="9" width="13" height="13" rx="1"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
590-
591-
const copyBtn = (copied: boolean, onCopy: () => void) => (
592-
<button
593-
type="button"
594-
onClick={onCopy}
595-
title="Copy markdown"
596-
style={{
597-
flexShrink: 0,
598-
width: '40px',
599-
height: '40px',
600-
display: 'flex',
601-
alignItems: 'center',
602-
justifyContent: 'center',
603-
background: copied ? '#2a5a2a' : '#0a0a0a',
604-
color: '#fff',
605-
border: 'none',
606-
cursor: 'pointer',
607-
transition: 'background 0.15s',
608-
}}
609-
>
610-
<CopyIcon done={copied} />
611-
</button>
612-
)
613-
614-
return (
615-
<div style={{ display: 'flex', flexDirection: 'column', marginTop: '4px' }}>
616-
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '6px', marginBottom: '8px' }}>
617-
<svg width="13" height="13" viewBox="0 0 24 24" fill="#8a8a8a" aria-hidden>
618-
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.385-1.335-1.755-1.335-1.755-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 21.795 24 17.295 24 12c0-6.63-5.37-12-12-12z"/>
619-
</svg>
620-
<span style={{ fontFamily: UI, fontSize: '11px', fontWeight: 600, color: '#8a8a8a', letterSpacing: '0.08em', textTransform: 'uppercase' }}>
621-
Add to README
622-
</span>
623-
</div>
624-
<div style={{ border: '2px solid #1a1a1a', background: '#FAF6EF', overflow: 'hidden' }}>
625-
{/* Badge row — preview + copy icon */}
626-
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '12px 12px 12px 14px', gap: '12px' }}>
627-
<div style={{ display: 'flex', flexDirection: 'column', gap: '6px', minWidth: 0 }}>
628-
{/* eslint-disable-next-line @next/next/no-img-element */}
629-
<img src={shieldsPreviewUrl} alt="commitmentissues badge" style={{ height: '22px', display: 'block' }} />
630-
<span style={{ fontFamily: UI, fontSize: '11px', color: '#8a8a8a' }}>links to certificate on commitmentissues.dev</span>
631-
</div>
632-
{copyBtn(badgeCopied, async () => { try { await navigator.clipboard.writeText(badgeMd); setBadgeCopied(true); setTimeout(() => setBadgeCopied(false), 2000) } catch { /* ignore */ } })}
633-
</div>
634-
</div>
635-
</div>
636-
)
637-
})()}
638-
639578
{/* Bury another — text link */}
640579
<div style={{ textAlign: 'center', marginTop: '6px', marginBottom: '8px' }}>
641580
<button

src/components/Leaderboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default function Leaderboard({ onSelect }: Props) {
5858
minHeight: '184px',
5959
flexShrink: 0,
6060
padding: '20px',
61-
background: '#f2f2f2',
61+
background: '#EDE8E1',
6262
border: '2px solid #1a1a1a',
6363
borderRadius: '0px',
6464
cursor: 'pointer',

0 commit comments

Comments
 (0)