Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
feat: New Tools page
Richie McIlroya9b05c64f221
diff --git a/apps/web/app/tools/convert/[conversionPath]/page.tsx b/apps/web/app/tools/convert/[conversionPath]/page.tsxnew file mode 100644index 000000000..5553b656b--- /dev/null+++ b/apps/web/app/tools/convert/[conversionPath]/page.tsx@@ -0,0 +1,109 @@+import { Metadata } from "next";+import {+ MediaFormatConverter,+ parseFormats,+ CONVERSION_CONFIGS,+} from "@/components/tools/MediaFormatConverter";+import { ToolsPageTemplate } from "@/components/tools/ToolsPageTemplate";+import { notFound } from "next/navigation";+import { ToolPageContent } from "@/components/tools/types";++interface ConversionPageProps {+ params: {+ conversionPath: string;+ };+}++export async function generateMetadata({+ params,+}: ConversionPageProps): Promise<Metadata> {+ const { conversionPath } = params;++ if (!CONVERSION_CONFIGS[conversionPath]) {+ return {+ title: "Conversion Not Supported",+ description: "This conversion type is not supported.",+ };+ }++ const { sourceFormat, targetFormat } = parseFormats(conversionPath);+ const config = CONVERSION_CONFIGS[conversionPath];++ return {+ title: `${sourceFormat.toUpperCase()} to ${targetFormat.toUpperCase()} Converter | Free Online Tool`,+ description: config.description(sourceFormat, targetFormat),+ };+}++export async function generateStaticParams() {+ return Object.keys(CONVERSION_CONFIGS).map((path) => ({+ conversionPath: path,+ }));+}++export default function ConversionPage({ params }: ConversionPageProps) {+ const { conversionPath } = params;++ if (!CONVERSION_CONFIGS[conversionPath]) {+ notFound();+ }++ const { sourceFormat, targetFormat } = parseFormats(conversionPath);+ const config = CONVERSION_CONFIGS[conversionPath];++ const pageContent: ToolPageContent = {+ title: config.title(sourceFormat, targetFormat),+ description: config.description(sourceFormat, targetFormat),+ featuresTitle: "Features",+ featuresDescription:+ "Our free online converter offers several advantages over other conversion services:",+ features: [+ {+ title: "100% Private",+ description:+ "Your files never leave your device. All processing happens right in your browser.",+ },+ {+ title: "No Installation Required",+ description:+ "No need to download or install any software. Just open the page and start converting.",+ },+ {+ title: "High Quality Conversion",+ description:+ "We use industry-standard FFmpeg technology to ensure high-quality conversion results.",+ },+ ],+ faqs: [+ {+ question: `How does the ${sourceFormat.toUpperCase()} to ${targetFormat.toUpperCase()} converter work?`,+ answer: `Our converter uses WebAssembly to run FFmpeg directly in your browser. When you upload a ${sourceFormat.toUpperCase()} file, it gets processed locally on your device and converted to ${targetFormat.toUpperCase()} format without ever being sent to a server.`,+ },+ {+ question: "Is there a file size limit?",+ answer:+ "Yes, currently we limit file sizes to 500MB to ensure smooth performance in the browser. For larger files, you might need to use a desktop application.",+ },+ {+ question: "Why should I use this converter instead of others?",+ answer:+ "Unlike many online converters that require uploading your files to their servers, our tool processes everything locally. This means your files never leave your device, providing maximum privacy and security.",+ },+ ],+ cta: {+ title: "Cap is the open source Loom alternative",+ description:+ "Record, edit, and share video messages with Cap. 100% open source and privacy focused.",+ buttonText: "Download Cap Free",+ },+ };++ return (+ <ToolsPageTemplate+ content={pageContent}+ toolComponent={+ <MediaFormatConverter initialConversionPath={conversionPath} />+ }+ />+ );+}diff --git a/apps/web/app/tools/convert/avi-to-mp4/page.tsx b/apps/web/app/tools/convert/avi-to-mp4/page.tsxnew file mode 100644index 000000000..40e2469a9--- /dev/null+++ b/apps/web/app/tools/convert/avi-to-mp4/page.tsx@@ -0,0 +1,62 @@+import { MediaFormatConverter } from "@/components/tools/MediaFormatConverter";+import { ToolsPageTemplate } from "@/components/tools/ToolsPageTemplate";+import { ToolPageContent } from "@/components/tools/types";++export default function AVIToMP4Page() {+ const pageContent: ToolPageContent = {+ title: "AVI to MP4 Converter",+ description: "Convert AVI videos to MP4 format directly in your browser",+ featuresTitle: "Features",+ featuresDescription:+ "Our free online converter offers several advantages over other conversion services:",+ features: [+ {+ title: "100% Private",+ description:+ "Your files never leave your device. All processing happens right in your browser.",+ },+ {+ title: "No Installation Required",+ description:+ "No need to download or install any software. Just open the page and start converting.",+ },+ {+ title: "High Quality Conversion",+ description:+ "We use industry-standard FFmpeg technology to ensure high-quality conversion results.",+ },+ ],+ faqs: [+ {+ question: "How does the AVI to MP4 converter work?",+ answer:+ "Our converter uses WebAssembly to run FFmpeg directly in your browser. When you upload an AVI file, it gets processed locally on your device and converted to MP4 format without ever being sent to a server.",+ },+ {+ question: "Is there a file size limit?",+ answer:+ "Yes, currently we limit file sizes to 500MB to ensure smooth performance in the browser. For larger files, you might need to use a desktop application.",+ },+ {+ question: "Why convert AVI to MP4?",+ answer:+ "AVI is an older format with limited compatibility on modern devices. MP4 offers better compression, smaller file sizes, and widespread support on virtually all platforms and devices.",+ },+ ],+ cta: {+ title: "Cap is the open source Loom alternative",+ description:+ "Record, edit, and share video messages with Cap. 100% open source and privacy focused.",+ buttonText: "Download Cap Free",+ },+ };++ return (+ <ToolsPageTemplate+ content={pageContent}+ toolComponent={+ <MediaFormatConverter initialConversionPath="avi-to-mp4" />+ }+ />+ );+}diff --git a/apps/web/app/tools/convert/layout.tsx b/apps/web/app/tools/convert/layout.tsxnew file mode 100644index 000000000..61acd223a--- /dev/null+++ b/apps/web/app/tools/convert/layout.tsx@@ -0,0 +1,7 @@+export default function ConvertToolsLayout({+ children,+}: {+ children: React.ReactNode;+}) {+ return <section>{children}</section>;+}diff --git a/apps/web/app/tools/convert/mkv-to-mp4/page.tsx b/apps/web/app/tools/convert/mkv-to-mp4/page.tsxnew file mode 100644index 000000000..bb790ded2--- /dev/null+++ b/apps/web/app/tools/convert/mkv-to-mp4/page.tsx@@ -0,0 +1,62 @@+import { MediaFormatConverter } from "@/components/tools/MediaFormatConverter";+import { ToolsPageTemplate } from "@/components/tools/ToolsPageTemplate";+import { ToolPageContent } from "@/components/tools/types";++export default function MKVToMP4Page() {+ const pageContent: ToolPageContent = {+ title: "MKV to MP4 Converter",+ description: "Convert MKV videos to MP4 format directly in your browser",+ featuresTitle: "Features",+ featuresDescription:+ "Our free online converter offers several advantages over other conversion services:",+ features: [+ {+ title: "100% Private",+ description:+ "Your files never leave your device. All processing happens right in your browser.",+ },+ {+ title: "No Installation Required",+ description:+ "No need to download or install any software. Just open the page and start converting.",+ },+ {+ title: "High Quality Conversion",+ description:+ "We use industry-standard FFmpeg technology to ensure high-quality conversion results.",+ },+ ],+ faqs: [+ {+ question: "How does the MKV to MP4 converter work?",+ answer:+ "Our converter uses WebAssembly to run FFmpeg directly in your browser. When you upload an MKV file, it gets processed locally on your device and converted to MP4 format without ever being sent to a server.",+ },+ {+ question: "Is there a file size limit?",+ answer:+ "Yes, currently we limit file sizes to 500MB to ensure smooth performance in the browser. For larger files, you might need to use a desktop application.",+ },+ {+ question: "Why convert MKV to MP4?",+ answer:+ "While MKV is a versatile container format, MP4 offers better compatibility with a wider range of devices and software. Converting MKV to MP4 ensures your videos can be played on virtually any device or platform.",+ },+ ],+ cta: {+ title: "Cap is the open source Loom alternative",+ description:+ "Record, edit, and share video messages with Cap. 100% open source and privacy focused.",+ buttonText: "Download Cap Free",+ },+ };++ return (+ <ToolsPageTemplate+ content={pageContent}+ toolComponent={+ <MediaFormatConverter initialConversionPath="mkv-to-mp4" />+ }+ />+ );+}diff --git a/apps/web/app/tools/convert/mov-to-mp4/page.tsx b/apps/web/app/tools/convert/mov-to-mp4/page.tsxnew file mode 100644index 000000000..d89299071--- /dev/null+++ b/apps/web/app/tools/convert/mov-to-mp4/page.tsx@@ -0,0 +1,62 @@+import { MediaFormatConverter } from "@/components/tools/MediaFormatConverter";+import { ToolsPageTemplate } from "@/components/tools/ToolsPageTemplate";+import { ToolPageContent } from "@/components/tools/types";++export default function MOVToMP4Page() {+ const pageContent: ToolPageContent = {+ title: "MOV to MP4 Converter",+ description: "Convert MOV videos to MP4 format directly in your browser",+ featuresTitle: "Features",+ featuresDescription:+ "Our free online converter offers several advantages over other conversion services:",+ features: [+ {+ title: "100% Private",+ description:+ "Your files never leave your device. All processing happens right in your browser.",+ },+ {+ title: "No Installation Required",+ description:+ "No need to download or install any software. Just open the page and start converting.",+ },+ {+ title: "High Quality Conversion",+ description:+ "We use industry-standard FFmpeg technology to ensure high-quality conversion results.",+ },+ ],+ faqs: [+ {+ question: "How does the MOV to MP4 converter work?",+ answer:+ "Our converter uses WebAssembly to run FFmpeg directly in your browser. When you upload a MOV file, it gets processed locally on your device and converted to MP4 format without ever being sent to a server.",+ },+ {+ question: "Is there a file size limit?",+ answer:+ "Yes, currently we limit file sizes to 500MB to ensure smooth performance in the browser. For larger files, you might need to use a desktop application.",+ },+ {+ question: "Why convert MOV to MP4?",+ answer:+ "MP4 offers much better compatibility across devices and platforms than MOV, which is primarily used on Apple devices. Converting to MP4 ensures your videos can be viewed anywhere.",+ },+ ],+ cta: {+ title: "Cap is the open source Loom alternative",+ description:+ "Record, edit, and share video messages with Cap. 100% open source and privacy focused.",+ buttonText: "Download Cap Free",+ },+ };++ return (+ <ToolsPageTemplate+ content={pageContent}+ toolComponent={+ <MediaFormatConverter initialConversionPath="mov-to-mp4" />+ }+ />+ );+}diff --git a/apps/web/app/tools/convert/mp4-to-gif/page.tsx b/apps/web/app/tools/convert/mp4-to-gif/page.tsxnew file mode 100644index 000000000..55aade391--- /dev/null+++ b/apps/web/app/tools/convert/mp4-to-gif/page.tsx@@ -0,0 +1,63 @@+import { MediaFormatConverter } from "@/components/tools/MediaFormatConverter";+import { ToolsPageTemplate } from "@/components/tools/ToolsPageTemplate";+import { ToolPageContent } from "@/components/tools/types";++export default function MP4ToGIFPage() {+ const pageContent: ToolPageContent = {+ title: "MP4 to GIF Converter",+ description:+ "Convert MP4 videos to animated GIF images directly in your browser",+ featuresTitle: "Features",+ featuresDescription:+ "Our free online converter offers several advantages over other conversion services:",+ features: [+ {+ title: "100% Private",+ description:+ "Your files never leave your device. All processing happens right in your browser.",+ },+ {+ title: "No Installation Required",+ description:+ "No need to download or install any software. Just open the page and start converting.",+ },+ {+ title: "High Quality Conversion",+ description:+ "We use industry-standard FFmpeg technology to create optimized GIFs from your videos.",+ },+ ],+ faqs: [+ {+ question: "How does the MP4 to GIF converter work?",+ answer:+ "Our converter uses WebAssembly to run FFmpeg directly in your browser. When you upload an MP4 file, it gets processed locally on your device and converted to an animated GIF without ever being sent to a server.",+ },+ {+ question: "Is there a file size limit?",+ answer:+ "Yes, currently we limit file sizes to 500MB to ensure smooth performance in the browser. For larger files, you might need to use a desktop application.",+ },+ {+ question: "What quality settings are used for the GIF?",+ answer:+ "We use optimal settings for web-friendly GIFs with a frame rate of 10 FPS and appropriate resizing to balance quality and file size.",+ },+ ],+ cta: {+ title: "Cap is the open source Loom alternative",+ description:+ "Record, edit, and share video messages with Cap. 100% open source and privacy focused.",+ buttonText: "Download Cap Free",+ },+ };++ return (+ <ToolsPageTemplate+ content={pageContent}+ toolComponent={+ <MediaFormatConverter initialConversionPath="mp4-to-gif" />+ }+ />+ );+}diff --git a/apps/web/app/tools/convert/mp4-to-mp3/page.tsx b/apps/web/app/tools/convert/mp4-to-mp3/page.tsxnew file mode 100644index 000000000..921f3aabc--- /dev/null+++ b/apps/web/app/tools/convert/mp4-to-mp3/page.tsx@@ -0,0 +1,62 @@+import { MediaFormatConverter } from "@/components/tools/MediaFormatConverter";+import { ToolsPageTemplate } from "@/components/tools/ToolsPageTemplate";+import { ToolPageContent } from "@/components/tools/types";++export default function MP4ToMP3Page() {+ const pageContent: ToolPageContent = {+ title: "MP4 to MP3 Converter",+ description: "Extract audio from MP4 videos and save as MP3 files",+ featuresTitle: "Features",+ featuresDescription:+ "Our free online converter offers several advantages over other conversion services:",+ features: [+ {+ title: "100% Private",+ description:+ "Your files never leave your device. All processing happens right in your browser.",+ },+ {+ title: "No Installation Required",+ description:+ "No need to download or install any software. Just open the page and start converting.",+ },+ {+ title: "High Quality Conversion",+ description:+ "We use industry-standard FFmpeg technology to ensure high-quality audio extraction.",+ },+ ],+ faqs: [+ {+ question: "How does the MP4 to MP3 converter work?",+ answer:+ "Our converter uses WebAssembly to run FFmpeg directly in your browser. When you upload an MP4 file, it extracts the audio track locally on your device and saves it as an MP3 file without ever being sent to a server.",+ },+ {+ question: "Is there a file size limit?",+ answer:+ "Yes, currently we limit file sizes to 500MB to ensure smooth performance in the browser. For larger files, you might need to use a desktop application.",+ },+ {+ question: "Will this affect the audio quality?",+ answer:+ "Our converter extracts the audio at a high bitrate of 192kbps, which maintains excellent quality while keeping file sizes reasonable.",+ },+ ],+ cta: {+ title: "Cap is the open source Loom alternative",+ description:+ "Record, edit, and share video messages with Cap. 100% open source and privacy focused.",+ buttonText: "Download Cap Free",+ },+ };++ return (+ <ToolsPageTemplate+ content={pageContent}+ toolComponent={+ <MediaFormatConverter initialConversionPath="mp4-to-mp3" />+ }+ />+ );+}diff --git a/apps/web/app/tools/convert/mp4-to-webm/page.tsx b/apps/web/app/tools/convert/mp4-to-webm/page.tsxnew file mode 100644index 000000000..7e47fcf60--- /dev/null+++ b/apps/web/app/tools/convert/mp4-to-webm/page.tsx@@ -0,0 +1,62 @@+import { MediaFormatConverter } from "@/components/tools/MediaFormatConverter";+import { ToolsPageTemplate } from "@/components/tools/ToolsPageTemplate";+import { ToolPageContent } from "@/components/tools/types";++export default function MP4ToWebMPage() {+ const pageContent: ToolPageContent = {+ title: "MP4 to WebM Converter",+ description: "Convert MP4 videos to WebM format directly in your browser",+ featuresTitle: "Features",+ featuresDescription:+ "Our free online converter offers several advantages over other conversion services:",+ features: [+ {+ title: "100% Private",+ description:+ "Your files never leave your device. All processing happens right in your browser.",+ },+ {+ title: "No Installation Required",+ description:+ "No need to download or install any software. Just open the page and start converting.",+ },+ {+ title: "High Quality Conversion",+ description:+ "We use industry-standard FFmpeg technology to ensure high-quality conversion results.",+ },+ ],+ faqs: [+ {+ question: "How does the MP4 to WebM converter work?",+ answer:+ "Our converter uses WebAssembly to run FFmpeg directly in your browser. When you upload an MP4 file, it gets processed locally on your device and converted to WebM format without ever being sent to a server.",+ },+ {+ question: "Is there a file size limit?",+ answer:+ "Yes, currently we limit file sizes to 500MB to ensure smooth performance in the browser. For larger files, you might need to use a desktop application.",+ },+ {+ question: "Why convert to WebM format?",+ answer:+ "WebM is an excellent format for web videos, offering good compression with high quality. It's well-supported by modern browsers and uses less bandwidth than many other formats.",+ },+ ],+ cta: {+ title: "Cap is the open source Loom alternative",+ description:+ "Record, edit, and share video messages with Cap. 100% open source and privacy focused.",+ buttonText: "Download Cap Free",+ },+ };++ return (+ <ToolsPageTemplate+ content={pageContent}+ toolComponent={+ <MediaFormatConverter initialConversionPath="mp4-to-webm" />+ }+ />+ );+}diff --git a/apps/web/app/tools/convert/page.tsx b/apps/web/app/tools/convert/page.tsxnew file mode 100644index 000000000..98120010c--- /dev/null+++ b/apps/web/app/tools/convert/page.tsx@@ -0,0 +1,134 @@+import { Metadata } from "next";+import Link from "next/link";++export const metadata: Metadata = {+ title: "File Conversion Tools | Free Online Converters",+ description:+ "Free online file conversion tools. Convert between various file formats directly in your browser with no uploads needed.",+};++interface ConversionTool {+ title: string;+ description: string;+ href: string;+ icon: string;+}++const conversionTools: ConversionTool[] = [+ {+ title: "WebM to MP4",+ description: "Convert WebM videos to MP4 format directly in your browser",+ href: "/tools/convert/webm-to-mp4",+ icon: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",+ },+ {+ title: "MP4 to MP3",+ description: "Extract audio from MP4 videos and save as MP3 files",+ href: "/tools/convert/mp4-to-mp3",+ icon: "M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",+ },+ {+ title: "MP4 to GIF",+ description: "Convert MP4 videos to animated GIF images",+ href: "/tools/convert/mp4-to-gif",+ icon: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",+ },+ {+ title: "MOV to MP4",+ description: "Convert MOV videos to more compatible MP4 format",+ href: "/tools/convert/mov-to-mp4",+ icon: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",+ },+ {+ title: "AVI to MP4",+ description: "Convert AVI videos to modern MP4 format",+ href: "/tools/convert/avi-to-mp4",+ icon: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",+ },+ {+ title: "MKV to MP4",+ description: "Convert MKV videos to widely supported MP4 format",+ href: "/tools/convert/mkv-to-mp4",+ icon: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",+ },+ {+ title: "MP4 to WebM",+ description:+ "Convert MP4 videos to WebM format for better web compatibility",+ href: "/tools/convert/mp4-to-webm",+ icon: "M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",+ },+];++export default function ConvertToolsPage() {+ return (+ <div className="py-20 md:py-28">+ <div className="wrapper">+ <div className="mb-8">+ <Link+ href="/tools"+ className="inline-flex items-center text-sm text-blue-600 hover:text-blue-800"+ >+ <svg+ className="w-5 h-5 mr-1"+ fill="none"+ stroke="currentColor"+ viewBox="0 0 24 24"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth={2}+ d="M10 19l-7-7m0 0l7-7m-7 7h18"+ />+ </svg>+ Back to All Tools+ </Link>+ </div>++ <h1 className="text-3xl font-bold tracking-tight text-gray-900 mb-8">+ File Conversion Tools+ </h1>+ <p className="mb-12 text-lg text-gray-600">+ Our free online conversion tools help you transform files between+ different formats without uploading them to any server. All+ conversions happen directly in your browser for maximum privacy and+ security.+ </p>++ <div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">+ {conversionTools.map((tool) => (+ <Link+ key={tool.href}+ href={tool.href}+ className="group block p-6 border border-gray-200 rounded-lg hover:border-blue-500 transition-colors"+ >+ <div className="flex items-center mb-4">+ <div className="flex-shrink-0 p-2 bg-blue-100 rounded-lg">+ <svg+ className="w-6 h-6 text-blue-600"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ strokeWidth={1.5}+ >+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ d={tool.icon}+ />+ </svg>+ </div>+ <h2 className="ml-3 text-xl font-semibold text-gray-900 group-hover:text-blue-600 transition-colors">+ {tool.title}+ </h2>+ </div>+ <p className="text-gray-600">{tool.description}</p>+ </Link>+ ))}+ </div>+ </div>+ </div>+ );+}diff --git a/apps/web/app/tools/convert/webm-to-mp4/page.tsx b/apps/web/app/tools/convert/webm-to-mp4/page.tsxnew file mode 100644index 000000000..5d5985dfc--- /dev/null+++ b/apps/web/app/tools/convert/webm-to-mp4/page.tsx@@ -0,0 +1,62 @@+import { MediaFormatConverter } from "@/components/tools/MediaFormatConverter";+import { ToolsPageTemplate } from "@/components/tools/ToolsPageTemplate";+import { ToolPageContent } from "@/components/tools/types";++export default function WebmToMp4Page() {+ const pageContent: ToolPageContent = {+ title: "WebM to MP4 Converter",+ description: "Convert WebM videos to MP4 format directly in your browser",+ featuresTitle: "Features",+ featuresDescription:+ "Our free online converter offers several advantages over other conversion services:",+ features: [+ {+ title: "100% Private",+ description:+ "Your files never leave your device. All processing happens right in your browser.",+ },+ {+ title: "No Installation Required",+ description:+ "No need to download or install any software. Just open the page and start converting.",+ },+ {+ title: "High Quality Conversion",+ description:+ "We use industry-standard FFmpeg technology to ensure high-quality conversion results.",+ },+ ],+ faqs: [+ {+ question: "How does the WebM to MP4 converter work?",+ answer:+ "Our converter uses WebAssembly to run FFmpeg directly in your browser. When you upload a WebM file, it gets processed locally on your device and converted to MP4 format without ever being sent to a server.",+ },+ {+ question: "Is there a file size limit?",+ answer:+ "Yes, currently we limit file sizes to 500MB to ensure smooth performance in the browser. For larger files, you might need to use a desktop application.",+ },+ {+ question: "Why should I use this converter instead of others?",+ answer:+ "Unlike many online converters that require uploading your files to their servers, our tool processes everything locally. This means your files never leave your device, providing maximum privacy and security.",+ },+ ],+ cta: {+ title: "Cap is the open source Loom alternative",+ description:+ "Record, edit, and share video messages with Cap. 100% open source and privacy focused.",+ buttonText: "Download Cap Free",+ },+ };++ return (+ <ToolsPageTemplate+ content={pageContent}+ toolComponent={+ <MediaFormatConverter initialConversionPath="webm-to-mp4" />+ }+ />+ );+}diff --git a/apps/web/app/tools/layout.tsx b/apps/web/app/tools/layout.tsxnew file mode 100644index 000000000..90b8c3d67--- /dev/null+++ b/apps/web/app/tools/layout.tsx@@ -0,0 +1,7 @@+export default function ToolsLayout({+ children,+}: {+ children: React.ReactNode;+}) {+ return <section>{children}</section>;+}diff --git a/apps/web/app/tools/page.tsx b/apps/web/app/tools/page.tsxnew file mode 100644index 000000000..376837806--- /dev/null+++ b/apps/web/app/tools/page.tsx@@ -0,0 +1,12 @@+import { Metadata } from "next";+import { ToolsPageContent } from "../../components/ToolsPageContent";++export const metadata: Metadata = {+ title: "Online Tools | Free Browser-Based Utilities",+ description:+ "Discover Cap's collection of free online tools for file conversion, video editing, and more. All tools run directly in your browser for maximum privacy.",+};++export default function ToolsPage() {+ return <ToolsPageContent />;+}diff --git a/apps/web/components/Footer.tsx b/apps/web/components/Footer.tsxindex bab493bf7..7d969a641 100644--- a/apps/web/components/Footer.tsx+++ b/apps/web/components/Footer.tsx@@ -2,7 +2,7 @@import { usePathname } from "next/navigation";import { Logo, LogoBadge } from "@cap/ui";-+import Link from "next/link";type FooterLink = {label: string;href: string;@@ -20,7 +20,6 @@ const footerLinks = {href: "https://github.com/CapSoftware/Cap",isExternal: true,},- { label: "Self-hosting", href: "/self-hosting" },{label: "Join the community",href: "https://discord.gg/y8gdQ3WRN3",@@ -28,7 +27,10 @@ const footerLinks = {},] as FooterLink[],help: [+ { label: "About", href: "/about" },+ { label: "Testimonials", href: "/testimonials" },{ label: "FAQs", href: "/faq" },+ { label: "Self-hosting", href: "/self-hosting" },{ label: "Email Support", href: "mailto:[email protected]" },{label: "Chat Support",@@ -54,6 +56,14 @@ const footerLinks = {isExternal: true,},] as FooterLink[],+ tools: [+ { label: "WebM to MP4", href: "/tools/webm-to-mp4" },+ { label: "MOV to MP4", href: "/tools/mov-to-mp4" },+ { label: "AVI to MP4", href: "/tools/avi-to-mp4" },+ { label: "MP4 to GIF", href: "/tools/mp4-to-gif" },+ { label: "MP4 to MP3", href: "/tools/mp4-to-mp3" },+ { label: "MP4 to WebM", href: "/tools/mp4-to-webm" },+ ] as FooterLink[],useCases: [{label: "Remote Team Collaboration",@@ -102,11 +112,12 @@ export const Footer = () => {style={{ boxShadow: "0px 2px 8px rgba(18, 22, 31, 0.02)" }}className="mx-auto max-w-[1400px] bg-gray-100 border-[1px] border-gray-200 p-8 lg:p-12 rounded-[20px] mb-10 relative overflow-hidden">- <div className="sm:grid space-y-8 sm:space-y-0 grid-cols-1 lg:grid-cols-12 gap-8 sm:items-start sm:justify-between z-10 relative">- <div className="space-y-2 sm:space-y-4 col-span-12 lg:col-span-6">+ <div className="grid grid-cols-1 lg:grid-cols-12 gap-8 items-start justify-between z-10 relative">+ {/* Logo Column */}+ <div className="space-y-2 sm:space-y-4 col-span-12 lg:col-span-5"><Logo className="w-[104px] h-auto" /><div className="w-full">- <p className="text-gray-500 max-w-md">+ <p className="text-gray-500 max-w-sm">Cap is the open source alternative to Loom. Lightweight,powerful, and cross-platform. Record and share in seconds.</p>@@ -123,57 +134,15 @@ export const Footer = () => {</a></div></div>- <div className="space-y-4 col-span-12 sm:col-span-6 lg:col-span-2">- <h3 className="text-lg font-semibold">Product</h3>- <ul className="space-y-2">- {footerLinks.product.map((link, index) => (- <li key={index}>- <a- href={link.href}- target={link.isExternal ? "_blank" : undefined}- >- {link.label}- </a>- </li>- ))}- </ul>- </div>- <div className="space-y-4 col-span-12 sm:col-span-6 lg:col-span-2">- <h3 className="text-lg font-semibold">Help</h3>- <ul className="space-y-2">- {footerLinks.help.map((link, index) => (- <li key={index}>- <a- href={link.href}- target={link.isExternal ? "_blank" : undefined}- >- {link.label}- </a>- </li>- ))}- </ul>- </div>- <div className="space-y-4 col-span-12 sm:col-span-6 lg:col-span-2">- <h3 className="text-lg font-semibold">Socials</h3>- <ul className="space-y-2">- {footerLinks.socials.map((link, index) => (- <li key={index}>- <a- href={link.href}- target={link.isExternal ? "_blank" : undefined}- >- {link.label}- </a>- </li>- ))}- </ul>- </div>- <div className="space-y-4 col-span-12 sm:col-span-6 lg:col-span-12">- <div className="grid grid-cols-1 lg:grid-cols-2 gap-8">++ {/* Links Container Column */}+ <div className="col-span-12 lg:col-span-7">+ <div className="grid grid-cols-1 xs:grid-cols-2 sm:grid-cols-3 gap-8">+ {/* Product Column */}<div className="space-y-4">- <h3 className="text-lg font-semibold">Additional Links</h3>- <ul className="grid grid-cols-1 sm:grid-cols-2 gap-2">- {footerLinks.additional.map((link, index) => (+ <h3 className="text-lg font-semibold">Product</h3>+ <ul className="space-y-2">+ {footerLinks.product.map((link, index) => (<li key={index}><ahref={link.href}@@ -184,11 +153,28 @@ export const Footer = () => {</li>))}</ul>++ <div className="pt-4">+ <h3 className="text-lg font-semibold">Additional Links</h3>+ <ul className="grid grid-cols-1 gap-2 pt-2">+ {footerLinks.additional.map((link, index) => (+ <li key={index}>+ <a+ href={link.href}+ target={link.isExternal ? "_blank" : undefined}+ >+ {link.label}+ </a>+ </li>+ ))}+ </ul>+ </div></div>++ {/* Help Column */}<div className="space-y-4">- <h3 className="text-lg font-semibold">Use Cases</h3>- <ul className="grid grid-cols-1 gap-2">- {footerLinks.useCases.map((link, index) => (+ <ul className="space-y-2">+ {footerLinks.help.map((link, index) => (<li key={index}><ahref={link.href}@@ -199,6 +185,57 @@ export const Footer = () => {</li>))}</ul>++ <div className="pt-4">+ <h3 className="text-lg font-semibold">Use Cases</h3>+ <ul className="grid grid-cols-1 gap-2 pt-2">+ {footerLinks.useCases.map((link, index) => (+ <li key={index}>+ <a+ href={link.href}+ target={link.isExternal ? "_blank" : undefined}+ >+ {link.label}+ </a>+ </li>+ ))}+ </ul>+ </div>+ </div>++ {/* Socials Column */}+ <div className="space-y-4">+ <h3 className="text-lg font-semibold">Socials</h3>+ <ul className="space-y-2">+ {footerLinks.socials.map((link, index) => (+ <li key={index}>+ <a+ href={link.href}+ target={link.isExternal ? "_blank" : undefined}+ >+ {link.label}+ </a>+ </li>+ ))}+ </ul>++ <div className="pt-4">+ <Link href="/tools" className="text-lg font-semibold">+ Tools+ </Link>+ <ul className="grid grid-cols-1 gap-2 pt-2">+ {footerLinks.tools.map((link, index) => (+ <li key={index}>+ <a+ href={link.href}+ target={link.isExternal ? "_blank" : undefined}+ >+ {link.label}+ </a>+ </li>+ ))}+ </ul>+ </div></div></div></div>diff --git a/apps/web/components/Navbar.tsx b/apps/web/components/Navbar.tsxindex 75c810b21..4e1ad9788 100644--- a/apps/web/components/Navbar.tsx+++ b/apps/web/components/Navbar.tsx@@ -51,6 +51,16 @@ const Links = [label: "Download",href: "/download",},+ {+ label: "Tools",+ dropdown: [+ {+ label: "WebM to MP4 Converter",+ sub: "Convert WebM videos to MP4 format in your browser",+ href: "/tools/webm-to-mp4",+ },+ ],+ },{label: "Testimonials",href: "/testimonials",@@ -229,6 +239,17 @@ export const Navbar = ({ auth }: { auth: boolean }) => {Download</Link></li>+ <li>+ <Link+ onClick={() => {+ setShowMobileMenu(false);+ }}+ href="/tools/webm-to-mp4"+ passHref+ >+ WebM to MP4 Converter+ </Link>+ </li><li><LinkonClick={() => {diff --git a/apps/web/components/ToolsPageContent.tsx b/apps/web/components/ToolsPageContent.tsxnew file mode 100644index 000000000..b2d0edfad--- /dev/null+++ b/apps/web/components/ToolsPageContent.tsx@@ -0,0 +1,162 @@+"use client";++import Link from "next/link";+import { Button } from "@cap/ui";+import { useEffect } from "react";++interface ToolCategory {+ title: string;+ description: string;+ href: string;+ icon: string;+}++const toolCategories: ToolCategory[] = [+ {+ title: "File Conversion",+ description:+ "Convert between different file formats directly in your browser",+ href: "/tools/convert",+ icon: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",+ },+];++export function ToolsPageContent() {+ useEffect(() => {+ const animateClouds = () => {+ const cloud1 = document.getElementById("cloud-1");+ const cloud2 = document.getElementById("cloud-2");++ if (cloud1 && cloud2) {+ cloud1.animate(+ [+ { transform: "translateX(0) translateY(0)" },+ { transform: "translateX(-10px) translateY(5px)" },+ { transform: "translateX(10px) translateY(-5px)" },+ { transform: "translateX(0) translateY(0)" },+ ],+ {+ duration: 15000,+ iterations: Infinity,+ easing: "ease-in-out",+ }+ );++ cloud2.animate(+ [+ { transform: "translateX(0) translateY(0)" },+ { transform: "translateX(10px) translateY(-5px)" },+ { transform: "translateX(-10px) translateY(5px)" },+ { transform: "translateX(0) translateY(0)" },+ ],+ {+ duration: 18000,+ iterations: Infinity,+ easing: "ease-in-out",+ }+ );+ }+ };++ animateClouds();+ }, []);++ return (+ <div className="py-20 md:py-28">+ <div className="wrapper">+ <div className="text-center mb-12">+ <h1 className="text-4xl font-bold tracking-tight text-gray-900 mb-4">+ Try our free tools+ </h1>+ <p className="text-xl text-gray-600 max-w-3xl mx-auto">+ Powerful browser-based utilities that run directly on your device.+ No uploads, no installations, maximum privacy.+ </p>+ </div>++ <div className="grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3">+ {toolCategories.map((category) => (+ <Link+ key={category.href}+ href={category.href}+ className="group block p-8 border border-gray-200 rounded-xl hover:border-blue-500 hover:shadow-md transition-all"+ >+ <div className="flex flex-col items-center text-center">+ <div className="flex-shrink-0 p-3 bg-blue-100 rounded-xl mb-5">+ <svg+ className="w-8 h-8 text-blue-600"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ strokeWidth={1.5}+ >+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ d={category.icon}+ />+ </svg>+ </div>+ <h2 className="text-2xl font-semibold text-gray-900 group-hover:text-blue-600 transition-colors mb-3">+ {category.title}+ </h2>+ <p className="text-gray-600">{category.description}</p>+ </div>+ </Link>+ ))}+ </div>++ <div+ className="mx-auto mt-16 mb-8 rounded-3xl overflow-hidden relative flex flex-col justify-center p-12"+ style={{+ minHeight: "300px",+ background:+ "linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #0ea5e9 100%)",+ }}+ >+ <div+ id="cloud-1"+ className="absolute top-0 -right-20 opacity-30 z-0 pointer-events-none transition-transform duration-700 ease-in-out"+ >+ <img+ className="max-w-[40vw] h-auto"+ src="/illustrations/cloud-1.png"+ alt="Footer Cloud One"+ />+ </div>+ <div+ id="cloud-2"+ className="absolute bottom-0 left-0 opacity-30 z-0 pointer-events-none transition-transform duration-700 ease-in-out"+ >+ <img+ className="max-w-[40vw] h-auto"+ src="/illustrations/cloud-2.png"+ alt="Footer Cloud Two"+ />+ </div>+ <div className="wrapper mx-auto h-full flex flex-col justify-center items-center relative z-10">+ <div className="text-center max-w-[800px] mx-auto mb-8">+ <h2 className="text-3xl md:text-4xl font-bold text-white mb-4 drop-shadow-md">+ The open source Loom alternative+ </h2>+ <p className="text-xl text-white/90 mb-6">+ Cap is lightweight, powerful, and cross-platform. Record and+ share securely in seconds with custom S3 bucket support.+ </p>+ </div>+ <div className="flex flex-col sm:flex-row items-center justify-center space-y-3 sm:space-y-0 sm:space-x-4">+ <Button+ variant="white"+ href="/download"+ size="lg"+ className="w-full sm:w-auto transition-all duration-300 font-medium px-8 py-3"+ >+ Download Cap Free+ </Button>+ </div>+ </div>+ </div>+ </div>+ </div>+ );+}diff --git a/apps/web/components/tools/MediaFormatConverter.tsx b/apps/web/components/tools/MediaFormatConverter.tsxnew file mode 100644index 000000000..8a31bf877--- /dev/null+++ b/apps/web/components/tools/MediaFormatConverter.tsx@@ -0,0 +1,818 @@+"use client";++import { useState, useRef, useEffect } from "react";+import { Button } from "@cap/ui";+import { FFmpeg } from "@ffmpeg/ffmpeg";+import { fetchFile } from "@ffmpeg/util";+import { trackEvent } from "@/app/utils/analytics";+import { useRouter, usePathname } from "next/navigation";+import Link from "next/link";++export const SUPPORTED_FORMATS = {+ video: ["mp4", "webm", "mov", "avi", "mkv"],+ audio: ["mp3"],+ image: ["gif"],+};++export const FORMAT_GROUPS = {+ video: ["mp4", "webm", "mov", "avi", "mkv"],+ audio: ["mp3"],+ image: ["gif"],+};++export const CONVERSION_CONFIGS: Record<+ string,+ {+ acceptType: string;+ command: (input: string, output: string) => string[];+ outputType: string;+ title: (source: string, target: string) => string;+ description: (source: string, target: string) => string;+ }+> = {+ "webm-to-mp4": {+ acceptType: "video/webm",+ command: (input, output) => [+ "-i",+ input,+ "-c:v",+ "libx264",+ "-preset",+ "medium",+ "-crf",+ "23",+ "-c:a",+ "aac",+ "-b:a",+ "128k",+ output,+ ],+ outputType: "video/mp4",+ title: (source, target) =>+ `${source.toUpperCase()} to ${target.toUpperCase()} Converter`,+ description: (source, target) =>+ `Convert ${source.toUpperCase()} videos to ${target.toUpperCase()} format directly in your browser`,+ },+ "mp4-to-webm": {+ acceptType: "video/mp4",+ command: (input, output) => [+ "-i",+ input,+ "-c:v",+ "libvpx",+ "-crf",+ "30",+ "-b:v",+ "0",+ "-c:a",+ "libvorbis",+ output,+ ],+ outputType: "video/webm",+ title: (source, target) =>+ `${source.toUpperCase()} to ${target.toUpperCase()} Converter`,+ description: (source, target) =>+ `Convert ${source.toUpperCase()} videos to ${target.toUpperCase()} format directly in your browser`,+ },+ "mov-to-mp4": {+ acceptType: "video/quicktime",+ command: (input, output) => [+ "-i",+ input,+ "-c:v",+ "libx264",+ "-preset",+ "fast",+ "-crf",+ "23",+ "-movflags",+ "+faststart",+ "-pix_fmt",+ "yuv420p",+ "-c:a",+ "aac",+ "-b:a",+ "128k",+ "-y",+ output,+ ],+ outputType: "video/mp4",+ title: (source, target) =>+ `${source.toUpperCase()} to ${target.toUpperCase()} Converter`,+ description: (source, target) =>+ `Convert ${source.toUpperCase()} videos to ${target.toUpperCase()} format directly in your browser`,+ },+ "avi-to-mp4": {+ acceptType: "video/x-msvideo",+ command: (input, output) => [+ "-i",+ input,+ "-c:v",+ "libx264",+ "-preset",+ "medium",+ "-crf",+ "23",+ "-c:a",+ "aac",+ "-b:a",+ "128k",+ output,+ ],+ outputType: "video/mp4",+ title: (source, target) =>+ `${source.toUpperCase()} to ${target.toUpperCase()} Converter`,+ description: (source, target) =>+ `Convert ${source.toUpperCase()} videos to ${target.toUpperCase()} format directly in your browser`,+ },+ "mkv-to-mp4": {+ acceptType: "video/x-matroska",+ command: (input, output) => [+ "-i",+ input,+ "-c:v",+ "libx264",+ "-preset",+ "medium",+ "-crf",+ "23",+ "-c:a",+ "aac",+ "-b:a",+ "128k",+ output,+ ],+ outputType: "video/mp4",+ title: (source, target) =>+ `${source.toUpperCase()} to ${target.toUpperCase()} Converter`,+ description: (source, target) =>+ `Convert ${source.toUpperCase()} videos to ${target.toUpperCase()} format directly in your browser`,+ },++ "mp4-to-mp3": {+ acceptType: "video/mp4",+ command: (input, output) => [+ "-i",+ input,+ "-vn",+ "-ar",+ "44100",+ "-ac",+ "2",+ "-b:a",+ "192k",+ output,+ ],+ outputType: "audio/mp3",+ title: (source, target) =>+ `${source.toUpperCase()} to ${target.toUpperCase()} Converter`,+ description: (source, target) =>+ `Extract audio from ${source.toUpperCase()} videos and save as ${target.toUpperCase()} files`,+ },++ "mp4-to-gif": {+ acceptType: "video/mp4",+ command: (input, output) => [+ "-i",+ input,+ "-vf",+ "fps=10,scale=320:-1:flags=lanczos",+ "-c:v",+ "gif",+ output,+ ],+ outputType: "image/gif",+ title: (source, target) =>+ `${source.toUpperCase()} to ${target.toUpperCase()} Converter`,+ description: (source, target) =>+ `Convert ${source.toUpperCase()} videos to animated ${target.toUpperCase()} images`,+ },+};++export const parseFormats = (+ conversionPath: string+): { sourceFormat: string; targetFormat: string } => {+ const parts = conversionPath.split("-to-");+ return {+ sourceFormat: parts[0] || "webm",+ targetFormat: parts[1] || "mp4",+ };+};++export const getMimeType = (format: string): string => {+ switch (format) {+ case "mp4":+ return "video/mp4";+ case "webm":+ return "video/webm";+ case "mov":+ return "video/quicktime";+ case "avi":+ return "video/x-msvideo";+ case "mkv":+ return "video/x-matroska";+ case "mp3":+ return "audio/mp3";+ case "gif":+ return "image/gif";+ default:+ return "";+ }+};++export const getAcceptAttribute = (format: string): string => {+ switch (format) {+ case "mp4":+ return "video/mp4";+ case "webm":+ return "video/webm";+ case "mov":+ return "video/quicktime";+ case "avi":+ return "video/x-msvideo";+ case "mkv":+ return "video/x-matroska";+ case "mp3":+ return "audio/mp3";+ case "gif":+ return "image/gif";+ default:+ return "";+ }+};++interface MediaFormatConverterProps {+ initialConversionPath: string;+}++export const MediaFormatConverter = ({+ initialConversionPath,+}: MediaFormatConverterProps) => {+ const router = useRouter();+ const pathname = usePathname() || "";++ const { sourceFormat = "webm", targetFormat = "mp4" } = parseFormats(+ initialConversionPath+ );++ const [file, setFile] = useState<File | null>(null);+ const [isConverting, setIsConverting] = useState(false);+ const [progress, setProgress] = useState(0);+ const [outputUrl, setOutputUrl] = useState<string | null>(null);+ const [error, setError] = useState<string | null>(null);+ const [ffmpegLoaded, setFfmpegLoaded] = useState(false);+ const [isDragging, setIsDragging] = useState(false);+ const [currentSourceFormat, setCurrentSourceFormat] = useState(sourceFormat);+ const [currentTargetFormat, setCurrentTargetFormat] = useState(targetFormat);++ const conversionPath = `${currentSourceFormat}-to-${currentTargetFormat}`;+ const config = CONVERSION_CONFIGS[conversionPath];++ const ffmpegRef = useRef<FFmpeg | null>(null);+ const fileInputRef = useRef<HTMLInputElement>(null);++ useEffect(() => {+ if (+ sourceFormat !== currentSourceFormat ||+ targetFormat !== currentTargetFormat+ ) {+ try {+ const basePath = pathname.split("/").slice(0, -1).join("/");+ const newPath = `${basePath}/${currentSourceFormat}-to-${currentTargetFormat}`;+ router.push(newPath);+ } catch (error) {+ console.error("Error updating URL:", error);+ }+ }+ }, [+ currentSourceFormat,+ currentTargetFormat,+ pathname,+ router,+ sourceFormat,+ targetFormat,+ ]);++ useEffect(() => {+ const loadFFmpeg = async () => {+ try {+ const ffmpegInstance = new FFmpeg();+ ffmpegRef.current = ffmpegInstance;++ ffmpegInstance.on("progress", ({ progress }: { progress: number }) => {+ setProgress(Math.round(progress * 100));+ });++ await ffmpegInstance.load();+ setFfmpegLoaded(true);+ trackEvent(`${conversionPath}_tool_loaded`);+ } catch (err) {+ setError("Failed to load FFmpeg. Please try again later.");+ console.error("FFmpeg loading error:", err);+ }+ };++ loadFFmpeg();++ return () => {+ if (outputUrl) {+ URL.revokeObjectURL(outputUrl);+ }+ };+ }, [conversionPath]);++ const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {+ const selectedFile = e.target.files?.[0];+ if (selectedFile) {+ validateAndSetFile(selectedFile);+ }+ };++ const validateAndSetFile = (selectedFile: File) => {+ setError(null);+ setOutputUrl(null);++ const expectedMimeType = getMimeType(currentSourceFormat);++ let isValidType = false;++ if (currentSourceFormat === "mov") {+ isValidType =+ selectedFile.type === "video/quicktime" ||+ selectedFile.type === "video/mov" ||+ selectedFile.name.toLowerCase().endsWith(".mov");+ } else if (currentSourceFormat === "mkv") {+ isValidType =+ selectedFile.type === "video/x-matroska" ||+ selectedFile.name.toLowerCase().endsWith(".mkv");+ } else if (currentSourceFormat === "avi") {+ isValidType =+ selectedFile.type === "video/x-msvideo" ||+ selectedFile.type === "video/avi" ||+ selectedFile.name.toLowerCase().endsWith(".avi");+ } else {+ isValidType =+ selectedFile.type === expectedMimeType ||+ selectedFile.type.includes(currentSourceFormat) ||+ selectedFile.name.toLowerCase().endsWith(`.${currentSourceFormat}`);+ }++ if (!isValidType) {+ setError(`Please select a ${currentSourceFormat.toUpperCase()} file.`);+ trackEvent(`${conversionPath}_invalid_file_type`, {+ fileType: selectedFile.type,+ });+ return;+ }++ if (selectedFile.size > 500 * 1024 * 1024) {+ setError("File size exceeds 500MB limit.");+ trackEvent(`${conversionPath}_file_too_large`, {+ fileSize: selectedFile.size,+ });+ return;+ }++ setFile(selectedFile);+ trackEvent(`${conversionPath}_file_selected`, {+ fileSize: selectedFile.size,+ });+ };++ const handleDragOver = (e: React.DragEvent) => {+ e.preventDefault();+ setIsDragging(true);+ };++ const handleDragLeave = (e: React.DragEvent) => {+ e.preventDefault();+ setIsDragging(false);+ };++ const handleDrop = (e: React.DragEvent) => {+ e.preventDefault();+ setIsDragging(false);++ const droppedFile = e.dataTransfer.files[0];+ if (droppedFile) {+ validateAndSetFile(droppedFile);+ }+ };++ const convertFile = async () => {+ if (!file || !ffmpegLoaded || !ffmpegRef.current || !config) return;++ setIsConverting(true);+ setError(null);+ setProgress(0);++ trackEvent(`${conversionPath}_conversion_started`, {+ fileSize: file.size,+ fileName: file.name,+ });++ try {+ const ffmpeg = ffmpegRef.current;+ const inputFileName = `input.${currentSourceFormat}`;+ const outputFileName = `output.${currentTargetFormat}`;++ console.log(`Starting conversion: ${conversionPath}`);+ console.log(`Input file: ${file.name}, size: ${file.size} bytes`);++ await ffmpeg.writeFile(inputFileName, await fetchFile(file));+ console.log("File written to FFmpeg virtual filesystem");++ const command = config.command(inputFileName, outputFileName);+ console.log("FFmpeg command:", command);++ await ffmpeg.exec(command);+ console.log("FFmpeg command executed");++ const data = await ffmpeg.readFile(outputFileName);+ console.log(`Output data received, type: ${typeof data}`);++ if (!data) {+ throw new Error(+ "Conversion resulted in an empty file. Please try again."+ );+ }++ const blob = new Blob([data], { type: config.outputType });+ console.log(`Output blob created, size: ${blob.size} bytes`);++ if (blob.size < 1024 && file.size > 10 * 1024) {+ throw new Error(+ "Conversion produced an unusually small file. It may be corrupted."+ );+ }++ const url = URL.createObjectURL(blob);++ setOutputUrl(url);++ trackEvent(`${conversionPath}_conversion_completed`, {+ fileSize: file.size,+ fileName: file.name,+ outputSize: blob.size,+ conversionTime: Date.now(),+ });++ await ffmpeg.deleteFile(inputFileName);+ await ffmpeg.deleteFile(outputFileName);+ } catch (err: any) {+ console.error("Detailed conversion error:", err);++ let errorMessage = "Conversion failed: ";+ if (err.message) {+ errorMessage += err.message;+ } else if (typeof err === "string") {+ errorMessage += err;+ } else {+ errorMessage += "Unknown error occurred during conversion";+ }++ setError(errorMessage);++ trackEvent(`${conversionPath}_conversion_failed`, {+ fileSize: file.size,+ fileName: file.name,+ error: err.message || "Unknown error",+ });+ } finally {+ setIsConverting(false);+ }+ };++ const handleDownload = () => {+ if (!outputUrl || !file) return;++ const fileExtension = `.${currentSourceFormat}`;+ const newExtension = `.${currentTargetFormat}`;+ const downloadFileName = file.name.replace(+ new RegExp(`${fileExtension}$`),+ newExtension+ );++ trackEvent(`${conversionPath}_download_clicked`, {+ fileName: downloadFileName,+ });++ const link = document.createElement("a");+ link.href = outputUrl;+ link.download = downloadFileName;+ link.click();+ };++ const resetConverter = () => {+ if (outputUrl) {+ URL.revokeObjectURL(outputUrl);+ }+ setFile(null);+ setOutputUrl(null);+ setProgress(0);+ setError(null);++ trackEvent(`${conversionPath}_reset`);++ if (fileInputRef.current) {+ fileInputRef.current.value = "";+ }+ };++ const getValidSourceFormats = () => {+ return Object.keys(CONVERSION_CONFIGS)+ .map((path) => {+ const { sourceFormat } = parseFormats(path);+ return sourceFormat;+ })+ .filter((value, index, self) => self.indexOf(value) === index);+ };++ const getValidTargetFormats = (source: string) => {+ return Object.keys(CONVERSION_CONFIGS)+ .filter((path) => path.startsWith(`${source}-to-`))+ .map((path) => {+ const { targetFormat } = parseFormats(path);+ return targetFormat;+ });+ };++ const validSourceFormats = getValidSourceFormats();+ const validTargetFormats = getValidTargetFormats(currentSourceFormat);++ const handleSourceFormatChange = (newSourceFormat: string) => {+ setCurrentSourceFormat(newSourceFormat);+ const newValidTargets = getValidTargetFormats(newSourceFormat);+ if (+ newValidTargets.length > 0 &&+ !newValidTargets.includes(currentTargetFormat)+ ) {+ if (newValidTargets[0]) {+ setCurrentTargetFormat(newValidTargets[0]);+ }+ }+ resetConverter();+ };++ const handleTargetFormatChange = (newTargetFormat: string) => {+ setCurrentTargetFormat(newTargetFormat);+ resetConverter();+ };++ if (!config) {+ return (+ <div className="p-6 bg-red-50 border border-red-200 rounded-lg text-red-600">+ <p>Unsupported conversion: {conversionPath}</p>+ <Link+ href="/tools/convert"+ className="mt-4 inline-flex items-center text-blue-600 hover:text-blue-800"+ >+ ← Back to Conversion Tools+ </Link>+ </div>+ );+ }++ return (+ <div className="w-full">+ <h2 className="text-2xl font-semibold text-center mb-6">+ {config.title(currentSourceFormat, currentTargetFormat)}+ </h2>++ {/* Format Selector */}+ <div className="w-full mb-6">+ <div className="flex flex-col sm:flex-row items-center justify-center gap-3 sm:gap-2">+ <div className="w-full sm:w-auto flex flex-col sm:flex-row items-center">+ <span className="w-full sm:w-auto text-center sm:text-left mb-2 sm:mb-0 sm:mr-2 text-gray-700 font-medium">+ From:+ </span>+ <div className="flex flex-wrap justify-center gap-2 w-full">+ {validSourceFormats.map((format) => (+ <Link+ key={format}+ href={`/tools/convert/${format}-to-${+ getValidTargetFormats(format).includes(currentTargetFormat)+ ? currentTargetFormat+ : getValidTargetFormats(format)[0]+ }`}+ onClick={(e) => {+ e.preventDefault();+ handleSourceFormatChange(format);+ }}+ className={`px-3 py-1.5 rounded-md text-sm font-medium text-center min-w-[60px] ${+ currentSourceFormat === format+ ? "bg-blue-600 text-white"+ : "bg-gray-200 text-gray-800 hover:bg-gray-300"+ }`}+ aria-label={`Convert from ${format.toUpperCase()} format`}+ >+ {format.toUpperCase()}+ </Link>+ ))}+ </div>+ </div>++ <span className="hidden sm:block mx-2 text-gray-400">→</span>+ <div className="w-full sm:hidden flex justify-center my-2">+ <span className="text-gray-400 text-xl">↓</span>+ </div>++ <div className="w-full sm:w-auto flex flex-col sm:flex-row items-center">+ <span className="w-full sm:w-auto text-center sm:text-left mb-2 sm:mb-0 sm:mr-2 text-gray-700 font-medium">+ To:+ </span>+ <div className="flex flex-wrap justify-center gap-2 w-full">+ {validTargetFormats.map((format) => (+ <Link+ key={format}+ href={`/tools/convert/${currentSourceFormat}-to-${format}`}+ onClick={(e) => {+ e.preventDefault();+ handleTargetFormatChange(format);+ }}+ className={`px-3 py-1.5 rounded-md text-sm font-medium text-center min-w-[60px] ${+ currentTargetFormat === format+ ? "bg-blue-600 text-white"+ : "bg-gray-200 text-gray-800 hover:bg-gray-300"+ }`}+ aria-label={`Convert to ${format.toUpperCase()} format`}+ >+ {format.toUpperCase()}+ </Link>+ ))}+ </div>+ </div>+ </div>+ </div>++ <div+ className={`border-2 border-dashed rounded-lg p-8 mb-6 flex flex-col items-center justify-center cursor-pointer transition-colors ${+ isDragging+ ? "border-blue-500 bg-blue-50"+ : "border-gray-300 hover:border-blue-400"+ }`}+ onDragOver={handleDragOver}+ onDragLeave={handleDragLeave}+ onDrop={handleDrop}+ onClick={() => fileInputRef.current?.click()}+ style={{ minHeight: "200px" }}+ >+ <input+ type="file"+ accept={getAcceptAttribute(currentSourceFormat)}+ className="hidden"+ onChange={handleFileChange}+ ref={fileInputRef}+ />++ <div className="text-center">+ {!file ? (+ <>+ <svg+ className="mx-auto h-12 w-12 text-gray-400 mb-3"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ >+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth={2}+ d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"+ />+ </svg>+ <p className="text-lg font-medium text-gray-700">+ Drag and drop your {currentSourceFormat.toUpperCase()} file here+ </p>+ <p className="text-sm text-gray-500 mt-1">+ or click to browse (max 500MB)+ </p>+ </>+ ) : (+ <>+ <svg+ className="mx-auto h-12 w-12 text-green-500 mb-3"+ fill="none"+ viewBox="0 0 24 24"+ stroke="currentColor"+ >+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth={2}+ d="M5 13l4 4L19 7"+ />+ </svg>+ <p className="text-lg font-medium text-gray-700">{file.name}</p>+ <p className="text-sm text-gray-500 mt-1">+ {(file.size / (1024 * 1024)).toFixed(2)} MB+ </p>+ </>+ )}+ </div>+ </div>++ {error && (+ <div className="mb-6 p-4 bg-red-50 border border-red-200 rounded-lg text-red-600">+ {error}+ </div>+ )}++ {isConverting && (+ <div className="mb-6">+ <p className="text-center text-gray-700 mb-2">+ Converting... {progress}%+ </p>+ <div className="w-full bg-gray-200 rounded-full h-2">+ <div+ className="bg-blue-600 h-2 rounded-full transition-all"+ style={{ width: `${progress}%` }}+ ></div>+ </div>+ </div>+ )}++ {outputUrl && (+ <div className="mb-6 p-5 bg-green-50 border border-green-200 rounded-lg">+ <p className="text-green-700 font-medium mb-3">+ Conversion complete!+ </p>+ {config.outputType.startsWith("video/") && (+ <video+ src={outputUrl}+ controls+ className="w-full rounded-lg mb-4 bg-black"+ style={{ maxHeight: "300px" }}+ ></video>+ )}+ {config.outputType.startsWith("audio/") && (+ <audio+ src={outputUrl}+ controls+ className="w-full rounded-lg mb-4"+ ></audio>+ )}+ {config.outputType.startsWith("image/") && (+ <img+ src={outputUrl}+ alt="Converted GIF"+ className="max-w-full rounded-lg mb-4 mx-auto"+ style={{ maxHeight: "300px" }}+ />+ )}+ <div className="flex flex-col sm:flex-row space-y-3 sm:space-y-0 sm:space-x-3">+ <Button+ variant="primary"+ onClick={handleDownload}+ className="w-full"+ >+ Download {currentTargetFormat.toUpperCase()}+ </Button>+ </div>+ </div>+ )}++ <div className="flex flex-col sm:flex-row space-y-3 sm:space-y-0 sm:space-x-3">+ {file && !isConverting && !outputUrl && (+ <Button+ variant="primary"+ onClick={convertFile}+ disabled={!ffmpegLoaded || isConverting}+ className="w-full"+ >+ Convert to {currentTargetFormat.toUpperCase()}+ </Button>+ )}++ {(file || outputUrl) && (+ <Button+ variant="white"+ onClick={resetConverter}+ disabled={isConverting}+ className="w-full"+ >+ {outputUrl ? "Convert Another File" : "Reset"}+ </Button>+ )}+ </div>++ {!ffmpegLoaded && !error && (+ <div className="mt-6 text-center text-gray-500">+ <p>Loading conversion engine...</p>+ <div className="mt-2 w-8 h-8 border-4 border-blue-200 border-t-blue-500 rounded-full animate-spin mx-auto"></div>+ </div>+ )}++ <div className="mt-8 pt-6 border-t border-gray-200 text-sm text-gray-500 text-center">+ <p>+ This converter works entirely in your browser. Your files are never+ uploaded to any server.+ </p>+ <p className="mt-1">+ The conversion is performed using FFmpeg, which runs locally on your+ device.+ </p>+ </div>+ </div>+ );+};diff --git a/apps/web/components/tools/ToolsPageTemplate.tsx b/apps/web/components/tools/ToolsPageTemplate.tsxnew file mode 100644index 000000000..0f0e5b695--- /dev/null+++ b/apps/web/components/tools/ToolsPageTemplate.tsx@@ -0,0 +1,342 @@+"use client";++import { Button } from "@cap/ui";+import { ToolPageContent } from "@/components/tools/types";+import { useEffect, ReactNode } from "react";+import { motion } from "framer-motion";++const renderHTML = (content: string) => {+ const styledContent = content.replace(+ /<a\s/g,+ '<a class="font-semibold text-blue-500 hover:text-blue-600 transition-colors" '+ );++ return <span dangerouslySetInnerHTML={{ __html: styledContent }} />;+};++const LeftBlueHue = () => {+ return (+ <svg+ className="absolute top-0 -left-24 z-0 opacity-20 pointer-events-none md:opacity-40"+ width="1000"+ height="500"+ viewBox="0 0 1276 690"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <g filter="url(#blue-hue-filter)">+ <ellipse+ cx="592"+ cy="339"+ rx="584"+ ry="251"+ transform="rotate(180 592 339)"+ fill="url(#blue-hue-gradient)"+ />+ </g>+ <defs>+ <filter+ id="blue-hue-filter"+ x="-92"+ y="-12"+ width="1368"+ height="702"+ filterUnits="userSpaceOnUse"+ colorInterpolationFilters="sRGB"+ >+ <feFlood floodOpacity="0" result="BackgroundImageFix" />+ <feBlend+ mode="normal"+ in="SourceGraphic"+ in2="BackgroundImageFix"+ result="shape"+ />+ <feGaussianBlur stdDeviation="50" result="blur-effect" />+ </filter>+ <linearGradient+ id="blue-hue-gradient"+ x1="1102.5"+ y1="339"+ x2="157.5"+ y2="375.5"+ gradientUnits="userSpaceOnUse"+ >+ <stop stopColor="#75A3FE" />+ <stop offset="1" stopColor="white" stopOpacity="0" />+ </linearGradient>+ </defs>+ </svg>+ );+};++export const ToolsPageTemplate = ({+ content,+ toolComponent,+}: {+ content: ToolPageContent;+ toolComponent: ReactNode;+}) => {+ useEffect(() => {+ const animateClouds = () => {+ const cloud4 = document.getElementById("cloud-4");+ const cloud5 = document.getElementById("cloud-5");++ if (cloud4 && cloud5) {+ cloud4.animate(+ [+ { transform: "translateX(0) translateY(0)" },+ { transform: "translateX(-10px) translateY(5px)" },+ { transform: "translateX(10px) translateY(-5px)" },+ { transform: "translateX(0) translateY(0)" },+ ],+ {+ duration: 15000,+ iterations: Infinity,+ easing: "ease-in-out",+ }+ );++ cloud5.animate(+ [+ { transform: "translateX(0) translateY(0)" },+ { transform: "translateX(10px) translateY(-5px)" },+ { transform: "translateX(-10px) translateY(5px)" },+ { transform: "translateX(0) translateY(0)" },+ ],+ {+ duration: 18000,+ iterations: Infinity,+ easing: "ease-in-out",+ }+ );+ }+ };++ animateClouds();+ }, []);++ return (+ <>+ {/* Compact Hero Section */}+ <div className="relative mt-[60px] overflow-hidden bg-gradient-to-b from-blue-50/50 to-white">+ <div className="relative z-10 px-5 pt-12 pb-6 md:pt-16 md:pb-8 w-full">+ <div className="mx-auto text-center wrapper wrapper-sm max-w-3xl">+ <h1 className="fade-in-down text-[2rem] leading-[2.5rem] md:text-[2.75rem] md:leading-[3.25rem] relative z-10 text-black mb-4">+ {content.title}+ </h1>+ <p className="mx-auto mb-6 max-w-2xl text-md sm:text-lg text-zinc-600 fade-in-down animate-delay-1">+ {content.description}+ </p>+ </div>+ </div>++ {/* Simplified Background Elements */}+ <div className="absolute inset-0 z-0 overflow-hidden opacity-50">+ <LeftBlueHue />++ {/* Reduced number of clouds for cleaner look */}+ <motion.img+ style={{ mixBlendMode: "plus-lighter" }}+ initial={{ right: 100, top: 30, rotate: 180 }}+ animate={{ x: "-30vw" }}+ transition={{+ duration: 300,+ repeat: Infinity,+ repeatType: "reverse",+ ease: "linear",+ }}+ className="absolute w-full max-w-[400px] z-[5] select-none opacity-30"+ src="/illustrations/bottomcloud.webp"+ alt="Background cloud"+ />++ <motion.img+ style={{ mixBlendMode: "screen" }}+ animate={{ x: [0, "50vw"] }}+ transition={{+ duration: 200,+ repeat: Infinity,+ repeatType: "reverse",+ }}+ className="absolute top-[20px] left-[-60px] max-w-[300px] select-none z-[5] pointer-events-none opacity-30"+ src="/illustrations/smallcloudthree.webp"+ alt="Background cloud"+ />+ </div>++ {/** Right Blue Hue */}+ <div+ className="w-[500px] h-[300px] bg-gradient-to-l rounded-full blur-[80px]+ absolute top-10 z-[0] right-0 from-[#A6D7FF] to-transparent opacity-40"+ />+ </div>++ {/* Tool Container - Now positioned for visibility above the fold */}+ <div className="wrapper py-10 bg-white relative z-10">+ <div className="mx-auto max-w-4xl bg-white rounded-2xl shadow-lg p-6 md:p-8 border border-gray-100">+ {toolComponent}+ </div>+ </div>++ {/* Main Content - Features & FAQ */}+ <div className="wrapper py-16 bg-gradient-to-b from-white to-gray-50 relative z-10">+ {/* Features Section */}+ <div className="mb-20">+ <div className="text-center max-w-[800px] mx-auto mb-12">+ <h2 className="text-3xl font-bold text-gray-800 mb-5 relative inline-block">+ {content.featuresTitle}+ <span className="absolute -bottom-2 left-1/2 transform -translate-x-1/2 w-16 h-1 bg-blue-500 rounded-full"></span>+ </h2>+ <p className="text-lg text-gray-600 leading-relaxed">+ {renderHTML(content.featuresDescription)}+ </p>+ </div>+ <div className="grid grid-cols-1 md:grid-cols-3 gap-6">+ {content.features.map(+ (+ feature: { title: string; description: string },+ index: number+ ) => (+ <div+ key={index}+ className="p-6 bg-white rounded-xl shadow-sm hover:shadow-md transition-all duration-300 border border-gray-100 hover:border-blue-100"+ >+ <div className="bg-blue-50 w-10 h-10 flex items-center justify-center rounded-full mb-4">+ <span className="text-blue-500 text-lg font-bold">+ {index + 1}+ </span>+ </div>+ <h3 className="text-lg mb-3 text-gray-800 font-semibold">+ {feature.title}+ </h3>+ <p className="text-gray-600 leading-relaxed text-sm md:text-base">+ {renderHTML(feature.description)}+ </p>+ </div>+ )+ )}+ </div>+ </div>++ {/* FAQ Section */}+ {content.faqs && (+ <div className="mb-20">+ <div className="text-center max-w-[800px] mx-auto mb-12">+ <h2 className="text-3xl font-bold text-gray-800 mb-5 relative inline-block">+ Frequently Asked Questions+ <span className="absolute -bottom-2 left-1/2 transform -translate-x-1/2 w-16 h-1 bg-blue-500 rounded-full"></span>+ </h2>+ </div>+ <div className="mb-10 max-w-3xl mx-auto">+ {content.faqs.map(+ (faq: { question: string; answer: string }, index: number) => (+ <div+ key={index}+ className="my-4 p-5 bg-white rounded-xl shadow-sm hover:shadow-md transition-all duration-300 border border-gray-100"+ >+ <h2 className="text-lg text-gray-800 font-semibold mb-2">+ {faq.question}+ </h2>+ <div className="text-gray-600 leading-relaxed text-sm md:text-base">+ {renderHTML(faq.answer)}+ </div>+ </div>+ )+ )}+ </div>+ </div>+ )}++ {/* Clean CTA Section */}+ <div+ className="wrapper max-w-[900px] mx-auto rounded-2xl overflow-hidden relative flex flex-col justify-center p-8 md:p-10"+ style={{+ background:+ "linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #0ea5e9 100%)",+ }}+ >+ <div+ id="cloud-4"+ className="absolute top-0 -right-20 opacity-20 z-0 pointer-events-none transition-transform duration-700 ease-in-out"+ >+ <img+ className="max-w-[30vw] h-auto"+ src="/illustrations/cloud-1.png"+ alt="Footer Cloud"+ />+ </div>+ <div+ id="cloud-5"+ className="absolute bottom-0 left-0 opacity-20 z-0 pointer-events-none transition-transform duration-700 ease-in-out"+ >+ <img+ className="max-w-[30vw] h-auto"+ src="/illustrations/cloud-2.png"+ alt="Footer Cloud"+ />+ </div>+ <div className="wrapper mx-auto h-full flex flex-col justify-center items-center relative z-10">+ <div className="text-center max-w-[700px] mx-auto mb-6">+ <h2 className="text-2xl md:text-3xl font-bold text-white mb-3 drop-shadow-md">+ {content.cta.title}+ </h2>+ <p className="text-lg text-white/90 mb-5">+ {content.cta.description}+ </p>+ </div>+ <div className="flex flex-col sm:flex-row items-center justify-center space-y-3 sm:space-y-0 sm:space-x-4">+ <Button+ variant="white"+ href="/download"+ size="lg"+ className="w-full sm:w-auto transition-all duration-200 font-medium px-8"+ >+ {content.cta.buttonText}+ </Button>+ </div>+ </div>+ </div>+ </div>++ <style jsx global>{`+ @keyframes fade-in-down {+ 0% {+ opacity: 0;+ transform: translateY(-10px);+ }+ 100% {+ opacity: 1;+ transform: translateY(0);+ }+ }++ @keyframes fade-in-up {+ 0% {+ opacity: 0;+ transform: translateY(10px);+ }+ 100% {+ opacity: 1;+ transform: translateY(0);+ }+ }++ .fade-in-down {+ animation: fade-in-down 0.8s ease-out forwards;+ }++ .fade-in-up {+ animation: fade-in-up 0.8s ease-out forwards;+ }++ .animate-delay-1 {+ animation-delay: 0.1s;+ }++ .animate-delay-2 {+ animation-delay: 0.2s;+ }+ `}</style>+ </>+ );+};diff --git a/apps/web/components/tools/types.ts b/apps/web/components/tools/types.tsnew file mode 100644index 000000000..3d93913e4--- /dev/null+++ b/apps/web/components/tools/types.ts@@ -0,0 +1,19 @@+export interface ToolPageContent {+ title: string;+ description: string;+ featuresTitle: string;+ featuresDescription: string;+ features: {+ title: string;+ description: string;+ }[];+ faqs?: {+ question: string;+ answer: string;+ }[];+ cta: {+ title: string;+ description: string;+ buttonText: string;+ };+}\ No newline at end of filediff --git a/packages/ui/style/tailwind.config.js b/packages/ui/style/tailwind.config.jsindex e23fbd97f..2485c8455 100644--- a/packages/ui/style/tailwind.config.js+++ b/packages/ui/style/tailwind.config.js@@ -8,6 +8,14 @@ module.exports = function (app, options) {"../../packages/*/src/**/*.{ts,tsx,html,stories.tsx}",],theme: {+ screens: {+ 'xs': '480px',+ 'sm': '640px',+ 'md': '768px',+ 'lg': '1024px',+ 'xl': '1280px',+ '2xl': '1536px',+ },fontWeight: {thin: "300",hairline: "300",