From 3fa1ccf793e3ce65454253f4a16c17ada72dd338 Mon Sep 17 00:00:00 2001 From: oiov Date: Tue, 25 Mar 2025 22:29:31 +0800 Subject: [PATCH] chore landing page --- app/(marketing)/page.tsx | 5 +- components/sections/hero-landing.tsx | 35 ++++-- components/sections/url-shortener.tsx | 156 ++++++++++++++++++++++++++ components/shared/icons.tsx | 4 + config/site.ts | 2 +- public/sw.js.map | 2 +- 6 files changed, 190 insertions(+), 14 deletions(-) create mode 100644 components/sections/url-shortener.tsx diff --git a/app/(marketing)/page.tsx b/app/(marketing)/page.tsx index 4ce76d0..f258faa 100644 --- a/app/(marketing)/page.tsx +++ b/app/(marketing)/page.tsx @@ -1,11 +1,12 @@ import HeroLanding, { LandingImages } from "@/components/sections/hero-landing"; -import PreviewLanding from "@/components/sections/preview-landing"; + +// import PreviewLanding from "@/components/sections/preview-landing"; export default function IndexPage() { return ( <> - + {/* */} ); diff --git a/components/sections/hero-landing.tsx b/components/sections/hero-landing.tsx index 75d2081..76fe1cc 100644 --- a/components/sections/hero-landing.tsx +++ b/components/sections/hero-landing.tsx @@ -8,7 +8,9 @@ import { cn, nFormatter } from "@/lib/utils"; import { buttonVariants } from "@/components/ui/button"; import { Icons } from "@/components/shared/icons"; +import { Doc } from "../../.contentlayer/generated/types"; import GitHubStarsWithSuspense from "../shared/github-star-wrapper"; +import UrlShortener from "./url-shortener"; export default async function HeroLanding() { const user = await getCurrentUser(); @@ -16,14 +18,14 @@ export default async function HeroLanding() {
- 🎉Screenshot API  + 🎉Short link analytics  available @@ -31,9 +33,9 @@ export default async function HeroLanding() {

- One Platform Powers{" "} + Short Links With{" "} - Endless Solutions + Powerful Solutions

@@ -42,24 +44,37 @@ export default async function HeroLanding() { you need to build better.

-
- + {/* + /> */} + + Documents + + {user?.id ? "Dashboard" : "Sign in for free"} - + {/* */}
+ +
); @@ -68,7 +83,7 @@ export default async function HeroLanding() { export function LandingImages() { return ( <> -
+
+
+ + + + + + Try it out +
+
+
+
+
+ + + + +
+
+ +
+
+
+
+ + + + +
+
+
+

+ wr.do/s/try +

+
+ + +
+
+
+ + + + + + + wr.do/login +
+
+
+
+
+ +

+ 12.6K clicks +

+
+ +
+
+
+
+
+ + ); +} diff --git a/components/shared/icons.tsx b/components/shared/icons.tsx index 1bceb40..3e06df3 100644 --- a/components/shared/icons.tsx +++ b/components/shared/icons.tsx @@ -1,5 +1,6 @@ import { AlertTriangle, + ArrowDown, ArrowRight, ArrowUpRight, BadgeHelp, @@ -33,6 +34,7 @@ import { MessagesSquare, Moon, MoreVertical, + MousePointerClick, Package, Paintbrush, Plus, @@ -54,6 +56,7 @@ export const Icons = { add: Plus, arrowRight: ArrowRight, arrowUpRight: ArrowUpRight, + arrowDown: ArrowDown, chevronLeft: ChevronLeft, chevronRight: ChevronRight, bookOpen: BookOpen, @@ -66,6 +69,7 @@ export const Icons = { download: Download, ellipsis: MoreVertical, paintbrush: Paintbrush, + mousePointerClick: MousePointerClick, github: ({ ...props }: LucideProps) => (