UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
feat: add magicui producthunt cta
Dillion Verma8d10d9b5ecc9
diff --git a/app/(docs)/docs/[[...slug]]/page.tsx b/app/(docs)/docs/[[...slug]]/page.tsxindex 033d76cf..aa092da4 100644--- a/app/(docs)/docs/[[...slug]]/page.tsx+++ b/app/(docs)/docs/[[...slug]]/page.tsx@@ -11,6 +11,7 @@ import Link from "next/link";import { notFound } from "next/navigation";import { Contribute } from "@/components/contribute";+import { SidebarCTA } from "@/components/sidebar-cta";import { TableOfContents } from "@/components/toc";interface DocPageProps {@@ -136,6 +137,7 @@ export default async function DocPage({ params }: DocPageProps) {<div className="sticky top-[90px] h-[calc(100vh-3.5rem)] space-y-4"><TableOfContents toc={toc} /><Contribute doc={doc} />+ <SidebarCTA /></div></div>)}diff --git a/components/sidebar-cta.tsx b/components/sidebar-cta.tsxindex f495647a..76631435 100644--- a/components/sidebar-cta.tsx+++ b/components/sidebar-cta.tsx@@ -7,7 +7,7 @@ import posthog from "posthog-js";import { AnimatedShinyText } from "@/registry/magicui/animated-shiny-text";import { TextAnimate } from "@/registry/magicui/text-animate";-export default function SidebarCTA() {+export function ProCTA() {return (<Linkhref="https://pro.magicui.design"@@ -22,15 +22,37 @@ export default function SidebarCTA() {✨ Introducing Magic UI Pro<ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" /></AnimatedShinyText>+ </Link>+ );+}++export function ProductHuntCTA() {+ return (+ <Link+ href="https://www.producthunt.com/posts/magic-ui-2?utm_source=sidebar-cta&utm_medium=sidebar-cta&utm_campaign=product-hunt-sidebar-cta"+ target="_blank"+ onClick={() => posthog.capture("product_hunt_sidebar_cta_clicked")}+ className="group my-20 flex w-full flex-col items-center justify-center gap-2 rounded-xl bg-[#ff6154] p-4 text-center text-lg font-medium leading-tight text-white"+ >+ <TextAnimate animate="blurInUp" by="word" className="text-2xl">+ Vote for Magic UI on Product Hunt Today!+ </TextAnimate>+ <AnimatedShinyText className="group inline items-center justify-center whitespace-pre-wrap via-white/80 text-white text-xs">+ ✨ Show your support and vote for us+ </AnimatedShinyText><videoautoPlayloopplaysInlinemuted- src="/startup-template-demo.mp4"+ src="/agent-demo.mp4"className="w-full overflow-hidden rounded-xl shadow-2xl"/></Link>);}++export function SidebarCTA() {+ return <ProductHuntCTA />;+}diff --git a/components/site-banner.tsx b/components/site-banner.tsxindex 05dfa92c..ab6d7975 100644--- a/components/site-banner.tsx+++ b/components/site-banner.tsx@@ -1,10 +1,10 @@"use client";-import Link from "next/link";import { ChevronRight } from "lucide-react";+import Link from "next/link";import posthog from "posthog-js";-export function SiteBanner() {+export function ProBanner() {return (<div className="group relative top-0 bg-indigo-600 py-3 text-white transition-all duration-300 md:py-0"><div className="container flex flex-col items-center justify-center gap-4 md:h-12 md:flex-row">@@ -27,3 +27,31 @@ export function SiteBanner() {</div>);}++export function ProductHuntBanner() {+ return (+ <div className="group relative top-0 bg-[#ff6154] py-3 text-white transition-all duration-300 md:py-0">+ <div className="container flex flex-col items-center justify-center gap-4 md:h-12 md:flex-row">+ <Link+ href="https://www.producthunt.com/posts/magic-ui-2?utm_source=site-banner&utm_medium=banner&utm_campaign=product-hunt-banner"+ onClick={() => posthog.capture("product_hunt_banner_clicked")}+ target="_blank"+ className="inline-flex text-xs leading-normal md:text-sm"+ >+ ✨{" "}+ <span className="ml-1 font-[580] dark:font-[550]">+ {" "}+ Magic UI is live on Product Hunt Today! Show your support and vote+ for us.+ </span>{" "}+ <ChevronRight className="ml-1 mt-[3px] hidden size-4 transition-all duration-300 ease-out group-hover:translate-x-1 lg:inline-block" />+ </Link>+ </div>+ <hr className="absolute bottom-0 m-0 h-px w-full bg-neutral-200/30" />+ </div>+ );+}++export function SiteBanner() {+ return <ProductHuntBanner />;+}