Skip to content

Commit f5fb2a5

Browse files
fix: badge style and remove full certificate embed
- Badge: red left (🪦 declared dead) + dark right (view certificate), for-the-badge - Removed full certificate embed row — badge only - Cleaned up unused certMd, certImageUrl, embedCopied Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4826b12 commit f5fb2a5

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

src/components/CertificateCard.tsx

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export default function CertificateCard({ cert, onReset }: Props) {
9393
const [showInlineShare, setShowInlineShare] = useState(false)
9494
const [copied, setCopied] = useState(false)
9595
const [badgeCopied, setBadgeCopied] = useState(false)
96-
const [embedCopied, setEmbedCopied] = useState(false)
9796

9897
function getPixelRatio(highQuality = false): number {
9998
if (typeof navigator === 'undefined') return 2
@@ -581,12 +580,9 @@ export default function CertificateCard({ cert, onReset }: Props) {
581580
{(() => {
582581
const fullName = cert.repoData.fullName
583582
const repoUrl = `https://commitmentissues.dev/?repo=${encodeURIComponent(fullName)}`
584-
const shieldsUrl = `https://img.shields.io/badge/%F0%9F%AA%A6%20declared%20dead-commitmentissues.dev-cc0000?style=flat-square`
583+
const shieldsUrl = `https://img.shields.io/badge/%F0%9F%AA%A6%20declared%20dead-view%20certificate-1a0f06?style=for-the-badge&labelColor=cc0000`
585584
const badgeMd = `[![commitmentissues](${shieldsUrl})](${repoUrl})`
586-
const certImageUrl = `https://commitmentissues.dev/api/certificate-image/${fullName}`
587-
const certMd = `[![${cert.repoData.name} — Certificate of Death](${certImageUrl})](${repoUrl})`
588-
589-
const shieldsPreviewUrl = `https://img.shields.io/badge/%F0%9F%AA%A6%20declared%20dead-commitmentissues.dev-cc0000?style=flat-square`
585+
const shieldsPreviewUrl = `https://img.shields.io/badge/%F0%9F%AA%A6%20declared%20dead-view%20certificate-1a0f06?style=for-the-badge&labelColor=cc0000`
590586

591587
const CopyIcon = ({ done }: { done: boolean }) => done
592588
? <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>
@@ -627,22 +623,14 @@ export default function CertificateCard({ cert, onReset }: Props) {
627623
</div>
628624
<div style={{ border: '2px solid #1a1a1a', background: '#FAF6EF', overflow: 'hidden' }}>
629625
{/* Badge row — preview + copy icon */}
630-
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '12px 12px 12px 14px', borderBottom: '1px solid #d8cfc4', gap: '12px' }}>
626+
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '12px 12px 12px 14px', gap: '12px' }}>
631627
<div style={{ display: 'flex', flexDirection: 'column', gap: '6px', minWidth: 0 }}>
632628
{/* eslint-disable-next-line @next/next/no-img-element */}
633629
<img src={shieldsPreviewUrl} alt="commitmentissues badge" style={{ height: '22px', display: 'block' }} />
634630
<span style={{ fontFamily: UI, fontSize: '11px', color: '#8a8a8a' }}>links to certificate on commitmentissues.dev</span>
635631
</div>
636632
{copyBtn(badgeCopied, async () => { try { await navigator.clipboard.writeText(badgeMd); setBadgeCopied(true); setTimeout(() => setBadgeCopied(false), 2000) } catch { /* ignore */ } })}
637633
</div>
638-
{/* Full certificate row */}
639-
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '12px 12px 12px 14px', gap: '12px' }}>
640-
<div style={{ display: 'flex', flexDirection: 'column', gap: '2px', minWidth: 0 }}>
641-
<span style={{ fontFamily: UI, fontSize: '13px', fontWeight: 600, color: '#1a1a1a' }}>Full certificate</span>
642-
<span style={{ fontFamily: UI, fontSize: '11px', color: '#8a8a8a' }}>embeds certificate image in README</span>
643-
</div>
644-
{copyBtn(embedCopied, async () => { try { await navigator.clipboard.writeText(certMd); setEmbedCopied(true); setTimeout(() => setEmbedCopied(false), 2000) } catch { /* ignore */ } })}
645-
</div>
646634
</div>
647635
</div>
648636
)

0 commit comments

Comments
 (0)