Skip to content

Commit

Permalink
feat: update home page
Browse files Browse the repository at this point in the history
  • Loading branch information
shadcn committed Oct 30, 2024
1 parent c830780 commit be6dc6e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
24 changes: 11 additions & 13 deletions apps/www/app/(app)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/page-header"
import CardsNewYork from "@/registry/new-york/example/cards"
import { Button } from "@/registry/new-york/ui/button"
import MailPage from "@/app/(app)/examples/mail/page"

export default function IndexPage() {
return (
Expand Down Expand Up @@ -41,24 +41,22 @@ export default function IndexPage() {
<ExamplesNav className="[&>a:first-child]:text-primary" />
<section className="overflow-hidden rounded-lg border bg-background shadow-md md:hidden md:shadow-xl">
<Image
src="/examples/mail-dark.png"
src="/examples/cards-light.png"
width={1280}
height={727}
alt="Mail"
className="hidden dark:block"
height={1214}
alt="Cards"
className="block dark:hidden"
/>
<Image
src="/examples/mail-light.png"
src="/examples/cards-dark.png"
width={1280}
height={727}
alt="Mail"
className="block dark:hidden"
height={1214}
alt="Cards"
className="hidden dark:block"
/>
</section>
<section className="hidden md:block">
<div className="overflow-hidden rounded-lg border bg-background shadow">
<MailPage />
</div>
<section className="hidden md:block [&>div]:p-0">
<CardsNewYork />
</section>
</div>
)
Expand Down
5 changes: 5 additions & 0 deletions apps/www/components/examples-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import { cn } from "@/lib/utils"
import { ScrollArea, ScrollBar } from "@/registry/new-york/ui/scroll-area"

const examples = [
{
name: "Examples",
href: "/",
code: "https://github.com/shadcn/ui/tree/main/apps/www/app/(app)/examples/mail",
},
{
name: "Mail",
href: "/examples/mail",
Expand Down
2 changes: 2 additions & 0 deletions apps/www/registry/new-york/example/cards/chat.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

import * as React from "react"
import { CheckIcon, PaperPlaneIcon, PlusIcon } from "@radix-ui/react-icons"

Expand Down
2 changes: 2 additions & 0 deletions apps/www/registry/new-york/example/cards/metric.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

import { useTheme } from "next-themes"
import { Line, LineChart, ResponsiveContainer, Tooltip } from "recharts"

Expand Down
2 changes: 2 additions & 0 deletions apps/www/registry/new-york/example/cards/stats.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

import { useTheme } from "next-themes"
import { Bar, BarChart, Line, LineChart, ResponsiveContainer } from "recharts"

Expand Down

0 comments on commit be6dc6e

Please sign in to comment.