Refine tag page behavior

This commit is contained in:
Sam Becker 2023-09-14 18:03:01 -05:00
parent b5b4499d27
commit 260a97a88e
5 changed files with 8 additions and 10 deletions

View File

@ -30,10 +30,7 @@ export default async function GridPage({
photos.length > 0
? <SiteGrid
contentMain={<div className="space-y-4">
<PhotoGrid
photos={photos}
staggerOnFirstLoadOnly
/>
<PhotoGrid photos={photos} />
{showMorePhotos &&
<MorePhotos path={`/grid?next=${offset + 1}`} />}
</div>}

View File

@ -88,7 +88,6 @@ export default async function PhotoPage({
contentMain={<PhotoGrid
photos={photosAfter.slice(1)}
animateOnFirstLoadOnly
staggerOnFirstLoadOnly
/>}
contentSide={<div className={cc(
'grid grid-cols-2',

View File

@ -13,7 +13,7 @@ export default function PhotoGrid({
offset = 0,
fast,
animateOnFirstLoadOnly,
staggerOnFirstLoadOnly,
staggerOnFirstLoadOnly = true,
showMore,
}: {
photos: Photo[]

View File

@ -11,10 +11,12 @@ export default function PhotoTag({
<Link
key={tag}
href={pathForTag(tag)}
className="flex items-center gap-x-1.5"
className="flex items-center gap-x-2"
>
<span className="uppercase">
{tag.replaceAll('-', ' ')}
</span>
<FaTag size={11} />
<span className="uppercase">{tag.replaceAll('-', ' ')}</span>
</Link>
);
}

View File

@ -5,7 +5,7 @@ export const pageTitleForTag = (tag: string) =>
`${capitalizeWords(tag.replaceAll('-', ' '))} Photos`;
export const ogTitleForTag = (tag: string) =>
`🏷️ ${tag.replaceAll('-', ' ').toUpperCase()}`;
`🏷️ ${capitalizeWords(tag.replaceAll('-', ' '))}`;
export const descriptionForTaggedPhotos = (photos:Photo[]) =>
`${photos.length} ${photos.length === 1 ? 'photo' : 'photos'}`;
`${photos.length} tagged ${photos.length === 1 ? 'photo' : 'photos'}`;