refactor: remove comments and make camel case text

This commit is contained in:
Mauricio Siu
2024-04-29 23:16:54 -06:00
parent d31a2879b2
commit a4d6bf2df3
7 changed files with 3 additions and 110 deletions

View File

@@ -1,59 +0,0 @@
import Link from "next/link";
import clsx from "clsx";
import { cn } from "@/lib/utils";
const baseStyles = {
solid:
"group inline-flex items-center justify-center rounded-full py-2 px-4 text-sm font-semibold focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2",
outline:
"group inline-flex ring-1 items-center justify-center rounded-full py-2 px-4 text-sm focus:outline-none",
};
const variantStyles = {
solid: {
slate:
"bg-slate-900 text-white hover:bg-slate-700 hover:text-slate-100 active:bg-slate-800 active:text-slate-300 focus-visible:outline-slate-900",
blue: "bg-blue-600 text-white hover:text-slate-100 hover:bg-blue-500 active:bg-blue-800 active:text-blue-100 focus-visible:outline-blue-600",
white:
"bg-white text-slate-900 hover:bg-blue-50 active:bg-blue-200 active:text-slate-600 focus-visible:outline-white",
},
outline: {
slate:
"ring-slate-200 text-slate-700 hover:text-slate-900 hover:ring-slate-300 active:bg-slate-100 active:text-slate-600 focus-visible:outline-blue-600 focus-visible:ring-slate-300",
white:
"ring-slate-700 text-white hover:ring-slate-500 active:ring-slate-700 active:text-slate-400 focus-visible:outline-white",
},
};
type VariantKey = keyof typeof variantStyles;
type ColorKey<Variant extends VariantKey> =
keyof (typeof variantStyles)[Variant];
type ButtonProps<
Variant extends VariantKey,
Color extends ColorKey<Variant>,
> = {
variant?: Variant;
color?: Color;
} & (
| Omit<React.ComponentPropsWithoutRef<typeof Link>, "color">
| (Omit<React.ComponentPropsWithoutRef<"button">, "color"> & {
href?: undefined;
})
);
export function Button<
Color extends ColorKey<Variant>,
Variant extends VariantKey = "solid",
>({ variant, color, className, ...props }: ButtonProps<Variant, Color>) {
variant = variant ?? ("solid" as Variant);
color = color ?? ("slate" as Color);
className = cn(baseStyles[variant], variantStyles[variant][color], className);
return typeof props.href === "undefined" ? (
<button className={className} {...props} />
) : (
<Link className={className} {...props} />
);
}

View File

@@ -33,7 +33,7 @@ export function CallToAction() {
Unlock Your Deployment Potential
</h2>
<p className="mt-4 text-lg tracking-tight text-muted-foreground">
Streamline your deployments with our PAAS. Effortlessly manage
Streamline your deployments with our PaaS. Effortlessly manage
Docker containers and traffic with Traefik. Boost your
infrastructure's efficiency and security today
</p>

View File

@@ -19,7 +19,6 @@ export function Footer() {
<nav className="mt-10 text-sm" aria-label="quick links">
<div className="-my-1 flex justify-center gap-6 flex-wrap">
<NavLink href="/#features">Features</NavLink>
{/* <NavLink href="/#testimonials">Testimonials</NavLink> */}
<NavLink href="/#faqs">Faqs</NavLink>
<NavLink
href="https://docs.dokploy.com/introduction"

File diff suppressed because one or more lines are too long

View File

@@ -1,16 +1,10 @@
"use client";
import { useEffect, useState } from "react";
import Image from "next/image";
import { Tab } from "@headlessui/react";
import { AnimatePresence, motion } from "framer-motion";
import { Container } from "./Container";
import backgroundImage from "@/images/background-features.jpg";
import screenshotExpenses from "@/images/screenshots/expenses.png";
import screenshotPayroll from "@/images/screenshots/payroll.png";
import screenshotReporting from "@/images/screenshots/reporting.png";
import screenshotVatReturns from "@/images/screenshots/vat-returns.png";
import { cn } from "@/lib/utils";
const features = [

View File

@@ -1,11 +1,4 @@
import Image from "next/image";
import { Container } from "./Container";
// import avatarImage1 from "@/images/avatars/avatar-1.png";
// import avatarImage2 from "@/images/avatars/avatar-2.png";
// import avatarImage3 from "@/images/avatars/avatar-3.png";
// import avatarImage4 from "@/images/avatars/avatar-4.png";
// import avatarImage5 from "@/images/avatars/avatar-5.png";
const testimonials = [
[