Skip to content

Commit f5fa704

Browse files
committed
Added hero section ✌🏾
1 parent 000fb83 commit f5fa704

File tree

7 files changed

+1987
-1564
lines changed

7 files changed

+1987
-1564
lines changed

app/(marketing)/page.tsx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { Button, H1 } from "@/packages/ui";
2+
import Link from "next/link";
3+
4+
export default function Home() {
5+
return (
6+
<main>
7+
<section className="max-w-5xl mx-auto mt-36 px-4 text-center">
8+
<H1>Make your projects</H1>
9+
<H1 className="text-outlined">stand out!</H1>
10+
11+
<p className="text-lg text-gray-600 mb-8 mt-4 max-w-2xl mx-auto">
12+
Retro styled component library for modern web apps. Comes with 20+
13+
free UI components that you can just copy paste into your projects.{" "}
14+
<br /> Now available for both HTML and React!
15+
</p>
16+
17+
<div className="max-w-md grid gap-4 mx-auto grid-cols-2">
18+
<Link href="/components" passHref>
19+
<Button className="w-full" aria-label="Get Started with RetroUI">
20+
Get Started
21+
</Button>
22+
</Link>
23+
<Link href="/components" passHref>
24+
<Button
25+
className="w-full"
26+
variant="outline"
27+
aria-label="Get Started with RetroUI"
28+
>
29+
Browse Components
30+
</Button>
31+
</Link>
32+
</div>
33+
</section>
34+
</main>
35+
);
36+
}

app/page.tsx renamed to app/demo.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export default function page() {
2525
<div className="space-y-8 mt-12">
2626
<div>
2727
<H3>Typography</H3>
28-
2928
<H1>This is H1</H1>
3029
<H2>This is H2</H2>
3130
<H3>This is H3</H3>

app/global.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
@tailwind base;
22
@tailwind components;
3-
@tailwind utilities;
3+
@tailwind utilities;
4+
5+
.text-outlined {
6+
@apply relative text-primary-400 font-bold;
7+
letter-spacing: 2px;
8+
text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000; /* Black outline */
9+
}

packages/ui/Buttons/Button.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,32 @@ import React, { ButtonHTMLAttributes } from "react";
33
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
44
size?: "sm" | "md" | "lg";
55
className?: string;
6+
variant?: "primary" | "outline" | "link";
67
}
78

89
export function Button({
910
children,
1011
size = "md",
1112
className = "",
13+
variant = "primary",
1214
...props
1315
}: ButtonProps) {
1416
const sizeClasses = {
15-
sm: "px-4 py-1 text-sm",
16-
md: "px-6 py-2 text-base",
17-
lg: "px-8 py-3 text-lg",
17+
sm: "px-2 py-1 text-sm",
18+
md: "px-4 py-2 text-base",
19+
lg: "px-6 py-3 text-lg",
20+
};
21+
22+
const variantClasses = {
23+
primary:
24+
"bg-primary-400 text-black border-2 border-black hover:bg-primary-500",
25+
outline: "bg-transparent text-black border-2 border-black",
26+
link: "bg-transparent text-primary-400 hover:underline",
1827
};
1928

2029
return (
2130
<button
22-
className={`font-head bg-primary-400 text-primary-foreground border-2 border-black shadow-md hover:shadow-xs transition-all ${sizeClasses[size]} ${className}`}
31+
className={`border-2 border-black shadow-md hover:shadow-xs transition-all ${sizeClasses[size]} ${variantClasses[variant]} ${className}`}
2332
{...props}
2433
>
2534
{children}

packages/ui/Typography/H1.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
import React, { ReactNode } from "react";
1+
import React, { HTMLAttributes, ReactNode } from "react";
22

3-
export function H1({ children }: { children: ReactNode }) {
4-
return <h1 className="font-head text-6xl font-bold">{children}</h1>;
3+
interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
4+
className?: string;
5+
}
6+
7+
export function H1({ children, className }: HeadingProps) {
8+
return (
9+
<h1 className={`font-head text-6xl font-bold ${className}`}>{children}</h1>
10+
);
511
}

0 commit comments

Comments
 (0)