Skip to content

Commit f274250

Browse files
updated ui
1 parent d685e17 commit f274250

File tree

16 files changed

+370
-9
lines changed

16 files changed

+370
-9
lines changed

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["21st.21st-extension"]
3+
}

app/globals.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,8 @@
6666
body {
6767
@apply bg-background text-foreground;
6868
}
69+
.dark body {
70+
background-color: #111111;
71+
background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 174, 239, 0.3), rgba(255, 255, 255, 0));
72+
}
6973
}

app/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { usePostHog } from 'posthog-js/react'
2525
import { SetStateAction, useCallback, useEffect, useState } from 'react'
2626
import { useLocalStorage } from 'usehooks-ts'
2727
import { useEnhancedChat } from '@/hooks/use-enhanced-chat'
28+
import { HeroPillSecond } from '@/components/announcement'
2829

2930
export default function Home() {
3031
const supabase = createBrowserClient()
@@ -369,6 +370,10 @@ export default function Home() {
369370
onUndo={handleUndo}
370371
/>
371372

373+
<div className="flex justify-center mb-4">
374+
<HeroPillSecond />
375+
</div>
376+
372377
{isLoadingProject ? (
373378
<div className="flex items-center justify-center h-32">
374379
<div className="text-muted-foreground">Loading project...</div>

app/settings/profile/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
getUserPreferences,
2323
updateUserProfile,
2424
updateUserPreferences,
25-
UserProfile,
2625
UserPreferences
2726
} from '@/lib/user-settings'
2827

components/announcement.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
'use client'
2+
3+
import { HeroPill } from "@/components/ui/hero-pill"
4+
import { StarBorder } from "@/components/ui/star-border"
5+
6+
export function HeroPillFirst() {
7+
return (
8+
<StarBorder color="hsl(var(--chart-1))">
9+
<HeroPill
10+
href="https://waitlist.codinit.dev"
11+
announcement="📣 Join The Launch Day Waitlist!"
12+
isExternal
13+
className="bg-slate-900/20 ring-1 ring-border [&_div]:bg-slate-100 [&_div]:text-slate-900 [&_p]:text-slate-900 [&_svg_path]:fill-slate-900 dark:[&_div]:bg-slate-900 dark:[&_div]:text-slate-100 dark:[&_p]:text-slate-100 dark:[&_svg_path]:fill-white"
14+
/>
15+
</StarBorder>
16+
)
17+
}
18+
19+
export function HeroPillSecond() {
20+
return (
21+
<StarBorder color="hsl(var(--chart-1))">
22+
<HeroPill
23+
href="https://waitlist.codinit.dev"
24+
announcement="📣 Join The Launch Day Waitlist!"
25+
isExternal
26+
className="bg-slate-900/20 ring-1 ring-border [&_div]:bg-slate-100 [&_div]:text-slate-900 [&_p]:text-slate-900 [&_svg_path]:fill-slate-900 dark:[&_div]:bg-slate-900 dark:[&_div]:text-slate-100 dark:[&_p]:text-slate-100 dark:[&_svg_path]:fill-white"
27+
/>
28+
</StarBorder>
29+
)
30+
}

components/chat-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export function ChatInput({
160160
<form
161161
onSubmit={handleSubmit}
162162
onKeyDown={onEnter}
163-
className="mb-2 mt-auto flex flex-col bg-background"
163+
className="mb-2 mt-auto flex flex-col bg-transparent"
164164
onDragEnter={isMultiModal ? handleDrag : undefined}
165165
onDragLeave={isMultiModal ? handleDrag : undefined}
166166
onDragOver={isMultiModal ? handleDrag : undefined}

components/navbar.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { Session } from '@supabase/supabase-js'
2222
import { ArrowRight, LogOut, Trash, Undo, Settings, Menu } from 'lucide-react'
2323
import Link from 'next/link'
2424
import Icon from './logo2'
25+
import { HeroPillSecond } from './announcement'
2526

2627
export function NavBar({
2728
session,
@@ -43,7 +44,7 @@ export function NavBar({
4344
canUndo: boolean
4445
}) {
4546
return (
46-
<nav className="w-full flex bg-background py-4">
47+
<nav className="w-full flex bg-transparent py-4">
4748
<div className="flex flex-1 items-center">
4849
<Link href="/" className="flex items-center gap-2" target="_blank">
4950
<Logo width={120} height={120} />
@@ -151,4 +152,4 @@ export function NavBar({
151152
</div>
152153
</nav>
153154
)
154-
}
155+
}

components/sidebar.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,13 @@ export const Sidebar: React.FC<SidebarProps> = ({
241241
<Button
242242
variant="ghost"
243243
size="icon"
244-
onClick={onSelectAccount}
244+
asChild
245245
className="h-8 w-8 text-muted-foreground hover:text-foreground transition-colors"
246-
aria-label="Select Account"
246+
aria-label="Join Waitlist"
247247
>
248-
<User className="h-5 w-5" />
248+
<a href="https://waitlist.codinit.dev" target="_blank" rel="noopener noreferrer">
249+
<User className="h-5 w-5" />
250+
</a>
249251
</Button>
250252
<Button
251253
variant="ghost"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"use client"
2+
3+
import { TwentyFirstToolbar } from "@21st-extension/toolbar-next"
4+
import { ReactPlugin } from "@21st-extension/react"
5+
6+
export function TwentyFirstToolbarWrapper() {
7+
return <TwentyFirstToolbar config={{ plugins: [ReactPlugin] }} />
8+
}

components/ui/hero-pill.tsx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { motion } from "framer-motion"
2+
import { cn } from "@/lib/utils"
3+
4+
interface HeroPillProps {
5+
href: string
6+
announcement?: string
7+
className?: string
8+
isExternal?: boolean
9+
}
10+
11+
export function HeroPill({
12+
href,
13+
announcement = "📣 Announcement",
14+
className,
15+
isExternal = false,
16+
}: HeroPillProps) {
17+
return (
18+
<motion.a
19+
href={href}
20+
target={isExternal ? "_blank" : undefined}
21+
className={cn(
22+
"flex w-auto items-center space-x-2 rounded-full",
23+
"bg-primary/20 ring-1 ring-accent",
24+
"px-2 py-1 whitespace-pre",
25+
className
26+
)}
27+
initial={{ opacity: 0, y: -20 }}
28+
animate={{ opacity: 1, y: 0 }}
29+
transition={{ duration: 0.8, ease: "easeOut" }}
30+
>
31+
<div className={cn(
32+
"w-fit rounded-full bg-accent px-2 py-0.5",
33+
"text-xs font-medium text-primary sm:text-sm",
34+
"text-center"
35+
)}>
36+
{announcement}
37+
</div>
38+
<p className="text-xs font-medium text-primary sm:text-sm">
39+
</p>
40+
<svg
41+
width="12"
42+
height="12"
43+
className="ml-1"
44+
viewBox="0 0 12 12"
45+
fill="none"
46+
xmlns="http://www.w3.org/2000/svg"
47+
>
48+
<path
49+
d="M8.78141 5.33312L5.20541 1.75712L6.14808 0.814453L11.3334 5.99979L6.14808 11.1851L5.20541 10.2425L8.78141 6.66645H0.666748V5.33312H8.78141Z"
50+
fill="currentColor"
51+
className="text-primary"
52+
/>
53+
</svg>
54+
</motion.a>
55+
)
56+
}

0 commit comments

Comments
 (0)