--- /** * CategoryList.astro * --------------------------------------------------------------------------- * Renders a media kind's full library grouped by category: for each group a * small subheader (the category name + item count), then a wrapping row of * pills (title + optional status). Reuses the existing `.pill` + `` * pattern already established on the old reading page. * * Pass the output of `getGrouped(kind)` directly. When the list is empty the * caller should fall back to `` (see the pages); this component * assumes at least one group. */ import Icon from '@components/Icon.astro'; import type { MediaGroup } from '@lib/media'; interface Props { groups: MediaGroup[]; /** mdi icon shown before each pill. */ pillIcon?: string; } const { groups, pillIcon = 'play-circle' } = Astro.props; ---
{ groups.map((group) => (

{group.category}

{group.items.length}
    {group.items.map((item) => (
  • {item.title} {item.status && ( {item.status} )} {item.year && ( {item.year} )}
  • ))}
)) }