Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Update styling and refactor components for improved UI consistency

Bill Yangb85a4a76b356
diff --git a/docs-v2/src/app/(home)/page.tsx b/docs-v2/src/app/(home)/page.tsx
index 92f402c7d..6a92b02ed 100644
--- a/docs-v2/src/app/(home)/page.tsx
+++ b/docs-v2/src/app/(home)/page.tsx
@@ -333,9 +333,9 @@ export default function HomePage() {
</p>
</div>
- <div className="bg-neutral-800/20 backdrop-blur-sm border border-neutral-700 rounded-xl overflow-hidden">
+ <div className="bg-neutral-800/20 backdrop-blur-sm border border-neutral-800/50 rounded-xl overflow-hidden">
<Accordion type="single" collapsible className="w-full">
- <AccordionItem value="item-1" className="border-b border-neutral-700/50">
+ <AccordionItem value="item-1" className="border-b border-neutral-800/50">
<AccordionTrigger className="px-6 py-4 text-base md:text-lg font-medium hover:text-emerald-400 transition-colors">
Is Rybbit GDPR and CCPA compliant?
</AccordionTrigger>
@@ -347,7 +347,7 @@ export default function HomePage() {
</AccordionContent>
</AccordionItem>
- <AccordionItem value="item-2" className="border-b border-neutral-700/50">
+ <AccordionItem value="item-2" className="border-b border-neutral-800/50">
<AccordionTrigger className="px-6 py-4 text-base md:text-lg font-medium hover:text-emerald-400 transition-colors">
Rybbit vs. Google Analytics
</AccordionTrigger>
@@ -368,7 +368,7 @@ export default function HomePage() {
</AccordionContent>
</AccordionItem>
- <AccordionItem value="item-3" className="border-b border-neutral-700/50">
+ <AccordionItem value="item-3" className="border-b border-neutral-800/50">
<AccordionTrigger className="px-6 py-4 text-base md:text-lg font-medium hover:text-emerald-400 transition-colors">
Rybbit vs. Plausible/Umami/Simple Analytics
</AccordionTrigger>
@@ -384,7 +384,7 @@ export default function HomePage() {
</p>
</AccordionContent>
</AccordionItem>
- <AccordionItem value="item-4" className="border-b border-neutral-700/50">
+ <AccordionItem value="item-4" className="border-b border-neutral-800/50">
<AccordionTrigger className="px-6 py-4 text-base md:text-lg font-medium hover:text-emerald-400 transition-colors">
Rybbit vs. Posthog/Mixpanel/Amplitude
</AccordionTrigger>
@@ -401,7 +401,7 @@ export default function HomePage() {
</AccordionContent>
</AccordionItem>
- <AccordionItem value="item-5" className="border-b border-neutral-700/50">
+ <AccordionItem value="item-5" className="border-b border-neutral-800/50">
<AccordionTrigger className="px-6 py-4 text-base md:text-lg font-medium hover:text-emerald-400 transition-colors">
Can I self-host Rybbit?
</AccordionTrigger>
@@ -415,7 +415,7 @@ export default function HomePage() {
</AccordionContent>
</AccordionItem>
- <AccordionItem value="item-6" className="border-b border-neutral-700/50">
+ <AccordionItem value="item-6" className="border-b border-neutral-800/50">
<AccordionTrigger className="px-6 py-4 text-base md:text-lg font-medium hover:text-emerald-400 transition-colors">
How easy is it to set up Rybbit?
</AccordionTrigger>
@@ -451,7 +451,7 @@ export default function HomePage() {
for either personal or business use.
</AccordionContent>
</AccordionItem>
- <AccordionItem value="item-9" className="border-t border-neutral-700/50">
+ <AccordionItem value="item-9" className="border-t border-neutral-800/50">
<AccordionTrigger className="px-6 py-4 text-base md:text-lg font-medium hover:text-emerald-400 transition-colors">
What counts as an event?
</AccordionTrigger>
diff --git a/docs-v2/src/components/Cards/Card.tsx b/docs-v2/src/components/Cards/Card.tsx
index af5d582fe..3b6e88476 100644
--- a/docs-v2/src/components/Cards/Card.tsx
+++ b/docs-v2/src/components/Cards/Card.tsx
@@ -9,10 +9,10 @@ interface CardProps {
export function Card({ title, description, children, className }: CardProps) {
return (
- <div className={cn("bg-neutral-800/50 p-6 rounded-xl", className)}>
+ <div className={cn("bg-neutral-800/20 p-6 rounded-xl border border-neutral-800/50", className)}>
<h3 className="text-xl font-semibold mb-3">{title}</h3>
{description && <p className="text-neutral-300 mb-4">{description}</p>}
{children}
</div>
);
-}
\ No newline at end of file
+}
diff --git a/docs-v2/src/components/Integration.tsx b/docs-v2/src/components/Integration.tsx
index ce435d6be..6e8328d64 100644
--- a/docs-v2/src/components/Integration.tsx
+++ b/docs-v2/src/components/Integration.tsx
@@ -38,8 +38,8 @@ const PlatformLogo = ({ name, logo, path }: { name: string; logo: string; path:
<div
className={cn(
"flex items-center justify-center h-20 w-20 mx-2 my-2",
- "bg-neutral-800/40 backdrop-blur-sm rounded-lg p-4",
- "border border-neutral-700 hover:border-neutral-500 transition-colors duration-200",
+ "bg-neutral-800/50 backdrop-blur-sm rounded-lg p-4",
+ "border border-neutral-700/50 hover:border-neutral-500 transition-colors duration-200",
"cursor-pointer hover:scale-105 transition-transform"
)}
>
diff --git a/docs-v2/src/components/Tweet.tsx b/docs-v2/src/components/Tweet.tsx
index 78ed834c9..8d9146ecb 100644
--- a/docs-v2/src/components/Tweet.tsx
+++ b/docs-v2/src/components/Tweet.tsx
@@ -1,37 +1,16 @@
/* eslint-disable @next/next/no-img-element */
import { cn } from "@/lib/utils";
import { Suspense } from "react";
-import {
- enrichTweet,
- type TweetProps,
- type TwitterComponents,
-} from "react-tweet";
+import { enrichTweet, type TweetProps, type TwitterComponents } from "react-tweet";
import { getTweet, type Tweet } from "react-tweet/api";
-import { TweetHeader, TweetBody, TweetMedia } from './TweetClient';
+import { TweetHeader, TweetBody, TweetMedia } from "./TweetClient";
-const Skeleton = ({
- className,
- ...props
-}: React.HTMLAttributes<HTMLDivElement>) => {
- return (
- <div className={cn("rounded-md bg-primary/10", className)} {...props} />
- );
+const Skeleton = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => {
+ return <div className={cn("rounded-md bg-primary/10", className)} {...props} />;
};
-export const TweetSkeleton = ({
- className,
- ...props
-}: {
- className?: string;
- [key: string]: unknown;
-}) => (
- <div
- className={cn(
- "flex size-full max-h-max min-w-72 flex-col gap-2 rounded-lg border p-4",
- className
- )}
- {...props}
- >
+export const TweetSkeleton = ({ className, ...props }: { className?: string; [key: string]: unknown }) => (
+ <div className={cn("flex size-full max-h-max min-w-72 flex-col gap-2 rounded-lg border p-4", className)} {...props}>
<div className="flex flex-row gap-2">
<Skeleton className="size-10 shrink-0 rounded-full" />
<Skeleton className="h-10 w-full" />
@@ -40,37 +19,21 @@ export const TweetSkeleton = ({
</div>
);
-export const TweetNotFound = ({
- className,
- ...props
-}: {
- className?: string;
- [key: string]: unknown;
-}) => (
+export const TweetNotFound = ({ className, ...props }: { className?: string; [key: string]: unknown }) => (
<div
- className={cn(
- "flex size-full flex-col items-center justify-center gap-2 rounded-lg border p-4",
- className
- )}
+ className={cn("flex size-full flex-col items-center justify-center gap-2 rounded-lg border p-4", className)}
{...props}
>
<h3>Tweet not found</h3>
</div>
);
-export const MagicTweet = ({
- tweet,
- className,
- ...props
-}: {
- tweet: Tweet;
- className?: string;
-}) => {
+export const MagicTweet = ({ tweet, className, ...props }: { tweet: Tweet; className?: string }) => {
const enrichedTweet = enrichTweet(tweet);
return (
<div
className={cn(
- "relative flex size-full max-w-lg flex-col gap-2 overflow-hidden rounded-lg p-4 backdrop-blur-md bg-neutral-900",
+ "relative flex size-full max-w-lg flex-col gap-2 overflow-hidden rounded-lg p-4 backdrop-blur-md bg-neutral-800/20 border border-neutral-800/50",
className
)}
{...props}
@@ -99,7 +62,7 @@ export const TweetCard = async ({
className?: string;
}) => {
const tweet = id
- ? await getTweet(id).catch((err) => {
+ ? await getTweet(id).catch(err => {
if (onError) {
onError(err);
} else {
@@ -118,4 +81,4 @@ export const TweetCard = async ({
<MagicTweet tweet={tweet} {...props} />
</Suspense>
);
-};
\ No newline at end of file
+};
diff --git a/docs-v2/src/components/integrations.tsx b/docs-v2/src/components/integrations.tsx
deleted file mode 100644
index ce435d6be..000000000
--- a/docs-v2/src/components/integrations.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-import { cn } from "@/lib/utils";
-import { Marquee } from "@/components/magicui/marquee";
-import Image from "next/image";
-import Link from "next/link";
-
-// 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" },
-];
-
-// 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;
-};
-
-const PlatformLogo = ({ name, logo, path }: { name: string; logo: string; path: string }) => {
- return (
- <Link href={path} className="block">
- <div
- className={cn(
- "flex items-center justify-center h-20 w-20 mx-2 my-2",
- "bg-neutral-800/40 backdrop-blur-sm rounded-lg p-4",
- "border border-neutral-700 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" />
- </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-7xl mx-auto px-4 mb-10 text-center">
- <div className="inline-block bg-emerald-900/30 text-emerald-400 px-3 py-1 rounded-full text-sm font-medium mb-4">
- Seamless Integration
- </div>
- <h2 className="text-4xl font-bold mb-3">Works with all your favorite platforms</h2>
- <p className="text-xl 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>
-
- <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>
- </div>
- );
-}