Skip to content

Commit a3a1b96

Browse files
2u841rclaude
andcommitted
Extend Twitter photo fallback to guest page and FacePile
- guest/[name_slug]: fix broken github.com/null.png (e.g. Dr. Courtney Tolinski) - FacePile: add twitter fallback so ShowCard faces on shows/ page also benefit Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent aeb27ba commit a3a1b96

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

src/lib/FacePile.svelte

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
type FaceForThePile = {
33
name: string;
44
github: string;
5+
twitter?: string;
56
};
67
interface Props {
78
size?: string;
@@ -13,7 +14,14 @@
1314

1415
<div class="pile" style:--face-size={size} style:--face-count={faces.length}>
1516
{#each faces as face}
16-
<img src="https://github.com/{face.github || 'null'}.png" alt={face.name} />
17+
<img
18+
src={face.github
19+
? `https://github.com/${face.github}.png`
20+
: face.twitter
21+
? `https://unavatar.io/twitter/${face.twitter}`
22+
: `https://github.com/null.png`}
23+
alt={face.name}
24+
/>
1725
{/each}
1826
</div>
1927

src/lib/ShowCard.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@
125125
...hosts,
126126
...(show.guests || []).map((guest) => ({
127127
name: guest.Guest.name,
128-
github: guest.Guest.github || ''
128+
github: guest.Guest.github || '',
129+
twitter: guest.Guest.twitter || ''
129130
}))
130131
]}
131132
/>

src/routes/(site)/guest/[name_slug]/+page.svelte

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99
{#if guest}
1010
<section>
1111
<header>
12-
<img src={`https://github.com/${guest.github}.png`} alt={guest.name} />
12+
<img
13+
src={guest.github
14+
? `https://github.com/${guest.github}.png`
15+
: guest.twitter
16+
? `https://unavatar.io/twitter/${guest.twitter}`
17+
: `https://github.com/null.png`}
18+
alt={guest.name}
19+
/>
1320
<div>
1421
<h1>{guest.name}</h1>
1522
{#if guest.twitter || guest.github || guest.url}

0 commit comments

Comments
 (0)