Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tools/star-tracker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,22 @@ async function backfillRepo(
return { mode: 'sampled', stargazers_count: count };
}

// -- Favicon ----------------------------------------------------------------

// Lucide `star` + `trending-up` combined: a gold star with a blue chart
// line rising to meet it. Telegraphs "tracking stars over time" at favicon
// scale. Inlined so it ships with the Worker — no static asset bucket needed.
const FAVICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5"><polyline points="2,21 6,17 10,19 14,11" stroke="#2196f3"/><path d="M17 1.5 L18.1 4.95 L21.8 4.95 L18.8 7.1 L19.9 10.5 L17 8.4 L14.1 10.5 L15.2 7.1 L12.2 4.95 L15.9 4.95 Z" fill="#ffd740" stroke="#ffd740"/></svg>`;

app.get('/favicon.svg', () => {
return new Response(FAVICON_SVG, {
headers: {
'content-type': 'image/svg+xml; charset=utf-8',
'cache-control': 'public, max-age=86400',
},
});
});

// -- Landing ----------------------------------------------------------------

app.get('/', (c) => c.html(pages.landing(c.get('user'))));
Expand Down
5 changes: 4 additions & 1 deletion tools/star-tracker/src/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function shell(title: string, user: User | null, body: string): string {
<html lang="en"><head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<title>${esc(title)}</title>
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-P2YBZ0W8HQ"></script>
<script>
window.dataLayer = window.dataLayer || [];
Expand All @@ -47,6 +48,8 @@ gtag('config', 'G-P2YBZ0W8HQ');
@media (prefers-color-scheme: dark) { body { background: #0b0f17; color: #e2e8f0; } a { color: #38bdf8; } code, pre { background: #111827 !important; color: #e2e8f0 !important; } .warn { background: #422006 !important; color: #fde68a !important; } header { border-color: #1e293b !important; } .card { background: #111827 !important; border-color: #1e293b !important; } }
header { display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; padding-bottom: 1rem; border-bottom: 1px solid #e2e8f0; margin-bottom: 1.5rem; font-size: 0.95rem; }
header a, header form { color: inherit; text-decoration: none; }
header a.brand { display: inline-flex; align-items: center; gap: 6px; }
header a.brand img { display: block; }
header strong { font-weight: 700; }
@media (max-width: 600px) { header .muted { display: block; margin-top: 2px; } }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
Expand Down Expand Up @@ -137,7 +140,7 @@ gtag('config', 'G-P2YBZ0W8HQ');
</style></head>
<body>
<header>
<span><strong><a href="/">stars.wavekat.com</a></strong> <span class="muted">— cumulative star history for any GitHub org</span></span>
<span><strong><a href="/" class="brand"><img src="/favicon.svg" alt="" width="18" height="18"/>stars.wavekat.com</a></strong> <span class="muted">— cumulative star history for any GitHub org</span></span>
<span>${nav}</span>
</header>
${body}
Expand Down
Loading