diff --git a/apps/og-generator/app/page.tsx b/apps/og-generator/app/page.tsx index add2d926755..f299ed5cfe2 100644 --- a/apps/og-generator/app/page.tsx +++ b/apps/og-generator/app/page.tsx @@ -447,17 +447,6 @@ export default function Page() { // of the standard 4 templates. const activeTemplates = formatId === 'newsletter' ? NEWSLETTER_TEMPLATES : formatId === 'twitter' ? SOCIAL_TEMPLATES : TEMPLATES - // Grouped by category (in first-seen order) so the Layout picker scales as - // more templates get added, instead of one ever-growing flat grid. - const templateGroups = useMemo(() => { - const groups: { category: string; templates: typeof activeTemplates }[] = [] - for (const t of activeTemplates) { - const group = groups.find((g) => g.category === t.category) - if (group) group.templates.push(t) - else groups.push({ category: t.category, templates: [t] }) - } - return groups - }, [activeTemplates]) const [view, setView] = useState('og') const [headline, setHeadline] = useState('Postgres full text search just got faster') @@ -824,10 +813,39 @@ export default function Page() { {/* Floating guides / view-in-context / zoom toolbar — bottom-aligned, centered on the same content box as the View toggle above, and - likewise anchored outside main's scroll container. One bar instead - of two so the canvas doesn't have controls floating on both - corners. */} -
+ likewise anchored outside main's scroll container. Stacked in a + column with the Layout carousel (when applicable) so the canvas + only ever has controls floating on the bottom edge, not scattered + across corners. */} +
+ {showContentControls && inContext === 'none' && ( +
+ {activeTemplates.map((t) => ( + + ))} +
+ )}
+ ) + })} +
- {showContentControls && ( - -
- {templateGroups.map((g) => ( -
- {templateGroups.length > 1 && ( - {g.category} - )} -
- {g.templates.map((t) => ( - - ))} -
-
- ))} -
-
- )} - {showContentControls && showEyebrowControl && (