feat: add video to monthly pricing

This commit is contained in:
Mauricio Siu 2024-11-10 16:13:02 -06:00
parent f458c31178
commit b4d4a64ace
2 changed files with 46 additions and 3 deletions

View File

@ -2,7 +2,14 @@
import clsx from "clsx"; import clsx from "clsx";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { ArrowRight, MinusIcon, PlusIcon } from "lucide-react"; import { IconInfoCircle } from "@tabler/icons-react";
import {
ArrowRight,
MinusIcon,
PlusCircleIcon,
PlusIcon,
X,
} from "lucide-react";
import { useTranslations } from "next-intl"; import { useTranslations } from "next-intl";
import Link from "next/link"; import Link from "next/link";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
@ -10,8 +17,15 @@ import { useState } from "react";
import { Container } from "./Container"; import { Container } from "./Container";
import { Badge } from "./ui/badge"; import { Badge } from "./ui/badge";
import { Button, buttonVariants } from "./ui/button"; import { Button, buttonVariants } from "./ui/button";
import HeroVideoDialog from "./ui/hero-video-dialog";
import { NumberInput } from "./ui/input"; import { NumberInput } from "./ui/input";
import { Tabs, TabsList, TabsTrigger } from "./ui/tabs"; import { Tabs, TabsList, TabsTrigger } from "./ui/tabs";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "./ui/tooltip";
function SwirlyDoodle(props: React.ComponentPropsWithoutRef<"svg">) { function SwirlyDoodle(props: React.ComponentPropsWithoutRef<"svg">) {
return ( return (
@ -74,6 +88,8 @@ export function Pricing() {
const [isAnnual, setIsAnnual] = useState(false); const [isAnnual, setIsAnnual] = useState(false);
const [serverQuantity, setServerQuantity] = useState(1); const [serverQuantity, setServerQuantity] = useState(1);
const featured = true; const featured = true;
const [openVideo, setOpenVideo] = useState(false);
return ( return (
<section <section
id="pricing" id="pricing"
@ -272,6 +288,33 @@ export function Pricing() {
serverQuantity, serverQuantity,
})} })}
</span> </span>
<TooltipProvider>
<Tooltip open={openVideo}>
<TooltipTrigger onClick={() => setOpenVideo(true)}>
<IconInfoCircle className="size-5 text-muted-foreground hover:text-primary transition-colors " />
</TooltipTrigger>
<TooltipContent className=" rounded-lg text-center w-[400px] z-[200] text-white font-semibold">
<div className="text-muted-foreground hover:text-primary transition-colors flex justify-end self-end w-full mb-2">
<X
onClick={() => setOpenVideo(false)}
className="text-muted-foreground hover:text-primary transition-colors flex self-end size-4 cursor-pointer"
/>
</div>
<p className="text-primary mb-2 text-left">
We Recommend to watch the video to understand the
benefits of Dokploy Cloud
</p>
<HeroVideoDialog
className="block w-full max-w-md rounded-xl z-20"
animationStyle="top-in-bottom-out"
videoSrc="https://www.youtube.com/embed/x2s_Y5ON-ms?si=i6gntgMmyPDLuPih"
thumbnailSrc="https://dokploy.com/banner.png"
thumbnailAlt="Hero Video"
/>
</TooltipContent>
</Tooltip>
</TooltipProvider>
</div> </div>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">

View File

@ -42,7 +42,7 @@ const grid = [
{ {
title: "GitHub Stars", title: "GitHub Stars",
description: description:
"With over 8.3k stars on GitHub, Dokploy is trusted by developers worldwide. Explore our repositories and join our community!", "With over 9.0k stars on GitHub, Dokploy is trusted by developers worldwide. Explore our repositories and join our community!",
icon: ( icon: (
<svg aria-hidden="true" className="h-6 w-6 fill-white"> <svg aria-hidden="true" className="h-6 w-6 fill-white">
<path d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844a9.59 9.59 0 0 1 2.504.337c1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.02 10.02 0 0 0 22 12.017C22 6.484 17.522 2 12 2Z" /> <path d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844a9.59 9.59 0 0 1 2.504.337c1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.02 10.02 0 0 0 22 12.017C22 6.484 17.522 2 12 2Z" />
@ -50,7 +50,7 @@ const grid = [
), ),
component: ( component: (
<p className="whitespace-pre-wrap text-2xl !font-semibold tracking-tighter mt-4"> <p className="whitespace-pre-wrap text-2xl !font-semibold tracking-tighter mt-4">
<NumberTicker value={8300} />+ <NumberTicker value={9000} />+
</p> </p>
), ),
}, },