Skip to content

Commit 7902278

Browse files
Merge remote-tracking branch 'origin/main'
2 parents f030a00 + 5d4a8fe commit 7902278

File tree

4 files changed

+30
-47
lines changed

4 files changed

+30
-47
lines changed

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,13 @@ Paste a public GitHub URL. Get a shareable **Certificate of Death** — algorith
2020

2121
Got a dead repo? Add the badge to your README:
2222

23-
[![commitmentissues](https://img.shields.io/badge/%E2%9A%B0%20commitmentissues-declared%20dead-cc0000?style=for-the-badge&labelColor=1a0f06)](https://commitmentissues.dev)
23+
[![🪦 declared dead](https://img.shields.io/badge/%F0%9F%AA%A6%20declared%20dead-view%20certificate-C4A882?style=for-the-badge&labelColor=cc0000)](https://commitmentissues.dev)
2424

2525
```markdown
26-
[![commitmentissues](https://img.shields.io/badge/%E2%9A%B0%20commitmentissues-declared%20dead-cc0000?style=for-the-badge&labelColor=1a0f06)](https://commitmentissues.dev/?repo=YOUR_OWNER/YOUR_REPO)
26+
[![🪦 declared dead](https://img.shields.io/badge/%F0%9F%AA%A6%20declared%20dead-view%20certificate-C4A882?style=for-the-badge&labelColor=cc0000)](https://commitmentissues.dev/?repo=YOUR_OWNER/YOUR_REPO)
2727
```
2828

29-
Or embed the full certificate image:
30-
31-
```markdown
32-
[![Certificate of Death](https://commitmentissues.dev/api/certificate-image/YOUR_OWNER/YOUR_REPO)](https://commitmentissues.dev/?repo=YOUR_OWNER/YOUR_REPO)
33-
```
34-
35-
Both are generated automatically on the certificate page — just hit **Copy** after analyzing your repo.
29+
The badge and full certificate embed markdown are generated automatically on the certificate page — just hit **Copy** after analyzing your repo.
3630

3731
## Screenshots
3832

@@ -48,7 +42,7 @@ Both are generated automatically on the certificate page — just hit **Copy** a
4842
- **Algorithmic scoring**`src/lib/scoring.ts` computes a death index from commit activity, archive status, issue count, and time since last push
4943
- **Export** — PNG downloads in multiple aspect ratios: A4, Instagram (4:5 and 1:1), X/Twitter (16:9), Facebook feed, and Stories (9:16)
5044
- **Mobile share** — Native share sheet on iOS/Android with a story-formatted image
51-
- **README badge** — Embed a ` DECLARED DEAD` shields.io badge linking back to the certificate
45+
- **README badge** — Embed a `🪦 DECLARED DEAD | VIEW CERTIFICATE` shields.io badge linking back to the certificate
5246
- **Certificate embed** — Full certificate image via `/api/certificate-image/[owner]/[repo]` for GitHub READMEs
5347
- **Recently Buried** — Live scrolling feed of the latest public burials
5448
- **Famous Casualties** — Curated graveyard of famously abandoned repos

src/app/api/certificate-image/[owner]/[repo]/route.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ async function loadFont(family: string, weight: number): Promise<ArrayBuffer | n
2323
try {
2424
const css = await fetch(
2525
`https://fonts.googleapis.com/css2?family=${family.replace(/\s+/g, '+')}:wght@${weight}&display=swap`,
26-
{ headers: { 'User-Agent': 'Mozilla/5.0 Chrome/120' } }
26+
{ headers: { 'User-Agent': 'Mozilla/5.0 Chrome/120' }, signal: AbortSignal.timeout(3000) }
2727
).then(r => r.text())
2828
const m = css.match(/url\((https:\/\/fonts\.gstatic\.com[^)]+)\)\s+format\(['"]woff2['"]\)/)
2929
if (!m) return null
30-
return fetch(m[1]).then(r => r.arrayBuffer())
30+
return fetch(m[1], { signal: AbortSignal.timeout(3000) }).then(r => r.arrayBuffer())
3131
} catch {
3232
return null
3333
}

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/${encodeURIComponent('⚰ commitmentissues')}-${encodeURIComponent('declared dead')}-cc0000?style=for-the-badge&labelColor=1a0f06`
583+
const shieldsUrl = `https://img.shields.io/badge/%F0%9F%AA%A6%20declared%20dead-view%20certificate-C4A882?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/${encodeURIComponent('⚰ commitmentissues')}-${encodeURIComponent('declared dead')}-cc0000?style=for-the-badge&labelColor=1a0f06`
585+
const shieldsPreviewUrl = `https://img.shields.io/badge/%F0%9F%AA%A6%20declared%20dead-view%20certificate-C4A882?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
)

src/components/CertificateFixed.tsx

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,27 @@ const CertificateFixed = forwardRef<HTMLDivElement, Props>(
8787
>
8888
{PAPER_TEXTURE_SVG}
8989

90+
{showStamp && (
91+
<div
92+
ref={stampRef}
93+
className="stamp-animate"
94+
style={{
95+
position: 'absolute',
96+
bottom: '28px',
97+
left: '50%',
98+
transform: 'translateX(-50%)',
99+
pointerEvents: 'none',
100+
userSelect: 'none',
101+
zIndex: 10,
102+
}}
103+
>
104+
<div style={{ border: '5px solid rgba(139,26,26,0.72)', borderRadius: '4px', padding: '10px 28px', background: 'rgba(139,26,26,0.04)' }}>
105+
<span style={{ fontFamily: MONO, fontSize: '13px', fontWeight: 700, letterSpacing: '0.14em', textTransform: 'uppercase', color: 'rgba(139,26,26,0.75)', display: 'block', textAlign: 'center', whiteSpace: 'nowrap' }}>
106+
Issued by commitmentissues.dev
107+
</span>
108+
</div>
109+
</div>
110+
)}
90111

91112
<div
92113
style={{
@@ -179,26 +200,6 @@ const CertificateFixed = forwardRef<HTMLDivElement, Props>(
179200
</p>
180201
</div>
181202

182-
{showStamp && (
183-
<div
184-
ref={stampRef}
185-
className="stamp-animate"
186-
style={{
187-
marginTop: 'auto',
188-
display: 'flex',
189-
justifyContent: 'center',
190-
paddingBottom: '8px',
191-
pointerEvents: 'none',
192-
userSelect: 'none',
193-
}}
194-
>
195-
<div style={{ border: '5px solid rgba(139,26,26,0.72)', borderRadius: '4px', padding: '10px 28px', background: 'rgba(139,26,26,0.04)' }}>
196-
<span style={{ fontFamily: MONO, fontSize: '13px', fontWeight: 700, letterSpacing: '0.14em', textTransform: 'uppercase', color: 'rgba(139,26,26,0.75)', display: 'block', textAlign: 'center', whiteSpace: 'nowrap' }}>
197-
Issued by commitmentissues.dev
198-
</span>
199-
</div>
200-
</div>
201-
)}
202203

203204
</div>
204205
</div>

0 commit comments

Comments
 (0)