Skip to content

Commit 11aaa83

Browse files
committed
feat(site): add npm downloads badge to hero
Surface live monthly npm downloads for @pythoughts/pythinker-code in the hero, above the install command. Unify the badge accent across the site and README on the brand blue (#2b89ff).
1 parent bd1ba9b commit 11aaa83

3 files changed

Lines changed: 36 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<br />
1111

1212
[![npm version](https://img.shields.io/npm/v/@pythoughts/pythinker-code?style=for-the-badge&logo=npm&logoColor=white&color=CB3837&label=pythinker-code)](https://www.npmjs.com/package/@pythoughts/pythinker-code)
13-
[![Downloads](https://img.shields.io/npm/dm/@pythoughts/pythinker-code?style=for-the-badge&logo=npm&logoColor=white&color=16a34a&label=downloads)](https://www.npmjs.com/package/@pythoughts/pythinker-code)
13+
[![Downloads](https://img.shields.io/npm/dm/@pythoughts/pythinker-code?style=for-the-badge&logo=npm&logoColor=white&color=2b89ff&label=downloads)](https://www.npmjs.com/package/@pythoughts/pythinker-code)
1414
[![Node.js](https://img.shields.io/badge/Node.js-26%2B-339933?style=for-the-badge&logo=nodedotjs&logoColor=white)](https://github.com/Pythoughts-labs/pythinker-code/blob/main/package.json)
1515
[![License: MIT](https://img.shields.io/badge/License-MIT-16a34a.svg?style=for-the-badge)](https://github.com/Pythoughts-labs/pythinker-code/blob/main/LICENSE)
1616
[![CI](https://img.shields.io/github/actions/workflow/status/Pythoughts-labs/pythinker-code/ci.yml?branch=main&label=CI&style=for-the-badge&logo=githubactions&logoColor=white)](https://github.com/Pythoughts-labs/pythinker-code/actions/workflows/ci.yml?query=branch%3Amain)

‎apps/site/src/App.vue‎

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,20 @@ onUnmounted(() => {
227227
<h1>Pythinker Code</h1>
228228
<p class="hero-accent">Think first, then code.</p>
229229
<p class="hero-lead">An open-source AI engineering agent for your terminal. It reads your repo, edits files, runs commands, and iterates until the job is done.</p>
230+
<a
231+
class="hero-npm-badge"
232+
href="https://www.npmjs.com/package/@pythoughts/pythinker-code"
233+
target="_blank"
234+
rel="noopener"
235+
>
236+
<img
237+
src="https://img.shields.io/npm/dm/%40pythoughts%2Fpythinker-code?style=flat&logo=npm&logoColor=white&color=2b89ff&label=downloads"
238+
alt="npm downloads per month for @pythoughts/pythinker-code"
239+
width="161"
240+
height="20"
241+
loading="lazy"
242+
/>
243+
</a>
230244
<div class="hero-install">
231245
<InstallCommand />
232246
</div>
@@ -630,7 +644,7 @@ onUnmounted(() => {
630644
631645
.hero-install {
632646
max-width: 720px;
633-
margin: 36px auto 0;
647+
margin: 10px auto 0;
634648
}
635649
636650
.hero-download-milestone {
@@ -639,6 +653,25 @@ onUnmounted(() => {
639653
justify-content: center;
640654
}
641655
656+
.hero-npm-badge {
657+
display: inline-flex;
658+
margin-top: 14px;
659+
border-radius: var(--radius);
660+
opacity: 0.85;
661+
transition: opacity 0.2s ease;
662+
}
663+
664+
.hero-npm-badge:hover {
665+
opacity: 1;
666+
}
667+
668+
/* ponytail: width:auto lets the badge grow as the download count does; the width attr only reserves space */
669+
.hero-npm-badge img {
670+
display: block;
671+
width: auto;
672+
height: 20px;
673+
}
674+
642675
.hero-caption {
643676
margin-top: 12px;
644677
color: var(--ink-subtle);

‎apps/site/src/components/LegacyDownloadsPopup.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const visible = ref(true);
2525
aria-label="View pythinker-code download statistics on Pepy"
2626
>
2727
<img
28-
src="https://static.pepy.tech/personalized-badge/pythinker-code?period=total&amp;units=INTERNATIONAL_SYSTEM&amp;left_color=BLACK&amp;right_color=GREEN&amp;left_text=downloads"
28+
src="https://static.pepy.tech/personalized-badge/pythinker-code?period=total&amp;units=INTERNATIONAL_SYSTEM&amp;left_color=BLACK&amp;right_color=BLUE&amp;left_text=downloads"
2929
alt="PyPI download count for pythinker-code"
3030
height="20"
3131
/>

0 commit comments

Comments
 (0)