Skip to content

Commit 382978d

Browse files
committed
style: shrink the album cards
Fit one more column from the sm breakpoint up and tighten the caption under the cover, so more of the library is visible at a glance without the tiles feeling cramped. The skeleton follows the same measurements to keep the grid from resizing as it loads.
1 parent 8629995 commit 382978d

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

frontend/src/components/Albums/AlbumCard.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ export const AlbumCard: React.FC<AlbumCardProps> = ({
8989
</div>
9090
</div>
9191
{/* Album Info */}
92-
<div className="space-y-1 p-4">
93-
<h3 className="truncate text-base font-semibold">{album.name}</h3>
92+
<div className="space-y-0.5 p-3">
93+
<h3 className="truncate text-sm font-semibold">{album.name}</h3>
9494
{album.description && (
95-
<p className="text-muted-foreground line-clamp-2 text-sm">
95+
<p className="text-muted-foreground line-clamp-1 text-xs">
9696
{album.description}
9797
</p>
9898
)}
9999

100-
<p className="text-muted-foreground text-sm">
100+
<p className="text-muted-foreground text-xs">
101101
{album.image_count} {album.image_count === 1 ? 'photo' : 'photos'}
102102
</p>
103103
</div>

frontend/src/pages/Album/Album.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const ALBUM_SORT_OPTIONS: SortOption<AlbumSortValue>[] = [
3333
const AlbumCardSkeleton: React.FC = () => (
3434
<div className="animate-pulse" data-testid="album-card-skeleton">
3535
<div className="bg-muted aspect-4/5 w-full rounded-xl" />
36-
<div className="space-y-2 p-4">
37-
<div className="bg-muted h-4 w-2/3 rounded" />
36+
<div className="space-y-1.5 p-3">
37+
<div className="bg-muted h-3.5 w-2/3 rounded" />
3838
<div className="bg-muted h-3 w-1/3 rounded" />
3939
</div>
4040
</div>
@@ -190,15 +190,15 @@ function Albums() {
190190
</div>
191191
<div className="flex-1 overflow-y-auto">
192192
{isLoading ? (
193-
<div className="grid grid-cols-2 gap-4 pb-6 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5">
193+
<div className="grid grid-cols-2 gap-4 pb-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6">
194194
{Array.from({ length: 10 }).map((_, index) => (
195195
<AlbumCardSkeleton key={index} />
196196
))}
197197
</div>
198198
) : albums.length === 0 ? (
199199
<EmptyAlbumsState />
200200
) : (
201-
<div className="grid grid-cols-2 gap-4 pb-6 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5">
201+
<div className="grid grid-cols-2 gap-4 pb-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6">
202202
{sortedAlbums.map((album) => (
203203
<AlbumCard
204204
key={album.id}

0 commit comments

Comments
 (0)