V2.1 (#21)
Working version Reviewed-on: #21
This commit was merged in pull request #21.
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
import { ArrowUpRight, BookOpen, Globe2, Shield, Sparkles, Swords } from 'lucide-react';
|
||||
import { ArrowUpRight, BookOpen, Shield, Sparkles, Swords } from 'lucide-react';
|
||||
import { rarity, stats, type Article } from '../shared/protocol.ts';
|
||||
import type { TestnetBlock } from '../shared/testnet.ts';
|
||||
import { STARTER_ARTICLES } from '../shared/catalog.ts';
|
||||
@@ -25,7 +25,7 @@ export function Card({ card, onClick }: { card: CardData; onClick?: () => void }
|
||||
return <><button className={`wiki-card ${tier.toLowerCase()}`} onClick={onClick} tabIndex={onClick ? 0 : -1} aria-label={`View ${article.title} ${tier} card`}>
|
||||
<div className="card-top"><span><Sparkles size={11} /> {tier}</span><span>W / {String(article.pageId).slice(-4)}</span></div>
|
||||
<div className={`card-art art-${article.category.toLowerCase()}`}>
|
||||
{article.image ? <img src={article.image} alt={article.title} loading="lazy" referrerPolicy="no-referrer" onError={e => { e.currentTarget.style.display = 'none'; }} /> : <Globe2 size={64} />}
|
||||
{article.image ? <img src={article.image} alt={article.title} loading="lazy" referrerPolicy="no-referrer" onError={e => { e.currentTarget.style.display = 'none'; }} /> : <img className="card-placeholder-logo" src="/original-logo.svg" alt="Wikideck" />}
|
||||
<span className="card-category">{article.category}</span>
|
||||
</div>
|
||||
<div className="card-content"><div className="card-title"><h3>{article.title}</h3><ArrowUpRight size={16} /></div><p>{article.extract}</p>
|
||||
|
||||
Reference in New Issue
Block a user