Skip to content

Commit e7f6f6b

Browse files
committed
refactor: streamline app card status display and update app descriptions for clarity
1 parent be30ea7 commit e7f6f6b

File tree

4 files changed

+20
-33
lines changed

4 files changed

+20
-33
lines changed

src/components/app-card.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ export function AppCard({
4040
const iconFilename = icon.split('/').pop() || 'app-icon.png'
4141
const [iconSrc, setIconSrc] = React.useState(icon)
4242
const iconBgColor = APP_COLORS[iconFilename] || 'rgb(99, 102, 241)'
43-
const statusLabel = preloaded ? 'PRELOADED' : 'MANUAL LOAD'
44-
const statusClasses = preloaded
45-
? 'border-border/60 text-muted-foreground/80'
46-
: 'border-primary/60 text-primary'
4743

4844
React.useEffect(() => {
4945
// Check if actual image exists, otherwise use placeholder
@@ -80,9 +76,11 @@ export function AppCard({
8076
<h3 className="font-sans font-bold text-base tracking-tight group-hover:text-primary transition-colors normal-case">
8177
{title}
8278
</h3>
83-
<span className={`font-mono text-[10px] uppercase tracking-[0.18em] px-2 py-[2px] rounded border ${statusClasses}`}>
84-
{statusLabel}
85-
</span>
79+
{!preloaded && (
80+
<span className="font-mono text-[10px] uppercase tracking-[0.18em] px-2 py-[2px] rounded border border-primary/60 text-primary">
81+
MANUAL LOAD
82+
</span>
83+
)}
8684
</div>
8785
<p className="text-sm text-muted-foreground line-clamp-4 leading-relaxed">
8886
{description}

src/pages/about-badge.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
System Breakdown
2828
</h1>
2929
<p class="font-mono text-sm text-muted-foreground max-w-2xl mx-auto">
30-
Hardware reference for rapid hacking: buttons, I/O, display, power, expansion. No fluff—just the parts and what they do.
30+
Hardware reference for rapid hacking: buttons, I/O, display, power, expansion.
3131
</p>
3232
</div>
3333
</div>

src/pages/apps.astro

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { getCollection } from 'astro:content'
77
88
// Fetch all apps from the content collection
99
const allApps = await getCollection('apps')
10+
const totalApps = allApps.length
1011
1112
const preloadedApps = allApps
1213
.filter((app) => app.data.preloaded)
@@ -20,13 +21,13 @@ const optionalCopy = optionalApps.length > 0
2021
? `We also maintain ${optionalApps.length} sideloadable builds below when you want to expand the catalog.`
2122
: 'Ready to flash your own code? Drop an app folder into /apps/ and it shows up beside the built-ins.'
2223
23-
const heroDescription = `Your Badger 2350 ships with ${preloadedApps.length} apps ready to boot. ${optionalCopy}`
24+
const heroDescription = `Browse ${totalApps} badge apps. ${preloadedApps.length} ship ready to boot. ${optionalCopy}`
2425
---
2526

26-
<Layout title="Preloaded Apps - Badger 2350 | Badger">
27+
<Layout title="Badge Apps - Badger 2350 | Badger">
2728
<ListingHero
2829
eyebrow="// READY TO USE"
29-
title="Preloaded"
30+
title="Badge"
3031
titleHighlight="Apps"
3132
description={heroDescription}
3233
/>
@@ -42,7 +43,7 @@ const heroDescription = `Your Badger 2350 ships with ${preloadedApps.length} app
4243
</div>
4344
</div>
4445
<div>
45-
<h3 class="font-semibold mb-1">Preloaded & Ready</h3>
46+
<h3 class="font-semibold mb-1">Built-In & Ready</h3>
4647
<p class="text-sm text-muted-foreground">
4748
All apps come installed and configured on your badge from day one.
4849
</p>
@@ -84,7 +85,7 @@ const heroDescription = `Your Badger 2350 ships with ${preloadedApps.length} app
8485
<section id="preloaded-apps" class="py-24 bg-muted/50">
8586
<div class="container">
8687
<div class="max-w-6xl mx-auto">
87-
<h2 class="text-3xl font-bold mb-8">Preloaded Apps</h2>
88+
<h2 class="text-3xl font-bold mb-8">Built-In Apps</h2>
8889

8990
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
9091
{preloadedApps.map((app) => (

src/pages/index.astro

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { getCollection } from 'astro:content'
1010
1111
// Fetch all hacks from the content collection
1212
const allHacks = await getCollection('hacks')
13+
const totalHacks = allHacks.length
1314
1415
// Filter and sort featured hacks
1516
const hacksWithFeature = allHacks.filter(hack =>
@@ -37,7 +38,8 @@ const featuredHacks = hacksWithFeature
3738
3839
// Fetch all apps from the content collection
3940
const allApps = await getCollection('apps')
40-
const featuredApps = allApps // Show all apps
41+
const totalApps = allApps.length
42+
const preloadedApps = allApps.filter((app) => app.data.preloaded)
4143
---
4244

4345
<Layout title="Badger - 2350 Hacks & Projects">
@@ -54,33 +56,20 @@ const featuredApps = allApps // Show all apps
5456
Hack. Tinker. Repeat.
5557
</h1>
5658
<p class="font-mono text-base text-muted-foreground max-w-prose leading-relaxed">
57-
A stripped-down catalog of experiments for the Badger 2350. No marketing fluff. Just code, hardware pins, and ways to bend them.
59+
A catalog of apps and hacks for the Tufty Badger 2350. Experiment, learn, build and have fun.
5860
</p>
5961
</div>
6062

61-
<div class="flex flex-col sm:flex-row gap-4">
62-
<Button asChild size="lg" client:load>
63-
<a href="#preloaded-apps" class="inline-flex items-center gap-2.5 px-5 py-3 font-mono text-base uppercase tracking-[0.12em]">
64-
<Grid3x3 className="h-5 w-5" />
65-
<span>Apps</span>
66-
</a>
67-
</Button>
68-
<Button asChild variant="outline" size="lg" client:load>
69-
<a href="/about-badge" class="inline-flex items-center gap-2.5 px-5 py-3 font-mono text-base uppercase tracking-[0.12em]">
70-
<Zap className="h-5 w-5" />
71-
<span>Hardware Map</span>
72-
</a>
73-
</Button>
74-
</div>
63+
7564

7665
<!-- Stats -->
7766
<div class="grid grid-cols-3 gap-8 pt-8 border-t border-border/30">
7867
<div class="text-center">
79-
<div class="font-mono text-4xl font-semibold text-primary mb-2">{featuredApps.length}</div>
68+
<div class="font-mono text-4xl font-semibold text-primary mb-2">{totalApps}</div>
8069
<div class="font-mono text-xs uppercase tracking-wider text-muted-foreground">apps</div>
8170
</div>
8271
<div class="text-center">
83-
<div class="font-mono text-4xl font-semibold text-primary mb-2">{featuredHacks.length}+</div>
72+
<div class="font-mono text-4xl font-semibold text-primary mb-2">{totalHacks}</div>
8473
<div class="font-mono text-xs uppercase tracking-wider text-muted-foreground">hacks</div>
8574
</div>
8675
<div class="text-center">
@@ -121,9 +110,8 @@ const featuredApps = allApps // Show all apps
121110

122111
<div class="max-w-6xl mx-auto">
123112
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
124-
{featuredApps.map((app) => (
113+
{preloadedApps.map((app) => (
125114
<AppCard
126-
key={app.slug}
127115
title={app.data.title}
128116
description={app.data.description}
129117
icon={app.data.icon}

0 commit comments

Comments
 (0)