🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Refactor list styles and improve layout components
Bill Yangb7bf3a69b1bd
diff --git a/docs/src/app/(home)/layout.tsx b/docs/src/app/(home)/layout.tsxindex e41709a02..68b007734 100644--- a/docs/src/app/(home)/layout.tsx+++ b/docs/src/app/(home)/layout.tsx@@ -1,6 +1,6 @@-import type { ReactNode } from "react";import { CustomHeader } from "@/components/CustomHeader";import { Footer } from "@/components/Footer";+import type { ReactNode } from "react";export default function Layout({ children }: { children: ReactNode }) {return (diff --git a/docs/src/app/(home)/tools/conversion-rate-calculator/page.tsx b/docs/src/app/(home)/tools/conversion-rate-calculator/page.tsxindex 37e34754d..3f38e3a0d 100644--- a/docs/src/app/(home)/tools/conversion-rate-calculator/page.tsx+++ b/docs/src/app/(home)/tools/conversion-rate-calculator/page.tsx@@ -127,29 +127,17 @@ const educationalContent = (By Industry</h4><ul className="space-y-2">- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Landing Pages:</strong> 4.02%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Landing Pages:</strong> 4.02%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>SaaS:</strong> 3.0%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>SaaS:</strong> 3.0%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>E-commerce:</strong> 2.86%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>E-commerce:</strong> 2.86%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Overall Website:</strong> 2.35%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Overall Website:</strong> 2.35%</li></ul></div>@@ -158,29 +146,17 @@ const educationalContent = (By Traffic Source</h4><ul className="space-y-2">- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Paid Search:</strong> 3.75%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Paid Search:</strong> 3.75%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Email Campaigns:</strong> 3.2%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Email Campaigns:</strong> 3.2%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Organic Search:</strong> 2.4%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Organic Search:</strong> 2.4%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Display Ads:</strong> 0.77%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Display Ads:</strong> 0.77%</li></ul></div>@@ -190,32 +166,20 @@ const educationalContent = (Why Conversion Rate Matters</h3><ul className="space-y-2 mb-6">- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Maximize ROI:</strong> Get more value from existing traffic without- increasing ad spend- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Maximize ROI:</strong> Get more value from existing traffic without+ increasing ad spend</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Identify issues:</strong> Low conversion rates signal problems with user- experience or messaging- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Identify issues:</strong> Low conversion rates signal problems with user+ experience or messaging</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Benchmark performance:</strong> Compare effectiveness across channels and- campaigns- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Benchmark performance:</strong> Compare effectiveness across channels and+ campaigns</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Guide optimization:</strong> Focus efforts on high-impact improvements- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Guide optimization:</strong> Focus efforts on high-impact improvements</li></ul>@@ -262,19 +226,13 @@ const educationalContent = (Understanding different conversion types helps optimize the entire funnel:</p><ul className="space-y-2 mb-6">- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Macro conversions:</strong> Primary goals like purchases, subscriptions, or- qualified leads- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Macro conversions:</strong> Primary goals like purchases, subscriptions, or+ qualified leads</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Micro conversions:</strong> Smaller actions like email sign-ups, content- downloads, or video views that indicate progress- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Micro conversions:</strong> Smaller actions like email sign-ups, content+ downloads, or video views that indicate progress</li></ul></>diff --git a/docs/src/app/(home)/tools/retention-rate-calculator/page.tsx b/docs/src/app/(home)/tools/retention-rate-calculator/page.tsxindex 01b686c80..a4ccec146 100644--- a/docs/src/app/(home)/tools/retention-rate-calculator/page.tsx+++ b/docs/src/app/(home)/tools/retention-rate-calculator/page.tsx@@ -9,8 +9,7 @@ export const metadata: Metadata = {"Calculate customer retention rate instantly with our free calculator. Compare against industry benchmarks, identify churn patterns, and improve customer loyalty.",openGraph: {title: "Free Retention Rate Calculator",- description:- "Calculate and optimize your customer retention with industry benchmarks",+ description: "Calculate and optimize your customer retention with industry benchmarks",type: "website",url: "https://rybbit.com/tools/retention-rate-calculator",siteName: "Rybbit Documentation",@@ -31,8 +30,7 @@ const structuredData = {{"@type": "WebApplication",name: "Retention Rate Calculator",- description:- "Free retention rate calculator to measure customer loyalty and compare against industry benchmarks",+ description: "Free retention rate calculator to measure customer loyalty and compare against industry benchmarks",url: "https://rybbit.com/tools/retention-rate-calculator",applicationCategory: "BusinessApplication",operatingSystem: "Any",@@ -84,23 +82,18 @@ const structuredData = {const educationalContent = (<>- <h2 className="text-2xl font-bold text-neutral-900 dark:text-white mb-4">- What is Retention Rate?- </h2>+ <h2 className="text-2xl font-bold text-neutral-900 dark:text-white mb-4">What is Retention Rate?</h2><p className="text-neutral-700 dark:text-neutral-300 leading-relaxed mb-4">- Retention rate measures the percentage of customers who continue doing business with you- over a specific period. It's one of the most important metrics for understanding customer- loyalty, product-market fit, and long-term business sustainability.+ Retention rate measures the percentage of customers who continue doing business with you over a specific period.+ It's one of the most important metrics for understanding customer loyalty, product-market fit, and long-term+ business sustainability.</p><p className="text-neutral-700 dark:text-neutral-300 leading-relaxed mb-6">- High retention rates indicate satisfied customers who find ongoing value in your product- or service, while low retention signals potential issues with product quality, customer- experience, or value proposition.+ High retention rates indicate satisfied customers who find ongoing value in your product or service, while low+ retention signals potential issues with product quality, customer experience, or value proposition.</p>- <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">- How to Calculate Retention Rate- </h3>+ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">How to Calculate Retention Rate</h3><div className="bg-neutral-50 dark:bg-neutral-900/50 border border-neutral-200 dark:border-neutral-800 rounded-lg p-6 mb-6"><div className="text-center mb-4"><div className="text-2xl font-bold text-emerald-600 dark:text-emerald-400">@@ -117,165 +110,99 @@ const educationalContent = (<li>S = Customers at start of period</li></ul><p className="pt-2">- <strong>Example:</strong> If you started with 1,000 customers, ended with 920, and- acquired 150 new customers:- </p>- <p className="text-center font-mono">- Retention Rate = ((920 - 150) ÷ 1,000) × 100 = 77%+ <strong>Example:</strong> If you started with 1,000 customers, ended with 920, and acquired 150 new customers:</p>+ <p className="text-center font-mono">Retention Rate = ((920 - 150) ÷ 1,000) × 100 = 77%</p></div></div>- <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">- Industry Benchmarks- </h3>+ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">Industry Benchmarks</h3><div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"><div>- <h4 className="font-semibold text-neutral-900 dark:text-white mb-2">- Monthly Retention- </h4>+ <h4 className="font-semibold text-neutral-900 dark:text-white mb-2">Monthly Retention</h4><ul className="space-y-2">- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Telecom:</strong> 97%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Telecom:</strong> 97%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Financial Services:</strong> 95%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Financial Services:</strong> 95%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>SaaS:</strong> 93%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>SaaS:</strong> 93%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Media/Publishing:</strong> 84%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Media/Publishing:</strong> 84%</li></ul></div><div>- <h4 className="font-semibold text-neutral-900 dark:text-white mb-2">- Annual Retention- </h4>+ <h4 className="font-semibold text-neutral-900 dark:text-white mb-2">Annual Retention</h4><ul className="space-y-2">- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Telecom:</strong> 78%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Telecom:</strong> 78%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Financial Services:</strong> 75%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Financial Services:</strong> 75%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Media/Publishing:</strong> 55%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Media/Publishing:</strong> 55%</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>SaaS:</strong> 35%- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>SaaS:</strong> 35%</li></ul></div></div>- <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">- Why Retention Rate Matters- </h3>+ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">Why Retention Rate Matters</h3><ul className="space-y-2 mb-6">- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Cost efficiency:</strong> Retaining customers is 5-25x cheaper than acquiring- new ones- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Cost efficiency:</strong> Retaining customers is 5-25x cheaper than acquiring new ones</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Revenue predictability:</strong> High retention creates stable, recurring- revenue streams- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Revenue predictability:</strong> High retention creates stable, recurring revenue streams</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Growth indicator:</strong> Shows product-market fit and customer satisfaction- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Growth indicator:</strong> Shows product-market fit and customer satisfaction</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Compounding value:</strong> Retained customers often increase spending over- time- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Compounding value:</strong> Retained customers often increase spending over time</li></ul>- <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">- How to Improve Retention Rate- </h3>+ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">How to Improve Retention Rate</h3><ol className="space-y-3 mb-6 list-decimal list-inside text-neutral-700 dark:text-neutral-300"><li>- <strong>Enhance onboarding:</strong> Create smooth, guided experiences that help- customers realize value quickly+ <strong>Enhance onboarding:</strong> Create smooth, guided experiences that help customers realize value quickly</li><li>- <strong>Provide excellent support:</strong> Respond quickly to issues and proactively- help customers succeed+ <strong>Provide excellent support:</strong> Respond quickly to issues and proactively help customers succeed</li><li>- <strong>Deliver consistent value:</strong> Continuously improve your product and- communicate new features+ <strong>Deliver consistent value:</strong> Continuously improve your product and communicate new features</li><li>- <strong>Engage regularly:</strong> Maintain communication through email, in-app- messaging, and content+ <strong>Engage regularly:</strong> Maintain communication through email, in-app messaging, and content</li><li>- <strong>Gather feedback:</strong> Understand why customers leave and address common pain- points+ <strong>Gather feedback:</strong> Understand why customers leave and address common pain points</li><li>- <strong>Build loyalty programs:</strong> Reward long-term customers with special perks- and recognition+ <strong>Build loyalty programs:</strong> Reward long-term customers with special perks and recognition</li></ol>- <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">- Retention vs Churn- </h3>+ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">Retention vs Churn</h3><p className="text-neutral-700 dark:text-neutral-300 leading-relaxed mb-4">- Retention rate and churn rate are inverse metrics that sum to 100%. If your retention- rate is 77%, your churn rate is 23%. Both metrics provide valuable insights:+ Retention rate and churn rate are inverse metrics that sum to 100%. If your retention rate is 77%, your churn rate+ is 23%. Both metrics provide valuable insights:</p><ul className="space-y-2 mb-6">- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Retention rate:</strong> Focuses on customers who stay (positive framing)- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Retention rate:</strong> Focuses on customers who stay (positive framing)</li>- <li className="flex items-start text-neutral-700 dark:text-neutral-300">-- <span>- <strong>Churn rate:</strong> Highlights customers lost (helps identify problems)- </span>+ <li className="text-neutral-700 dark:text-neutral-300">+ <strong>Churn rate:</strong> Highlights customers lost (helps identify problems)</li></ul></>@@ -311,16 +238,15 @@ const faqs = [question: "Why is retention rate more important than acquisition?",answer: (<>- Retaining existing customers is typically 5-25x cheaper than acquiring new ones. High- retention also increases{" "}+ Retaining existing customers is typically 5-25x cheaper than acquiring new ones. High retention also increases{" "}<Linkhref="/tools/customer-lifetime-value-calculator"className="text-emerald-600 dark:text-emerald-400 hover:underline">customer lifetime value</Link>- , creates predictable revenue, and indicates strong product-market fit. A 5% increase- in retention can increase profits by 25-95%.+ , creates predictable revenue, and indicates strong product-market fit. A 5% increase in retention can increase+ profits by 25-95%.</>),},diff --git a/docs/src/app/global.css b/docs/src/app/global.cssindex 0f8e3e016..c816227dd 100644--- a/docs/src/app/global.css+++ b/docs/src/app/global.css@@ -62,3 +62,27 @@ pre {.animate-marquee-vertical {animation: marquee-vertical var(--duration) linear infinite;}++/* Override prose list styles for tool pages */+.prose ul li.flex,+.prose ol li.flex {+ padding-left: 0 !important;+ padding-inline-start: 0 !important;+ margin-left: 0 !important;+ list-style-type: none !important;+}++.prose ul li.flex::before,+.prose ol li.flex::before,+.prose ul li.flex::marker,+.prose ol li.flex::marker {+ content: none !important;+ display: none !important;+}++/* Remove left padding from ordered lists with list-inside */+.prose ol.list-inside {+ padding-left: 0 !important;+ padding-inline-start: 0 !important;+ margin-left: 0 !important;+}diff --git a/docs/src/components/BlackFridayBanner.tsx b/docs/src/components/BlackFridayBanner.tsxnew file mode 100644index 000000000..521eb1d81--- /dev/null+++ b/docs/src/components/BlackFridayBanner.tsx@@ -0,0 +1,69 @@+"use client";++import { useEffect, useState } from "react";++export function BlackFridayBanner() {+ const [timeLeft, setTimeLeft] = useState({+ days: 0,+ hours: 0,+ minutes: 0,+ seconds: 0,+ });+ const [isExpired, setIsExpired] = useState(false);++ useEffect(() => {+ // Set end date to December 1, 2025, 11:59:59 PM PST+ const endDate = new Date("2025-12-01T23:59:59-08:00");++ const calculateTimeLeft = () => {+ const now = new Date();+ const difference = endDate.getTime() - now.getTime();++ if (difference <= 0) {+ setIsExpired(true);+ return;+ }++ const days = Math.floor(difference / (1000 * 60 * 60 * 24));+ const hours = Math.floor((difference / (1000 * 60 * 60)) % 24);+ const minutes = Math.floor((difference / 1000 / 60) % 60);+ const seconds = Math.floor((difference / 1000) % 60);++ setTimeLeft({ days, hours, minutes, seconds });+ };++ calculateTimeLeft();+ const timer = setInterval(calculateTimeLeft, 1000);++ return () => clearInterval(timer);+ }, []);++ if (isExpired) {+ return null;+ }++ return (+ <div className="flex flex-col sm:flex-row items-center justify-center gap-1.5 sm:gap-3 text-center px-2 py-1 bg-emerald-300 dark:bg-emerald-600">+ <span className="font-semibold text-xs sm:text-sm">Black Friday Sale: 50% off first month!</span>+ <span className="text-[11px] sm:text-xs opacity-90">+ Code: <span className="font-mono font-bold">BLACKFRIDAY</span>+ </span>+ <div className="flex items-center gap-1 sm:gap-1.5 text-[11px] sm:text-xs">+ <span className="opacity-90">Ends in:</span>+ <div className="flex gap-1 font-mono font-semibold">+ {timeLeft.days > 0 && (+ <>+ <span>{timeLeft.days}d</span>+ <span>:</span>+ </>+ )}+ <span>{String(timeLeft.hours).padStart(2, "0")}h</span>+ <span>:</span>+ <span>{String(timeLeft.minutes).padStart(2, "0")}m</span>+ <span>:</span>+ <span>{String(timeLeft.seconds).padStart(2, "0")}s</span>+ </div>+ </div>+ </div>+ );+}diff --git a/docs/src/components/CustomHeader.tsx b/docs/src/components/CustomHeader.tsxindex 763b5c9db..bcc83d889 100644--- a/docs/src/components/CustomHeader.tsx+++ b/docs/src/components/CustomHeader.tsx@@ -6,12 +6,15 @@ import Image from "next/image";import Link from "next/link";import { useState } from "react";import { ThemeSwitcher } from "./ThemeSwitcher";+import { BlackFridayBanner } from "./BlackFridayBanner";+import { Banner } from "fumadocs-ui/components/banner";export function CustomHeader() {const [mobileMenuOpen, setMobileMenuOpen] = useState(false);return (<header className="sticky top-0 z-50 w-full border-b border-neutral-300 dark:border-neutral-800 bg-background/80 backdrop-blur-md">+ <BlackFridayBanner /><nav className="mx-auto flex max-w-7xl items-center justify-between px-4 py-3" aria-label="Global">{/* Logo */}<div className="flex items-center">