Skip to content

Commit 1572382

Browse files
author
patj
committed
Sponsor section, live contributor count, fix Store-highlight scoping
1. Download: the Microsoft Store link's promoted styling is now scoped to .is-recommended, so it only glows when the visitor is actually on Windows — previously it read as highlighted on every platform 2. New Sponsor section (+nav/footer links): Open Collective CTA with impact tiles — AI development subscriptions, control-device lab, public ledger — plus a gear-donation path for the device lab 3. Contribute facts: live contributor count via the GitHub contributors Link-header trick (per_page=1&anon=1 -> rel=last page), 1h cache, static 46 fallback
1 parent 90bba10 commit 1572382

3 files changed

Lines changed: 100 additions & 4 deletions

File tree

‎assets/js/downloads.js‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,38 @@
113113
.catch(function () { /* keep fallback /releases/latest links */ });
114114
}
115115

116-
function init() { highlight(); loadRelease(); }
116+
// Live contributor count: GitHub exposes the total as the last-page number
117+
// in the Link header of /contributors?per_page=1 (anon=1 counts everyone).
118+
function loadContributors() {
119+
var els = document.querySelectorAll('[data-contributor-count]');
120+
if (!els.length || !window.fetch) return;
121+
var CC_KEY = 'aetherContributorCount';
122+
try {
123+
var c = JSON.parse(localStorage.getItem(CC_KEY));
124+
if (c && Date.now() - c.t < TTL) {
125+
for (var i = 0; i < els.length; i++) els[i].textContent = c.n;
126+
return;
127+
}
128+
} catch (e) {}
129+
fetch('https://api.github.com/repos/' + REPO + '/contributors?per_page=1&anon=1', {
130+
headers: { Accept: 'application/vnd.github+json' }
131+
})
132+
.then(function (res) {
133+
if (!res.ok) throw new Error('github ' + res.status);
134+
var link = res.headers.get('Link') || '';
135+
var m = link.match(/[?&]page=(\d+)>;\s*rel="last"/);
136+
if (!m) throw new Error('no last page');
137+
return parseInt(m[1], 10);
138+
})
139+
.then(function (n) {
140+
if (!n) return;
141+
try { localStorage.setItem(CC_KEY, JSON.stringify({ t: Date.now(), n: n })); } catch (e) {}
142+
for (var i = 0; i < els.length; i++) els[i].textContent = n;
143+
})
144+
.catch(function () { /* keep the static fallback count */ });
145+
}
146+
147+
function init() { highlight(); loadRelease(); loadContributors(); }
117148
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init);
118149
else init();
119150
})();

‎index.html‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<a href="#built">How it's built</a>
4646
<a href="#partners">Partners</a>
4747
<a href="#contribute">Contribute</a>
48+
<a href="#sponsor">Sponsor</a>
4849
<div class="nav-item">
4950
<button class="nav-dd-toggle" type="button" aria-haspopup="true">
5051
Support
@@ -471,6 +472,7 @@ <h2 style="margin-top:16px; font-size: clamp(28px, 4vw, 40px);">Help build the c
471472
<a class="btn btn-ghost" href="https://github.com/aethersdr/AetherSDR/discussions" target="_blank" rel="noopener">Join Discussions</a>
472473
</div>
473474
<div class="contribute-facts">
475+
<span class="f"><b data-contributor-count>46</b> contributors and counting</span>
474476
<span class="f"><b>~50</b> PRs merged / week</span>
475477
<span class="f"><b>GPG-signed</b> commits</span>
476478
<span class="f"><b>≥6</b> AI tools in the codebase</span>
@@ -481,6 +483,47 @@ <h2 style="margin-top:16px; font-size: clamp(28px, 4vw, 40px);">Help build the c
481483
</div>
482484
</section>
483485

486+
<!-- ===================== SPONSOR ===================== -->
487+
<section class="block" id="sponsor" style="padding-top: 10px;">
488+
<div class="wrap">
489+
<div class="cta-banner">
490+
<span class="eyebrow"><span class="dot"></span> Sponsor AetherSDR</span>
491+
<h2 style="margin-top:16px;">Fuel the next release</h2>
492+
<p>AetherSDR is free, GPL, and always will be. Sponsorship through
493+
<a href="https://opencollective.com/aethersdr" target="_blank" rel="noopener">Open Collective</a>
494+
directly drives the product forward — it funds the AI development subscriptions behind
495+
our ~50 merged PRs a week, and puts real control hardware on the test bench so knobs,
496+
dials, and decks work the day we ship them.</p>
497+
<div class="sponsor-impact">
498+
<div class="imp">
499+
<div class="k grad-text">AI development</div>
500+
<div class="v">Claude Code &amp; AetherClaude subscriptions — the engine behind the release pace</div>
501+
</div>
502+
<div class="imp">
503+
<div class="k grad-text">Device lab</div>
504+
<div class="v">Buying the knobs, dials, and Stream Decks we implement and test on real hardware</div>
505+
</div>
506+
<div class="imp">
507+
<div class="k grad-text">Public ledger</div>
508+
<div class="v">Every dollar in and out is visible on Open Collective — no black box</div>
509+
</div>
510+
</div>
511+
<div class="hero-cta" style="justify-content:center; margin-top:26px;">
512+
<a class="btn btn-primary" href="https://opencollective.com/aethersdr" target="_blank" rel="noopener">
513+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.8 8.6a5.5 5.5 0 0 0-9.8-2.6 5.5 5.5 0 0 0-9.8 2.6c0 5.3 7.2 9.9 9.8 11.4 2.6-1.5 9.8-6.1 9.8-11.4z" transform="translate(1 1) scale(0.92)"/></svg>
514+
Sponsor on Open Collective
515+
</a>
516+
<a class="btn btn-ghost" href="https://opencollective.com/aethersdr#category-BUDGET" target="_blank" rel="noopener">See the public ledger</a>
517+
</div>
518+
<p style="color:var(--muted); font-size:13.5px; margin-top:20px;">
519+
Prefer to contribute gear instead? Controller hardware loans and donations for the
520+
device lab are just as welcome —
521+
<a href="https://github.com/aethersdr/AetherSDR/discussions">start a thread</a>.
522+
</p>
523+
</div>
524+
</div>
525+
</section>
526+
484527
<!-- ===================== FOOTER ===================== -->
485528
<footer class="foot">
486529
<div class="wrap">
@@ -502,6 +545,7 @@ <h4>Community</h4>
502545
<a href="https://github.com/aethersdr/AetherSDR/discussions">Discussions</a>
503546
<a href="https://github.com/aethersdr/AetherSDR/issues">Issue tracker</a>
504547
<a href="https://github.com/aethersdr/AetherSDR/blob/main/CONTRIBUTING.md">Contributing</a>
548+
<a href="https://opencollective.com/aethersdr">Sponsor us</a>
505549
</div>
506550
<div class="foot-col">
507551
<h4>Resources</h4>

‎styles.css‎

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,16 @@ section.block { padding: 84px 0; }
367367
}
368368
.dl-card .variants a:hover { border-color: var(--cyan); color: var(--ink); background: rgba(93,227,255,0.06); }
369369
.dl-card .variants .arch { color: var(--muted); font-size: 12.5px; font-family: var(--mono); }
370-
.dl-card .variants a.primary-dl {
370+
/* The Store link is only visually promoted when this card is the visitor's
371+
detected platform — otherwise it renders like any other variant. */
372+
.dl-card.is-recommended .variants a.primary-dl {
371373
border-color: var(--line-hi);
372374
background: var(--grad-soft);
373375
color: var(--ink);
374376
font-weight: 640;
375377
}
376-
.dl-card .variants a.primary-dl .arch { color: var(--cyan); }
377-
.dl-card .variants a.primary-dl:hover { border-color: var(--cyan); background: rgba(93,227,255,0.12); }
378+
.dl-card.is-recommended .variants a.primary-dl .arch { color: var(--cyan); }
379+
.dl-card.is-recommended .variants a.primary-dl:hover { border-color: var(--cyan); background: rgba(93,227,255,0.12); }
378380
.dl-card .winget {
379381
margin-top: 2px;
380382
font-family: var(--mono);
@@ -448,6 +450,25 @@ section.block { padding: 84px 0; }
448450
}
449451
.bridge-guard svg { width: 16px; height: 16px; stroke: var(--aqua); fill: none; stroke-width: 1.8; flex: none; margin-top: 2px; }
450452

453+
/* ---------- Sponsor ---------- */
454+
.sponsor-impact {
455+
display: grid;
456+
grid-template-columns: repeat(3, 1fr);
457+
gap: 14px;
458+
max-width: 860px;
459+
margin: 28px auto 0;
460+
text-align: left;
461+
}
462+
.sponsor-impact .imp {
463+
border: 1px solid var(--line);
464+
border-radius: var(--radius-sm);
465+
background: rgba(255,255,255,0.02);
466+
padding: 16px 18px;
467+
}
468+
.sponsor-impact .k { font-size: 15px; font-weight: 720; letter-spacing: -0.01em; }
469+
.sponsor-impact .v { color: var(--muted); font-size: 13.5px; margin-top: 5px; line-height: 1.5; }
470+
@media (max-width: 700px) { .sponsor-impact { grid-template-columns: 1fr; } }
471+
451472
/* ---------- Contribute ---------- */
452473
.contribute-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
453474
.contribute-facts {

0 commit comments

Comments
 (0)