Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create frontend design for hero #17

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
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
26 changes: 26 additions & 0 deletions src/app/components/Hero.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import Image from "next/image";
import styles from "../styles/hero.module.css";

export default function Hero() {
return (
<div className={styles.parent}>
<Image
src=''
alt='image'
className={styles['landing-image']}
/>
<h2 className={styles.title}>
What is Paso Food Co-op?
</h2>
<p className={styles.description}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sed vestibulum, velit vitae sagittis ullamcorper, dui metus tristique neque, id ultricies risus est vitae velit.
Integer euismod venenatis malesuada.
</p>
<div className={styles['actions-container']}>
<button>JOIN NOW</button>
<button>LEARN MORE</button>
</div>
</div>
);
}
3 changes: 3 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
margin: 0px;
}
5 changes: 5 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<head>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap" rel="stylesheet" />
</head>
<body>{children}</body>
</html>
);
Expand Down
2 changes: 2 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import Hero from "@components/Hero";
import Navbar from "@components/Navbar";

export default function Home() {
return (
<main>
<Navbar />
<h1>Paso Home</h1>
<Hero />
</main>
);
}
48 changes: 48 additions & 0 deletions src/app/styles/hero.module.css
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on simulating the hero components.
For styling, let's switch to using the Tailwind library instead.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.parent {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-wrap: wrap;
font-family: "Inter"
}

.landing-image {
background-color: #F5F5F5;
min-height: 300px;
width: 100%;
}

.title {
font-weight: bold;
font-size: 30px;
margin-top: 35px;
margin-bottom: 0;
text-align: center;
}

.description {
margin-top: 10px;
padding: 0px 5%;
font-size: 18px;
max-width: 800px;
font-weight: 600;
}

.actions-container {
display: flex;
flex-wrap: wrap;
gap: 50px;
justify-content: space-evenly;
}

.actions-container button {
background-color: #A8A6A6;
border-radius: 5px;
border: none;
padding: 10px 35px;
box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.25);
font-weight: bold;
font-size: 28px;
cursor: pointer;
}