Spaces:
Build error
Build error
Upload components/SlideDeckCard.js with huggingface_hub
Browse files- components/SlideDeckCard.js +62 -0
components/SlideDeckCard.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { ChevronRight, Presentation } from 'lucide-react';
|
| 2 |
+
|
| 3 |
+
export default function SlideDeckCard({ deck }) {
|
| 4 |
+
return (
|
| 5 |
+
<div className="brutal-card group cursor-pointer">
|
| 6 |
+
{/* Slide preview */}
|
| 7 |
+
<div className="relative aspect-[16/9] bg-brutal-black mb-4 overflow-hidden">
|
| 8 |
+
<img
|
| 9 |
+
src={deck.preview}
|
| 10 |
+
alt={deck.title}
|
| 11 |
+
className="w-full h-full object-cover opacity-60 group-hover:opacity-100 transition-opacity"
|
| 12 |
+
/>
|
| 13 |
+
<div className="absolute inset-0 flex items-center justify-center">
|
| 14 |
+
<Presentation size={48} className="text-brutal-white opacity-60" />
|
| 15 |
+
</div>
|
| 16 |
+
{/* Slide count badge */}
|
| 17 |
+
<div className="absolute bottom-2 right-2 bg-brutal-white px-2 py-1 font-mono text-xs border-2 border-brutal-black">
|
| 18 |
+
{deck.slideCount} slides
|
| 19 |
+
</div>
|
| 20 |
+
</div>
|
| 21 |
+
|
| 22 |
+
{/* Content */}
|
| 23 |
+
<div className="space-y-3">
|
| 24 |
+
<div className="flex items-center gap-2">
|
| 25 |
+
<span className="font-mono text-xs bg-brutal-black text-brutal-white px-2 py-1">
|
| 26 |
+
{deck.topic}
|
| 27 |
+
</span>
|
| 28 |
+
{deck.isNew && (
|
| 29 |
+
<span className="font-mono text-xs bg-brutal-accent text-brutal-white px-2 py-1">
|
| 30 |
+
NEW
|
| 31 |
+
</span>
|
| 32 |
+
)}
|
| 33 |
+
</div>
|
| 34 |
+
|
| 35 |
+
<h3 className="font-bold text-lg group-hover:text-brutal-accent transition-colors">
|
| 36 |
+
{deck.title}
|
| 37 |
+
</h3>
|
| 38 |
+
|
| 39 |
+
<p className="text-sm text-brutal-gray line-clamp-2">
|
| 40 |
+
{deck.description}
|
| 41 |
+
</p>
|
| 42 |
+
|
| 43 |
+
<div className="flex items-center justify-between pt-2">
|
| 44 |
+
<div className="flex -space-x-2">
|
| 45 |
+
{deck.authors.map((author, i) => (
|
| 46 |
+
<img
|
| 47 |
+
key={i}
|
| 48 |
+
src={author.avatar}
|
| 49 |
+
alt={author.name}
|
| 50 |
+
className="w-8 h-8 border-2 border-brutal-white"
|
| 51 |
+
/>
|
| 52 |
+
))}
|
| 53 |
+
</div>
|
| 54 |
+
<button className="font-mono text-sm flex items-center gap-1 group-hover:gap-2 transition-all">
|
| 55 |
+
View Deck
|
| 56 |
+
<ChevronRight size={16} />
|
| 57 |
+
</button>
|
| 58 |
+
</div>
|
| 59 |
+
</div>
|
| 60 |
+
</div>
|
| 61 |
+
);
|
| 62 |
+
}
|