diff --git a/app/(home)/blog/[slug]/page.tsx b/app/(home)/blog/[slug]/page.tsx index 72d2b37..d27ceab 100644 --- a/app/(home)/blog/[slug]/page.tsx +++ b/app/(home)/blog/[slug]/page.tsx @@ -4,85 +4,57 @@ import { InlineTOC } from 'fumadocs-ui/components/inline-toc'; import defaultMdxComponents from 'fumadocs-ui/mdx'; import { blog } from '@/lib/source'; import { Button } from '@/components/ui/button'; -import { FiArrowLeft, FiCalendar, FiUser } from 'react-icons/fi'; - +import { ArrowLeft, Calendar, UserCircle2 } from 'lucide-react'; export default async function Page(props: { params: Promise<{ slug: string }>; }) { const params = await props.params; const page = blog.getPage([params.slug]); - + if (!page) notFound(); const Mdx = page.data.body; return ( -
- -
- {/* Article Header */} -
-

- {page.data.title} -

-

- {page.data.description} -

- - {/* Metadata */} -
-
- - {page.data.author} -
-
- - {new Date(page.data.date).toLocaleDateString()} -
+
+
+

{page.data.title}

+

{page.data.description}

+ +
+ + {page.data.author} + + + {new Date(page.data.date).toLocaleDateString()} +
-
+ - {/* Content Layout */} -
- {/* Sticky TOC */} -
-
-

Table of Contents

- +
+
+ - {/* Main Content */} -
+
- - {/* Footer */} -
- -
-
+ ); -} +} + export function generateStaticParams(): { slug: string }[] { return blog.getPages().map((page) => ({ slug: page.slugs[0], @@ -94,9 +66,9 @@ export async function generateMetadata(props: { }) { const params = await props.params; const page = blog.getPage([params.slug]); - + if (!page) notFound(); - + return { title: page.data.title, description: page.data.description, diff --git a/app/(home)/blog/page.tsx b/app/(home)/blog/page.tsx index 85a4871..22ca7d6 100644 --- a/app/(home)/blog/page.tsx +++ b/app/(home)/blog/page.tsx @@ -1,70 +1,59 @@ import Link from 'next/link'; import Image from 'next/image'; - import { blog } from '@/lib/source'; -import { FiArrowRight, FiClock, FiTag } from 'react-icons/fi'; +import { ArrowRight, Clock3, Sparkles, Tag } from 'lucide-react'; -export default function Home() { +export default function BlogHome() { const posts = blog.getPages(); return ( -
-

- Latest Insights -

- -
- {posts.map((post) => ( +
+
+

+ Fresh insights for builders +

+

Dcup Blog

+

+ Product, AI retrieval, infrastructure, and growth playbooks to help you ship faster and convert better. +

+
+ +
+ {posts.map((post, idx) => ( - {/* Optional image container - add if you have cover images */} -
+
{post.data.title}
-
- {/* Category and date */} -
-
- - {'General'} -
-
- - {'5 min read'} -
-
- - {/* Content */} -

- {post.data.title} -

-

- {post.data.description} -

- - {/* Read more */} -
- Read article - +
+
+ + General + + + 5 min read +
+

{post.data.title}

+

{post.data.description}

+ + Read article +
- - {/* Hover effect */} -
))} -
+
); } diff --git a/app/(home)/coming-soon/page.tsx b/app/(home)/coming-soon/page.tsx new file mode 100644 index 0000000..cbdd8d3 --- /dev/null +++ b/app/(home)/coming-soon/page.tsx @@ -0,0 +1,137 @@ +'use client'; + +import { FormEvent, useState } from 'react'; +import Link from 'next/link'; +import { ArrowRight, CheckCircle2, Sparkles } from 'lucide-react'; +import { Button } from '@/components/ui/button'; + +export default function ComingSoonPage() { + const [email, setEmail] = useState(''); + const [thoughts, setThoughts] = useState(''); + const [status, setStatus] = useState<'idle' | 'loading' | 'success' | 'error'>('idle'); + const [message, setMessage] = useState(''); + + async function handleSubmit(event: FormEvent) { + event.preventDefault(); + setStatus('loading'); + setMessage('Submitting...'); + + try { + const response = await fetch('/api/waitlist', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ email, thoughts }), + }); + + const data = await response.json(); + + if (!response.ok) { + throw new Error(data?.message || 'Unable to submit right now.'); + } + + setStatus('success'); + setMessage('You are on the list! We will reach out before launch.'); + setEmail(''); + setThoughts(''); + } catch (error) { + setStatus('error'); + setMessage(error instanceof Error ? error.message : 'Something went wrong. Please try again.'); + } + } + + return ( +
+
+ +
+
+
+

+ Coming Soon +

+ +

+ dcup – Your Data, Smarter. Coming Soon. +

+ +

+ Unlock the power of your data with dcup – the open-source AI assistant platform built for developers. Connect PDFs, web pages, Notion notes, and more in minutes, and turn them into searchable, actionable intelligence. +

+ +
+ {[ + 'Connect docs, sites, and notes in minutes', + 'Search and reason over your data with confidence', + 'Built open-source for developer control and flexibility', + ].map((item) => ( +

+ + {item} +

+ ))} +
+ + +
+ +
+

Join the early-access waitlist

+

+ Leave your email and thoughts. We are collecting interest to prioritize launch features. +

+ +
+
+ + setEmail(event.target.value)} + placeholder="you@company.com" + required + className="h-11 w-full rounded-lg border bg-background px-3 text-sm outline-none ring-offset-background transition focus:border-primary focus:ring-2 focus:ring-primary/30" + /> +
+ +
+ +