Skip to content

Commit f9c2c5d

Browse files
committed
vertical image text cards
1 parent 1ea01fc commit f9c2c5d

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

src/components/AlbumCoversTextGrid.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ export const AlbumCoversTextGrid = ({
1313
onAlbumClick,
1414
activeAlbum,
1515
}: AlbumCoversTextGridProps) => (
16-
<div className="grid gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-5">
16+
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 2xl:grid-cols-9">
1717
{releases.map(({ basic_information: { id, title, artists, year, formats, thumb } }, index) => (
1818
<button
1919
className={cn(
20-
`hover:bg-foreground/8 group flex cursor-pointer gap-4 overflow-hidden rounded-sm border
21-
p-3 text-start outline-2 outline-offset-2 outline-transparent transition-colors`,
20+
`hover:bg-foreground/10 group focus-visible:bg-foreground/10 cursor-pointer
21+
overflow-hidden rounded-sm p-3 text-start outline-1 outline-transparent transition-colors`,
2222
id === activeAlbum && 'outline-ring'
2323
)}
2424
key={`${title}-${index}`}
2525
onClick={() => onAlbumClick(id)}
2626
>
27-
<div className="size-24 shrink-0 overflow-hidden rounded-xs">
27+
<div className="mb-3 aspect-square overflow-hidden rounded-sm">
2828
{thumb ? (
2929
<img src={thumb} alt={title} className="size-full object-cover" />
3030
) : (
@@ -34,15 +34,18 @@ export const AlbumCoversTextGrid = ({
3434
)}
3535
</div>
3636
<div className="grow">
37-
<h2 className="max-w-40 truncate font-bold md:max-w-24 xl:max-w-36">
37+
<h2 className="max-w-40 truncate md:max-w-24 xl:max-w-36">
3838
<span className="underline-offset-4 group-hover:underline">{title}</span>
3939
</h2>
40-
<p className="mb-2 max-w-40 truncate md:max-w-24 xl:max-w-36">
40+
<p className="mb-2 max-w-40 truncate opacity-70 md:max-w-24 xl:max-w-36">
4141
{artists.map((artist) => artist.name).join(', ')}
4242
</p>
43-
<p className="text-sm">{year}</p>
4443
<p className="max-w-40 truncate text-sm opacity-50 md:max-w-24 xl:max-w-36">
45-
{formats.map((format) => format.name).join(', ')}
44+
{year}{' '}
45+
{formats
46+
.filter((format) => format.name !== 'All Media')
47+
.map((format) => format.name)
48+
.join(', ')}
4649
</p>
4750
</div>
4851
</button>

0 commit comments

Comments
 (0)