Refine /grid sidebar layout
This commit is contained in:
parent
cf09a06eeb
commit
75fd60bd2e
@ -42,7 +42,7 @@ export default async function GridPage({ searchParams }: PaginationParams) {
|
||||
photos.length > 0
|
||||
? <SiteGrid
|
||||
contentMain={<PhotoGrid {...{ photos, showMorePath }} />}
|
||||
contentSide={<div className="sticky top-4 space-y-4">
|
||||
contentSide={<div className="sticky space-y-4 mt-[-4px]">
|
||||
<PhotoGridSidebar {...{
|
||||
tags,
|
||||
cameras,
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
import { getPhotosCached } from '@/photo/cache';
|
||||
import InfoBlock from '@/components/InfoBlock';
|
||||
import RedirectOnDesktop from '@/components/RedirectOnDesktop';
|
||||
import SiteGrid from '@/components/SiteGrid';
|
||||
import { generateOgImageMetaForPhotos } from '@/photo';
|
||||
import PhotoGridSidebar from '@/photo/PhotoGridSidebar';
|
||||
import { getPhotoSidebarDataCached } from '@/photo/data';
|
||||
import { MAX_PHOTOS_TO_SHOW_OG } from '@/image-response';
|
||||
import { PATH_GRID } from '@/site/paths';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export const runtime = 'edge';
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const photos = await getPhotosCached({ limit: MAX_PHOTOS_TO_SHOW_OG });
|
||||
return generateOgImageMetaForPhotos(photos);
|
||||
}
|
||||
|
||||
export default async function SetsPage() {
|
||||
const [
|
||||
photosCount,
|
||||
tags,
|
||||
cameras,
|
||||
simulations,
|
||||
] = await Promise.all(getPhotoSidebarDataCached());
|
||||
|
||||
return (
|
||||
<SiteGrid
|
||||
contentMain={<InfoBlock
|
||||
padding="tight"
|
||||
centered={false}
|
||||
>
|
||||
<RedirectOnDesktop redirectPath={PATH_GRID} />
|
||||
<div className="text-base space-y-4 p-2">
|
||||
<PhotoGridSidebar {...{
|
||||
tags,
|
||||
cameras,
|
||||
simulations,
|
||||
photosCount,
|
||||
}} />
|
||||
</div>
|
||||
</InfoBlock>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -15,7 +15,10 @@ export default function HeaderList({
|
||||
}) {
|
||||
return (
|
||||
<AnimateItems
|
||||
className={className}
|
||||
className={clsx(
|
||||
className,
|
||||
'space-y-0.5',
|
||||
)}
|
||||
scaleOffset={0.95}
|
||||
duration={0.5}
|
||||
staggerDelay={0.05}
|
||||
@ -25,7 +28,7 @@ export default function HeaderList({
|
||||
className={clsx(
|
||||
'text-gray-900',
|
||||
'dark:text-gray-100',
|
||||
'flex items-center mb-0.5 gap-1',
|
||||
'flex items-center mb-1 gap-1',
|
||||
'uppercase',
|
||||
)}
|
||||
>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user