Files
my-website-v2/frontend/islands/ProjectCard.tsx
Wyatt J. Miller 82cf30447b
Some checks failed
Build and Release Docker Images / build-and-push (./backend, public/Dockerfile, my-website-v2_public) (push) Failing after 21m47s
Build and Release Docker Images / build-and-push (./backend, task/Dockerfile, my-website-v2_task) (push) Failing after 23m39s
Build and Release Docker Images / build-and-push (./frontend, Dockerfile, my-website-v2_frontend) (push) Failing after 17m34s
Build and Release Docker Images / create-release (push) Has been skipped
added color accents to cards, underlines to subheaders
2025-07-31 22:45:23 -04:00

56 lines
1.6 KiB
TypeScript

export const ProjectCard = function ProjectCard(props: ProjectProps) {
return (
<div
class={`md:m-8 group space-y-1 rounded-md ${
props.wip ? "border-2" : "cursor-pointer"
} bg-[#44485b] px-3 py-2 m-4 shadow-md transition-all duration-300 ease-in-out border-b-4 border-b-[#94e2d5] hover:shadow-xl hover:scale-105`}
style={
props.wip
? {
borderTopStyle: "dashed",
borderRightStyle: "dashed",
borderLeftStyle: "dashed",
}
: {}
}
onClick={() => props.repo && open(props.repo, "_blank")}
>
<div class="flex items-center justify-between">
<h2 class="text-lg text-white font-black uppercase">
<a href={props.repo} target="_blank">
{props.title}
</a>
</h2>
<div class="bg-[#585b70] text-[#a6adc8] text-xs font-bold uppercase px-2.5 py-0.5 rounded-full">
{props.repo && (
<a
class="hover:underline"
href={props.repo}
target="_blank"
onClick={(e) => e.stopPropagation()}
>
Active
</a>
)}
{!props.repo && !props.wip && <span>Dead</span>}
{props.wip && <span>WIP</span>}
</div>
</div>
<p class="whitespace-pre-wrap italic font-light text-lg text-[#a6adc8]">
{props.summary}
</p>
<p class="whitespace-pre-wrap text-sm font-semibold text-[#a6adc8]">
{props.tech}
</p>
</div>
);
};
type ProjectProps = {
title: string;
repo?: string;
summary: string;
tech: string;
wip?: boolean;
};