Skip to content

Commit cd95434

Browse files
justin808claude
andcommitted
Feature AI prompts in home Quick Start
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1320d1a commit cd95434

2 files changed

Lines changed: 19 additions & 53 deletions

File tree

prototypes/docusaurus/src/pages/index.module.css

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@
108108
line-height: 1.16;
109109
}
110110

111+
.quickStartNote {
112+
max-width: 44rem;
113+
margin: 0.6rem 0 0;
114+
color: var(--ifm-color-content-secondary);
115+
font-size: 0.95rem;
116+
}
117+
111118
.quickStartGrid,
112119
.valueGrid,
113120
.migrationGrid,
@@ -141,7 +148,6 @@
141148
grid-template-columns: repeat(2, minmax(0, 1fr));
142149
}
143150

144-
.quickStartCard,
145151
.valueCard,
146152
.migrationCard,
147153
.quoteCard {
@@ -153,34 +159,17 @@
153159
box-shadow: none;
154160
}
155161

156-
.quickStartCard h3,
157162
.valueCard h3,
158163
.migrationCard h3 {
159164
margin-bottom: 0.55rem;
160165
line-height: 1.12;
161166
}
162167

163-
.quickStartCard p,
164168
.valueCard p,
165169
.migrationCard p {
166170
color: var(--ifm-color-content-secondary);
167171
}
168172

169-
.inlineCode {
170-
box-sizing: border-box;
171-
display: block;
172-
width: 100%;
173-
max-width: 100%;
174-
margin: 0 0 0.8rem;
175-
padding: 0.6rem 0.7rem;
176-
border: 1px solid var(--site-border);
177-
border-radius: 6px;
178-
background: var(--site-inline-code-surface);
179-
color: var(--ifm-color-content);
180-
overflow-x: auto;
181-
white-space: nowrap;
182-
}
183-
184173
.cardLink {
185174
display: inline-flex;
186175
align-items: center;

prototypes/docusaurus/src/pages/index.tsx

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,11 @@ import ThemedImage from '@theme/ThemedImage';
77

88
import {docsRoutes} from '../constants/docsRoutes';
99
import {featuredDemos} from '../constants/demos';
10+
import {agentNote, homePrompts} from '../constants/prompts';
1011
import DemoCard from '../components/DemoCard';
12+
import PromptCard from '../components/PromptCard';
1113
import styles from './index.module.css';
1214

13-
const quickStartCards = [
14-
{
15-
title: 'Create App',
16-
command: 'npx create-react-on-rails-app@latest my-app',
17-
description: 'Scaffold a working Rails + React app with TypeScript defaults.',
18-
href: docsRoutes.createApp,
19-
cta: 'Open guide',
20-
},
21-
{
22-
title: 'Install Into Rails',
23-
command: 'bundle exec rails generate react_on_rails:install --typescript',
24-
description: 'Add React on Rails to an existing app while keeping Rails routes and conventions.',
25-
href: docsRoutes.installExistingApp,
26-
cta: 'Open guide',
27-
},
28-
{
29-
title: 'Upgrade To Pro',
30-
command: 'bundle add react_on_rails_pro',
31-
description: 'Evaluate Pro SSR, streaming, and RSC paths before buying a production license.',
32-
href: docsRoutes.proUpgrade,
33-
cta: 'Open guide',
34-
},
35-
];
36-
3715
const valueCards = [
3816
{
3917
title: 'Rails-first React',
@@ -183,19 +161,18 @@ function QuickStartSection() {
183161
return (
184162
<section className={styles.section}>
185163
<div className="container">
186-
<div className={styles.sectionHeader}>
187-
<h2>Quick Start</h2>
164+
<div className={styles.sectionHeaderRow}>
165+
<div className={styles.sectionHeader}>
166+
<h2>Quick Start</h2>
167+
<p className={styles.quickStartNote}>{agentNote}</p>
168+
</div>
169+
<Link className={styles.browseAll} to="/prompts">
170+
Browse all prompts →
171+
</Link>
188172
</div>
189173
<div className={styles.quickStartGrid}>
190-
{quickStartCards.map((card) => (
191-
<article className={styles.quickStartCard} key={card.title}>
192-
<h3>{card.title}</h3>
193-
<code className={styles.inlineCode}>{card.command}</code>
194-
<p>{card.description}</p>
195-
<Link className={styles.cardLink} to={card.href}>
196-
{card.cta}
197-
</Link>
198-
</article>
174+
{homePrompts.map((prompt) => (
175+
<PromptCard prompt={prompt} key={prompt.id} />
199176
))}
200177
</div>
201178
</div>

0 commit comments

Comments
 (0)