Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Every WinLab app is framed by four fixed corners, 24px in from the viewport. `ap
- There is no theme toggle: the theme follows the system.
- CD passes `BUILD_SHA`, `BUILD_TIME` and `BUILD_URL` to the image build (`NEXT_PUBLIC_BUILD_*`); without them the version reads `dev`.
- A corner with nothing to show stays empty.
- Every corner item can carry a tip that says what its label leaves out (where a link goes, what a page holds, who owns the site). A tip never repeats the label. Tips open at once, toward the page, lined up with the corner's outer edge; touch never opens them, so nothing depends on one.
- Every corner item has a tip (`tip` is required in `app-shell`, so a missing one fails the type check) that says what its label leaves out (where a link goes, what a page holds, who owns the site). A tip never repeats the label. Tips open at once, toward the page, lined up with the corner's outer edge; touch never opens them, so nothing depends on one.
- Corner text is `text-body` in `muted-foreground`, links turn `foreground` on hover and when current.
- Content that scrolls under the corners fades into a 64px band of frosted glass at the top and bottom edges.
- No menu button: an app keeps its pages few enough to fit beside the breadcrumb on a phone.
Expand Down
6 changes: 5 additions & 1 deletion app/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export default async function DocPage({

return (
<SiteShell
page={{ label: doc.title, href: `/${doc.slug}` }}
page={{
label: doc.title,
href: `/${doc.slug}`,
tip: doc.item ? `@winlab/${doc.item}` : doc.description,
}}
layout={doc.layout ?? "spotlight"}
>
<div className="flex w-full flex-col items-center gap-12">
Expand Down
2 changes: 1 addition & 1 deletion app/_docs/site-shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function SiteShell({
layout,
children,
}: {
page?: { label: string; href: string }
page?: { label: string; href: string; tip: string }
layout?: "column" | "spotlight" | "wide"
children: React.ReactNode
}) {
Expand Down
9 changes: 5 additions & 4 deletions registry/winlab/blocks/app-shell/app-shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ import {
TooltipTrigger,
} from "@/registry/winlab/ui/tooltip"

// A tip says what the label leaves out (where a link goes, what a page
// holds); it never repeats the label.
type Crumb = { label: string; href: string; tip?: string }
type NavItem = { label: string; href: string; tip?: string }
// Every corner item has a tip, required so none is forgotten. It says what
// the label leaves out (where a link goes, what a page holds, whose account
// it is); it never repeats the label.
type Crumb = { label: string; href: string; tip: string }
type NavItem = { label: string; href: string; tip: string }

// The chrome of every WinLab app is its four corners. By default each corner
// has one job, filled from the props below; an app that needs something else
Expand Down
Loading