Skip to content

Commit e74d7b3

Browse files
committed
refactor(frontend): self-styled coffee link instead of the Ko-fi image badge
Replace the external Ko-fi badge image (storage.ko-fi.com) with a small styled link to the same ko-fi.com/N4N31DPNUS. It matches the UI, drops a cross-origin request, and — unlike the badge image — works offline now that Pongo is a PWA (the service worker only caches same-origin assets). The README keeps the image badge, which is the right convention there.
1 parent 2eebb1e commit e74d7b3

2 files changed

Lines changed: 32 additions & 7 deletions

File tree

lobby_worker/index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,13 @@ <h1 class="game-title">PONGO</h1>
203203
</div>
204204

205205
<div style="margin-top: 10px; display: flex; justify-content: center">
206-
<a href="https://ko-fi.com/N4N31DPNUS" target="_blank" rel="noopener noreferrer">
207-
<img
208-
height="34"
209-
style="border: 0px; height: 34px"
210-
src="https://storage.ko-fi.com/cdn/kofi2.png?v=6"
211-
alt="Buy Me a Coffee at ko-fi.com"
212-
/>
206+
<a
207+
class="kofi-link"
208+
href="https://ko-fi.com/N4N31DPNUS"
209+
target="_blank"
210+
rel="noopener noreferrer"
211+
>
212+
<span aria-hidden="true"></span> Buy me a coffee
213213
</a>
214214
</div>
215215
</div>

lobby_worker/style.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,3 +1049,28 @@ body.touch-enabled .popout-btn {
10491049
padding: 8px 10px;
10501050
font-size: 14px;
10511051
}
1052+
1053+
/* "Buy me a coffee" tip-jar link — links to Ko-fi, self-styled (no external
1054+
image), so it matches the UI and works offline in the PWA. */
1055+
.kofi-link {
1056+
display: inline-flex;
1057+
align-items: center;
1058+
gap: 6px;
1059+
padding: 6px 14px;
1060+
border-radius: 999px;
1061+
border: 1px solid rgba(148, 163, 184, 0.25);
1062+
color: var(--text-muted, #94a3b8);
1063+
font-size: 13px;
1064+
font-weight: 600;
1065+
text-decoration: none;
1066+
transition:
1067+
color 0.2s,
1068+
border-color 0.2s,
1069+
background 0.2s;
1070+
}
1071+
1072+
.kofi-link:hover {
1073+
color: #fff;
1074+
border-color: rgba(99, 102, 241, 0.5);
1075+
background: rgba(99, 102, 241, 0.12);
1076+
}

0 commit comments

Comments
 (0)