Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bun.lockb
Binary file not shown.
2 changes: 2 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Footer from "@/components/footer/footer";
import Header from "@/components/header";
import { Hero} from "@/components/hero";
import Image from "next/image";
Expand All @@ -7,6 +8,7 @@ export default function Home() {
<main className="h-screen ">
<Header />
<Hero />
<Footer />
</main>
);
}
11 changes: 9 additions & 2 deletions src/components/auth-button.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
"use client"

import { useRouter } from "next/navigation";

export const SignInButton = () => {
const router = useRouter()
return (
<button className="flex items-center gap-2 bg-white p-3 text-sm font-medium text-black shadow-sm group">
<button className="flex items-center gap-2 bg-white p-3 text-sm font-medium text-black shadow-sm group" onClick={() => router.push("/auth")}>
<span className="text-md font-bold font-mono ">Sign in</span>
</button>
);
};

export const SignUpButton = () => {
const router = useRouter();
return (
<button className="flex items-center gap-2 bg-neutral-900/80 border border-neutral-800 p-3 text-sm font-medium text-white shadow-sm">
<button
className="flex items-center gap-2 bg-neutral-900/80 border border-neutral-800 p-3 text-sm font-medium text-white shadow-sm"
onClick={() => router.push("/auth")}
>
<span className="text-md font-bold font-mono ">Get Started</span>
</button>
);
Expand Down
191 changes: 191 additions & 0 deletions src/components/footer/footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
"use client";

import Link from "next/link";
import { Github, Moon, Sun } from "lucide-react";
import { SignInButton } from "../auth-button";
import { SquareSwitch } from "../ui/square-switch";
import { useEffect, useState } from "react";

export default function Footer() {
const [theme, setTheme] = useState("dark");

useEffect(() => {
document.documentElement.classList.toggle("dark", theme === "dark");
}, [theme]);

const toggleTheme = () => {
setTheme((prevTheme:any) => (prevTheme === "dark" ? "light" : "dark")); //implicity type is any here :)
};
return (
<footer className="w-full bg-black text-white py-16">
<div className="container mx-auto px-4">
<div className="grid grid-cols-1 md:grid-cols-4 gap-12">
<div className="space-y-4">
<h3 className="text-lg font-semibold">Product</h3>
<ul className="space-y-2">
<li>
<Link
href="#feature"
className="text-gray-400 hover:text-white transition-colors"
>
Features
</Link>
</li>
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Pricing
</Link>
</li>
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Browser Extension
</Link>
</li>
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Mobile App
</Link>
</li>
</ul>
</div>
<div className="space-y-4">
<h3 className="text-lg font-semibold">Resources</h3>
<ul className="space-y-2">
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Documentation
</Link>
</li>
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
API
</Link>
</li>
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Guides
</Link>
</li>
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Support
</Link>
</li>
</ul>
</div>
<div className="space-y-4">
<h3 className="text-lg font-semibold">Company</h3>
<ul className="space-y-2">
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
About
</Link>
</li>
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Blog
</Link>
</li>
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Careers
</Link>
</li>
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Press
</Link>
</li>
</ul>
</div>
<div className="space-y-4">
<h3 className="text-lg font-semibold">Legal</h3>
<ul className="space-y-2">
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Privacy Policy
</Link>
</li>
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Terms of Service
</Link>
</li>
<li>
<Link
href="#"
className="text-gray-400 hover:text-white transition-colors"
>
Cookie Policy
</Link>
</li>
</ul>
</div>
</div>

{/* Bottom Section */}
<div className="mt-16 pt-8 border-t border-gray-800 flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0">
<div className="flex items-center space-x-4">
<span className="text-gray-400">&copy; 2024 Pinsphere.ai</span>
<Link
href="https://github.com/wtfdivyansh/bm"
className="text-gray-400 hover:text-white transition-colors"
>
<Github className="h-5 w-5" />
</Link>
</div>
<div className="flex space-x-4">
<div className="flex items-center space-x-2">
<Sun className="h-4 w-4 text-gray-400" />
<SquareSwitch
checked={theme === "dark"}
onCheckedChange={toggleTheme}
/>
<Moon className="h-4 w-4 text-gray-400" />
</div>
<SignInButton />
</div>
</div>
</div>
</footer>
);
}
1 change: 0 additions & 1 deletion src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default function Header() {
</div>
<div className="">
<div className="flex sm:gap-2 gap-1 items-center ">
<ModeToggle />
<SignInButton />
<SignUpButton />
</div>
Expand Down
29 changes: 29 additions & 0 deletions src/components/ui/square-switch.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"use client";

import * as React from "react";
import * as SwitchPrimitives from "@radix-ui/react-switch";

import { cn } from "@/lib/utils";

const SquareSwitch = React.forwardRef<
React.ElementRef<typeof SwitchPrimitives.Root>,
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
>(({ className, ...props }, ref) => (
<SwitchPrimitives.Root
className={cn(
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
className
)}
{...props}
ref={ref}
>
<SwitchPrimitives.Thumb
className={cn(
"pointer-events-none block h-5 w-5 bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
)}
/>
</SwitchPrimitives.Root>
));
SquareSwitch.displayName = SwitchPrimitives.Root.displayName;

export { SquareSwitch };