Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #45 from brown-ccv/home-page
Browse files Browse the repository at this point in the history
Home page
  • Loading branch information
hetd54 authored Jun 6, 2024
2 parents 47073c5 + 5acae49 commit 5875878
Show file tree
Hide file tree
Showing 10 changed files with 641 additions and 5 deletions.
32 changes: 32 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@astrojs/tailwind": "^5.1.0",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-hover-card": "^1.0.7",
"@radix-ui/react-icons": "^1.3.0",
"@staticcms/core": "^4.1.2",
"@staticcms/proxy-server": "^4.0.4",
Expand Down
Binary file added public/images/udg.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions src/components/HoverCard.tsx
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
23 changes: 23 additions & 0 deletions src/components/svg/Circle.tsx
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
Loading

0 comments on commit 5875878

Please sign in to comment.