Refine /sets layout
This commit is contained in:
parent
ba3f1235c0
commit
ac20ec74db
@ -4,12 +4,12 @@ import {
|
||||
getUniqueFilmSimulationsCached,
|
||||
getUniqueTagsCached,
|
||||
} from '@/cache';
|
||||
import InfoBlock from '@/components/InfoBlock';
|
||||
import RedirectOnDesktop from '@/components/RedirectOnDesktop';
|
||||
import SiteGrid from '@/components/SiteGrid';
|
||||
import PhotoGridSidebar from '@/photo/PhotoGridSidebar';
|
||||
import { SHOW_FILM_SIMULATIONS } from '@/site/config';
|
||||
import { PATH_GRID } from '@/site/paths';
|
||||
import { cc } from '@/utility/css';
|
||||
|
||||
export default async function SetsPage() {
|
||||
const [
|
||||
@ -26,17 +26,20 @@ export default async function SetsPage() {
|
||||
|
||||
return (
|
||||
<SiteGrid
|
||||
contentMain={<div className={cc(
|
||||
'top-4 space-y-4 text-base',
|
||||
)}>
|
||||
contentMain={<InfoBlock
|
||||
padding="tight"
|
||||
centered={false}
|
||||
>
|
||||
<RedirectOnDesktop redirectPath={PATH_GRID} />
|
||||
<PhotoGridSidebar {...{
|
||||
tags,
|
||||
cameras,
|
||||
simulations,
|
||||
photosCount,
|
||||
}} />
|
||||
</div>}
|
||||
<div className="text-base space-y-4 p-2">
|
||||
<PhotoGridSidebar {...{
|
||||
tags,
|
||||
cameras,
|
||||
simulations,
|
||||
photosCount,
|
||||
}} />
|
||||
</div>
|
||||
</InfoBlock>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@ -5,10 +5,12 @@ export default function InfoBlock({
|
||||
children,
|
||||
className,
|
||||
padding = 'normal',
|
||||
centered = true,
|
||||
}: {
|
||||
children: ReactNode
|
||||
className?: string
|
||||
padding?: 'loose' | 'normal' | 'tight';
|
||||
centered?: boolean;
|
||||
} ) {
|
||||
const getPaddingClasses = () => {
|
||||
switch (padding) {
|
||||
@ -28,7 +30,8 @@ export default function InfoBlock({
|
||||
className,
|
||||
)}>
|
||||
<div className={cc(
|
||||
'flex flex-col items-center justify-center w-full',
|
||||
'flex flex-col justify-center w-full',
|
||||
centered && 'items-center',
|
||||
'space-y-4',
|
||||
'text-medium',
|
||||
)}>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user