-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
91 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,70 @@ | ||
import * as Dialog from "@radix-ui/react-dialog"; | ||
import { SocialIcon } from "react-social-icons"; | ||
import Image from "next/image"; | ||
|
||
|
||
import ProfileModal from "./ProfileModal"; | ||
import { Executive } from "./ExecProfiles"; | ||
|
||
|
||
export default function ExecProfile(exec: Executive) { | ||
|
||
|
||
interface ExecProfileProps | ||
{ | ||
ID: string; | ||
|
||
Name: string; | ||
|
||
ImageBuffer: string; | ||
|
||
Position: Array<string>; | ||
|
||
Description: string; | ||
} | ||
|
||
export default function ExecProfile({ID, Name, ImageBuffer, Position, Description} : ExecProfileProps) | ||
{ | ||
|
||
|
||
/* | ||
Anderson's thoughts: | ||
This entire component is black magic. | ||
*/ | ||
return ( | ||
<div className="flex flex-col items-center gap-3 max-w-[200px]"> | ||
<div className="flex flex-col items-center text-center"> | ||
<div className="flex" style={{ justifyContent: "center"}}> | ||
<div className="flex" style={{ justifyContent: "center" }}> | ||
<div> | ||
<Dialog.Root> | ||
<Dialog.Trigger className='font-bold flex flex-col items-center'> | ||
|
||
<Image src={ImageBuffer} width={200} height={200} alt={Name} style={{ borderRadius: "100%", height: 200, width: 200 }} className={`w-[${200}px] h-[${200}px] aspect-square rounded-2xl object-cover transition duration-300 ease-in-out hover:scale-105 `}/> | ||
<div>{Name}</div> | ||
|
||
<Dialog.Trigger className="flex flex-col items-center"> | ||
<Image | ||
src={exec.profile_picture ? `https://${exec.profile_picture}` : "/blank_profile.jpg"} | ||
width={200} | ||
height={200} | ||
alt={exec.name} | ||
style={{ borderRadius: "100%", height: 200, width: 200 }} | ||
className="w-[200px] h-[200px] aspect-square rounded-2xl object-cover transition duration-500 ease-in-out hover:scale-105 hover:border-4 border-dashed border-0 border-lang-orange" | ||
/> | ||
|
||
<div className="font-bold">{exec.name}</div> | ||
<p className="text-gray-300">{exec.roles.join(" & ")}</p> | ||
|
||
<div className="flex gap-2"> | ||
{Object.entries(exec.social_media_links).map(([platform, url]) => ( | ||
<SocialIcon | ||
key={url} | ||
url={url} | ||
fgColor="white" | ||
bgColor="#171717" | ||
style={{ height: 40, width: 40 }} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="transition duration-300 transform hover:scale-125" | ||
/> | ||
))} | ||
</div> | ||
</Dialog.Trigger> | ||
<Dialog.Portal> | ||
<Dialog.Overlay className="fixed inset-0 bg-black/60"> | ||
<Dialog.Content className="fixed top-1/4 left-1/2 -translate-x-1/2 p-8" style={{ border: "2px solid #F15A22", backgroundColor: "#171717" }}> | ||
<ProfileModal | ||
ID={ID} | ||
Name={Name} | ||
Position={Position.join(" & ")} | ||
ImageBuffer={ImageBuffer} | ||
Description={Description} | ||
imageWidth={200} /> | ||
{/* FRANKLY THIS IS AWFUL */} | ||
<Dialog.Content | ||
className="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[80vw] md:w-fit p-2 md:p-8 overflow-scroll" | ||
style={{ border: "2px solid #F15A22", backgroundColor: "#171717" }} | ||
> | ||
<ProfileModal {...exec} /> | ||
</Dialog.Content> | ||
</Dialog.Overlay> | ||
</Dialog.Portal> | ||
</Dialog.Root> | ||
<p>{Position.join(" & ")}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div>); | ||
} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters