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

Feature/arohanrachel/our impact #16

Merged
merged 7 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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 added frontend/public/Newsletter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/impact_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/testimonials.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions frontend/src/app/BackgroundHeader.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import Image from "next/image";
import React from "react";
import "./backgroundheader.css";

/*const styleObj = { color: "white" };*/

type bgProps = {
imageUrl: string;
};

const BackgroundHeader: React.FC<bgProps> = ({ imageUrl }) => {
return (
<div className="background-container">
<Image
src={imageUrl}
alt="Background image"
layout="fill"
objectFit="cover"
className="background-image"
priority
/>

<div
className="bg-text-container" /*className="absolute bottom-20 left-20 w-1/2 h-full flex flex-col items-start justify-center ml-20"*/
>
<h1 className="bg-title" /*className="text-white text-4xl py-10 font-bold"*/>Our Impact</h1>
<p className="bg-para" /*style={styleObj}*/>
4FLOT is committed in preventing and ending homelessness, hunger and disparity in
underprivileged communities.
</p>
</div>
</div>
);
};

export default BackgroundHeader;
52 changes: 52 additions & 0 deletions frontend/src/app/WhiteCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// WhiteCard.tsx
import Image from "next/image";
import React from "react";
import "./white-card.css"; // Import the CSS file for the white cards

type WhiteCardProps = {
title: string;
description: string;
verticalPosition: string; // Accepts a percentage value for vertical position
imageUrl: string;
};

const WhiteCard: React.FC<WhiteCardProps> = ({
title,
description,
imageUrl,
verticalPosition,
}) => {
const cardStyle = {
width: "71.875%", // 1035px / 1440px
height: "28.19vw", // 418px / 2184px
top: verticalPosition,
left: "14%", // 203px / 1440px
// padding: "3.3333%", // 53px / 1440px
// borderRadius: "0.7292%", // 10px / 1440px
// gap: "1.4815%", // 32px / 2184px
};

return (
<div className="white-card-container" style={cardStyle}>
<div className="data-container">
<div className="card-image-container">
<Image
src={imageUrl}
alt="Card image"
layout="fill"
objectFit="cover"
className="card-image"
priority
/>
</div>
<h2 className="card-title">{title}</h2>
<p className="card-description">{description}</p>
</div>
<div className="button-container">
<button className="button-text">Learn more</button>
</div>
</div>
);
};

export default WhiteCard;
53 changes: 53 additions & 0 deletions frontend/src/app/backgroundheader.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/* styles.css */

.background-container {
max-width: 100%;
background-color: #484848;
/*top: 7.43vw;*/
position: relative;
width: 100vw;
height: 47.7vw; /* Adjust the height as needed */
overflow: hidden;
}

.background-image {
position: relative;
width: 100%;
/*height: 100%;*/
object-fit: cover;
opacity: 40%;
/* top: 107px;
left: 1440px; */
/* transform: rotate(-180deg); */
/* opacity: 0.4; */
}

.bg-text-container {
opacity: 100%;
position: absolute;
display: flex;
width: 53.61vw;
height: 9.305vw;
margin-top: 16.111vw;
margin-left: 6.6667vw;
flex-direction: column;
gap: 0.97222vw;
}

.bg-title {
color: white;
font-size: 3.3333vw;
font-weight: 700;
/*font-family: "Roboto Slab";*/
letter-spacing: 2%;
overflow: hidden;
}

.bg-para {
color: white;
font-size: 1.388889vw;
font-weight: 400;
/*font-family: "Open Sans";*/
max-width: 46.38889vw;
overflow: hidden;
}
4 changes: 2 additions & 2 deletions frontend/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
}
}

body {
/*body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb)))
rgb(var(--background-start-rgb));
}
}*/
128 changes: 20 additions & 108 deletions frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,113 +1,25 @@
import Image from "next/image";
import React from "react";

export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center justify-between p-24">
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
Get started by editing&nbsp;
<code className="font-mono font-bold">src/app/page.tsx</code>
</p>
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
<a
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
By{" "}
<Image
src="/vercel.svg"
alt="Vercel Logo"
className="dark:invert"
width={100}
height={24}
priority
/>
</a>
</div>
</div>

<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
<Image
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
src="/next.svg"
alt="Next.js Logo"
width={180}
height={37}
priority
/>
</div>

<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left">
<a
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Find in-depth information about Next.js features and API.
</p>
</a>
import BackgroundHeader from "./BackgroundHeader";
import WhiteCard from "./WhiteCard";

<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>

<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Explore starter templates for Next.js.
</p>
</a>

<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
</div>
export default function Impact() {
return (
<main style={{ backgroundColor: "#F9F9F9" }}>
<BackgroundHeader imageUrl="/impact_bg.png" />
{/* White Cards */}
<WhiteCard
imageUrl="/testimonials.png"
title="Testimonals"
description="Lorem ipsum dolor sit amet consectetur. Et vestibulum enim nunc ultrices. Donec blandit sollicitudin vitae integer mauris sed. Mattis duis id viverra suscipit morbi."
verticalPosition="38.68vw"
/>
<WhiteCard
imageUrl="/Newsletter.png"
title="Newsletter"
description="Your support and contributions will enable us to meet our goals and improve conditions. Your generous donation will fund our mission."
verticalPosition="71.04vw"
/>
</main>
);
}
97 changes: 97 additions & 0 deletions frontend/src/app/white-card.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/* white-card.css */

/* white-card.css */

.white-card-container {
width: 71.875%; /* 1035px / 1440px */
height: 30vw; /*18.6%; /* (418, 394)px / 2184px */
background-color: white;
position: absolute;
/*top: 15.4116%; /* Adjust as needed */
left: 6.6667%; /* Adjust as needed */
border-radius: 10px; /* Adjust as needed */
padding-top: 3.68vw; /* Adjust as needed */
padding-bottom: 3.68vw;
padding-left: 17.43vw;
padding-right: 17.43vw;
gap: 2.22vw;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
box-sizing: border-box; /* Include padding in the total width and height */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.data-container {
position: relative;
width: 37.014vw;
height: 16.111vw;
gap: 0.833vw;
justify-content: center;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}

.card-title {
position: relative;
width: 13.6111vw; /* 196px / 1440px */
height: 3.333vw; /* 48px / 2184px */
font-family: "Roboto Slab", sans-serif;
font-size: 2.22222vw; /* 32px / 1440px */
font-weight: 700;
/*line-height: 2.1991%; /* 48px / 2184px */
letter-spacing: 0.02em;
/*margin-top: 1rem;*/
text-align: center;
/*margin-bottom: 10px; /* Adjust as needed */
/*max-height: 18.75vh;*/
color: #000000;
justify-content: center;
overflow: hidden;
}
.card-image-container {
position: relative;
width: 6.11vw;
height: 6.11vw;
overflow: hidden;
}

.card-description {
font-size: 1.1111111vw; /* Adjust as needed */
color: #000000;
max-width: 37.01vw; /* Width limit for the text */
max-height: 5vw; /* Height limit for the text */
display: flex; /* Enable flexbox for vertical centering */
flex-direction: column; /* Arrange the text content in a column */
justify-content: center; /* Center the text vertically */
align-items: center; /* Center the text horizontally */
text-align: center;
/*margin-top: 3vh; /* 3% of the viewport height */
/*max-height: 7.8vh;*/
overflow: hidden;
}

.card-image {
width: 100%;
height: 100%;
object-fit: cover;
}

.button-container {
width: 11.59vw;
height: 3.333vw;
background-color: #694c97;
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px;
}

.button-text {
color: white;
font-size: 14px;
font-weight: 600;
}
Loading