Skip to content

Commit c604fb9

Browse files
committed
feat: sponsor nudge polish + pink fish logo
SponsorNudge: - Larger fonts: title 13px (was 12px/xs), body 12px (was xs/11px), button 12px - Pink fish logo (favicon-pink.svg) now appears inline in the message text replacing the word 'Fish' — e.g. 'Pretty 🐟 lives rent-free...' - Removed logo from header row (cleaner title line) New asset: public/favicon-pink.svg - Same design as favicon.svg but pink (#ec4899 body, #f9a8d4 connectors) - Matches the sponsor/heart color theme
1 parent 5f15c00 commit c604fb9

2 files changed

Lines changed: 33 additions & 18 deletions

File tree

public/favicon-pink.svg

Lines changed: 10 additions & 0 deletions
Loading

src/components/app/SponsorNudge.tsx

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,15 @@ export function recordNudgeShown() {
4949
writeState({ showCount: s.showCount + 1, lastShownAt: Date.now() })
5050
}
5151

52-
// Rotating messages — human, whimsical, not needy
53-
const MESSAGES = [
54-
"Pretty Fish lives rent-free in your browser. If it's been useful, throwing a few bucks our way keeps the lights on (and the fish swimming).",
55-
"Built with too much coffee and genuine love for good diagrams. If Pretty Fish saved you some time, consider tossing a coin to your developer.",
56-
"Pretty Fish is free, open-source, and powered by stubbornness. If you've enjoyed it, GitHub Sponsors is a lovely way to say so.",
52+
// Rotating messages — [before logo, after logo]
53+
// The Pretty Fish pink logo is rendered inline between the two parts.
54+
const MESSAGES: [string, string][] = [
55+
["Pretty ", " lives rent-free in your browser. If it's been useful, throwing a few bucks our way keeps the lights on (and the fish swimming)."],
56+
["Built with too much coffee and genuine love for good diagrams. If Pretty ", " saved you some time, consider tossing a coin to your developer."],
57+
["Pretty ", " is free, open-source, and powered by stubbornness. If you've enjoyed it, GitHub Sponsors is a lovely way to say so."],
5758
]
5859

59-
function getMessage(showCount: number): string {
60+
function getMessage(showCount: number): [string, string] {
6061
return MESSAGES[showCount % MESSAGES.length]!
6162
}
6263

@@ -93,35 +94,39 @@ export function SponsorNudge({ visible, onDismiss, showCount }: SponsorNudgeProp
9394
mounted ? 'opacity-100 translate-y-0' : 'opacity-0 -translate-y-2',
9495
)}
9596
>
96-
<div className="p-3.5">
97-
<div className="flex items-start justify-between gap-2 mb-2">
98-
<div className="flex items-center gap-1.5">
99-
<img src="/favicon.svg" alt="" className="w-4 h-4 shrink-0" />
100-
<span className="text-xs font-semibold text-foreground">Support Pretty Fish</span>
101-
</div>
97+
<div className="p-4">
98+
<div className="flex items-start justify-between gap-2 mb-2.5">
99+
<span className="text-[13px] font-semibold text-foreground">Support Pretty Fish</span>
102100
<button
103101
type="button"
104102
aria-label="Dismiss"
105103
onClick={onDismiss}
106-
className="text-muted-foreground hover:text-foreground transition-colors -mt-0.5 -mr-0.5 p-0.5 rounded"
104+
className="text-muted-foreground hover:text-foreground transition-colors -mt-0.5 -mr-0.5 p-0.5 rounded shrink-0"
107105
>
108-
<X className="w-3 h-3" />
106+
<X className="w-3.5 h-3.5" />
109107
</button>
110108
</div>
111-
<p className="text-xs text-muted-foreground leading-relaxed mb-3">
112-
{getMessage(showCount)}
109+
<p className="text-[12px] text-muted-foreground leading-relaxed mb-3.5">
110+
{(() => {
111+
const [before, after] = getMessage(showCount)
112+
return (
113+
<>
114+
{before}<img src="/favicon-pink.svg" alt="Pretty Fish" className="inline w-4 h-4 mx-0.5 align-middle" />{after}
115+
</>
116+
)
117+
})()}
113118
</p>
114119
<a
115120
href="https://github.com/sponsors/pastelsky"
116121
target="_blank"
117122
rel="noopener noreferrer"
118123
onClick={onDismiss}
119124
className={cn(
120-
'inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors',
125+
'inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[12px] font-medium transition-colors',
121126
'bg-pink-500 hover:bg-pink-600 text-white',
122127
)}
123128
>
124-
<Heart className="w-3 h-3" weight="fill" />
129+
<Heart className="w-3.5 h-3.5" weight="fill" />
125130
Sponsor on GitHub
126131
</a>
127132
</div>

0 commit comments

Comments
 (0)