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

Add Philanthropy component #46

Merged
merged 11 commits into from
Jan 21, 2025
Merged

Add Philanthropy component #46

merged 11 commits into from
Jan 21, 2025

Conversation

Sdrabla
Copy link
Collaborator

@Sdrabla Sdrabla commented Jan 20, 2025

image

closes #31

@Sdrabla Sdrabla requested a review from stanleylew5 January 20, 2025 22:25
@Sdrabla Sdrabla self-assigned this Jan 20, 2025
@Sdrabla
Copy link
Collaborator Author

Sdrabla commented Jan 20, 2025

Also added background color in last commit

Copy link
Contributor

@stanleylew5 stanleylew5 left a comment

Choose a reason for hiding this comment

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

the code I've given you should be the basic frame of the entire component, no need to overcomplicate haha

className="absolute left-1/2"
style={{ transform: "translateY(5%) translateX(-50%)" }}
>
<img src={Image.src} alt="heart" className="h-3/4 w-3/4" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<img src={Image.src} alt="heart" className="h-3/4 w-3/4" />
<Image src={Image.src} alt="heart" className="h-3/4 w-3/4" />

Use image tag from next/image. you need to import it at the top like

Import Image from "next/Image" or something like this

@@ -0,0 +1,22 @@
import React from "react";
import Image from "@/public/about/heart.svg";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import Image from "@/public/about/heart.svg";
import Image from "@/public/about/heart.svg";

Rename this to something better than Image like Heart or something


const Philanthropy = () => {
return (
<div className="relative grid grid-cols-4 p-6">
Copy link
Contributor

Choose a reason for hiding this comment

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

grid is not needed here, try referencing the code here

<div className="flex justify-end">
      <div className="relative h-[12vh] w-[25vw] border-8 border-csa-gray-100 rounded-3xl flex items-center">
         ......
      </div>
</div>

you won't need justify-end since your component starts on the left side of the page but you'll need some margin left. and where the ... is you'll have to add the text and image.

@Sdrabla
Copy link
Collaborator Author

Sdrabla commented Jan 21, 2025

image

  • Im assuming its okay its half the length since that was the size in the reference code but I can change if it needs to be more like the figma

Comment on lines 13 to 16
className="right absolute"
style={{ transform: "translateY(5%) translateX(110%)" }}
>
<Image src={HeartImage} alt="heartImage" className="h-3/4 w-3/4" />
Copy link
Contributor

@stanleylew5 stanleylew5 Jan 21, 2025

Choose a reason for hiding this comment

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

you can just absolutely position the image itself like below and then modify its location using right and top -- you don't need the outer div surrounding the image

<Image src={HeartImage} alt="heartImage" className="w-7/12 absolute right-[-40%] top-[-90%]" />

@Sdrabla
Copy link
Collaborator Author

Sdrabla commented Jan 21, 2025

image

@stanleylew5 stanleylew5 merged commit c8feb6d into dev Jan 21, 2025
5 checks passed
@stanleylew5 stanleylew5 deleted the sdrabla/Philanthropy branch January 21, 2025 23:52
Copy link
Contributor

@stanleylew5 stanleylew5 left a comment

Choose a reason for hiding this comment

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

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Philanthropy Component
2 participants