Skip to content

Commit c0994d2

Browse files
committed
feat: add hero section and make responsive
1 parent 4beac6b commit c0994d2

File tree

5 files changed

+59
-5
lines changed

5 files changed

+59
-5
lines changed

src/assets/Astronaut-herosection.png

40.8 KB
Loading

src/components/navigation/LandingPageNavbar.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,24 @@ export function LandingPageNavbar({}: LandingPageNavbarProps) {
77
const isLoading = useRouterState({ select: (s) => s.status === "pending" });
88

99
return (
10-
<header className="sticky top-0 z-30 flex w-full flex-col items-center justify-between bg-base-200/520">
11-
<nav className="flex h-full w-full items-center justify-between gap-5 px-5 p-2">
10+
<header className="bg-base-200/520 sticky top-0 z-30 flex w-full flex-col items-center justify-between">
11+
<nav className="flex h-full w-full items-center justify-between gap-5 p-2 px-5">
1212
<Link to="/" className="btn btn-link btn-sm">
1313
<img src="/colabs.png" alt="logo" className="h-8 w-fit" />
1414
</Link>
1515
<div className="flex items-center gap-5">
16-
<Link to="/auth" search={{ returnTo: "/dashboard" }} className="btn btn-sm">
16+
<Link
17+
to="/auth"
18+
search={{ returnTo: "/dashboard" }}
19+
className="btn btn-sm"
20+
>
1721
Login
1822
</Link>
19-
<Link to="/auth/signup" search={{ returnTo: "/dashboard" }} className="btn btn-primary btn-sm">
23+
<Link
24+
to="/auth/signup"
25+
search={{ returnTo: "/dashboard" }}
26+
className="btn btn-primary btn-sm"
27+
>
2028
Sign up
2129
</Link>
2230
</div>

src/routes/-components/FooterCTA.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const FooterCTA = () => {
99
className="relative flex flex-col items-center gap-4 p-4 md:gap-10 md:p-10 lg:flex lg:flex-row lg:pl-[20%]"
1010
>
1111
<div className="z-10 lg:flex lg:w-1/2 lg:flex-col lg:gap-6">
12-
<p className="text-[32px] font-bold text-white lg:text-[55px] lg:leading-[60.5px]">
12+
<p className="text-[32px] font-bold text-heading lg:text-[55px] lg:leading-[60.5px]">
1313
Experience counts. Get it on Colabs.
1414
</p>
1515
<p className="font-ff-inconsolata text-lg font-bold leading-6 text-[#9f9c9c] lg:text-xl">
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import astronaut from "../../assets/Astronaut-herosection.png";
2+
import rocketIcon from "../../assets/rocket.png";
3+
import { Link } from "@tanstack/react-router";
4+
5+
export const HeroSection = () => {
6+
return (
7+
<div
8+
data-test="HeroSection"
9+
className="flex flex-col items-center gap-4 p-4 md:gap-1 md:p-4 lg:flex lg:flex-row lg:justify-around"
10+
>
11+
<div className="lg:flex-0 p-4 lg:flex lg:w-1/2 lg:flex-col lg:gap-6">
12+
<h1 className="pb-2 text-[25px] font-bold text-heading md:text-[30px] lg:text-[55px] lg:leading-[60.5px]">
13+
Making open-source contribution fun again
14+
</h1>
15+
<p className="font-ff-inconsolata text-lg font-bold leading-6 text-brand-gray-8 lg:text-xl">
16+
Open-source is the fastest way to get the job experience you need.
17+
Colabs is the platform that makes open-source contribution fun and
18+
competitive.
19+
</p>
20+
<div className="mt-5 flex flex-col gap-2 md:flex-row md:justify-around lg:justify-start lg:gap-4">
21+
<Link
22+
to="/auth/signup"
23+
search={{ returnTo: "/dashboard" }}
24+
className="btn bg-brand-green-6 px-4 py-2 text-white md:w-[40%] lg:w-auto lg:text-lg"
25+
>
26+
Join Colabs
27+
</Link>
28+
<Link
29+
to="/dashboard/hackathons"
30+
className="btn bg-brand-green-8 px-4 py-2 text-brand-green-7 outline outline-1 outline-brand-green-8 md:w-[40%] lg:w-auto lg:text-lg"
31+
>
32+
Launch a Hackathon <img src={rocketIcon} alt="Rocket icon" />
33+
</Link>
34+
</div>
35+
</div>
36+
37+
<img
38+
src={astronaut}
39+
alt="Standing robot"
40+
className="mt-4 md:mt-6 lg:h-auto lg:max-w-[30%] lg:flex-1 lg:items-center lg:justify-center lg:object-contain"
41+
/>
42+
</div>
43+
);
44+
};

src/routes/-components/HomePage.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { LandingPageNavbar } from "@/components/navigation/LandingPageNavbar";
2+
import { HeroSection } from "./HeroSection";
23
import { Link } from "@tanstack/react-router";
34
import RepositoriesSection from "./RepositoriesSection";
45

@@ -12,6 +13,7 @@ export function HomePage() {
1213
<div className="flex h-full min-h-screen w-full flex-col">
1314
<LandingPageNavbar />
1415
<div className="flex h-full min-h-screen w-full flex-col items-center justify-center gap-3 font-ff-poppins">
16+
<HeroSection />
1517
{/* landing page goes here */}
1618
<p className="rounded-2xl border border-primary p-5 text-3xl">
1719
Landing page goes here

0 commit comments

Comments
 (0)