🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Enhance marquee functionality and layout consistency across components
Bill Yangc4b9a21191ea
diff --git a/docs/src/app/(home)/oss-friends/page.tsx b/docs/src/app/(home)/oss-friends/page.tsxindex a45062cf6..d80f4d4a7 100644--- a/docs/src/app/(home)/oss-friends/page.tsx+++ b/docs/src/app/(home)/oss-friends/page.tsx@@ -40,7 +40,7 @@ export default async function OSSFriendsPage() {return (<div className="min-h-screen">- <div className="max-w-[1300px] mx-auto px-6 py-20">+ <div className="max-w-[1200px] mx-auto px-6 py-20">{/* Header */}<div className="text-center mb-16"><h1 className="text-4xl md:text-5xl font-bold text-neutral-900 dark:text-white mb-4">OSS Friends</h1>diff --git a/docs/src/app/(home)/page.tsx b/docs/src/app/(home)/page.tsxindex 22d036e5f..9d46dcb71 100644--- a/docs/src/app/(home)/page.tsx+++ b/docs/src/app/(home)/page.tsx@@ -1,6 +1,7 @@import { CTASection } from "@/components/CTASection";import { GitHubStarButton } from "@/components/GitHubStarButton";import { Integrations } from "@/components/Integration";+import { Marquee } from "@/components/magicui/marquee";import { SectionBadge } from "@/components/SectionBadge";import { SpinningGlobe } from "@/components/SpinningGlobe";import { TrackedButton } from "@/components/TrackedButton";@@ -216,7 +217,7 @@ export default function HomePage() {{/* Logo Section */}<section className="py-12 md:py-16 w-full">- <div className="max-w-[1300px] mx-auto px-4">+ <div className="max-w-[1200px] mx-auto px-4"><div className="text-center mb-10 md:mb-12"><p className="text-neutral-500 dark:text-neutral-400 text-sm uppercase tracking-wider font-medium">Trusted by 4,000+ organizations worldwide@@ -312,7 +313,7 @@ export default function HomePage() {</div></div></section>- <section className="py-14 md:py-20 w-full max-w-[1300px] px-4">+ <section className="py-14 md:py-20 w-full max-w-[1200px] px-4">{/* <div className="bg-neutral-900/30 backdrop-blur-sm border border-neutral-800/50 rounded-2xl p-4 md:p-8"> */}<div className="grid grid-cols-1 md:grid-cols-3 gap-10 md:gap-16">{features.map(feature => {@@ -331,7 +332,7 @@ export default function HomePage() {{/* </div> */}</section>- <section className="py-14 md:py-20 w-full max-w-[1300px] px-4">+ <section className="py-14 md:py-20 w-full max-w-[1200px] px-4"><div className="text-center mb-10 md:mb-16"><SectionBadge className="mb-4"> Analytics Reimagined</SectionBadge><h2 className="text-3xl md:text-5xl font-bold tracking-tight">Features</h2>@@ -347,8 +348,7 @@ export default function HomePage() {</div></section>- {/* Real-Time Globe Section */}- <section className="py-14 md:py-20 w-full max-w-[1300px]">+ {/* <section className="py-14 md:py-20 w-full max-w-[1200px]"><div className="text-center mb-10 md:mb-16 px-4"><SectionBadge className="mb-4">Real-Time Insights</SectionBadge><h2 className="text-3xl md:text-5xl font-bold tracking-tight">See Your Users Around the World</h2>@@ -360,12 +360,12 @@ export default function HomePage() {<div className="relative h-[420px] md:h-[700px] max-w-[100vw] mx-auto rounded-2xl"><SpinningGlobe /></div>- </section>+ </section> */}<Integrations />{/* Testimonial Section */}- <section className="py-10 md:py-16 w-full">- <div className="max-w-[1300px] mx-auto px-4">+ <section className="py-10 md:py-16 w-full overflow-hidden">+ <div className="max-w-[1200px] mx-auto px-4"><div className="text-center mb-10 md:mb-16"><SectionBadge className="mb-4">User Testimonials</SectionBadge><h2 className="text-3xl md:text-5xl font-bold tracking-tight">People love Rybbit</h2>@@ -373,35 +373,49 @@ export default function HomePage() {See what others think about Rybbit Analytics</p></div>- <div className="columns-1 md:columns-3 lg:columns-4 gap-4 space-y-4">- <TweetCard id="1991296442611184125" className="break-inside-avoid mb-4" />- <TweetCard id="1921928423284629758" className="break-inside-avoid mb-4" />- <TweetCard id="1920899082253434950" className="break-inside-avoid mb-4" />- <TweetCard id="2000974573005889706" className="break-inside-avoid mb-4" />- <TweetCard id="2000788904778326334" className="break-inside-avoid mb-4" />-- <TweetCard id="2015102995789381815" className="break-inside-avoid mb-4" />- <TweetCard id="2009548405488615871" className="break-inside-avoid mb-4" />- <TweetCard id="1927817460993884321" className="break-inside-avoid mb-4" />- <TweetCard id="1982378431166963982" className="break-inside-avoid mb-4" />-- <TweetCard id="1920470706761929048" className="break-inside-avoid mb-4" />- <TweetCard id="1981795864118243355" className="break-inside-avoid mb-4" />- <TweetCard id="1980082738934993142" className="break-inside-avoid mb-4" />- <TweetCard id="1979830490006974510" className="break-inside-avoid mb-4" />-- <TweetCard id="1977471983278535071" className="break-inside-avoid mb-4" />- <TweetCard id="1976495558480232672" className="break-inside-avoid mb-4" />- <TweetCard id="1970265809122705759" className="break-inside-avoid mb-4" />- <TweetCard id="1958789741635141673" className="break-inside-avoid mb-4" />+ <div className="relative bg-neutral-100/50 dark:bg-neutral-800/20 backdrop-blur-sm border border-neutral-300/50 dark:border-neutral-800/50 rounded-3xl overflow-hidden">+ <div className="grid grid-cols-1 md:grid-cols-3 gap-4 h-[600px] md:h-[700px] p-4">+ {/* Column 1 */}+ <Marquee vertical pauseOnHover className="[--duration:60s]" repeat={2}>+ <TweetCard id="1991296442611184125" />+ <TweetCard id="1921928423284629758" />+ <TweetCard id="2000974573005889706" />+ <TweetCard id="1927817460993884321" />+ <TweetCard id="1977471983278535071" />+ <TweetCard id="1958789741635141673" />+ </Marquee>++ {/* Column 2 */}+ <Marquee vertical pauseOnHover reverse className="[--duration:45s]" repeat={2}>+ <TweetCard id="1920899082253434950" />+ <TweetCard id="2000788904778326334" />+ <TweetCard id="2015102995789381815" />+ <TweetCard id="1982378431166963982" />+ <TweetCard id="1980082738934993142" />+ <TweetCard id="1976495558480232672" />+ </Marquee>++ {/* Column 3 */}+ <Marquee vertical pauseOnHover className="[--duration:60s]" repeat={2}>+ <TweetCard id="2009548405488615871" />+ <TweetCard id="1920470706761929048" />+ <TweetCard id="1981795864118243355" />+ <TweetCard id="1979830490006974510" />+ <TweetCard id="1970265809122705759" />+ </Marquee>+ </div>++ {/* Gradient overlays */}+ <div className="pointer-events-none absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-neutral-100/90 dark:from-neutral-900/90 to-transparent"></div>+ <div className="pointer-events-none absolute inset-x-0 bottom-0 h-24 bg-gradient-to-t from-neutral-100/90 dark:from-neutral-900/90 to-transparent"></div></div></div></section>{/* FAQ Section */}- <section className="py-16 md:py-24 w-full">- <div className="max-w-[1300px] mx-auto px-4">+ <section className="py-10 md:py-16 w-full">+ <div className="max-w-[1200px] mx-auto px-4"><div className="grid grid-cols-1 md:grid-cols-[1fr_2fr] gap-8 md:gap-16"><div className="md:sticky md:top-24 md:self-start"><h2 className="text-3xl md:text-4xl font-bold">Frequently Asked Questions</h2>diff --git a/docs/src/app/(home)/tools/page.tsx b/docs/src/app/(home)/tools/page.tsxindex 433ef5e6e..bf4e6f0d2 100644--- a/docs/src/app/(home)/tools/page.tsx+++ b/docs/src/app/(home)/tools/page.tsx@@ -356,7 +356,7 @@ function ToolCard({ tool }: { tool: { href: string; icon: any; title: string; deexport default function ToolsPage() {return (<div className="min-h-screen">- <div className="max-w-[1300px] mx-auto px-6 py-20">+ <div className="max-w-[1200px] mx-auto px-6 py-20">{/* Header */}<div className="text-center mb-16"><h1 className="text-4xl md:text-5xl font-bold text-neutral-900 dark:text-white mb-4">{totalToolCount} Free Marketing Tools</h1>diff --git a/docs/src/components/CTASection.tsx b/docs/src/components/CTASection.tsxindex da14137e5..9d4ad2602 100644--- a/docs/src/components/CTASection.tsx+++ b/docs/src/components/CTASection.tsx@@ -22,7 +22,7 @@ export function CTASection({}: CTASectionProps) {return (<section className="py-12 md:py-20 w-full px-4">- <div className="max-w-[1300px] mx-auto">+ <div className="max-w-[1200px] mx-auto"><div className="relative overflow-hidden rounded-3xl bg-neutral-950 p-10 md:p-16 lg:p-20">{/* Noise texture overlay */}<svgdiff --git a/docs/src/components/Footer.tsx b/docs/src/components/Footer.tsxindex acd5eb806..d969058d6 100644--- a/docs/src/components/Footer.tsx+++ b/docs/src/components/Footer.tsx@@ -4,7 +4,7 @@ import Link from "next/link";export function Footer() {return (<footer className="border-t border-neutral-800">- <div className="max-w-[1300px] mx-auto px-6 py-12">+ <div className="max-w-[1200px] mx-auto px-4 py-12">{/* Main Footer Content */}<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-8">{/* Company Info */}diff --git a/docs/src/components/Integration.tsx b/docs/src/components/Integration.tsxindex 28e45fc54..54496d247 100644--- a/docs/src/components/Integration.tsx+++ b/docs/src/components/Integration.tsx@@ -1,87 +1,124 @@import { cn } from "@/lib/utils";-import { Marquee } from "@/components/magicui/marquee";import { SectionBadge } from "@/components/SectionBadge";-import Image from "next/image";import Link from "next/link";+import {+ SiAngular,+ SiAstro,+ SiBigcommerce,+ SiCarrd,+ SiContentful,+ SiDocusaurus,+ SiDrupal,+ SiFramer,+ SiGatsby,+ SiGhost,+ SiGitbook,+ SiGoogletagmanager,+ SiHugo,+ SiJekyll,+ SiJoomla,+ SiLaravel,+ SiMintlify,+ SiNextdotjs,+ SiNuxt,+ SiPrestashop,+ SiReact,+ SiRemix,+ SiSanity,+ SiShopify,+ SiSquarespace,+ SiStrapi,+ SiSvelte,+ SiVitepress,+ SiVuedotjs,+ SiWebflow,+ SiWix,+ SiWoocommerce,+ SiWordpress,+} from "@icons-pack/react-simple-icons";+import { ComponentType } from "react";-// Platform logos from the public directory with their documentation paths-const platforms = [- { name: "Next.js", logo: "/platforms/nextjs.svg", path: "/docs/guides/react/next-js" },- { name: "React", logo: "/platforms/react.svg", path: "/docs/guides/react/vite-cra" },- { name: "Vue", logo: "/platforms/vue.svg", path: "/docs/guides/vue/vite" },- { name: "Angular", logo: "/platforms/angular.svg", path: "/docs/guides/angular" },- { name: "Svelte", logo: "/platforms/svelte.svg", path: "/docs/guides/svelte/vite" },- { name: "Remix", logo: "/platforms/remix.png", path: "/docs/guides/react/remix" },- { name: "Gatsby", logo: "/platforms/gatsby.svg", path: "/docs/guides/react/gatsby" },- { name: "Nuxt", logo: "/platforms/nuxt.svg", path: "/docs/guides/vue/nuxt" },- { name: "WordPress", logo: "/platforms/wordpress.svg", path: "/docs/guides/wordpress" },- { name: "Shopify", logo: "/platforms/shopify.svg", path: "/docs/guides/shopify" },- { name: "Webflow", logo: "/platforms/webflow.svg", path: "/docs/guides/webflow" },- { name: "Laravel", logo: "/platforms/laravel.svg", path: "/docs/guides/laravel" },- { name: "GTM", logo: "/platforms/gtm.svg", path: "/docs/guides/google-tag-manager" },- { name: "Docusaurus", logo: "/platforms/docusaurus.svg", path: "/docs/guides/docusaurus" },- { name: "WooCommerce", logo: "/platforms/woocommerce.svg", path: "/docs/guides/woocommerce" },- { name: "Mintlify", logo: "/platforms/mintlify.svg", path: "/docs/guides/mintlify" },-];--// Shuffle function to randomize array order-const shuffleArray = <T,>(array: T[]): T[] => {- const shuffled = [...array];- for (let i = shuffled.length - 1; i > 0; i--) {- const j = Math.floor(Math.random() * (i + 1));- [shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];- }- return shuffled;+type IconProps = {+ className?: string;+ size?: number;};-const PlatformLogo = ({ name, logo, path }: { name: string; logo: string; path: string }) => {+// Platform data with their documentation paths and icons+const platforms: { name: string; icon: ComponentType<IconProps>; path: string }[] = [+ { name: "Angular", icon: SiAngular, path: "/docs/guides/angular" },+ { name: "Astro", icon: SiAstro, path: "/docs/guides/astro" },+ { name: "BigCommerce", icon: SiBigcommerce, path: "/docs/guides/bigcommerce" },+ { name: "Carrd", icon: SiCarrd, path: "/docs/guides/carrd" },+ { name: "Contentful", icon: SiContentful, path: "/docs/guides/contentful" },+ { name: "Docusaurus", icon: SiDocusaurus, path: "/docs/guides/docusaurus" },+ { name: "Drupal", icon: SiDrupal, path: "/docs/guides/drupal" },+ { name: "Framer", icon: SiFramer, path: "/docs/guides/framer" },+ { name: "Gatsby", icon: SiGatsby, path: "/docs/guides/react/gatsby" },+ { name: "Ghost", icon: SiGhost, path: "/docs/guides/ghost" },+ { name: "GitBook", icon: SiGitbook, path: "/docs/guides/gitbook" },+ { name: "GTM", icon: SiGoogletagmanager, path: "/docs/guides/google-tag-manager" },+ { name: "Hugo", icon: SiHugo, path: "/docs/guides/hugo" },+ { name: "Jekyll", icon: SiJekyll, path: "/docs/guides/jekyll" },+ { name: "Joomla", icon: SiJoomla, path: "/docs/guides/joomla" },+ { name: "Laravel", icon: SiLaravel, path: "/docs/guides/laravel" },+ { name: "Mintlify", icon: SiMintlify, path: "/docs/guides/mintlify" },+ { name: "Next.js", icon: SiNextdotjs, path: "/docs/guides/react/next-js" },+ { name: "Nuxt", icon: SiNuxt, path: "/docs/guides/vue/nuxt" },+ { name: "PrestaShop", icon: SiPrestashop, path: "/docs/guides/prestashop" },+ { name: "React", icon: SiReact, path: "/docs/guides/react/vite-cra" },+ { name: "Remix", icon: SiRemix, path: "/docs/guides/react/remix" },+ { name: "Sanity", icon: SiSanity, path: "/docs/guides/sanity" },+ { name: "Shopify", icon: SiShopify, path: "/docs/guides/shopify" },+ { name: "Squarespace", icon: SiSquarespace, path: "/docs/guides/squarespace" },+ { name: "Strapi", icon: SiStrapi, path: "/docs/guides/strapi" },+ { name: "Svelte", icon: SiSvelte, path: "/docs/guides/svelte/vite" },+ { name: "SvelteKit", icon: SiSvelte, path: "/docs/guides/svelte/sveltekit" },+ { name: "VitePress", icon: SiVitepress, path: "/docs/guides/vitepress" },+ { name: "Vue", icon: SiVuedotjs, path: "/docs/guides/vue/vite" },+ { name: "Webflow", icon: SiWebflow, path: "/docs/guides/webflow" },+ { name: "Wix", icon: SiWix, path: "/docs/guides/wix" },+ { name: "WooCommerce", icon: SiWoocommerce, path: "/docs/guides/woocommerce" },+ { name: "WordPress", icon: SiWordpress, path: "/docs/guides/wordpress" },+];++const PlatformLogo = ({ name, icon: Icon, path }: { name: string; icon: ComponentType<IconProps>; path: string }) => {return (<Link href={path} className="block"><divclassName={cn(- "flex items-center justify-center h-20 w-20 mx-2 my-2",- "bg-neutral-100/50 dark:bg-neutral-800/50 backdrop-blur-sm rounded-lg p-4",+ "flex flex-col justify-center gap-4 p-4 w-32",+ "bg-neutral-100/50 dark:bg-neutral-900 backdrop-blur-sm rounded-lg","border border-neutral-300/50 dark:border-neutral-700/50 hover:border-neutral-500 dark:hover:border-neutral-500 transition-colors duration-200","cursor-pointer hover:scale-105 transition-transform")}>- <Image src={logo} alt={name} width={60} height={60} className="object-contain max-h-10" />+ <Icon className="h-6 w-6 text-neutral-700 dark:text-neutral-300" />+ <span className="text-sm text-neutral-600 dark:text-neutral-400">{name}</span></div></Link>);};export function Integrations() {- // Create two different shuffled arrays for the marquee rows- const topRowPlatforms = shuffleArray(platforms);- const bottomRowPlatforms = shuffleArray(platforms);-return (- <div className="py-20 w-full">- <div className="max-w-[1300px] mx-auto px-4 mb-10 text-center">- <SectionBadge className="mb-4">- Seamless Integration- </SectionBadge>- <h2 className="text-4xl font-bold mb-3">Works with all your favorite platforms</h2>- <p className="text-xl text-neutral-600 dark:text-neutral-300 font-light">Integrate Rybbit with any platform in minutes</p>- </div>-- <div className="relative flex w-full flex-col items-center justify-center overflow-hidden gap-8">- <Marquee pauseOnHover className="[--duration:120s]" reverse>- {topRowPlatforms.map((platform, index) => (- <PlatformLogo key={`top-${index}`} {...platform} />- ))}- </Marquee>-- <Marquee pauseOnHover className="[--duration:90s]">- {bottomRowPlatforms.map((platform, index) => (- <PlatformLogo key={`bottom-${index}`} {...platform} />- ))}- </Marquee>+ <section className="py-12 md:py-20 w-full">+ <div className="max-w-[1200px] mx-auto px-4">+ <div className="grid grid-cols-1 md:grid-cols-[1fr_2fr] gap-8 md:gap-16">+ <div className="md:sticky md:top-24 md:self-start">+ <SectionBadge className="mb-4">Seamless Integration</SectionBadge>+ <h2 className="text-3xl md:text-4xl font-bold">Works with all your favorite platforms</h2>+ <p className="mt-4 text-neutral-600 dark:text-neutral-300 font-light">+ Integrate Rybbit with any platform in minutes+ </p>+ </div>- <div className="pointer-events-none absolute inset-y-0 left-0 w-1/4 bg-gradient-to-r from-background"></div>- <div className="pointer-events-none absolute inset-y-0 right-0 w-1/4 bg-gradient-to-l from-background"></div>+ <div className="flex flex-wrap gap-5">+ {platforms.map((platform) => (+ <PlatformLogo key={platform.name} {...platform} />+ ))}+ </div>+ </div></div>- </div>+ </section>);}diff --git a/docs/src/components/magicui/marquee.tsx b/docs/src/components/magicui/marquee.tsxindex f8c530b75..627550a82 100644--- a/docs/src/components/magicui/marquee.tsx+++ b/docs/src/components/magicui/marquee.tsx@@ -53,9 +53,10 @@ export function Marquee({key={i}className={cn("flex shrink-0 justify-around [gap:var(--gap)]", {"animate-marquee flex-row": !vertical,- "animate-marquee-vertical flex-col": vertical,+ "animate-marquee-vertical flex-col": vertical && !reverse,+ "animate-marquee-vertical-reverse flex-col": vertical && reverse,"group-hover:[animation-play-state:paused]": pauseOnHover,- "[animation-direction:reverse]": reverse,+ "[animation-direction:reverse]": reverse && !vertical,})}>{children}diff --git a/docs/tailwind.config.ts b/docs/tailwind.config.tsindex 814fd1146..fa89983de 100644--- a/docs/tailwind.config.ts+++ b/docs/tailwind.config.ts@@ -8,6 +8,7 @@ const config: Config = {animation: {marquee: "marquee var(--duration) linear infinite","marquee-vertical": "marquee-vertical var(--duration) linear infinite",+ "marquee-vertical-reverse": "marquee-vertical-reverse var(--duration) linear infinite",},keyframes: {marquee: {@@ -18,6 +19,10 @@ const config: Config = {from: { transform: "translateY(0)" },to: { transform: "translateY(calc(-100% - var(--gap)))" },},+ "marquee-vertical-reverse": {+ from: { transform: "translateY(0)" },+ to: { transform: "translateY(calc(100% + var(--gap)))" },+ },},},},