blob: 4ffbd0a039b23d1bdd6830a3ea2533f3e5cc1594 [file] [log] [blame]
Samuel Shuert932ddda2024-10-12 14:13:49 -04001---
2
3import active from '../images/active.svg';
4import wip from '../images/wip.svg';
5import { Status } from './Project.astro';
6
7
8interface Props {
9 name: string,
10 url: string,
11 status: Status;
12}
13
14const { name, url, status } = Astro.props;
15
16let color: string;
17let icon: string;
18
19switch (status) {
20 case Status.Active: {
21 color = "bg-green";
22 icon = active.src;
23 break;
24 }
25 default:
26 case Status.Inactive:
27 case Status.WIP: {
28 color = "bg-yellow";
29 icon = wip.src;
30 break;
31 }
32}
33---
34
35<a href={url} class="w-max h-fit flex flex-col rounded-lg p-2 m-2 bg-surface0 shadow-md shadow-crust transition-transform hover:bg-surface1 hover:drop-shadow-md hover:-translate-y-1">
36 <div class="flex justify-between mr-1 mb-1 items-end gap-2">
37 <p class="text-text text-lg">{name}</p>
38 <img src={icon} alt="cross" class="h-8 self-start"/>
39 </div>
40</a>