Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / apps/web/components/github/github-project-card.tsx |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | apps/web/components/github/github-project-card.tsx |
| Original SHA-256 | 0004e1ae1f12cf65f8feb0d80d3e6911cfa4dda181b0df39ed01e3e9e82ea4cf |
| Git blob SHA | 6be40cfb1cb43c7053da71c7f43969ad71ee90ca |
| Reading-copy SHA-256 | 0004e1ae1f12cf65f8feb0d80d3e6911cfa4dda181b0df39ed01e3e9e82ea4cf |
Recovered source transcript
Download complete source text ↓61 lines · 2.2 KB
import { ExternalLink, Github, Star } from 'lucide-react'
import Link from 'next/link'
import { Card, CardContent } from '@/components/ui/card'
import type { GitHubProject } from '@/lib/github'
import { formatRelativeDate } from '@/lib/utils'
interface GitHubProjectCardProps {
project: GitHubProject
index?: number
}
/**
* Card component for displaying a GitHub project
*
* @param props - Component props
* @param props.project - The GitHub project to display
* @param props.index - Optional index for staggered animations
* @returns React component
*/
export function GitHubProjectCard({ project, index = 0 }: GitHubProjectCardProps) {
return (
<Card
className="transition-all hover:border-primary hover:bg-muted/50 relative overflow-hidden animate-fade-in-up group"
style={{ animationDelay: `${(index + 1) * 50}ms` }}
>
<CardContent className="p-4 sm:p-5">
<div className="flex flex-col gap-3">
<div className="flex items-center justify-between">
<div className="flex items-center gap-1.5">
<Github className="size-4 text-muted-foreground" />
<time className="text-xs text-muted-foreground" dateTime={project.lastUpdated}>
{formatRelativeDate(project.lastUpdated)}
</time>
</div>
<div className="flex items-center gap-1 text-sm">
<Star className="size-3.5 fill-yellow-500 text-yellow-500" />
<span className="tabular-nums font-medium">{project.stars.toLocaleString()}</span>
</div>
</div>
<h3 className="font-semibold text-sm sm:text-base line-clamp-1">
<Link
href={project.url}
className="hover:text-primary transition-colors block after:absolute after:inset-0 after:content-[''] z-10"
target="_blank"
rel="noopener noreferrer"
>
{project.fullName}
<ExternalLink className="inline-block ml-1.5 size-3.5 opacity-50" />
</Link>
</h3>
<p className="text-xs sm:text-sm text-muted-foreground line-clamp-2">
{project.description || 'No description available'}
</p>
</div>
</CardContent>
</Card>
)
}