Skip to content

Commit 72239de

Browse files
committed
feat(site): homepage polish — hero stats, license badge, search, pagination
- Show plugin/author counts as prominent pixel-font stats in the hero - Style license label with distinct blue badge in both light and dark mode - Extend plugin search to match tags and author name/username - Lower pagination compact-form threshold to >8 pages; set page size to 28
1 parent cf11a3d commit 72239de

4 files changed

Lines changed: 34 additions & 8 deletions

File tree

site/src/components/Header.astro

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,20 @@ const { pluginCount, authorCount } = Astro.props;
2020
Community-driven plugin marketplace for Claude Code
2121
</p>
2222
<div
23-
class="mt-4 flex items-center justify-center gap-6 text-base text-gray-500"
23+
class="mt-8 flex items-start justify-center gap-12 sm:gap-20"
2424
>
25-
<span><strong class="text-white">{pluginCount}</strong> plugins</span>
26-
<span><strong class="text-white">{authorCount}</strong> authors</span>
25+
<div class="flex flex-col items-center">
26+
<span class="font-pixel text-4xl sm:text-5xl font-bold leading-none text-white">
27+
{pluginCount}
28+
</span>
29+
<span class="mt-2 text-sm text-gray-400">plugins</span>
30+
</div>
31+
<div class="flex flex-col items-center">
32+
<span class="font-pixel text-4xl sm:text-5xl font-bold leading-none text-white">
33+
{authorCount}
34+
</span>
35+
<span class="mt-2 text-sm text-gray-400">authors</span>
36+
</div>
2737
</div>
2838
<div class="mt-4 inline-flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 backdrop-blur-sm px-3 py-1.5">
2939
<code class="text-base text-gray-300">/plugin marketplace add nullorder/agenthub</code>

site/src/components/PluginCard.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const categoryColor = categoryColors[category] || categoryColors.other;
9393
</span>
9494
))}
9595
{license && (
96-
<span class="rounded bg-white/10 px-2 py-0.5 text-xs text-gray-400">
96+
<span class="license-badge rounded px-2 py-0.5 text-xs">
9797
{license}
9898
</span>
9999
)}
@@ -162,7 +162,7 @@ const categoryColor = categoryColors[category] || categoryColors.other;
162162
)}
163163
<div class="flex items-center gap-2">
164164
{license && (
165-
<span class="rounded bg-white/10 px-2 py-0.5 text-xs text-gray-400">
165+
<span class="license-badge rounded px-2 py-0.5 text-xs">
166166
{license}
167167
</span>
168168
)}

site/src/pages/index.astro

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const allTags = [
2727
const authorCount = [...new Set(plugins.map((p: any) => p.author.username))]
2828
.length;
2929
30-
const PLUGINS_PER_PAGE = 32;
30+
const PLUGINS_PER_PAGE = 28;
3131
const initialPlugins = plugins.slice(0, PLUGINS_PER_PAGE);
3232
const totalPluginCount = plugins.length;
3333
---
@@ -230,7 +230,12 @@ const totalPluginCount = plugins.length;
230230
const matchesSearch =
231231
!currentSearch ||
232232
p.name.toLowerCase().includes(currentSearch) ||
233-
(p.description || "").toLowerCase().includes(currentSearch);
233+
(p.description || "").toLowerCase().includes(currentSearch) ||
234+
(p.tags || []).some((t) =>
235+
t.toLowerCase().includes(currentSearch),
236+
) ||
237+
(p.author?.name || "").toLowerCase().includes(currentSearch) ||
238+
(p.author?.username || "").toLowerCase().includes(currentSearch);
234239
const matchesCategory =
235240
currentCategory === "all" || p.category === currentCategory;
236241
const matchesTag =
@@ -312,7 +317,7 @@ const totalPluginCount = plugins.length;
312317
if (pages <= 1) return;
313318

314319
// Compact form when there are many pages: 1 < … current … > last
315-
if (pages > 10) {
320+
if (pages > 8) {
316321
const atStart = currentPage === 1;
317322
const atEnd = currentPage === pages;
318323

site/src/styles/global.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ html.light .modal-content { background-color: rgba(255, 255, 255, 0.95); }
7878

7979
.text-always-white { color: #fff !important; }
8080

81+
/* License badge — distinct blue styling in both themes */
82+
.license-badge {
83+
background-color: rgba(59, 130, 246, 0.15);
84+
color: #93c5fd;
85+
}
86+
87+
html.light .license-badge {
88+
background-color: rgba(59, 130, 246, 0.12);
89+
color: #1d4ed8;
90+
}
91+
8192
/* Background image toggle */
8293
.bg-dark { display: block; }
8394
.bg-light { display: none; }

0 commit comments

Comments
 (0)