From 2415858d8f00c65ebd82ca742a421350507998da Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Tue, 5 May 2026 21:31:10 +0700 Subject: [PATCH] feat(website): clarify download page with Server section and copy buttons Splits the old "Web & CLI" block into separate Web and Server sections so new users can find the headless install flow without reading the FAQ. Each section gets a one-line subtitle, and command rows reuse the CodeBlock component (extracted from CommandDialog) with a new compact size variant. Also adds Homebrew and Nix install rows, and stacks rows vertically on small screens. --- .../website/src/components/code-block.tsx | 60 +++++++++++++ .../website/src/components/command-dialog.tsx | 48 +--------- packages/website/src/routes/download.tsx | 89 ++++++++++++------- 3 files changed, 118 insertions(+), 79 deletions(-) create mode 100644 packages/website/src/components/code-block.tsx diff --git a/packages/website/src/components/code-block.tsx b/packages/website/src/components/code-block.tsx new file mode 100644 index 000000000..360447140 --- /dev/null +++ b/packages/website/src/components/code-block.tsx @@ -0,0 +1,60 @@ +import * as React from "react"; + +interface CodeBlockProps { + children: string; + size?: "sm" | "md"; +} + +const SIZE_PADDING: Record, string> = { + sm: "px-3 py-2", + md: "p-3 md:p-4", +}; + +export function CodeBlock({ children, size = "md" }: CodeBlockProps) { + const [copied, setCopied] = React.useState(false); + + const handleCopy = React.useCallback(() => { + navigator.clipboard.writeText(children); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }, [children]); + + return ( +
+
+ $ + {children} +
+ +
+ ); +} diff --git a/packages/website/src/components/command-dialog.tsx b/packages/website/src/components/command-dialog.tsx index 2a0a66e1f..08265fe53 100644 --- a/packages/website/src/components/command-dialog.tsx +++ b/packages/website/src/components/command-dialog.tsx @@ -1,5 +1,6 @@ import * as React from "react"; import { motion, AnimatePresence, type Transition } from "framer-motion"; +import { CodeBlock } from "./code-block"; const OVERLAY_INITIAL = { opacity: 0 }; const OVERLAY_ANIMATE = { opacity: 1 }; @@ -85,50 +86,3 @@ export function CommandDialog({ ); } - -function CodeBlock({ children }: { children: string }) { - const [copied, setCopied] = React.useState(false); - - const handleCopy = React.useCallback(() => { - navigator.clipboard.writeText(children); - setCopied(true); - setTimeout(() => setCopied(false), 2000); - }, [children]); - - return ( -
-
- $ - {children} -
- -
- ); -} diff --git a/packages/website/src/routes/download.tsx b/packages/website/src/routes/download.tsx index ee708dc6e..742c262db 100644 --- a/packages/website/src/routes/download.tsx +++ b/packages/website/src/routes/download.tsx @@ -1,5 +1,5 @@ import { Link, createFileRoute } from "@tanstack/react-router"; -import { CommandDialog } from "~/components/command-dialog"; +import { CodeBlock } from "~/components/code-block"; import { pageMeta } from "~/meta"; import { downloadUrls, @@ -26,12 +26,6 @@ export const Route = createFileRoute("/download")({ component: Download, }); -const homebrewTrigger = ( - - Homebrew - -); - function Download() { const release = useRelease(); const { version } = release; @@ -101,14 +95,17 @@ function Download() { {/* Desktop */}
-
-

Desktop

- +
+
+

Desktop

+

Recommended, bundles the server

+
+
{/* macOS */} -
+
macOS @@ -116,16 +113,20 @@ function Download() {
-
+ {/* Homebrew */} +
+
+ + Homebrew +
+ brew install --cask paseo +
+ {/* Windows */} -
+
Windows @@ -140,7 +141,7 @@ function Download() {
{/* Linux */} -
+
Linux @@ -163,7 +164,7 @@ function Download() {
{/* Android */} -
+
Android @@ -175,7 +176,7 @@ function Download() {
{/* iOS */} -
+
iOS @@ -187,15 +188,20 @@ function Download() {
- {/* Web & CLI */} -
-
-

Web & CLI

- + {/* Web */} +
+
+
+

Web

+

+ Connect to a server from any browser +

+
+
-
+
Web App @@ -204,17 +210,36 @@ function Download() {
+
+
-
+ {/* Server */} +
+
+
+

Server

+

+ Run the Paseo server anywhere, connect from any client +

+
+ +
+ +
+
- CLI + npm
-
- - npm install -g @getpaseo/cli - + npm install -g @getpaseo/cli && paseo +
+ +
+
+ + Nix
+ nix run github:getpaseo/paseo