|
| 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 | + standalone?: boolean; |
| 9 | + postEvent?: boolean; |
| 10 | + hasOutcomes?: boolean; |
| 11 | +}>(); |
| 12 | +</script> |
| 13 | + |
| 14 | +<template> |
| 15 | + <Card :class="['gx-tile border-galaxy-primary/10 py-0 gap-0', { 'h-full': !standalone }]"> |
| 16 | + <CardHeader class="pt-4 pb-1"> |
| 17 | + <CardTitle class="m-0 text-galaxy-dark text-base leading-tight">{{ project.project }}</CardTitle> |
| 18 | + </CardHeader> |
| 19 | + <CardContent class="flex flex-1 flex-col gap-2.5 pt-1 pb-4"> |
| 20 | + <p v-if="project.description" class="text-sm text-galaxy-grey leading-relaxed">{{ project.description }}</p> |
| 21 | + <div v-if="project.lead" class="text-sm"> |
| 22 | + <span class="text-galaxy-grey">Lead: </span> |
| 23 | + <span class="font-semibold text-galaxy-primary">{{ project.lead }}</span> |
| 24 | + </div> |
| 25 | + <div v-if="project.assignees.length > 0 || !postEvent" class="team-section"> |
| 26 | + <span class="section-label">TEAM</span> |
| 27 | + <div v-if="project.assignees.length > 0" class="flex flex-wrap gap-1.5"> |
| 28 | + <Badge v-for="name in project.assignees" :key="name" variant="default" class="text-xs font-normal"> |
| 29 | + {{ name }} |
| 30 | + </Badge> |
| 31 | + </div> |
| 32 | + <p v-else class="text-xs text-galaxy-primary italic">✨ Open spot — come join this project!</p> |
| 33 | + </div> |
| 34 | + <div v-if="postEvent && hasOutcomes" class="outcomes-section"> |
| 35 | + <span class="section-label">HIGHLIGHTS</span> |
| 36 | + <slot /> |
| 37 | + </div> |
| 38 | + </CardContent> |
| 39 | + </Card> |
| 40 | +</template> |
| 41 | + |
| 42 | +<style scoped> |
| 43 | +.team-section { |
| 44 | + margin-top: auto; |
| 45 | + padding-top: 0.45rem; |
| 46 | + border-top: 1px solid color-mix(in srgb, var(--color-galaxy-primary, #25537b) 12%, transparent); |
| 47 | + display: flex; |
| 48 | + flex-direction: column; |
| 49 | + gap: 0.35rem; |
| 50 | +} |
| 51 | +
|
| 52 | +.section-label { |
| 53 | + font-size: 0.7rem; |
| 54 | + font-weight: 700; |
| 55 | + letter-spacing: 0.08em; |
| 56 | + color: var(--color-galaxy-grey, #6b7280); |
| 57 | +} |
| 58 | +
|
| 59 | +.outcomes-section { |
| 60 | + padding-top: 0.45rem; |
| 61 | + border-top: 1px solid color-mix(in srgb, var(--color-galaxy-primary, #25537b) 12%, transparent); |
| 62 | + display: flex; |
| 63 | + flex-direction: column; |
| 64 | + gap: 0.35rem; |
| 65 | + font-size: 0.875rem; |
| 66 | + line-height: 1.6; |
| 67 | +} |
| 68 | +</style> |
0 commit comments