|
|
|
@ -66,13 +66,20 @@ const SecondaryPageLayout = forwardRef( |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
{title && ( |
|
|
|
{title && ( |
|
|
|
<SecondaryPageTitlebar |
|
|
|
<> |
|
|
|
title={title} |
|
|
|
<div className="flex justify-center py-1 border-b"> |
|
|
|
controls={controls} |
|
|
|
<span className="text-green-600 dark:text-green-500 font-semibold text-sm"> |
|
|
|
hideBackButton={hideBackButton} |
|
|
|
Imwald |
|
|
|
hideBottomBorder={hideTitlebarBottomBorder} |
|
|
|
</span> |
|
|
|
titlebar={titlebar} |
|
|
|
</div> |
|
|
|
/> |
|
|
|
<SecondaryPageTitlebar |
|
|
|
|
|
|
|
title={title} |
|
|
|
|
|
|
|
controls={controls} |
|
|
|
|
|
|
|
hideBackButton={hideBackButton} |
|
|
|
|
|
|
|
hideBottomBorder={hideTitlebarBottomBorder} |
|
|
|
|
|
|
|
titlebar={titlebar} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</> |
|
|
|
)} |
|
|
|
)} |
|
|
|
{children} |
|
|
|
{children} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -85,13 +92,20 @@ const SecondaryPageLayout = forwardRef( |
|
|
|
<DeepBrowsingProvider active={currentIndex === index} scrollAreaRef={scrollAreaRef}> |
|
|
|
<DeepBrowsingProvider active={currentIndex === index} scrollAreaRef={scrollAreaRef}> |
|
|
|
<div className="h-full flex flex-col"> |
|
|
|
<div className="h-full flex flex-col"> |
|
|
|
{title && ( |
|
|
|
{title && ( |
|
|
|
<SecondaryPageTitlebar |
|
|
|
<> |
|
|
|
title={title} |
|
|
|
<div className="flex justify-center py-1 border-b"> |
|
|
|
controls={controls} |
|
|
|
<span className="text-green-600 dark:text-green-500 font-semibold text-sm"> |
|
|
|
hideBackButton={hideBackButton} |
|
|
|
Imwald |
|
|
|
hideBottomBorder={hideTitlebarBottomBorder} |
|
|
|
</span> |
|
|
|
titlebar={titlebar} |
|
|
|
</div> |
|
|
|
/> |
|
|
|
<SecondaryPageTitlebar |
|
|
|
|
|
|
|
title={title} |
|
|
|
|
|
|
|
controls={controls} |
|
|
|
|
|
|
|
hideBackButton={hideBackButton} |
|
|
|
|
|
|
|
hideBottomBorder={hideTitlebarBottomBorder} |
|
|
|
|
|
|
|
titlebar={titlebar} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</> |
|
|
|
)} |
|
|
|
)} |
|
|
|
<div className="flex-1" ref={scrollAreaRef}> |
|
|
|
<div className="flex-1" ref={scrollAreaRef}> |
|
|
|
{children} |
|
|
|
{children} |
|
|
|
@ -119,8 +133,6 @@ export function SecondaryPageTitlebar({ |
|
|
|
hideBottomBorder?: boolean |
|
|
|
hideBottomBorder?: boolean |
|
|
|
titlebar?: React.ReactNode |
|
|
|
titlebar?: React.ReactNode |
|
|
|
}): JSX.Element { |
|
|
|
}): JSX.Element { |
|
|
|
const { isSmallScreen } = useScreenSize() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (titlebar) { |
|
|
|
if (titlebar) { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Titlebar className="p-1" hideBottomBorder={hideBottomBorder}> |
|
|
|
<Titlebar className="p-1" hideBottomBorder={hideBottomBorder}> |
|
|
|
@ -136,29 +148,12 @@ export function SecondaryPageTitlebar({ |
|
|
|
{hideBackButton ? ( |
|
|
|
{hideBackButton ? ( |
|
|
|
<div className="flex gap-2 items-center pl-3 w-fit truncate text-lg font-semibold"> |
|
|
|
<div className="flex gap-2 items-center pl-3 w-fit truncate text-lg font-semibold"> |
|
|
|
{title} |
|
|
|
{title} |
|
|
|
<span className="text-green-600 dark:text-green-500 font-semibold text-sm ml-2"> |
|
|
|
|
|
|
|
Im Wald 🌲 |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
) : ( |
|
|
|
) : ( |
|
|
|
<div className="flex items-center flex-1 w-0"> |
|
|
|
<div className="flex items-center flex-1 w-0"> |
|
|
|
<BackButton>{title}</BackButton> |
|
|
|
<BackButton>{title}</BackButton> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
)} |
|
|
|
)} |
|
|
|
{isSmallScreen && ( |
|
|
|
|
|
|
|
<div className="absolute left-1/2 transform -translate-x-1/2 z-10"> |
|
|
|
|
|
|
|
<span className="text-green-600 dark:text-green-500 font-semibold text-sm"> |
|
|
|
|
|
|
|
Im Wald 🌲 |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
{!isSmallScreen && !hideBackButton && ( |
|
|
|
|
|
|
|
<div className="absolute left-1/2 transform -translate-x-1/2 z-10 pointer-events-none"> |
|
|
|
|
|
|
|
<span className="text-green-600 dark:text-green-500 font-semibold text-sm"> |
|
|
|
|
|
|
|
Im Wald 🌲 |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
<div className="flex-shrink-0">{controls}</div> |
|
|
|
<div className="flex-shrink-0">{controls}</div> |
|
|
|
</Titlebar> |
|
|
|
</Titlebar> |
|
|
|
) |
|
|
|
) |
|
|
|
|