code-share/pages/index/+Page.tsx

51 lines
1.7 KiB
TypeScript
Raw Permalink Normal View History

2024-02-23 19:36:10 +07:00
import { Button } from "~/components/ui/button";
2024-02-22 12:14:58 +00:00
import type { Data } from "./+data";
import { useData } from "~/renderer/hooks";
import Link from "~/renderer/link";
2024-02-23 19:36:10 +07:00
import Footer from "~/components/containers/footer";
import ProjectCard from "~/components/containers/project-card";
2024-02-22 12:14:58 +00:00
const HomePage = () => {
2024-02-22 20:59:20 +00:00
const { projects } = useData<Data>();
2024-02-22 12:14:58 +00:00
return (
2024-02-23 19:36:10 +07:00
<>
<main>
<section className="container py-8 md:py-16 min-h-dvh md:min-h-[80vh] flex items-center justify-center flex-col text-center">
<h1 className="text-4xl md:text-5xl lg:text-6xl font-medium text-transparent bg-gradient-to-b from-gray-200 to-gray-100 bg-clip-text">
Create and Share Web Snippets
</h1>
<p className="text-lg mt-8 md:mt-12 text-gray-300">
Collaborate with Ease, Share with the World
</p>
2024-02-22 12:14:58 +00:00
2024-02-23 19:36:10 +07:00
<div className="flex flex-col sm:flex-row gap-3 items-center mt-8 md:mt-12">
<Button href="/get-started" size="lg">
Getting Started
</Button>
<Button href="#browse" size="lg" variant="outline">
Browse Projects
</Button>
</div>
</section>
<section id="browse" className="container max-w-5xl py-8 md:py-16">
<h2 className="text-4xl font-medium border-b pb-3 mb-8 border-white/20">
Community Projects
</h2>
<div className="grid sm:grid-cols-2 md:grid-cols-3 gap-3 md:gap-4">
{projects.map((project) => (
<ProjectCard key={project.id} project={project} />
2024-02-23 19:36:10 +07:00
))}
</div>
</section>
</main>
<Footer />
</>
2024-02-22 12:14:58 +00:00
);
};
export default HomePage;