Skip to content

Commit f096e56

Browse files
add reusable CofestProject.vue component
1 parent 95a4989 commit f096e56

2 files changed

Lines changed: 53 additions & 41 deletions

File tree

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script setup lang="ts">
22
import type { Project } from '@/utils/cofest-csv';
3-
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card';
4-
import { Badge } from '@/components/ui/badge';
3+
import CofestProject from '@/components/CofestProject.vue';
54
65
defineProps<{
76
projects: Project[];
@@ -20,45 +19,7 @@ defineProps<{
2019
No projects found yet — check back soon!
2120
</div>
2221
<div v-else class="gx-tile-grid not-prose">
23-
<Card v-for="p in projects" :key="p.project" class="gx-tile h-full border-galaxy-primary/10 py-0 gap-0">
24-
<CardHeader class="pt-4 pb-1">
25-
<CardTitle class="m-0 text-galaxy-dark text-base leading-tight">{{ p.project }}</CardTitle>
26-
</CardHeader>
27-
<CardContent class="flex flex-1 flex-col gap-2.5 pt-1 pb-4">
28-
<p v-if="p.description" class="text-sm text-galaxy-grey leading-relaxed">{{ p.description }}</p>
29-
<div v-if="p.lead" class="text-sm">
30-
<span class="text-galaxy-grey">Lead: </span>
31-
<span class="font-semibold text-galaxy-primary">{{ p.lead }}</span>
32-
</div>
33-
<div class="team-section">
34-
<span class="team-label">TEAM</span>
35-
<div v-if="p.assignees.length > 0" class="flex flex-wrap gap-1.5">
36-
<Badge v-for="name in p.assignees" :key="name" variant="default" class="text-xs font-normal">
37-
{{ name }}
38-
</Badge>
39-
</div>
40-
<p v-else class="text-xs text-galaxy-primary italic">✨ Open spot — come join this project!</p>
41-
</div>
42-
</CardContent>
43-
</Card>
22+
<CofestProject v-for="p in projects" :key="p.project" :project="p" />
4423
</div>
4524
</div>
4625
</template>
47-
48-
<style scoped>
49-
.team-section {
50-
margin-top: auto;
51-
padding-top: 0.45rem;
52-
border-top: 1px solid color-mix(in srgb, var(--color-galaxy-primary, #25537b) 12%, transparent);
53-
display: flex;
54-
flex-direction: column;
55-
gap: 0.35rem;
56-
}
57-
58-
.team-label {
59-
font-size: 0.7rem;
60-
font-weight: 700;
61-
letter-spacing: 0.08em;
62-
color: var(--color-galaxy-grey, #6b7280);
63-
}
64-
</style>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<script setup lang="ts">
2+
import type { Project } from '@/utils/cofest-csv';
3+
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card';
4+
import { Badge } from '@/components/ui/badge';
5+
6+
defineProps<{
7+
project: Project;
8+
}>();
9+
</script>
10+
11+
<template>
12+
<Card class="gx-tile h-full border-galaxy-primary/10 py-0 gap-0">
13+
<CardHeader class="pt-4 pb-1">
14+
<CardTitle class="m-0 text-galaxy-dark text-base leading-tight">{{ project.project }}</CardTitle>
15+
</CardHeader>
16+
<CardContent class="flex flex-1 flex-col gap-2.5 pt-1 pb-4">
17+
<p v-if="project.description" class="text-sm text-galaxy-grey leading-relaxed">{{ project.description }}</p>
18+
<div v-if="project.lead" class="text-sm">
19+
<span class="text-galaxy-grey">Lead: </span>
20+
<span class="font-semibold text-galaxy-primary">{{ project.lead }}</span>
21+
</div>
22+
<div class="team-section">
23+
<span class="team-label">TEAM</span>
24+
<div v-if="project.assignees.length > 0" class="flex flex-wrap gap-1.5">
25+
<Badge v-for="name in project.assignees" :key="name" variant="default" class="text-xs font-normal">
26+
{{ name }}
27+
</Badge>
28+
</div>
29+
<p v-else class="text-xs text-galaxy-primary italic">✨ Open spot — come join this project!</p>
30+
</div>
31+
</CardContent>
32+
</Card>
33+
</template>
34+
35+
<style scoped>
36+
.team-section {
37+
margin-top: auto;
38+
padding-top: 0.45rem;
39+
border-top: 1px solid color-mix(in srgb, var(--color-galaxy-primary, #25537b) 12%, transparent);
40+
display: flex;
41+
flex-direction: column;
42+
gap: 0.35rem;
43+
}
44+
45+
.team-label {
46+
font-size: 0.7rem;
47+
font-weight: 700;
48+
letter-spacing: 0.08em;
49+
color: var(--color-galaxy-grey, #6b7280);
50+
}
51+
</style>

0 commit comments

Comments
 (0)