Skip to content

Commit 589c224

Browse files
committed
feat(landing): Phase 1 - Foundation & Hero Section
- New LandingPage component with dark theme (#0a0a0b) - Pain-point headline: 'grep returned 847 results' - Semantic search box with gradient glow effect - Repo selector pills (Flask, FastAPI, Express) - Trust indicators (speed, no signup, free searches) - Example queries for quick testing - Search results with syntax highlighting - Rate limit banner with signup CTA - Features preview section (Semantic Search, MCP, Code Intel) - Clean minimal navigation and footer - Badge component with custom variants Part of landing page redesign (#22)
1 parent 41f34ad commit 589c224

3 files changed

Lines changed: 489 additions & 10 deletions

File tree

frontend/src/App.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import { BrowserRouter, Routes, Route, Navigate, useNavigate } from 'react-router-dom';
1+
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
22
import { AuthProvider, useAuth } from './contexts/AuthContext';
33
import { LoginPage } from './pages/LoginPage';
44
import { SignupPage } from './pages/SignupPage';
5-
import { Playground } from './pages/Playground';
5+
import { LandingPage } from './pages/LandingPage';
66
import { Dashboard } from './components/Dashboard';
77

88
function ProtectedRoute({ children }: { children: React.ReactNode }) {
99
const { user, loading } = useAuth();
1010

1111
if (loading) {
1212
return (
13-
<div className="min-h-screen flex items-center justify-center">
14-
<div className="text-lg">Loading...</div>
13+
<div className="min-h-screen flex items-center justify-center bg-[#0a0a0b]">
14+
<div className="text-lg text-white">Loading...</div>
1515
</div>
1616
);
1717
}
@@ -23,25 +23,24 @@ function ProtectedRoute({ children }: { children: React.ReactNode }) {
2323
return <>{children}</>;
2424
}
2525

26-
function PlaygroundWrapper() {
27-
const navigate = useNavigate();
26+
function LandingWrapper() {
2827
const { user } = useAuth();
2928

3029
// If user is logged in, redirect to dashboard
3130
if (user) {
3231
return <Navigate to="/dashboard" replace />;
3332
}
3433

35-
return <Playground onSignupClick={() => navigate('/signup')} />;
34+
return <LandingPage />;
3635
}
3736

3837
function AppRoutes() {
3938
const { user } = useAuth();
4039

4140
return (
4241
<Routes>
43-
{/* Playground is the new landing page */}
44-
<Route path="/" element={<PlaygroundWrapper />} />
42+
{/* New Landing Page */}
43+
<Route path="/" element={<LandingWrapper />} />
4544

4645
<Route
4746
path="/login"
@@ -60,7 +59,7 @@ function AppRoutes() {
6059
}
6160
/>
6261

63-
{/* Legacy route redirect */}
62+
{/* Fallback */}
6463
<Route path="*" element={<Navigate to="/" replace />} />
6564
</Routes>
6665
);
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import * as React from "react"
2+
import { cva, type VariantProps } from "class-variance-authority"
3+
4+
import { cn } from "@/lib/utils"
5+
6+
const badgeVariants = cva(
7+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8+
{
9+
variants: {
10+
variant: {
11+
default:
12+
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
13+
secondary:
14+
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
15+
destructive:
16+
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
17+
outline: "text-foreground",
18+
success:
19+
"border-transparent bg-green-500/10 text-green-500 border-green-500/20",
20+
glow:
21+
"border-transparent bg-blue-500/10 text-blue-400 border-blue-500/20",
22+
},
23+
},
24+
defaultVariants: {
25+
variant: "default",
26+
},
27+
}
28+
)
29+
30+
export interface BadgeProps
31+
extends React.HTMLAttributes<HTMLDivElement>,
32+
VariantProps<typeof badgeVariants> {}
33+
34+
function Badge({ className, variant, ...props }: BadgeProps) {
35+
return (
36+
<div className={cn(badgeVariants({ variant }), className)} {...props} />
37+
)
38+
}
39+
40+
export { Badge, badgeVariants }

0 commit comments

Comments
 (0)