style: related techniques cards use same recent-card styling as homepage Recently Added
This commit is contained in:
parent
71183639ea
commit
1d210faf68
2 changed files with 20 additions and 16 deletions
|
|
@ -2395,7 +2395,7 @@ a.app-footer__repo:hover {
|
||||||
.technique-related__grid {
|
.technique-related__grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
gap: 0.75rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
|
|
|
||||||
|
|
@ -566,26 +566,30 @@ export default function TechniquePage() {
|
||||||
</section>
|
</section>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Related techniques */}
|
{/* Related techniques — styled as cards matching homepage Recently Added */}
|
||||||
{technique.related_links.length > 0 && (
|
{technique.related_links.length > 0 && (
|
||||||
<section className="technique-related">
|
<section className="technique-related">
|
||||||
<h2>Related Techniques</h2>
|
<h2>Related Techniques</h2>
|
||||||
<div className="technique-related__grid">
|
<div className="technique-related__grid">
|
||||||
{technique.related_links.map((link) => (
|
{technique.related_links.map((link) => (
|
||||||
<div key={link.target_slug} className="related-card">
|
<Link key={link.target_slug} to={`/techniques/${link.target_slug}`} className="recent-card">
|
||||||
<Link to={`/techniques/${link.target_slug}`} className="related-card__title">
|
<span className="recent-card__title">{link.target_title}</span>
|
||||||
{link.target_title}
|
<span className="recent-card__meta">
|
||||||
</Link>
|
|
||||||
{link.creator_name && (
|
|
||||||
<span className="related-card__creator">{link.creator_name}</span>
|
|
||||||
)}
|
|
||||||
{link.topic_category && (
|
{link.topic_category && (
|
||||||
<span className="related-card__badge">{link.topic_category}</span>
|
<span className="badge badge--category">
|
||||||
|
{link.topic_category}
|
||||||
|
</span>
|
||||||
)}
|
)}
|
||||||
{link.reason && (
|
{link.reason && (
|
||||||
<p className="related-card__reason">{link.reason}</p>
|
<span className="recent-card__summary">{link.reason}</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</span>
|
||||||
|
<span className="recent-card__footer">
|
||||||
|
<span className="recent-card__creator">
|
||||||
|
{link.creator_name || ''}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</Link>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue