create-ampless 1.0.0-alpha.56 → 1.0.0-alpha.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/templates/_shared/AGENTS.ja.md +6 -18
- package/dist/templates/_shared/AGENTS.md +6 -18
- package/dist/templates/_shared/README.ja.md +7 -1
- package/dist/templates/_shared/README.md +7 -1
- package/dist/templates/_shared/THEMES.ja.md +495 -0
- package/dist/templates/_shared/THEMES.md +523 -0
- package/dist/templates/_shared/package.json +8 -8
- package/package.json +1 -1
|
@@ -36,25 +36,12 @@
|
|
|
36
36
|
- `.amplify/` — Amplify CLI の作業ディレクトリ。
|
|
37
37
|
- `pnpm-lock.yaml` / `package-lock.json` — パッケージマネージャーに任せる。
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## テーマのカスタマイズ
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
`my-` プレフィックスがついているコピーは `npm run update-ampless` で上書きされない。ターゲット名が `my-` で始まらない場合、コマンドは実行を拒否する。
|
|
46
|
-
|
|
47
|
-
2. 以下の優先順位で編集する:
|
|
48
|
-
- `themes/my-blog/tokens.css` — 色、タイポグラフィ、スペーシング(`[data-theme='my-blog']` スコープの CSS カスタムプロパティ)。
|
|
49
|
-
- `themes/my-blog/manifest.ts` — 管理 UI(`/admin/sites/<id>/theme`)に公開するフィールドの宣言。
|
|
50
|
-
- `themes/my-blog/pages/` — レイアウト / 構造(Next.js ページモジュール: フィード、サイトマップ、投稿テンプレート)。
|
|
51
|
-
|
|
52
|
-
3. テーマを有効化する: `/admin/sites/<siteId>/theme` を開き、`my-blog` を選択する。テーマ切り替えはランタイム設定 — 再デプロイは不要。
|
|
53
|
-
|
|
54
|
-
4. 動作確認:
|
|
55
|
-
```bash
|
|
56
|
-
npm run dev # http://localhost:3000
|
|
57
|
-
```
|
|
41
|
+
テーマのカスタマイズ手順 — ベーステーマの選び方、`themes/my-*/`
|
|
42
|
+
へのコピーフロー、Claude Design からの反映、AI 支援の実装、
|
|
43
|
+
レスポンシブの目視確認、Markdown 要素のデザイン方針、よくある失敗
|
|
44
|
+
— は [THEMES.ja.md](./THEMES.ja.md) を参照する。
|
|
58
45
|
|
|
59
46
|
## MCP サーバー(`@ampless/mcp-server`)
|
|
60
47
|
|
|
@@ -99,6 +86,7 @@ UI / テーマを変更した場合、型チェックだけを根拠にタスク
|
|
|
99
86
|
|
|
100
87
|
## 参照先
|
|
101
88
|
|
|
89
|
+
- `THEMES.ja.md` — テーマカスタマイズの実務ガイド(ベーステーマの選び方、Claude Design からの反映、AI への依頼、ブラウザ確認、Markdown 要素のスタイリング、よくある失敗)。
|
|
102
90
|
- `README.ja.md` — サイト運営者向けの日常利用ガイド。
|
|
103
91
|
- `RUNBOOK.ja.md` — 定期的な運用手順(キーローテーション、バックアップ復元など)。
|
|
104
92
|
- `themes/<name>/README.ja.md` — テーマごとのカスタマイズ詳細。
|
|
@@ -36,25 +36,12 @@ This file is written for AI coding agents (Claude Code, Cursor, Codex, etc.). Fo
|
|
|
36
36
|
- `.amplify/` — Amplify CLI working directory.
|
|
37
37
|
- `pnpm-lock.yaml` / `package-lock.json` — let the package manager update these.
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## Theme customization
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
The `my-` prefix marks the copy as user-owned so `npm run update-ampless` leaves it alone. The target name must start with `my-` or the command refuses to run.
|
|
46
|
-
|
|
47
|
-
2. Edit in this priority order:
|
|
48
|
-
- `themes/my-blog/tokens.css` — colours, typography, spacing (CSS custom properties scoped under `[data-theme='my-blog']`).
|
|
49
|
-
- `themes/my-blog/manifest.ts` — declare which fields are exposed in the admin UI (`/admin/sites/<id>/theme`).
|
|
50
|
-
- `themes/my-blog/pages/` — layout / structure (Next.js page modules: feed, sitemap, post templates).
|
|
51
|
-
|
|
52
|
-
3. Activate the theme: open `/admin/sites/<siteId>/theme` and select `my-blog`. Theme switching is a runtime setting — no redeploy needed.
|
|
53
|
-
|
|
54
|
-
4. Verify:
|
|
55
|
-
```bash
|
|
56
|
-
npm run dev # http://localhost:3000
|
|
57
|
-
```
|
|
41
|
+
For theme customization workflows — choosing a base theme, the
|
|
42
|
+
standard copy-and-edit flow, Claude Design handoff, AI-assisted
|
|
43
|
+
implementation, responsive visual QA, Markdown styling expectations,
|
|
44
|
+
and the common failure modes — see [THEMES.md](./THEMES.md).
|
|
58
45
|
|
|
59
46
|
## MCP server (`@ampless/mcp-server`)
|
|
60
47
|
|
|
@@ -99,6 +86,7 @@ Do not report a task complete based solely on type checks if a UI/theme was modi
|
|
|
99
86
|
|
|
100
87
|
## See also
|
|
101
88
|
|
|
89
|
+
- `THEMES.md` — theme customization workflows (base-theme selection, Claude Design handoff, AI prompts, browser QA, Markdown styling, common pitfalls).
|
|
102
90
|
- `README.md` — day-to-day usage for site owners.
|
|
103
91
|
- `RUNBOOK.md` — occasional ops procedures (key rotation, backup restore, etc.).
|
|
104
92
|
- `themes/<name>/README.md` — per-theme customization details.
|
|
@@ -86,7 +86,13 @@ npm run sandbox
|
|
|
86
86
|
npm run copy-theme
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
インストール済みテーマを `npm run update-ampless` で上書きされない形でカスタマイズしたい場合は、`my-` プレフィックス付きにコピーする:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm run copy-theme blog my-blog
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
テーマカスタマイズの実務ガイド — ベーステーマの選び方、コピー / 編集 / 切り替えの標準フロー、Claude Design からの反映、AI を使った実装、レスポンシブ確認、Markdown 要素のスタイリング、よくある失敗 — はこのプロジェクト内の [THEMES.ja.md](./THEMES.ja.md)([English](./THEMES.md))に集約しています。
|
|
90
96
|
|
|
91
97
|
## プラグイン
|
|
92
98
|
|
|
@@ -86,7 +86,13 @@ To install another official theme into this project:
|
|
|
86
86
|
npm run copy-theme
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
To
|
|
89
|
+
To customize an installed theme without losing the customization on `npm run update-ampless`, copy it under the `my-` prefix:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm run copy-theme blog my-blog
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The full working guide for theme customization — base-theme selection, the standard copy / edit / activate flow, Claude Design handoff, AI-assisted implementation, responsive QA, Markdown styling, and the common pitfalls — lives in [THEMES.md](./THEMES.md) (and [THEMES.ja.md](./THEMES.ja.md)) right in this project.
|
|
90
96
|
|
|
91
97
|
## Plugins
|
|
92
98
|
|
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
> English: [THEMES.md](./THEMES.md)
|
|
2
|
+
>
|
|
3
|
+
# THEMES.md
|
|
4
|
+
|
|
5
|
+
このドキュメントは、ampless プロジェクトでテーマをカスタマイズするときの実務ガイドです。
|
|
6
|
+
AI エージェントが読むことも、人間が作業メモとして読むことも想定しています。
|
|
7
|
+
|
|
8
|
+
テーマ作業の詳細はここに集約し、`AGENTS.md` / `AGENTS.ja.md` には最終的に「テーマ作業は `THEMES.md` を参照」とだけ残す方針です。
|
|
9
|
+
|
|
10
|
+
## 基本方針
|
|
11
|
+
|
|
12
|
+
- 公式テーマは直接編集しない。
|
|
13
|
+
- カスタマイズは `themes/my-*/` に閉じ込める。
|
|
14
|
+
- 共有シェルである `app/`、`components/`、`lib/` は、テーマだけで解決できない場合に限って触る。
|
|
15
|
+
- `themes-registry.ts` は自動生成ファイルなので手動編集しない。
|
|
16
|
+
- UI / テーマ変更は、型チェックだけで完了扱いにしない。必ずブラウザで目視確認する。
|
|
17
|
+
|
|
18
|
+
## ベーステーマの選び方
|
|
19
|
+
|
|
20
|
+
ampless のテーマカスタマイズは、既存テーマをベースにして `themes/my-*/` にコピーするところから始める。
|
|
21
|
+
最初に「何を作るか」ではなく「どのテーマを土台にするか」を決めると、作業範囲が小さくなる。
|
|
22
|
+
|
|
23
|
+
### `blog`
|
|
24
|
+
|
|
25
|
+
個人ブログ、日記、技術メモ、ニュースへのコメントなど、時系列の投稿を中心にしたサイト向け。
|
|
26
|
+
|
|
27
|
+
特徴:
|
|
28
|
+
|
|
29
|
+
- ホームに投稿フィード。
|
|
30
|
+
- 個別投稿ページ。
|
|
31
|
+
- タグ別一覧。
|
|
32
|
+
- ヘッダー / フッターナビ。
|
|
33
|
+
- カラー、フォント、角丸、固定記事などの調整幅が広い。
|
|
34
|
+
|
|
35
|
+
向いているカスタマイズ:
|
|
36
|
+
|
|
37
|
+
- 個人メディア風にする。
|
|
38
|
+
- 記事一覧の密度を変える。
|
|
39
|
+
- 記事詳細の組版を強める。
|
|
40
|
+
- Markdown の表、コード、引用まで含めて読み物として整える。
|
|
41
|
+
|
|
42
|
+
迷ったらまず `blog` をベースにする。
|
|
43
|
+
|
|
44
|
+
### `minimal`
|
|
45
|
+
|
|
46
|
+
装飾を抑えた小さなブログ向け。
|
|
47
|
+
|
|
48
|
+
特徴:
|
|
49
|
+
|
|
50
|
+
- カスタマイズ項目が少ない。
|
|
51
|
+
- 余計な chrome が少ない。
|
|
52
|
+
- デザインを主張させず、投稿を淡々と並べる。
|
|
53
|
+
|
|
54
|
+
向いているカスタマイズ:
|
|
55
|
+
|
|
56
|
+
- 色と角丸だけ軽く変えたい。
|
|
57
|
+
- レイアウトはほぼ変えない。
|
|
58
|
+
- 文章量が少ないサイト。
|
|
59
|
+
|
|
60
|
+
大きく作り替えるなら `blog` の方が向く。
|
|
61
|
+
|
|
62
|
+
### `landing`
|
|
63
|
+
|
|
64
|
+
1 ページ完結型の紹介サイト向け。
|
|
65
|
+
|
|
66
|
+
特徴:
|
|
67
|
+
|
|
68
|
+
- ヒーロー中心。
|
|
69
|
+
- CTA ボタン。
|
|
70
|
+
- 任意で最新記事。
|
|
71
|
+
- サイト説明や導線を前面に出す。
|
|
72
|
+
|
|
73
|
+
向いているカスタマイズ:
|
|
74
|
+
|
|
75
|
+
- プロダクト、イベント、ポートフォリオ、店舗紹介。
|
|
76
|
+
- 投稿一覧よりも最初の訴求を重視するサイト。
|
|
77
|
+
- AI に hero / CTA / feature section のデザインを作らせたい場合。
|
|
78
|
+
|
|
79
|
+
### `corporate`
|
|
80
|
+
|
|
81
|
+
企業サイト、事務所、団体サイト向け。
|
|
82
|
+
|
|
83
|
+
特徴:
|
|
84
|
+
|
|
85
|
+
- 落ち着いたヒーロー。
|
|
86
|
+
- お知らせ一覧。
|
|
87
|
+
- ヘッダー / フッターがしっかりある。
|
|
88
|
+
- フッター注記を持てる。
|
|
89
|
+
|
|
90
|
+
向いているカスタマイズ:
|
|
91
|
+
|
|
92
|
+
- 会社概要やサービス説明を前面に置く。
|
|
93
|
+
- ニュースやお知らせを投稿として管理する。
|
|
94
|
+
- 信頼感、読みやすさ、保守性を優先する。
|
|
95
|
+
|
|
96
|
+
### `docs`
|
|
97
|
+
|
|
98
|
+
ドキュメントサイト向け。
|
|
99
|
+
|
|
100
|
+
特徴:
|
|
101
|
+
|
|
102
|
+
- サイドバー主導。
|
|
103
|
+
- `tag:<name>` をナビに入れると、そのタグの記事一覧を自動展開できる。
|
|
104
|
+
- コードフォントや技術文書向けの構造を持つ。
|
|
105
|
+
|
|
106
|
+
向いているカスタマイズ:
|
|
107
|
+
|
|
108
|
+
- ヘルプ、仕様書、開発者向けドキュメント。
|
|
109
|
+
- 記事をタグで分類し、サイドバーへ自動反映したい。
|
|
110
|
+
- Markdown のコードブロックや表が多い。
|
|
111
|
+
|
|
112
|
+
### `dads`
|
|
113
|
+
|
|
114
|
+
デジタル庁デザインシステムに寄せた公共系サイト向け。
|
|
115
|
+
|
|
116
|
+
特徴:
|
|
117
|
+
|
|
118
|
+
- 高コントラスト。
|
|
119
|
+
- アクセシビリティ重視。
|
|
120
|
+
- 装飾控えめ。
|
|
121
|
+
- `@digital-go-jp/tailwind-theme-plugin` ベース。
|
|
122
|
+
|
|
123
|
+
向いているカスタマイズ:
|
|
124
|
+
|
|
125
|
+
- 政府、自治体、公共系の情報サイト。
|
|
126
|
+
- 独自の雰囲気よりも準拠性や読みやすさを優先する。
|
|
127
|
+
|
|
128
|
+
注意:
|
|
129
|
+
|
|
130
|
+
- DADS 以外の色へ大きく変えると、DADS 準拠の意味は薄れる。
|
|
131
|
+
- 公共系では、AI が出した装飾案をそのまま採用せず、アクセシビリティを優先して調整する。
|
|
132
|
+
|
|
133
|
+
## 標準フロー
|
|
134
|
+
|
|
135
|
+
1. 公式テーマをコピーする。
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npm run copy-theme blog my-blog
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
`my-` プレフィックスがついたテーマはユーザー所有のコピーとして扱われ、`npm run update-ampless` で上書きされない。
|
|
142
|
+
|
|
143
|
+
2. まずテーマ内だけで実装する。
|
|
144
|
+
|
|
145
|
+
優先順位:
|
|
146
|
+
|
|
147
|
+
- `themes/my-blog/tokens.css` — 色、フォント、余白、罫線、Markdown 本文の見た目。
|
|
148
|
+
- `themes/my-blog/manifest.ts` — 管理 UI に公開するテーマ設定。
|
|
149
|
+
- `themes/my-blog/pages/` — home / post / tag / feed / sitemap などのルート別レイアウト。
|
|
150
|
+
- `themes/my-blog/components.tsx` など — テーマ内でだけ使う共通 UI。ヘッダー、フッター、ワードマークなどはここに切り出してよい。
|
|
151
|
+
|
|
152
|
+
3. テーマを有効化する。
|
|
153
|
+
|
|
154
|
+
`/admin/sites/<siteId>/theme` で `my-blog` を選択して保存する。テーマ切り替えはランタイム設定なので、通常は再デプロイ不要。
|
|
155
|
+
|
|
156
|
+
4. 確認する。
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npm run dev
|
|
160
|
+
npx tsc --noEmit
|
|
161
|
+
npm run build
|
|
162
|
+
npm run lint
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
`npm run lint` がプロジェクトの Next.js バージョンと合っていない場合は、その旨を報告する。代替として型チェック、ビルド、ブラウザ確認は必ず行う。
|
|
166
|
+
|
|
167
|
+
## カスタマイズの設計手順
|
|
168
|
+
|
|
169
|
+
テーマを変更するときは、実装前に次の順で決める。
|
|
170
|
+
|
|
171
|
+
1. サイトの役割
|
|
172
|
+
|
|
173
|
+
例: 個人ブログ、技術メモ、ニュースコメント、企業サイト、ドキュメント、ランディングページ。
|
|
174
|
+
|
|
175
|
+
2. 読ませ方
|
|
176
|
+
|
|
177
|
+
例: 長文をじっくり読ませる、一覧を高速にスキャンさせる、ヒーローで強く印象づける、検索やタグから探させる。
|
|
178
|
+
|
|
179
|
+
3. 画面の種類
|
|
180
|
+
|
|
181
|
+
少なくとも以下を考える。
|
|
182
|
+
|
|
183
|
+
- home
|
|
184
|
+
- post detail
|
|
185
|
+
- tag / archive
|
|
186
|
+
- empty state
|
|
187
|
+
- mobile home
|
|
188
|
+
- mobile detail
|
|
189
|
+
|
|
190
|
+
4. 変更範囲
|
|
191
|
+
|
|
192
|
+
`tokens.css` だけで済むのか、`pages/` の構造変更が必要か、テーマ内コンポーネントを追加するかを決める。
|
|
193
|
+
|
|
194
|
+
5. Markdown の扱い
|
|
195
|
+
|
|
196
|
+
ブログや docs では、本文だけでなく Markdown 要素もテーマの一部として設計する。
|
|
197
|
+
|
|
198
|
+
### 変更の優先順位
|
|
199
|
+
|
|
200
|
+
まず `tokens.css` で変えられることを変える。
|
|
201
|
+
|
|
202
|
+
- 色
|
|
203
|
+
- フォント
|
|
204
|
+
- 背景
|
|
205
|
+
- 罫線
|
|
206
|
+
- 余白
|
|
207
|
+
- prose / Markdown
|
|
208
|
+
- レスポンシブ時のサイズ調整
|
|
209
|
+
|
|
210
|
+
次に `pages/` を変える。
|
|
211
|
+
|
|
212
|
+
- home の構造。
|
|
213
|
+
- 記事一覧の密度。
|
|
214
|
+
- post detail の余白とメタ情報。
|
|
215
|
+
- tag / archive の見せ方。
|
|
216
|
+
- empty state。
|
|
217
|
+
|
|
218
|
+
最後に、繰り返し出る要素を `components.tsx` などのテーマ内コンポーネントへ切り出す。
|
|
219
|
+
|
|
220
|
+
共有 `components/` や `app/` へ手を入れるのは、複数テーマで使う必要がある場合だけにする。
|
|
221
|
+
|
|
222
|
+
## Claude Design を使わない場合
|
|
223
|
+
|
|
224
|
+
まず、既存テーマを読む。いきなり作り替えない。
|
|
225
|
+
|
|
226
|
+
確認するもの:
|
|
227
|
+
|
|
228
|
+
- `tokens.css` のトークン構造。
|
|
229
|
+
- `manifest.ts` の公開フィールド。
|
|
230
|
+
- `pages/home.tsx`、`pages/post.tsx`、`pages/tag.tsx` のデータ取得と表示責務。
|
|
231
|
+
- `themes/<official-name>/README.*` があれば、テーマ固有の意図。
|
|
232
|
+
|
|
233
|
+
進め方:
|
|
234
|
+
|
|
235
|
+
1. 要件を「読む体験」「情報密度」「ブランド感」「対応するコンテンツ型」に分解する。
|
|
236
|
+
2. 先に `tokens.css` で大きな方向を決める。
|
|
237
|
+
3. 必要な場合だけ `pages/` の構造を変更する。
|
|
238
|
+
4. 繰り返し出る chrome はテーマローカルコンポーネントに切り出す。
|
|
239
|
+
5. Markdown 要素も必ずデザイン対象にする。
|
|
240
|
+
|
|
241
|
+
Markdown で確認するもの:
|
|
242
|
+
|
|
243
|
+
- 見出し `h1` / `h2` / `h3`
|
|
244
|
+
- 段落
|
|
245
|
+
- リスト
|
|
246
|
+
- 表
|
|
247
|
+
- 引用
|
|
248
|
+
- インラインコード
|
|
249
|
+
- コードブロック
|
|
250
|
+
- 画像
|
|
251
|
+
- リンク
|
|
252
|
+
|
|
253
|
+
読み物サイトでは、本文の可読性を最優先する。装飾は本文の外側、余白、罫線、ナビゲーション、一覧の密度、メタ情報の組版で出す。
|
|
254
|
+
|
|
255
|
+
## AI を使ったテーマカスタマイズ
|
|
256
|
+
|
|
257
|
+
AI は「実装を全部任せる道具」ではなく、複数の役割に分けて使うと精度が上がる。
|
|
258
|
+
|
|
259
|
+
おすすめの役割分担:
|
|
260
|
+
|
|
261
|
+
- デザイン探索: Claude Design、ChatGPT、画像生成などで方向性を出す。
|
|
262
|
+
- 実装計画: Codex / Claude Code に既存テーマを読ませ、どのファイルに反映するか決める。
|
|
263
|
+
- 実装: テーマ内ファイルを編集する。
|
|
264
|
+
- 検証: ブラウザスクリーンショットで Desktop / Mobile を比較する。
|
|
265
|
+
- 仕上げ: はみ出し、空状態、Markdown、長いタイトルを詰める。
|
|
266
|
+
|
|
267
|
+
### AI に渡すとよい情報
|
|
268
|
+
|
|
269
|
+
AI にテーマ案を作らせるときは、次を渡す。
|
|
270
|
+
|
|
271
|
+
- サイト名。
|
|
272
|
+
- サイトの内容。
|
|
273
|
+
- 読者。
|
|
274
|
+
- 主な投稿タイプ。
|
|
275
|
+
- 避けたい雰囲気。
|
|
276
|
+
- 参考サイトやスクリーンショット。
|
|
277
|
+
- Desktop / Mobile の両方が必要であること。
|
|
278
|
+
- home / archive / detail / empty state が必要であること。
|
|
279
|
+
- Markdown の表、リスト、コード、引用も使うこと。
|
|
280
|
+
|
|
281
|
+
例:
|
|
282
|
+
|
|
283
|
+
```text
|
|
284
|
+
ishinao.net という個人ブログのテーマを作りたい。
|
|
285
|
+
内容は日常、技術メモ、ニュースへの短いコメント。
|
|
286
|
+
本文を読ませるサイトなので、記事本文の可読性を最優先。
|
|
287
|
+
ただし home / archive / header / meta 情報ではデザイン性を出したい。
|
|
288
|
+
Desktop と Mobile の両方で、Top empty、Top with content、Archive、Detail を作って。
|
|
289
|
+
Markdown の表、リスト、引用、コードブロックも浮かない雰囲気にしたい。
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### AI 出力をそのまま信じない
|
|
293
|
+
|
|
294
|
+
AI が作ったデザインには、次のような抜けが出やすい。
|
|
295
|
+
|
|
296
|
+
- Desktop は良いが Mobile が破綻する。
|
|
297
|
+
- ヒーローだけ作り込み、記事詳細が普通になる。
|
|
298
|
+
- 本文の可読性より装飾が勝つ。
|
|
299
|
+
- Markdown の表やコードが未設計。
|
|
300
|
+
- 空状態がない。
|
|
301
|
+
- 実データの長い日本語タイトルで崩れる。
|
|
302
|
+
- 余白や文字サイズが実装時に別物になる。
|
|
303
|
+
|
|
304
|
+
そのため、AI 出力は「完成コード」ではなく「視覚仕様」として扱う。
|
|
305
|
+
|
|
306
|
+
## Claude Design を使う場合
|
|
307
|
+
|
|
308
|
+
Claude Design の出力 HTML は、多くの場合「ひとつの完成サイト」ではなく「複数画面のアートボード集」です。HTML をそのまま移植するのではなく、画面ごとの設計意図を抽出して、ampless のテーマ構造へ写像する。
|
|
309
|
+
|
|
310
|
+
### 読み取り方
|
|
311
|
+
|
|
312
|
+
まず HTML またはスクリーンショットから、アートボードを画面単位で分類する。
|
|
313
|
+
|
|
314
|
+
例:
|
|
315
|
+
|
|
316
|
+
- Desktop / Top empty
|
|
317
|
+
- Desktop / Top with content
|
|
318
|
+
- Desktop / Archive list
|
|
319
|
+
- Desktop / Detail
|
|
320
|
+
- Mobile / Top
|
|
321
|
+
- Mobile / Archive
|
|
322
|
+
- Mobile / Detail
|
|
323
|
+
|
|
324
|
+
次に、各画面から共通トークンを抜き出す。
|
|
325
|
+
|
|
326
|
+
- 背景色
|
|
327
|
+
- アクセントカラー
|
|
328
|
+
- 罫線色
|
|
329
|
+
- フォントファミリー
|
|
330
|
+
- 見出しのサイズ感
|
|
331
|
+
- 本文の行間
|
|
332
|
+
- 一覧の密度
|
|
333
|
+
- 余白の単位
|
|
334
|
+
- ヘッダー / フッターの chrome
|
|
335
|
+
- モバイル時の幅、余白、改行、情報の省略ルール
|
|
336
|
+
|
|
337
|
+
この段階で、特定アートボードだけを見て実装しない。Desktop と Mobile の両方を見て、同じ UI がどう変化しているかを確認する。
|
|
338
|
+
|
|
339
|
+
### 実装への写像
|
|
340
|
+
|
|
341
|
+
Claude Design の画面を ampless のテーマに対応させる。
|
|
342
|
+
|
|
343
|
+
- Top / Home 系 → `themes/my-blog/pages/home.tsx`
|
|
344
|
+
- Detail / Article 系 → `themes/my-blog/pages/post.tsx`
|
|
345
|
+
- Archive / Tag / List 系 → `themes/my-blog/pages/tag.tsx`
|
|
346
|
+
- 共通ヘッダー、ワードマーク、フッター → `themes/my-blog/components.tsx`
|
|
347
|
+
- 色、フォント、グリッド、prose、レスポンシブ → `themes/my-blog/tokens.css`
|
|
348
|
+
- 管理 UI で変えたい値 → `themes/my-blog/manifest.ts`
|
|
349
|
+
|
|
350
|
+
HTML 内の generated code や inline style を丸ごとコピーしない。必要なのは、実装そのものではなく設計のルール。
|
|
351
|
+
|
|
352
|
+
### 実装時のコツ
|
|
353
|
+
|
|
354
|
+
Claude Design の HTML からは、次を手で抽出する。
|
|
355
|
+
|
|
356
|
+
- 画面タイプ。
|
|
357
|
+
- 共通トークン。
|
|
358
|
+
- レイアウトグリッド。
|
|
359
|
+
- 見出しのサイズ比。
|
|
360
|
+
- 一覧行の高さ、罫線、メタ情報の位置。
|
|
361
|
+
- モバイル時の省略 / 縦積み / サイズ変更。
|
|
362
|
+
- 空状態の扱い。
|
|
363
|
+
|
|
364
|
+
ampless 側では、それを以下のように分ける。
|
|
365
|
+
|
|
366
|
+
- 共通デザイン言語 → `tokens.css`
|
|
367
|
+
- 画面構造 → `pages/*.tsx`
|
|
368
|
+
- 繰り返し UI → テーマ内 `components.tsx`
|
|
369
|
+
- 管理 UI で変更可能にする値 → `manifest.ts`
|
|
370
|
+
|
|
371
|
+
Claude Design のアートボードに複数状態がある場合は、最初に状態名をメモする。
|
|
372
|
+
|
|
373
|
+
例:
|
|
374
|
+
|
|
375
|
+
```text
|
|
376
|
+
Final - ishinao.net theme
|
|
377
|
+
- Top empty
|
|
378
|
+
- Top with content
|
|
379
|
+
- Archive list
|
|
380
|
+
- Detail editorial body
|
|
381
|
+
- Mobile top empty
|
|
382
|
+
- Mobile top with content
|
|
383
|
+
- Mobile archive
|
|
384
|
+
- Mobile detail
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
このメモを実装チェックリストとして使う。
|
|
388
|
+
|
|
389
|
+
### Claude Design 反映チェックリスト
|
|
390
|
+
|
|
391
|
+
- Desktop と Mobile の両方を実装したか。
|
|
392
|
+
- 空状態と投稿あり状態の両方を考慮したか。
|
|
393
|
+
- 一覧、詳細、タグ一覧など、複数ページに同じデザイン言語が通っているか。
|
|
394
|
+
- ワードマーク、ナビ、メタ情報、罫線、背景の扱いが共通化されているか。
|
|
395
|
+
- モバイルで横スクロールや文字のはみ出しがないか。
|
|
396
|
+
- 長い日本語タイトルでも破綻しないか。
|
|
397
|
+
- 投稿が 1 件、複数件、タグなし、タグ複数のときに破綻しないか。
|
|
398
|
+
- Markdown の表やコードブロックがテーマの世界観から浮いていないか。
|
|
399
|
+
|
|
400
|
+
## Claude Design 以外の AI を使う場合
|
|
401
|
+
|
|
402
|
+
Claude Design がない場合でも、AI は十分使える。
|
|
403
|
+
|
|
404
|
+
### テキストで依頼する
|
|
405
|
+
|
|
406
|
+
まず、AI にデザイン仕様書を書かせる。
|
|
407
|
+
|
|
408
|
+
依頼例:
|
|
409
|
+
|
|
410
|
+
```text
|
|
411
|
+
ampless の blog テーマをベースに、個人技術ブログ向けのテーマ仕様を作って。
|
|
412
|
+
出力は実装コードではなく、tokens、home、post detail、tag archive、mobile rules、Markdown styling に分けて。
|
|
413
|
+
本文の可読性を最優先し、装飾は chrome と一覧で出す。
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
この出力をもとに、Codex / Claude Code へ実装させる。
|
|
417
|
+
|
|
418
|
+
### 画像やスクリーンショットを使う
|
|
419
|
+
|
|
420
|
+
参考画像がある場合は、AI に以下を抽出させる。
|
|
421
|
+
|
|
422
|
+
- 色。
|
|
423
|
+
- フォントの雰囲気。
|
|
424
|
+
- 余白。
|
|
425
|
+
- 罫線。
|
|
426
|
+
- 情報密度。
|
|
427
|
+
- Desktop / Mobile の差。
|
|
428
|
+
- 実装時に `tokens.css` へ入れるべきもの。
|
|
429
|
+
- `pages/` の構造変更が必要なもの。
|
|
430
|
+
|
|
431
|
+
### AI に実装させるときの依頼
|
|
432
|
+
|
|
433
|
+
実装 AI には、次のように依頼する。
|
|
434
|
+
|
|
435
|
+
```text
|
|
436
|
+
themes/my-blog だけを編集して、共有 app/components/lib は触らない。
|
|
437
|
+
まず既存テーマを読んで、tokens.css、pages、manifest の責務を確認して。
|
|
438
|
+
Desktop 1440px と Mobile 390px でスクリーンショット確認して。
|
|
439
|
+
Markdown の表、リスト、引用、コードもテーマに合うように調整して。
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
AI に「全部いい感じにして」とだけ依頼すると、共有ファイルを触ったり、Desktop だけで終わったりしやすい。
|
|
443
|
+
|
|
444
|
+
## ブラウザ確認
|
|
445
|
+
|
|
446
|
+
UI / テーマ変更では dev server を起動し、実際のページを開いて確認する。
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
npm run dev
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
確認する代表幅:
|
|
453
|
+
|
|
454
|
+
- Desktop: `1440 x 1100`
|
|
455
|
+
- Mobile: `390 x 844`
|
|
456
|
+
|
|
457
|
+
スクリーンショットで確認する場合は、キャッシュの影響を避けるためにクエリ文字列を付けるとよい。
|
|
458
|
+
|
|
459
|
+
```text
|
|
460
|
+
http://localhost:3000/?v=theme-check-1
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
見るポイント:
|
|
464
|
+
|
|
465
|
+
- 参照デザインと比べて、第一印象が同じ方向を向いているか。
|
|
466
|
+
- テキストが親要素からはみ出していないか。
|
|
467
|
+
- モバイルで横スクロールが発生していないか。
|
|
468
|
+
- 背景、罫線、余白、文字サイズが画面幅に対して自然か。
|
|
469
|
+
- 読むべき本文のコントラストと行間が十分か。
|
|
470
|
+
- リンク、タグ、ナビ、フッターが空設定のときに余計な余白を残していないか。
|
|
471
|
+
|
|
472
|
+
## テーマ内コンポーネントの使いどころ
|
|
473
|
+
|
|
474
|
+
テーマ専用の共通 UI は `themes/my-blog/components.tsx` のようにテーマ内へ置く。
|
|
475
|
+
|
|
476
|
+
向いているもの:
|
|
477
|
+
|
|
478
|
+
- ヘッダー
|
|
479
|
+
- フッター
|
|
480
|
+
- ワードマーク
|
|
481
|
+
- 記事行
|
|
482
|
+
- メタ情報
|
|
483
|
+
- テーマ固有の装飾 UI
|
|
484
|
+
|
|
485
|
+
共有 `components/` に置くのは、複数テーマや管理 UI でも再利用する場合だけにする。
|
|
486
|
+
|
|
487
|
+
## よくある失敗
|
|
488
|
+
|
|
489
|
+
- Claude Design の最初のサムネイルだけを見て実装してしまう。
|
|
490
|
+
- Desktop だけ寄せて、Mobile アートボードを見落とす。
|
|
491
|
+
- `tokens.css` だけで済む変更なのに、共有 `components/` を編集してしまう。
|
|
492
|
+
- 公式テーマ `themes/blog/` を直接編集してしまう。
|
|
493
|
+
- Markdown の表、引用、コードブロックを未調整のままにする。
|
|
494
|
+
- ブラウザ確認なしで「ビルドが通ったので完了」とする。
|
|
495
|
+
- 空の footer / nav 設定でも chrome だけ表示してしまう。
|
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
> 日本語版: [THEMES.ja.md](./THEMES.ja.md)
|
|
2
|
+
>
|
|
3
|
+
# THEMES.md
|
|
4
|
+
|
|
5
|
+
Working guide for customizing themes in an ampless project. Written
|
|
6
|
+
for AI coding agents and humans alike — keep it as your day-to-day
|
|
7
|
+
reference when designing or restyling a site.
|
|
8
|
+
|
|
9
|
+
All theme-related instructions live here. `AGENTS.md` / `AGENTS.ja.md`
|
|
10
|
+
deliberately keep only a one-line pointer back to this file.
|
|
11
|
+
|
|
12
|
+
## Ground rules
|
|
13
|
+
|
|
14
|
+
- Never edit the official themes directly.
|
|
15
|
+
- Keep customizations inside `themes/my-*/`.
|
|
16
|
+
- The shared shell (`app/`, `components/`, `lib/`) is touched only when
|
|
17
|
+
the change genuinely can't be solved inside a theme.
|
|
18
|
+
- `themes-registry.ts` is auto-generated — don't hand-edit it.
|
|
19
|
+
- UI / theme changes are NOT done when type-checks pass. Always verify
|
|
20
|
+
in a browser.
|
|
21
|
+
|
|
22
|
+
## Picking a base theme
|
|
23
|
+
|
|
24
|
+
Theme customization in ampless starts by copying an existing theme
|
|
25
|
+
into `themes/my-*/`. Deciding "which theme to start from" first keeps
|
|
26
|
+
the scope small — much smaller than deciding "what to build" first.
|
|
27
|
+
|
|
28
|
+
### `blog`
|
|
29
|
+
|
|
30
|
+
Personal blogs, journals, technical notes, short news commentary —
|
|
31
|
+
anything chronological where individual posts are the primary unit.
|
|
32
|
+
|
|
33
|
+
Out of the box:
|
|
34
|
+
|
|
35
|
+
- Post feed on the home page.
|
|
36
|
+
- Per-post detail page.
|
|
37
|
+
- Per-tag archive page.
|
|
38
|
+
- Header / footer nav.
|
|
39
|
+
- Wide tuning surface for colors, fonts, radii, pinned posts, etc.
|
|
40
|
+
|
|
41
|
+
Good fits:
|
|
42
|
+
|
|
43
|
+
- Personal-media feel.
|
|
44
|
+
- Adjusting the density of the post list.
|
|
45
|
+
- Strengthening typography on the detail page.
|
|
46
|
+
- Designing Markdown elements (tables, code, blockquotes) as part of
|
|
47
|
+
the reading experience.
|
|
48
|
+
|
|
49
|
+
When in doubt, start from `blog`.
|
|
50
|
+
|
|
51
|
+
### `minimal`
|
|
52
|
+
|
|
53
|
+
Restrained, small-surface blog.
|
|
54
|
+
|
|
55
|
+
Out of the box:
|
|
56
|
+
|
|
57
|
+
- Few manifest customization fields.
|
|
58
|
+
- Minimal chrome.
|
|
59
|
+
- Design steps back so the posts take the lead.
|
|
60
|
+
|
|
61
|
+
Good fits:
|
|
62
|
+
|
|
63
|
+
- Light color / radius tweaks only.
|
|
64
|
+
- Layout largely untouched.
|
|
65
|
+
- Low-content sites.
|
|
66
|
+
|
|
67
|
+
If you want to redesign meaningfully, start from `blog` instead.
|
|
68
|
+
|
|
69
|
+
### `landing`
|
|
70
|
+
|
|
71
|
+
Single-page introduction sites.
|
|
72
|
+
|
|
73
|
+
Out of the box:
|
|
74
|
+
|
|
75
|
+
- Hero-centric layout.
|
|
76
|
+
- CTA button.
|
|
77
|
+
- Optional latest-posts strip.
|
|
78
|
+
- Site description and primary CTAs front and center.
|
|
79
|
+
|
|
80
|
+
Good fits:
|
|
81
|
+
|
|
82
|
+
- Products, events, portfolios, shop introductions.
|
|
83
|
+
- Sites that prioritize the first impression over a long post list.
|
|
84
|
+
- Letting an AI design the hero / CTA / feature sections.
|
|
85
|
+
|
|
86
|
+
### `corporate`
|
|
87
|
+
|
|
88
|
+
Company sites, firms, organizations.
|
|
89
|
+
|
|
90
|
+
Out of the box:
|
|
91
|
+
|
|
92
|
+
- Restrained hero.
|
|
93
|
+
- News / announcements list.
|
|
94
|
+
- Substantial header / footer.
|
|
95
|
+
- Footer disclaimer slot.
|
|
96
|
+
|
|
97
|
+
Good fits:
|
|
98
|
+
|
|
99
|
+
- Putting company overview / services up front.
|
|
100
|
+
- Managing news and announcements as posts.
|
|
101
|
+
- Trust, readability, maintainability as priorities.
|
|
102
|
+
|
|
103
|
+
### `docs`
|
|
104
|
+
|
|
105
|
+
Documentation sites.
|
|
106
|
+
|
|
107
|
+
Out of the box:
|
|
108
|
+
|
|
109
|
+
- Sidebar-driven navigation.
|
|
110
|
+
- Putting `tag:<name>` into a sidebar entry auto-expands the matching
|
|
111
|
+
post list.
|
|
112
|
+
- Structure tuned for code fonts and technical writing.
|
|
113
|
+
|
|
114
|
+
Good fits:
|
|
115
|
+
|
|
116
|
+
- Help docs, specifications, developer reference.
|
|
117
|
+
- Categorizing posts by tag and surfacing them in the sidebar.
|
|
118
|
+
- Heavy use of Markdown code blocks and tables.
|
|
119
|
+
|
|
120
|
+
### `dads`
|
|
121
|
+
|
|
122
|
+
Public-sector sites following Japan's Digital Agency Design System.
|
|
123
|
+
|
|
124
|
+
Out of the box:
|
|
125
|
+
|
|
126
|
+
- High contrast.
|
|
127
|
+
- Accessibility-first.
|
|
128
|
+
- Restrained decoration.
|
|
129
|
+
- Built on `@digital-go-jp/tailwind-theme-plugin`.
|
|
130
|
+
|
|
131
|
+
Good fits:
|
|
132
|
+
|
|
133
|
+
- Government, municipal, public-sector information sites.
|
|
134
|
+
- Compliance and readability prioritized over a distinctive look.
|
|
135
|
+
|
|
136
|
+
Caveats:
|
|
137
|
+
|
|
138
|
+
- Reskinning to non-DADS palettes erodes the "DADS-compliant" claim.
|
|
139
|
+
- For public-sector work, don't take AI-suggested decorative changes
|
|
140
|
+
at face value — keep accessibility first.
|
|
141
|
+
|
|
142
|
+
## Standard workflow
|
|
143
|
+
|
|
144
|
+
1. Copy an official theme.
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npm run copy-theme blog my-blog
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
The `my-` prefix marks the copy as user-owned;
|
|
151
|
+
`npm run update-ampless` leaves anything under `themes/my-*/` alone.
|
|
152
|
+
|
|
153
|
+
2. Implement inside the theme first.
|
|
154
|
+
|
|
155
|
+
In priority order:
|
|
156
|
+
|
|
157
|
+
- `themes/my-blog/tokens.css` — colors, fonts, spacing, rules,
|
|
158
|
+
Markdown body styling.
|
|
159
|
+
- `themes/my-blog/manifest.ts` — fields exposed to the admin UI.
|
|
160
|
+
- `themes/my-blog/pages/` — per-route layouts (home / post / tag /
|
|
161
|
+
feed / sitemap).
|
|
162
|
+
- `themes/my-blog/components.tsx` (or similar) — shared UI used
|
|
163
|
+
only within this theme. Header, footer, wordmark, and such can
|
|
164
|
+
live here.
|
|
165
|
+
|
|
166
|
+
3. Activate the theme.
|
|
167
|
+
|
|
168
|
+
Open `/admin/sites/<siteId>/theme`, select `my-blog`, save. Theme
|
|
169
|
+
switching is a runtime setting — no redeploy required.
|
|
170
|
+
|
|
171
|
+
4. Verify.
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
npm run dev
|
|
175
|
+
npx tsc --noEmit
|
|
176
|
+
npm run build
|
|
177
|
+
npm run lint
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
If `npm run lint` is misaligned with the project's Next.js version,
|
|
181
|
+
say so — but type-check, build, and browser verification still all
|
|
182
|
+
have to pass.
|
|
183
|
+
|
|
184
|
+
## Design before you implement
|
|
185
|
+
|
|
186
|
+
Before changing a theme, decide in this order:
|
|
187
|
+
|
|
188
|
+
1. **Site role.** Personal blog? Technical notes? News commentary?
|
|
189
|
+
Company site? Documentation? Landing page?
|
|
190
|
+
2. **Reading mode.** Slow reading of long-form posts? Fast scanning
|
|
191
|
+
of a list? Strong hero impression? Search / tag discovery?
|
|
192
|
+
3. **Screen inventory.** At minimum, think through:
|
|
193
|
+
- home
|
|
194
|
+
- post detail
|
|
195
|
+
- tag / archive
|
|
196
|
+
- empty state
|
|
197
|
+
- mobile home
|
|
198
|
+
- mobile detail
|
|
199
|
+
4. **Change surface.** Is `tokens.css` enough? Does `pages/` structure
|
|
200
|
+
change? Do you need a new theme-local component?
|
|
201
|
+
5. **Markdown.** For blog or docs themes, Markdown elements are part
|
|
202
|
+
of the design — not afterthought.
|
|
203
|
+
|
|
204
|
+
### Order of operations
|
|
205
|
+
|
|
206
|
+
First, change what `tokens.css` can change:
|
|
207
|
+
|
|
208
|
+
- Colors
|
|
209
|
+
- Fonts
|
|
210
|
+
- Backgrounds
|
|
211
|
+
- Rules
|
|
212
|
+
- Spacing
|
|
213
|
+
- Prose / Markdown
|
|
214
|
+
- Responsive sizing
|
|
215
|
+
|
|
216
|
+
Then change `pages/`:
|
|
217
|
+
|
|
218
|
+
- Home structure.
|
|
219
|
+
- Post-list density.
|
|
220
|
+
- Post-detail spacing and meta.
|
|
221
|
+
- Tag / archive presentation.
|
|
222
|
+
- Empty state.
|
|
223
|
+
|
|
224
|
+
Last, extract repeated UI into theme-local components like
|
|
225
|
+
`components.tsx`.
|
|
226
|
+
|
|
227
|
+
Reach for shared `components/` or `app/` only when the change has to
|
|
228
|
+
be used across multiple themes.
|
|
229
|
+
|
|
230
|
+
## Working without Claude Design
|
|
231
|
+
|
|
232
|
+
Read the existing theme first. Don't restart from scratch.
|
|
233
|
+
|
|
234
|
+
What to read:
|
|
235
|
+
|
|
236
|
+
- `tokens.css` token structure.
|
|
237
|
+
- Public fields in `manifest.ts`.
|
|
238
|
+
- Data fetching and rendering responsibilities in `pages/home.tsx`,
|
|
239
|
+
`pages/post.tsx`, `pages/tag.tsx`.
|
|
240
|
+
- `themes/<official-name>/README.*` if present — theme-specific intent.
|
|
241
|
+
|
|
242
|
+
How to proceed:
|
|
243
|
+
|
|
244
|
+
1. Decompose the requirements into "reading experience", "information
|
|
245
|
+
density", "brand feel", and "content types".
|
|
246
|
+
2. Set the broad direction in `tokens.css`.
|
|
247
|
+
3. Change `pages/` only where needed.
|
|
248
|
+
4. Extract repeated chrome into theme-local components.
|
|
249
|
+
5. Always include Markdown elements in the design.
|
|
250
|
+
|
|
251
|
+
Markdown elements to check:
|
|
252
|
+
|
|
253
|
+
- Headings `h1` / `h2` / `h3`
|
|
254
|
+
- Paragraphs
|
|
255
|
+
- Lists
|
|
256
|
+
- Tables
|
|
257
|
+
- Blockquotes
|
|
258
|
+
- Inline code
|
|
259
|
+
- Code blocks
|
|
260
|
+
- Images
|
|
261
|
+
- Links
|
|
262
|
+
|
|
263
|
+
For reading-focused sites, body legibility is the top priority.
|
|
264
|
+
Express the design through the framing — spacing, rules, navigation,
|
|
265
|
+
list density, meta typography — not the body itself.
|
|
266
|
+
|
|
267
|
+
## Using AI for theme customization
|
|
268
|
+
|
|
269
|
+
Don't treat AI as a single "implement everything" tool. Accuracy goes
|
|
270
|
+
up when you split the work across roles.
|
|
271
|
+
|
|
272
|
+
A workable split:
|
|
273
|
+
|
|
274
|
+
- **Design exploration**: Claude Design, ChatGPT, image generation —
|
|
275
|
+
produce a direction.
|
|
276
|
+
- **Implementation plan**: Codex / Claude Code reads the existing
|
|
277
|
+
theme and decides which files reflect the plan.
|
|
278
|
+
- **Implementation**: edits inside the theme.
|
|
279
|
+
- **Verification**: Desktop / Mobile browser screenshots.
|
|
280
|
+
- **Polish**: overflow, empty states, Markdown, long titles.
|
|
281
|
+
|
|
282
|
+
### What to feed the AI
|
|
283
|
+
|
|
284
|
+
When you ask an AI to draft a theme, include:
|
|
285
|
+
|
|
286
|
+
- Site name.
|
|
287
|
+
- Site content.
|
|
288
|
+
- Audience.
|
|
289
|
+
- Primary post types.
|
|
290
|
+
- Vibes to avoid.
|
|
291
|
+
- Reference sites or screenshots.
|
|
292
|
+
- That both Desktop and Mobile are required.
|
|
293
|
+
- That home / archive / detail / empty-state are all required.
|
|
294
|
+
- That Markdown — tables, lists, code, blockquotes — is in scope.
|
|
295
|
+
|
|
296
|
+
Example:
|
|
297
|
+
|
|
298
|
+
```text
|
|
299
|
+
Design a theme for ishinao.net, a personal blog. The content is
|
|
300
|
+
day-to-day life, technical notes, and short news commentary.
|
|
301
|
+
Body legibility is the top priority because this is a reading site,
|
|
302
|
+
but the home, archive, header, and meta deserve real design.
|
|
303
|
+
Produce Top-empty, Top-with-content, Archive, and Detail for both
|
|
304
|
+
Desktop and Mobile. Markdown tables, lists, blockquotes, and code
|
|
305
|
+
blocks should sit cleanly inside the theme's world.
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Don't trust AI output verbatim
|
|
309
|
+
|
|
310
|
+
Common gaps in AI-produced themes:
|
|
311
|
+
|
|
312
|
+
- Desktop looks great; Mobile breaks.
|
|
313
|
+
- Hero is polished but post detail looks generic.
|
|
314
|
+
- Decoration wins over body legibility.
|
|
315
|
+
- Markdown tables / code aren't designed.
|
|
316
|
+
- No empty state.
|
|
317
|
+
- Long real-world Japanese titles overflow.
|
|
318
|
+
- Spacing / type sizes drift between mockup and implementation.
|
|
319
|
+
|
|
320
|
+
Treat AI output as a **visual spec**, not finished code.
|
|
321
|
+
|
|
322
|
+
## Using Claude Design
|
|
323
|
+
|
|
324
|
+
Claude Design output HTML is usually a collection of artboards across
|
|
325
|
+
multiple screens, not a single finished site. Don't port the HTML
|
|
326
|
+
verbatim — extract the design intent per screen and map it onto the
|
|
327
|
+
ampless theme structure.
|
|
328
|
+
|
|
329
|
+
### Reading the output
|
|
330
|
+
|
|
331
|
+
First, classify the artboards by screen from the HTML or screenshots:
|
|
332
|
+
|
|
333
|
+
- Desktop / Top empty
|
|
334
|
+
- Desktop / Top with content
|
|
335
|
+
- Desktop / Archive list
|
|
336
|
+
- Desktop / Detail
|
|
337
|
+
- Mobile / Top
|
|
338
|
+
- Mobile / Archive
|
|
339
|
+
- Mobile / Detail
|
|
340
|
+
|
|
341
|
+
Then pull the shared tokens out of each screen:
|
|
342
|
+
|
|
343
|
+
- Background color
|
|
344
|
+
- Accent color
|
|
345
|
+
- Rule color
|
|
346
|
+
- Font family
|
|
347
|
+
- Heading size relationships
|
|
348
|
+
- Body line-height
|
|
349
|
+
- List density
|
|
350
|
+
- Spacing unit
|
|
351
|
+
- Header / footer chrome
|
|
352
|
+
- Mobile widths, padding, line breaks, info-elision rules
|
|
353
|
+
|
|
354
|
+
Don't implement from a single artboard in isolation. Look at Desktop
|
|
355
|
+
and Mobile together to see how the same UI transforms.
|
|
356
|
+
|
|
357
|
+
### Mapping to ampless
|
|
358
|
+
|
|
359
|
+
Map Claude Design screens onto the ampless theme structure:
|
|
360
|
+
|
|
361
|
+
- Top / Home → `themes/my-blog/pages/home.tsx`
|
|
362
|
+
- Detail / Article → `themes/my-blog/pages/post.tsx`
|
|
363
|
+
- Archive / Tag / List → `themes/my-blog/pages/tag.tsx`
|
|
364
|
+
- Shared header / wordmark / footer →
|
|
365
|
+
`themes/my-blog/components.tsx`
|
|
366
|
+
- Colors, fonts, grid, prose, responsive → `themes/my-blog/tokens.css`
|
|
367
|
+
- Values exposed in the admin UI → `themes/my-blog/manifest.ts`
|
|
368
|
+
|
|
369
|
+
Don't copy generated code or inline styles wholesale. What you need
|
|
370
|
+
is the design rules, not the implementation.
|
|
371
|
+
|
|
372
|
+
### Implementation tips
|
|
373
|
+
|
|
374
|
+
Extract by hand from the Claude Design HTML:
|
|
375
|
+
|
|
376
|
+
- Screen types.
|
|
377
|
+
- Shared tokens.
|
|
378
|
+
- Layout grid.
|
|
379
|
+
- Heading size scale.
|
|
380
|
+
- List row height, rule treatment, meta position.
|
|
381
|
+
- Mobile elision / vertical stacking / size changes.
|
|
382
|
+
- Empty-state handling.
|
|
383
|
+
|
|
384
|
+
On the ampless side, slot those into:
|
|
385
|
+
|
|
386
|
+
- Shared design language → `tokens.css`
|
|
387
|
+
- Screen structure → `pages/*.tsx`
|
|
388
|
+
- Repeating UI → theme-local `components.tsx`
|
|
389
|
+
- Admin-editable values → `manifest.ts`
|
|
390
|
+
|
|
391
|
+
If a Claude Design board carries multiple states, note them first.
|
|
392
|
+
Example:
|
|
393
|
+
|
|
394
|
+
```text
|
|
395
|
+
Final - ishinao.net theme
|
|
396
|
+
- Top empty
|
|
397
|
+
- Top with content
|
|
398
|
+
- Archive list
|
|
399
|
+
- Detail editorial body
|
|
400
|
+
- Mobile top empty
|
|
401
|
+
- Mobile top with content
|
|
402
|
+
- Mobile archive
|
|
403
|
+
- Mobile detail
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
Treat the list as your implementation checklist.
|
|
407
|
+
|
|
408
|
+
### Claude Design reflection checklist
|
|
409
|
+
|
|
410
|
+
- Implemented both Desktop and Mobile?
|
|
411
|
+
- Handled both empty and populated states?
|
|
412
|
+
- Same design language flows through list / detail / tag pages?
|
|
413
|
+
- Wordmark, nav, meta, rules, background treated consistently?
|
|
414
|
+
- No horizontal scroll or text overflow on mobile?
|
|
415
|
+
- Long Japanese titles don't break the layout?
|
|
416
|
+
- 1 / many / no-tag / multi-tag posts all render cleanly?
|
|
417
|
+
- Markdown tables / code blocks don't float outside the theme world?
|
|
418
|
+
|
|
419
|
+
## Using other AI tools (no Claude Design)
|
|
420
|
+
|
|
421
|
+
You can still get a lot out of AI without Claude Design.
|
|
422
|
+
|
|
423
|
+
### Ask in text
|
|
424
|
+
|
|
425
|
+
Have the AI write a design spec first:
|
|
426
|
+
|
|
427
|
+
```text
|
|
428
|
+
Based on the blog theme, draft a theme spec for a personal technical
|
|
429
|
+
blog. Output is a written spec — not code — split across tokens,
|
|
430
|
+
home, post detail, tag archive, mobile rules, and Markdown styling.
|
|
431
|
+
Body legibility is the top priority; decoration lives in the chrome
|
|
432
|
+
and lists.
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Then hand the spec to Codex / Claude Code for implementation.
|
|
436
|
+
|
|
437
|
+
### Use reference images / screenshots
|
|
438
|
+
|
|
439
|
+
If you have reference imagery, have the AI extract:
|
|
440
|
+
|
|
441
|
+
- Colors.
|
|
442
|
+
- Font vibes.
|
|
443
|
+
- Spacing.
|
|
444
|
+
- Rules.
|
|
445
|
+
- Information density.
|
|
446
|
+
- Desktop / Mobile differences.
|
|
447
|
+
- What should land in `tokens.css`.
|
|
448
|
+
- Whether `pages/` structure has to change.
|
|
449
|
+
|
|
450
|
+
### Asking AI to implement
|
|
451
|
+
|
|
452
|
+
Phrase the implementation ask narrowly:
|
|
453
|
+
|
|
454
|
+
```text
|
|
455
|
+
Edit only themes/my-blog. Don't touch shared app / components / lib.
|
|
456
|
+
Read the existing theme first to learn the tokens.css / pages /
|
|
457
|
+
manifest responsibilities. Verify Desktop 1440px and Mobile 390px in
|
|
458
|
+
the browser. Style Markdown tables, lists, blockquotes, and code
|
|
459
|
+
blocks consistently with the theme.
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
A vague "make it look good" prompt is how you end up with shared
|
|
463
|
+
files edited and Mobile forgotten.
|
|
464
|
+
|
|
465
|
+
## Browser verification
|
|
466
|
+
|
|
467
|
+
UI / theme changes need a real dev server. Open the actual pages.
|
|
468
|
+
|
|
469
|
+
```bash
|
|
470
|
+
npm run dev
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
Representative widths:
|
|
474
|
+
|
|
475
|
+
- Desktop: `1440 x 1100`
|
|
476
|
+
- Mobile: `390 x 844`
|
|
477
|
+
|
|
478
|
+
When taking screenshots, append a query string to bypass any
|
|
479
|
+
intermediate cache:
|
|
480
|
+
|
|
481
|
+
```text
|
|
482
|
+
http://localhost:3000/?v=theme-check-1
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
What to look for:
|
|
486
|
+
|
|
487
|
+
- First impression matches the reference direction.
|
|
488
|
+
- Text doesn't overflow its parent.
|
|
489
|
+
- No horizontal scroll on mobile.
|
|
490
|
+
- Background, rules, spacing, and type scale all feel right at the
|
|
491
|
+
width.
|
|
492
|
+
- Body contrast and line-height are comfortable to read.
|
|
493
|
+
- Empty link / tag / nav / footer configurations don't leave dead
|
|
494
|
+
chrome behind.
|
|
495
|
+
|
|
496
|
+
## Theme-local components
|
|
497
|
+
|
|
498
|
+
Theme-specific shared UI belongs in the theme, e.g.
|
|
499
|
+
`themes/my-blog/components.tsx`.
|
|
500
|
+
|
|
501
|
+
Good candidates:
|
|
502
|
+
|
|
503
|
+
- Header
|
|
504
|
+
- Footer
|
|
505
|
+
- Wordmark
|
|
506
|
+
- Post row
|
|
507
|
+
- Meta block
|
|
508
|
+
- Theme-specific decorative UI
|
|
509
|
+
|
|
510
|
+
Put something in shared `components/` only when it has to be reused
|
|
511
|
+
across multiple themes or by the admin UI.
|
|
512
|
+
|
|
513
|
+
## Common failure modes
|
|
514
|
+
|
|
515
|
+
- Implementing only the first Claude Design thumbnail you opened.
|
|
516
|
+
- Hugging Desktop and missing the Mobile artboards.
|
|
517
|
+
- Editing shared `components/` for a change `tokens.css` could have
|
|
518
|
+
handled.
|
|
519
|
+
- Editing the official `themes/blog/` directly.
|
|
520
|
+
- Leaving Markdown tables, blockquotes, and code blocks unstyled.
|
|
521
|
+
- Calling a change "done" because the build passed, with no browser
|
|
522
|
+
check.
|
|
523
|
+
- Empty footer / nav configurations still rendering empty chrome.
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"@tiptap/pm": "^3.23.6",
|
|
26
26
|
"@tiptap/react": "^3.23.6",
|
|
27
27
|
"@tiptap/starter-kit": "^3.23.6",
|
|
28
|
-
"@ampless/plugin-og-image": "^0.2.0-alpha.
|
|
29
|
-
"@ampless/plugin-rss": "^0.2.0-alpha.
|
|
30
|
-
"@ampless/plugin-seo": "^0.2.0-alpha.
|
|
31
|
-
"@ampless/plugin-webhook": "^0.2.0-alpha.
|
|
32
|
-
"@ampless/admin": "^1.0.0-alpha.
|
|
33
|
-
"@ampless/backend": "^1.0.0-alpha.
|
|
34
|
-
"@ampless/runtime": "^1.0.0-alpha.
|
|
28
|
+
"@ampless/plugin-og-image": "^0.2.0-alpha.15",
|
|
29
|
+
"@ampless/plugin-rss": "^0.2.0-alpha.15",
|
|
30
|
+
"@ampless/plugin-seo": "^0.2.0-alpha.15",
|
|
31
|
+
"@ampless/plugin-webhook": "^0.2.0-alpha.15",
|
|
32
|
+
"@ampless/admin": "^1.0.0-alpha.37",
|
|
33
|
+
"@ampless/backend": "^1.0.0-alpha.28",
|
|
34
|
+
"@ampless/runtime": "^1.0.0-alpha.21",
|
|
35
35
|
"@digital-go-jp/tailwind-theme-plugin": "^0.3.4",
|
|
36
|
-
"ampless": "^1.0.0-alpha.
|
|
36
|
+
"ampless": "^1.0.0-alpha.15",
|
|
37
37
|
"aws-amplify": "^6.17.0",
|
|
38
38
|
"class-variance-authority": "^0.7.1",
|
|
39
39
|
"clsx": "^2.1.1",
|