Skip to content

Commit 24e544e

Browse files
committed
feat: update StackLandingPage and StacksIndexPage headers for improved layout and navigation
1 parent 79aefcd commit 24e544e

File tree

2 files changed

+48
-28
lines changed

2 files changed

+48
-28
lines changed

app/stacks/[stack]/page.tsx

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -138,25 +138,33 @@ export default function StackLandingPage({ params }: { params: { stack: string }
138138
const highlights = details?.highlights ?? []
139139
const pageTitle = details?.title ?? `${stackEntry.label} instructions file`
140140
const description = details?.description ?? `Start a ${stackEntry.label} instructions wizard with DevContext.`
141-
const targetUrl = `/new?stack=${slug}`
141+
const targetUrl = `/new/stack/${slug}`
142+
const defaultSummaryUrl = `/new/stack/${slug}/default/summary`
142143

143144
return (
144145
<main className="mx-auto flex min-h-screen max-w-3xl flex-col gap-10 px-6 py-16 text-foreground">
145-
<header className="space-y-4">
146-
<p className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">Stack presets</p>
147-
<h1 className="text-4xl font-semibold tracking-tight md:text-5xl">{pageTitle}</h1>
148-
<p className="text-base text-muted-foreground md:text-lg">{description}</p>
149-
{stackEntry.docs ? (
150-
<p className="text-sm text-muted-foreground">
151-
Source docs: {" "}
152-
<a href={stackEntry.docs} target="_blank" rel="noreferrer" className="underline-offset-4 hover:underline">
153-
{stackEntry.label} documentation
154-
</a>
155-
</p>
156-
) : null}
157-
{details?.docsNote ? (
158-
<p className="text-sm text-muted-foreground">{details.docsNote}</p>
159-
) : null}
146+
<header className="space-y-6">
147+
<div className="flex items-center justify-between">
148+
<Link href="/" className="text-sm font-semibold text-foreground transition hover:text-primary">
149+
DevContext
150+
</Link>
151+
</div>
152+
<div className="space-y-4">
153+
<p className="text-xs font-semibold uppercase tracking-wide text-muted-foreground">Stack presets</p>
154+
<h1 className="text-4xl font-semibold tracking-tight md:text-5xl">{pageTitle}</h1>
155+
<p className="text-base text-muted-foreground md:text-lg">{description}</p>
156+
{stackEntry.docs ? (
157+
<p className="text-sm text-muted-foreground">
158+
Source docs: {" "}
159+
<a href={stackEntry.docs} target="_blank" rel="noreferrer" className="underline-offset-4 hover:underline">
160+
{stackEntry.label} documentation
161+
</a>
162+
</p>
163+
) : null}
164+
{details?.docsNote ? (
165+
<p className="text-sm text-muted-foreground">{details.docsNote}</p>
166+
) : null}
167+
</div>
160168
</header>
161169

162170
{highlights.length > 0 ? (
@@ -171,17 +179,22 @@ export default function StackLandingPage({ params }: { params: { stack: string }
171179
) : null}
172180

173181
<div className="flex flex-col gap-4 rounded-2xl border border-border/70 bg-card/95 p-6 shadow-sm">
174-
<h2 className="text-xl font-semibold">Ready to build your instructions?</h2>
182+
<h2 className="text-xl font-semibold">Choose how to use this preset</h2>
175183
<p className="text-sm text-muted-foreground">
176-
Launch the DevContext wizard with {stackEntry.label} pre-selected. You can review every question, accept defaults, and export a
177-
stack-aware instructions file when each section is complete.
184+
Continue into the DevContext wizard to fine-tune every answer, or open the recommended summary if you want to use the defaults as-is.
178185
</p>
179-
<div>
186+
<div className="flex flex-col gap-2 sm:flex-row">
180187
<Link
181188
href={targetUrl}
182189
className="inline-flex items-center justify-center rounded-lg border border-border/80 bg-primary px-5 py-2 text-sm font-semibold text-primary-foreground shadow-sm transition hover:translate-y-[1px] hover:bg-primary/90"
183190
>
184-
Start the {stackEntry.label} wizard
191+
Customize in the wizard
192+
</Link>
193+
<Link
194+
href={defaultSummaryUrl}
195+
className="inline-flex items-center justify-center rounded-lg border border-border/80 bg-background px-5 py-2 text-sm font-semibold text-foreground shadow-sm transition hover:translate-y-[1px] hover:text-primary"
196+
>
197+
Open default summary
185198
</Link>
186199
</div>
187200
</div>

app/stacks/page.tsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,19 @@ export const metadata: Metadata = {
3030
export default function StacksIndexPage() {
3131
return (
3232
<main className="mx-auto flex min-h-screen max-w-4xl flex-col gap-10 px-6 py-16 text-foreground">
33-
<header className="space-y-4 text-center">
34-
<h1 className="text-4xl font-semibold tracking-tight md:text-5xl">Framework instructions presets</h1>
35-
<p className="mx-auto max-w-2xl text-base text-muted-foreground md:text-lg">
36-
Jump straight into the DevContext wizard with copy tailored to your stack. Each page outlines what we cover and links directly
37-
into the guided flow.
38-
</p>
33+
<header className="space-y-6">
34+
<div className="flex items-center justify-between">
35+
<Link href="/" className="text-sm font-semibold text-foreground transition hover:text-primary">
36+
DevContext
37+
</Link>
38+
</div>
39+
<div className="space-y-4 text-center">
40+
<h1 className="text-4xl font-semibold tracking-tight md:text-5xl">Framework instructions presets</h1>
41+
<p className="mx-auto max-w-2xl text-base text-muted-foreground md:text-lg">
42+
Jump straight into the DevContext wizard with copy tailored to your stack. Each page outlines what we cover and links directly
43+
into the guided flow.
44+
</p>
45+
</div>
3946
</header>
4047

4148
<section className="grid gap-6 md:grid-cols-2">
@@ -61,7 +68,7 @@ export default function StacksIndexPage() {
6168
href={href}
6269
className="inline-flex items-center justify-center rounded-lg border border-border/80 bg-background/80 px-4 py-2 text-sm font-semibold transition hover:border-primary/40 hover:text-primary"
6370
>
64-
View {answer.label} instructions
71+
Preview {answer.label} preset
6572
</Link>
6673
</div>
6774
</article>

0 commit comments

Comments
 (0)