-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into download-files
- Loading branch information
Showing
28 changed files
with
841 additions
and
31 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React from "react" | ||
|
||
interface CardProps { | ||
position: number | ||
image?: string | ||
title: string | ||
name: string | ||
address?: string | ||
phone?: string | ||
email?: string | ||
} | ||
|
||
const Card: React.FC<CardProps> = ({ position, image, title, name, address, phone, email }) => { | ||
// strip 'public/' from the avatar string since astro's public folder is available without this in the link | ||
const link = image?.replace("/public", "") | ||
return ( | ||
<div | ||
className={`flex flex-row items-center ${ | ||
position % 2 ? "md:flex-row-reverse md:text-right" : "" | ||
}`} | ||
> | ||
{image && ( | ||
<div> | ||
<img | ||
className="object-cover rounded-full w-64 h-64 min-w-64 min-h-64 hidden md:block" | ||
src={link} | ||
alt={name} | ||
/> | ||
</div> | ||
)} | ||
<div className="px-8"> | ||
<div> | ||
<p className="text-xl font-semibold">{name}</p> | ||
<p className="italic">{title}</p> | ||
</div> | ||
<div> | ||
{address && <p className="text-base">{address}</p>} | ||
{phone && <p className="text-base">{phone}</p>} | ||
{email && ( | ||
<a className="text-base hover:text-neutral-300" href={`mailto:${email}`}> | ||
{email} | ||
</a> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Card |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
import Card from "./Card" | ||
const { color, title, people } = Astro.props | ||
interface PersonProps { | ||
data: { | ||
title: string | ||
name: string | ||
avatar?: string | ||
email?: string | ||
address?: string | ||
phone?: string | ||
} | ||
} | ||
--- | ||
|
||
<div class="flex flex-row items-start space-x-12"> | ||
<h2 class={`${color} [writing-mode:vertical-lr] rotate-180`}>{title}</h2> | ||
<div class="flex flex-col space-y-20 flex-1"> | ||
{ | ||
people.map((person: PersonProps, i: number) => { | ||
return ( | ||
<> | ||
<Card | ||
position={i} | ||
title={person.data.title} | ||
name={person.data.name} | ||
image={person.data.avatar} | ||
email={person.data.email} | ||
phone={person.data.phone} | ||
address={person.data.address} | ||
/> | ||
</> | ||
) | ||
}) | ||
} | ||
</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
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from "react" | ||
import * as HoverCard from "@radix-ui/react-hover-card" | ||
|
||
interface HoverCardItemProps { | ||
image?: string | ||
alt?: string | ||
title: string | ||
content: string | React.ReactNode | ||
footer?: string | React.ReactNode | ||
trigger: React.ReactNode | ||
} | ||
|
||
const HoverCardItem: React.FC<HoverCardItemProps> = ({ | ||
trigger, | ||
alt, | ||
title, | ||
content, | ||
footer, | ||
image, | ||
}) => { | ||
return ( | ||
<HoverCard.Root openDelay={2}> | ||
<HoverCard.Trigger asChild> | ||
<a className="cursor-pointer" rel="noreferrer noopener"> | ||
{trigger} | ||
</a> | ||
</HoverCard.Trigger> | ||
<HoverCard.Portal> | ||
<HoverCard.Content sideOffset={5}> | ||
<div className="bg-white p-5 rounded shadow flex flex-col gap-3.5"> | ||
{image && alt && <img className="w-14 h-14 rounded-full" src={image} alt={alt} />} | ||
<div className="flex flex-col gap-3.5"> | ||
<p className="font-semibold">{title}</p> | ||
<div>{content}</div> | ||
{footer && ( | ||
<div className="flex gap-3.5"> | ||
<p>{footer}</p> | ||
</div> | ||
)} | ||
</div> | ||
</div> | ||
<HoverCard.Arrow className="fill-white" /> | ||
</HoverCard.Content> | ||
</HoverCard.Portal> | ||
</HoverCard.Root> | ||
) | ||
} | ||
|
||
export default HoverCardItem |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from "react" | ||
|
||
interface CircleProps { | ||
styling: string | ||
} | ||
|
||
const CircleIcon: React.FC<CircleProps> = ({ styling }) => { | ||
return ( | ||
<> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="48" | ||
height="48" | ||
viewBox="0 0 24 24" | ||
className={styling} | ||
> | ||
<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"></path> | ||
</svg> | ||
</> | ||
) | ||
} | ||
|
||
export default CircleIcon |
Oops, something went wrong.