From 72c180aaf733003d58e46faa605145b2a4fddfc3 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Tue, 6 Oct 2026 22:23:50 +0200 Subject: [PATCH] website: plugins section spacing with margins, not flex gaps PluginSection takes its header as a prop and puts the content 32px below it with a margin. Sections on the index are 56px apart via space-y. The browse page h1 sits 32px above the sort tabs, matching the index headings. --- packages/website/src/plugins/browse-page.tsx | 5 +- packages/website/src/plugins/section.tsx | 11 ++- packages/website/src/routes/plugins/index.tsx | 91 ++++++++++++------- 3 files changed, 66 insertions(+), 41 deletions(-) diff --git a/packages/website/src/plugins/browse-page.tsx b/packages/website/src/plugins/browse-page.tsx index 569eb44ab7..95a925db2b 100644 --- a/packages/website/src/plugins/browse-page.tsx +++ b/packages/website/src/plugins/browse-page.tsx @@ -60,7 +60,7 @@ export function BrowsePage({
-
+

{query.q ? `Results for “${query.q}”${category ? ` in ${title}` : ""}` : title} @@ -73,8 +73,7 @@ export function BrowsePage({ )}

- - + }> {results.length === 0 && query.q && (

No plugins match.

diff --git a/packages/website/src/plugins/section.tsx b/packages/website/src/plugins/section.tsx index 690a758fde..f873457a75 100644 --- a/packages/website/src/plugins/section.tsx +++ b/packages/website/src/plugins/section.tsx @@ -1,20 +1,23 @@ import type { ReactNode } from "react"; -/** A block of a plugins page: its header, then its content one fixed gap below. */ +/** A block of a plugins page: its header, then its content 32px below. */ export function PluginSection({ id, labelledBy, - className = "", + className, + header, children, }: { id?: string; labelledBy?: string; className?: string; + header: ReactNode; children: ReactNode; }) { return ( -
- {children} +
+ {header} +
{children}
); } diff --git a/packages/website/src/routes/plugins/index.tsx b/packages/website/src/routes/plugins/index.tsx index d686b98a4e..b694b2147a 100644 --- a/packages/website/src/routes/plugins/index.tsx +++ b/packages/website/src/routes/plugins/index.tsx @@ -128,19 +128,31 @@ function PluginsPage() {
-
+
{featured.length > 0 && ( - - -
- Featured -

A selection of hand picked plugins

-
- - See all plugins - - -
+ +
+ Featured +

+ A selection of hand picked plugins +

+
+ + See all plugins + + + + } + >
{featured.map((plugin) => ( @@ -149,14 +161,21 @@ function PluginsPage() { )} - - - What’s new - - See all - - - + + What’s new + + See all + + + + } + >
{newest.map((plugin) => ( @@ -164,8 +183,10 @@ function PluginsPage() {
- - Categories + Categories} + >
{CATEGORIES.map((category) => { const Icon = CATEGORY_ICONS[category.slug]; @@ -192,19 +213,21 @@ function PluginsPage() { id="most-installed" labelledBy="most-installed-title" className="scroll-mt-8" + header={ + + + + Most installed + + + + + + } > - - - - Most installed - - - - -
{top.map((plugin, index) => (