diff --git a/frontend/src/App.css b/frontend/src/App.css index f21728f..69d9525 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -1781,27 +1781,62 @@ a.app-footer__repo:hover { margin-bottom: 0.5rem; } -.technique-related__list { - list-style: none; - display: flex; - flex-direction: column; - gap: 0.375rem; +.technique-related__grid { + display: grid; + grid-template-columns: 1fr; + gap: 0.75rem; } -.technique-related__list a { +@media (min-width: 600px) { + .technique-related__grid { + grid-template-columns: 1fr 1fr; + } +} + +.related-card { + background: var(--color-surface-card); + border: 1px solid var(--color-border); + border-radius: 0.5rem; + padding: 0.875rem 1rem; + display: flex; + flex-direction: column; + gap: 0.25rem; +} + +.related-card__title { color: var(--color-link-accent); text-decoration: none; + font-weight: 600; font-size: 0.9375rem; } -.technique-related__list a:hover { +.related-card__title:hover { text-decoration: underline; } -.technique-related__rel { - font-size: 0.75rem; +.related-card__creator { + font-size: 0.8125rem; color: var(--color-text-muted); - margin-left: 0.375rem; +} + +.related-card__badge { + display: inline-block; + align-self: flex-start; + font-size: 0.6875rem; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.03em; + padding: 0.125rem 0.5rem; + border-radius: 999px; + background: var(--color-badge-bg, rgba(255, 255, 255, 0.08)); + color: var(--color-badge-text, var(--color-text-muted)); +} + +.related-card__reason { + font-size: 0.75rem; + font-style: italic; + color: var(--color-text-muted); + margin: 0; } /* ══════════════════════════════════════════════════════════════════════════════ diff --git a/frontend/src/api/public-client.ts b/frontend/src/api/public-client.ts index 0094fcd..18d2980 100644 --- a/frontend/src/api/public-client.ts +++ b/frontend/src/api/public-client.ts @@ -49,6 +49,9 @@ export interface RelatedLinkItem { target_title: string; target_slug: string; relationship: string; + creator_name: string; + topic_category: string; + reason: string; } export interface TechniquePageDetail { diff --git a/frontend/src/pages/TechniquePage.tsx b/frontend/src/pages/TechniquePage.tsx index 842fe40..c670987 100644 --- a/frontend/src/pages/TechniquePage.tsx +++ b/frontend/src/pages/TechniquePage.tsx @@ -495,18 +495,24 @@ export default function TechniquePage() { {technique.related_links.length > 0 && (

Related Techniques

- +
)}