import { Link } from 'react-router-dom'; import { Article } from '../types'; import { motion } from 'motion/react'; import { Bookmark, Clock, User, ArrowRight } from 'lucide-react'; import { useBookmarks } from '../contexts/BookmarksContext'; import { cn } from '../lib/utils'; interface ArticleCardProps { article: Article; featured?: boolean; } export default function ArticleCard({ article, featured = false }: ArticleCardProps) { const { toggleBookmark, isBookmarked } = useBookmarks(); const bookmarked = isBookmarked(article.id); const sysId = `NODE_IDX_0${article.id.slice(0, 1)}`; if (featured) { return ( {article.category} {sysId} {article.title} {" >> "} {article.excerpt} {article.author.name} ARCHITECT_INFRA_v4 {article.readTime} ); } return ( toggleBookmark(article.id)} className={cn( "absolute bottom-4 right-4 h-10 w-10 border border-white/10 backdrop-blur-md flex items-center justify-center transition-all opacity-0 group-hover:opacity-100", bookmarked ? "bg-brand border-brand text-black opacity-100" : "bg-black/60 text-brand hover:bg-brand hover:text-black" )} > {article.category} {sysId} {article.title} {article.excerpt} {article.author.name} {article.readTime} ); }
{" >> "} {article.excerpt}
{article.author.name}
ARCHITECT_INFRA_v4
{article.excerpt}