From 60ff6ac7df22c5b858bca1acfa9214a3c9f305b1 Mon Sep 17 00:00:00 2001 From: shay Date: Mon, 30 Nov 2026 13:05:05 -0800 Subject: [PATCH] feat(editor): Get embed code label; numbered create-repo and README steps Co-Authored-By: Claude Opus 5.5 --- README.md | 4 +-- .../frontend/src/screens/ResultScreen.tsx | 29 ++++++++++++------- .../frontend/src/screens/WorkshopScreen.tsx | 2 +- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index f8be7c7..ccceb73 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ That card is live, not a screenshot. Swap in your own username: 2. Sign in with GitHub. Signing in is how you prove ownership of the username, and it unlocks the editor. 3. Pick a theme, reorder widgets, add any custom tags or achievements. -4. Click **Generate**. +4. Click **Get embed code**. 5. Paste this one line into your profile README: ```md @@ -345,7 +345,7 @@ Sign in with GitHub at . Only the account whose login matches the username can edit that widget's settings. **Can I change the widget without re-embedding?** -Yes. The image URL is stable. Edit in the editor, click **Generate**, +Yes. The image URL is stable. Edit in the editor, click **Get embed code**, and the next fetch serves the new version. GitHub's image cache may delay propagation by a few minutes. diff --git a/generator/frontend/src/screens/ResultScreen.tsx b/generator/frontend/src/screens/ResultScreen.tsx index e849f83..1b3b2b0 100644 --- a/generator/frontend/src/screens/ResultScreen.tsx +++ b/generator/frontend/src/screens/ResultScreen.tsx @@ -173,6 +173,22 @@ export function ResultScreen({ username, generating, generatedSvg, generateError
+ {noRepo === profileRepo && ( +
+

+ {username} has no profile README yet. GitHub shows the README of the repo named {username}/{username} on your profile. +

+ +

In step 1, leave "Add a README" unticked. Step 2 opens a README with this card already in it; commit it.

+
+ )}

Embed in your README

@@ -195,21 +211,12 @@ export function ResultScreen({ username, generating, generatedSvg, generateError
                   )}
                 
               
-

+ {noRepo !== profileRepo &&

Paste it into {username}/{username}, the repo GitHub shows on your profile.{' '} Copy & open your README {' \u00b7 '} Create the repo -

- {noRepo === profileRepo && ( -

- {username} has no profile README yet. 1.{' '} - Create the repo - {' '}(leave "Add a README" unticked). 2.{' '} - Add a README with this card in it - {' '}and commit. -

- )} +

} {otherCard && (

This README already shows a {otherCard} card. Replace that line with the one above to swap it for this card. diff --git a/generator/frontend/src/screens/WorkshopScreen.tsx b/generator/frontend/src/screens/WorkshopScreen.tsx index 5171d86..94dd683 100644 --- a/generator/frontend/src/screens/WorkshopScreen.tsx +++ b/generator/frontend/src/screens/WorkshopScreen.tsx @@ -375,7 +375,7 @@ export function WorkshopScreen({ onClick={onGenerate} className="w-full py-3 rounded-xl bg-gray-800 text-white text-sm font-medium hover:bg-gray-700 transition-colors mb-6" > - Generate → + Get embed code → {fetchError && (