Add support for sidebar-only layout

This commit is contained in:
Zeno Kapitein
2024-10-22 14:16:08 +02:00
parent a41fb53445
commit c008cc7cc2
2 changed files with 3 additions and 7 deletions
@@ -50,16 +50,12 @@ export function CompactHeader(props: {
'grow-0',
'md:grow',
'sm:max-w-xs',
'lg:my-4',
'lg:mt-2',
'lg:mb-8',
'lg:max-w-full',
'justify-self-end',
)}
>
{isMultiVariants ? (
<div className={tcls('mb-2')}>
<SpacesDropdown space={space} spaces={spaces} />
</div>
) : null}
<React.Suspense fallback={null}>
<SearchButton>
<span className={tcls('flex-1')}>
@@ -106,7 +106,7 @@ export function SpaceLayout(props: {
)
}
innerHeader={
sections ? <SpacesDropdown space={space} spaces={spaces} /> : null
sections || (!withTopHeader && site && spaces.length > 1) ? <SpacesDropdown space={space} spaces={spaces} /> : null
}
headerOffset={headerOffset}
/>