Skip to content

Commit 46bb162

Browse files
authored
Merge pull request #10 from Sagargupta16/feat/community-polish
refactor: simplify site to single landing page
2 parents dd7dbe5 + 99f2141 commit 46bb162

3 files changed

Lines changed: 43 additions & 65 deletions

File tree

site/src/App.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import { Routes, Route } from 'react-router-dom'
22
import Navbar from './components/Navbar'
33
import Footer from './components/Footer'
44
import Home from './pages/Home'
5-
import Calculator from './pages/Calculator'
6-
import BadgeChecker from './pages/BadgeChecker'
7-
import RepoAnalyzer from './pages/RepoAnalyzer'
85
import styles from './App.module.css'
96

107
function App() {
@@ -13,10 +10,7 @@ function App() {
1310
<Navbar />
1411
<main className={styles.main}>
1512
<Routes>
16-
<Route path="/" element={<Home />} />
17-
<Route path="/calculator" element={<Calculator />} />
18-
<Route path="/badge" element={<BadgeChecker />} />
19-
<Route path="/analyzer" element={<RepoAnalyzer />} />
13+
<Route path="/*" element={<Home />} />
2014
</Routes>
2115
</main>
2216
<Footer />

site/src/components/Navbar.tsx

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,13 @@
1-
import { NavLink } from 'react-router-dom'
21
import styles from './Navbar.module.css'
32

43
function Navbar() {
54
return (
65
<nav className={styles.navbar}>
76
<div className={styles.inner}>
8-
<NavLink to="/" className={styles.logo}>
7+
<a href="/" className={styles.logo}>
98
Claude Cost Optimizer
10-
</NavLink>
9+
</a>
1110
<div className={styles.links}>
12-
<NavLink
13-
to="/"
14-
end
15-
className={({ isActive }) =>
16-
isActive ? `${styles.link} ${styles.active}` : styles.link
17-
}
18-
>
19-
Home
20-
</NavLink>
21-
<NavLink
22-
to="/calculator"
23-
className={({ isActive }) =>
24-
isActive ? `${styles.link} ${styles.active}` : styles.link
25-
}
26-
>
27-
Calculator
28-
</NavLink>
29-
<NavLink
30-
to="/badge"
31-
className={({ isActive }) =>
32-
isActive ? `${styles.link} ${styles.active}` : styles.link
33-
}
34-
>
35-
Badge
36-
</NavLink>
37-
<NavLink
38-
to="/analyzer"
39-
className={({ isActive }) =>
40-
isActive ? `${styles.link} ${styles.active}` : styles.link
41-
}
42-
>
43-
Repo Analyzer
44-
</NavLink>
4511
<a
4612
href="https://github.com/Sagargupta16/claude-cost-optimizer"
4713
target="_blank"
@@ -50,6 +16,14 @@ function Navbar() {
5016
>
5117
GitHub
5218
</a>
19+
<a
20+
href="https://github.com/Sagargupta16/claude-cost-optimizer/discussions"
21+
target="_blank"
22+
rel="noopener noreferrer"
23+
className={styles.link}
24+
>
25+
Discussions
26+
</a>
5327
</div>
5428
</div>
5529
</nav>

site/src/pages/Home.tsx

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useState, useCallback } from 'react'
2-
import { Link } from 'react-router-dom'
32
import styles from './Home.module.css'
43

54
const INSTALL_CMD = 'npx skills add Sagargupta16/claude-cost-optimizer'
@@ -51,21 +50,21 @@ const benchmarks = [
5150
{ task: 'Error boundary', before: 3454, after: 1040 },
5251
]
5352

54-
const tools = [
53+
const resources = [
5554
{
56-
title: 'Repo Analyzer',
57-
desc: 'Paste a GitHub URL. Get a cost audit, grade, and recommendations.',
58-
link: '/analyzer',
55+
title: '10 Optimization Guides',
56+
desc: 'From getting started to three-tier task routing and prompt caching deep dives.',
57+
link: 'https://github.com/Sagargupta16/claude-cost-optimizer/tree/main/guides',
5958
},
6059
{
61-
title: 'Cost Calculator',
62-
desc: 'Estimate monthly spend based on model, sessions, and config.',
63-
link: '/calculator',
60+
title: '10 CLAUDE.md Templates',
61+
desc: 'Cost-optimized templates for React, Next.js, FastAPI, Go, Rust, Django, Rails, and more.',
62+
link: 'https://github.com/Sagargupta16/claude-cost-optimizer/tree/main/templates/CLAUDE.md',
6463
},
6564
{
66-
title: 'Badge Checker',
67-
desc: 'Score your setup (A+ to F) and get a shields.io badge.',
68-
link: '/badge',
65+
title: '7 CLI Tools',
66+
desc: 'Token estimator, usage analyzer, badge generator, MCP server, budget hooks, and more.',
67+
link: 'https://github.com/Sagargupta16/claude-cost-optimizer/tree/main/tools',
6968
},
7069
]
7170

@@ -237,16 +236,22 @@ function Home() {
237236
</div>
238237
</section>
239238

240-
{/* Web Tools */}
239+
{/* Resources */}
241240
<section className={styles.section}>
242-
<h2 className={styles.sectionTitle}>Web Tools</h2>
241+
<h2 className={styles.sectionTitle}>What's in the Repo</h2>
243242
<div className={styles.toolsGrid}>
244-
{tools.map((t) => (
245-
<Link key={t.title} to={t.link} className={styles.toolCard}>
246-
<h3 className={styles.toolTitle}>{t.title}</h3>
247-
<p className={styles.toolDesc}>{t.desc}</p>
248-
<span className={styles.toolArrow}>Open</span>
249-
</Link>
243+
{resources.map((r) => (
244+
<a
245+
key={r.title}
246+
href={r.link}
247+
target="_blank"
248+
rel="noopener noreferrer"
249+
className={styles.toolCard}
250+
>
251+
<h3 className={styles.toolTitle}>{r.title}</h3>
252+
<p className={styles.toolDesc}>{r.desc}</p>
253+
<span className={styles.toolArrow}>View on GitHub</span>
254+
</a>
250255
))}
251256
</div>
252257
</section>
@@ -297,9 +302,14 @@ function Home() {
297302
>
298303
Discussions
299304
</a>
300-
<Link to="/analyzer" className={styles.ctaLink}>
301-
Repo Analyzer
302-
</Link>
305+
<a
306+
href="https://github.com/Sagargupta16/claude-cost-optimizer/tree/main/guides"
307+
target="_blank"
308+
rel="noopener noreferrer"
309+
className={styles.ctaLink}
310+
>
311+
Guides
312+
</a>
303313
</div>
304314
</section>
305315
</div>

0 commit comments

Comments
 (0)